williamalmeida/mary-v1-community
Composer 安装命令:
composer require williamalmeida/mary-v1-community
包简介
Mary UI Community Edition - UI components for Livewire, daisyUI and Tailwind (forked and maintained by William Almeida)
关键字:
README 文档
README
mary-v1-community
This repository is an independent, community-maintained continuation of the original MaryUI v1 project. It preserves and extends the classic v1 branch after official support was discontinued, ensuring ongoing updates, bug fixes, and compatibility for users who rely on the v1 codebase.
mary-v1-community provides a set of beautiful UI components for Livewire, powered by daisyUI and Tailwind CSS, based on the original MaryUI v1 foundation.
Documentation
Refer to the maryUI website for the original documentation. Community updates and new documentation will be provided here as the project evolves.
Contributing
Contributions are welcome! If you want to help maintain or improve mary-v1-community, please open issues or pull requests.
To use this package locally during development, clone this repository and set up a local path repository in your app's composer.json:
"repositories": { "mary-v1-community": { "type": "path", "url": "/path/to/mary-v1-community", "options": { "symlink": true } } }
Then require the package:
composer require williamalmeida/mary-v1-community
Start the dev server:
yarn dev
Importing JS helpers from vendor (no CDN required)
The original maryUI docs suggest loading some helpers (e.g. currency.js) via CDN from a <script> tag in your layout. In mary-v1-community you can also import the bundled helpers directly from the package inside your resources/js/app.js, so they get processed by Vite and bundled with your app — no extra CDN request needed.
The available helpers live under vendor/williamalmeida/mary-v1-community/libs/:
color-palette.js— registers the$store.maryColorPaletteAlpine store used by the<x-color-palette>component.dialog.js— registers the global Livewiredialoglistener used by theDialogtrait.toast.js— registers the global Livewiretoastlistener used by theToasttrait.currency.js— provides the globalwindow.Currencyclass used by the<x-input money>component.
Example: resources/js/app.js
import './bootstrap'; import Alpine from 'alpinejs'; import { Livewire } from '../../vendor/livewire/livewire/dist/livewire.esm'; // mary-v1-community helpers (bundled, no CDN) import { registerColorPalette } from '../../vendor/williamalmeida/mary-v1-community/libs/color-palette'; import { registerDialog } from '../../vendor/williamalmeida/mary-v1-community/libs/dialog'; import { registerToast } from '../../vendor/williamalmeida/mary-v1-community/libs/toast'; import '../../vendor/williamalmeida/mary-v1-community/libs/currency'; // exposes window.Currency // Register the Alpine store BEFORE Alpine starts document.addEventListener('alpine:init', () => { registerColorPalette(Alpine); }); // Register Livewire listeners AFTER Livewire is available on window registerDialog(); registerToast(); window.Alpine = Alpine; Alpine.start(); Livewire.start();
Notes
registerDialog()andregisterToast()use the globalwindow.Livewire(Livewire 3), so call them after Livewire has been loaded.registerColorPalette(Alpine)must be called inside thealpine:initevent so the store is available before Alpine boots.currency.jsonly needs to be imported once — it auto-attacheswindow.Currency.
Tailwind: scan the package sources
Make sure your tailwind.config.js includes the package components so Tailwind picks up the classes used inside them:
module.exports = { content: [ // ... './vendor/williamalmeida/mary-v1-community/src/View/Components/**/*.php', ], // ... }
Tip: se você está desenvolvendo localmente usando um repositório path (link simbólico via composer), inclua também o caminho para a cópia local do pacote para que o Vite/Tailwind detectem as classes durante o desenvolvimento. Exemplo com ambas as opções:
module.exports = { content: [ // arquivos da sua app './resources/js/**/*.js', './resources/views/**/*.blade.php', // quando o pacote está instalado via Composer './vendor/williamalmeida/mary-v1-community/src/View/Components/**/*.php', // quando estiver usando o pacote localmente via `repositories.type = path` '../mary-v1-community/src/View/Components/**/*.php', ], }
Isso garante que o Tailwind processe as classes usadas por <x-color-palette> (e outros componentes do pacote) tanto em instalações via vendor quanto em desenvolvimento local.
Color Palette component
<x-color-palette> renders a Tailwind color palette picker (all 22 color families × shades 50–950) and stores the selected hex value in your model.
It depends on the maryColorPalette Alpine store registered by libs/color-palette.js (see the import section above).
{{-- Livewire model --}} <x-color-palette label="Background color" wire:model="background_color" clearable hint="Click the swatch to open the palette" /> {{-- Plain Alpine model --}} <div x-data="{ color: '' }"> <x-color-palette label="Pick a color" x-model="color" /> </div>
Available props: label, hint, hintClass, inline, clearable, plus the standard error props (errorField, errorClass, omitError, firstErrorOnly). Standard HTML attributes such as disabled, readonly, required and placeholder are also supported.
License
mary-v1-community is open-sourced software licensed under the MIT license.
williamalmeida/mary-v1-community 适用场景与选型建议
williamalmeida/mary-v1-community 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 10 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「ui」 「components」 「laravel」 「blade」 「tailwind」 「livewire」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 williamalmeida/mary-v1-community 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 williamalmeida/mary-v1-community 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 williamalmeida/mary-v1-community 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Web Font Loader gives you added control when using linked fonts via @font-face.
Ariadne Component Library: xml writer and parser Component
Ariadne Component Library: Cache Component
Ariadne Component Library: hierarchical configuration management Component
Ariadne Component Library: user and group rights management Component
Ariadne Component Library: W3C style events Component
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-22
