Skip to content

Commit 6066690

Browse files
committed
More 1.0 refactoring
1 parent 85c5d7f commit 6066690

23 files changed

+682
-477
lines changed

README.md

+20-75
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11

2-
<div class="mb-6 text-right">
3-
<a href="https://circleci.com/gh/glhd/aire" target="_blank" class="no-underline">
2+
<div class="mb-6 float-right inline-flex">
3+
<a href="https://circleci.com/gh/glhd/aire" target="_blank" class="mx-1">
44
<img
55
src="https://circleci.com/gh/glhd/aire.svg?style=svg"
66
alt="Build Status"
77
/>
88
</a>
9-
<a href="https://coveralls.io/github/glhd/aire?branch=master" target="_blank" class="no-underline">
9+
<a href="https://coveralls.io/github/glhd/aire?branch=master" target="_blank" class="mx-1">
1010
<img
1111
src="https://coveralls.io/repos/github/glhd/aire/badge.svg?branch=master"
1212
alt="Coverage Status"
1313
/>
1414
</a>
15-
<a href="https://packagist.org/packages/glhd/aire" target="_blank" class="no-underline">
15+
<a href="https://packagist.org/packages/glhd/aire" target="_blank" class="mx-1">
1616
<img
1717
src="https://poser.pugx.org/glhd/aire/v/stable"
1818
alt="Latest Stable Release"
1919
/>
2020
</a>
21-
<a href="./LICENSE" target="_blank" class="no-underline">
21+
<a href="./LICENSE" target="_blank" class="mx-1">
2222
<img
2323
src="https://poser.pugx.org/glhd/aire/license"
2424
alt="MIT Licensed"
@@ -162,75 +162,20 @@ an error at the top of the page if validation failed.
162162

163163
## Client-Side Validation
164164

165-
Javascript validation in Aire is currently **work in progress**. Eventually, Aire will
166-
support automatic client-side validation (just call `rules()` on a field). This will let
167-
you set the rules on a field-by-field basis, or for the whole form, and will let you
168-
pass in a `FormRequest` object to automatically inject rules.
169-
170-
## Misc. Notes
171-
172-
These notes are here mostly to inform development.
173-
174-
### Considerations/Inspiration
175-
176-
- Form controls should take sizing config
177-
- 'Read-only plain text' http://getbootstrap.com/docs/4.1/components/forms/#readonly-plain-text
178-
- 'Form groups' - Label/input/help text/validation text (config how many errors show)
179-
- Multi-column forms (Name: {first} {last})
180-
- Configurable support for custom checkboxes and radios?
181-
- Custom select support?
182-
- File inputs?
183-
- Should client-side validation be included?
184-
- https://github.com/netojose/laravel-bootstrap-4-forms
185-
- https://tailwindcss.com/docs/examples/forms/
186-
- https://github.com/glhd/forms
187-
- https://github.com/glhd/bootforms
188-
- Append/Prepend (input groups)
189-
190-
### Components
191-
192-
- Button
193-
- Checkbox
194-
- Date
195-
- DateTimeLocal
196-
- Email
197-
- File
198-
- FormControl
199-
- FormOpen
200-
- FormClose
201-
- Hidden
202-
- Input
203-
- Label
204-
- Password
205-
- RadioButton
206-
- Select
207-
- Text
208-
- TextArea
209-
210-
### Input Types
211-
212-
- button
213-
- checkbox
214-
- color
215-
- date
216-
- datetime
217-
- datetime-local
218-
- email
219-
- file
220-
- hidden
221-
- image
222-
- month
223-
- number
224-
- password
225-
- radio
226-
- range
227-
- reset
228-
- search
229-
- submit
230-
- tel
231-
- text
232-
- time
233-
- url
234-
- wee
165+
Javascript validation in Aire is in its early stages. Browser testing is limited, and the
166+
Javascript code hasn't had an performance optimizations applied. That said, Aire
167+
supports automatic client-side validation—simply pass an array of rules or a `FormRequest`
168+
object and Aire will automatically apply most rules on the client side (thanks
169+
to [validatorjs](https://github.com/skaterdav85/validatorjs)!).
170+
171+
## Under Consideration / Feature Ideas
235172

173+
There are a few things that are still either in-the-works or being considered for a
174+
later release. These include:
236175

176+
- Sizing option for form controls
177+
- [Read-only plain text](http://getbootstrap.com/docs/4.1/components/forms/#readonly-plain-text)
178+
- Cross-browser support for custom checkboxes and radio buttons via a config option
179+
- Support for Choices.js or similar `<select>` UI libraries
180+
- Better handling of file inputs
181+
- Better support for [prepending or appending content to inputs](https://getbootstrap.com/docs/4.0/components/input-group/#basic-example)

config/aire.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
'checkbox_group_label_wrapper' => 'flex-1 ml-2',
9595
'radio_group_label' => 'flex items-baseline mb-2 ml-2 border-transparent border-l',
9696
'radio_group_label_wrapper' => 'flex-1 ml-2',
97-
'summary' => 'border border-red bg-red-100 text-red font-bold rounded p-4 my-4',
97+
'summary' => 'border border-red-500 bg-red-100 text-red-500 font-bold rounded p-4 my-4',
9898
'button' => 'inline-block font-normal text-center whitespace-no-wrap align-middle select-none border
9999
rounded font-normal leading-normal text-white bg-blue-600 border-blue-700 hover:bg-blue-700
100100
hover:border-blue-900 p-2 px-4',

docs/aire.css

+14-13
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,17 @@ p {
631631
line-height: 1.5;
632632
}
633633

634+
a {
635+
color: #f4645f;
636+
text-decoration: none;
637+
}
638+
639+
a:hover, a:active {
640+
text-decoration: underline;
641+
}
642+
634643
:not(pre) > code {
635-
background-color: #e2e8f0;
644+
background-color: #edf2f7;
636645
color: #f4645f;
637646
display: inline-block;
638647
padding-left: 0.25rem;
@@ -648,22 +657,14 @@ p {
648657

649658
pre {
650659
background-color: #f7fafc;
651-
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
652-
border-radius: 0.125rem;
653-
padding: 0.5rem;
660+
border-width: 1px;
661+
border-color: #cbd5e0;
662+
border-radius: 0.25rem;
663+
padding: 1.5rem;
654664
margin-top: 2rem;
655665
margin-bottom: 2rem;
656666
}
657667

658-
ul, ol {
659-
margin-bottom: 1.5rem;
660-
font-size: 1rem;
661-
}
662-
663-
li {
664-
margin-bottom: 0.5rem;
665-
}
666-
667668
.container{
668669
width: 100%;
669670
}

0 commit comments

Comments
 (0)