{"id":22278026,"url":"https://github.com/enflow/laravel-address-ui","last_synced_at":"2025-07-18T02:36:12.211Z","repository":{"id":57111572,"uuid":"253771449","full_name":"enflow/laravel-address-ui","owner":"enflow","description":"The frontend UI kit for usage with enflow/laravel-location","archived":false,"fork":false,"pushed_at":"2020-09-26T08:27:17.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T22:39:17.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-07T11:20:07.000Z","updated_at":"2020-09-26T08:27:20.000Z","dependencies_parsed_at":"2022-08-21T11:00:23.181Z","dependency_job_id":null,"html_url":"https://github.com/enflow/laravel-address-ui","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Flaravel-address-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Flaravel-address-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Flaravel-address-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Flaravel-address-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enflow","download_url":"https://codeload.github.com/enflow/laravel-address-ui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245516793,"owners_count":20628227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T15:12:38.390Z","updated_at":"2025-03-25T18:20:47.050Z","avatar_url":"https://github.com/enflow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Address UI\n\n[![Software License](https://img.shields.io/badge/license-ISC-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Latest Version on NPM](https://img.shields.io/npm/v/enflow/laravel-address-ui.svg?style=flat-square)](https://npmjs.com/package/@enflow/laravel-address-ui)\n[![npm](https://img.shields.io/npm/dt/enflow/laravel-address-ui.svg?style=flat-square)](https://www.npmjs.com/package/@enflow/laravel-address-ui)\n\nThe frontend UI kit for usage with [enflow/laravel-address](https://github.com/enflow/laravel-address).\n\n## Usage\nYou can install the package with yarn or npm:\n\n```bash\nyarn add @enflow/laravel-address-ui\n// or\nnpm install @enflow/laravel-address-ui --save\n```\n\nYou may instance the `Address` component. For instance:\n\n```javascript\nvar Address = require('@enflow/laravel-address-ui');\n\nwindow.onload = () =\u003e {\n    document.querySelectorAll('[role=address]').forEach((field) =\u003e {\n        new Address(field);\n    });\n};\n```\n\nYou must include the CSS provides by this package in your build process as well. The easiest would be by using `postcss-import` and importing it in your core stylesheet. This can be modified based on your build process.\n\n```css\n@import \"@enflow/laravel-address-ui\";\n```\n\nThen, add the field to your template:\n\n#### .blade.php\n```blade\n\u003cdiv role=\"address\"\u003e\n    \u003cinput type=\"text\" role=\"address-label\" value=\"{{ old('address_label', optional($user-\u003eaddress)-\u003elabel) }}\" id=\"address_label\" name=\"address_label\" class=\"form-input\"\u003e\n    \u003cinput type=\"hidden\" role=\"address-value\" value=\"{{ old('address', $user-\u003eaddress ? json_encode($user-\u003eaddress-\u003evalue()) : null) }}\" id=\"address\" name=\"address\"\u003e\n\u003c/div\u003e\n```\n\n#### .twig\n```twig\n\u003cdiv class=\"mt-1 rounded-md shadow-sm\" role=\"address\"\u003e\n    \u003cinput type=\"text\" role=\"address-label\" value=\"{{ old('address_label', user.address ? user.address.label : null) }}\" id=\"address_label\" name=\"address_label\" class=\"form-input\"\u003e\n    \u003cinput type=\"hidden\" role=\"address-value\" value=\"{{ old('address', user.address ? user.address.value()|json_encode : null) }}\" id=\"address\" name=\"address\"\u003e\n\u003c/div\u003e\n```\n\n## Testing\n``` bash\n$ npm run start\n```\n\n## Contributing\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\nIf you discover any security related issues, please email michel@enflow.nl instead of using the issue tracker.\n\n## Credits\nThis package is forked from [mapbox/mapbox-gl-geocoder](https://github.com/mapbox/mapbox-gl-geocoder) and modified to work out of the box with `enflow/laravel-address`. They did an amazing job with the intital pacakge, and this work wouldn't be here without them. \n\n- [Michel Bardelmeijer](https://github.com/mbardelmeijer)\n- [Mapbox \u0026 Contributers](https://github.com/mapbox/mapbox-gl-geocoder)\n- [All Contributors](../../contributors)\n\n## About Enflow\nEnflow is a digital creative agency based in Alphen aan den Rijn, Netherlands. We specialize in developing web applications, mobile applications and websites. You can find more info [on our website](https://enflow.nl/en).\n\n## License\nThe ISC License (ISC). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenflow%2Flaravel-address-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenflow%2Flaravel-address-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenflow%2Flaravel-address-ui/lists"}