@wpmoo/ui 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,74 +1,201 @@
1
- # Moo UI
1
+ <p align="center">
2
+ <img src="https://ui.wpmoo.org/assets/images/readme-hero.webp" alt="Moo UI catalog preview" width="760">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://github.com/wpmoo-org/ui/actions/workflows/ui-ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/wpmoo-org/ui/ui-ci.yml?branch=main&label=CI"></a>
7
+ <a href="https://github.com/wpmoo-org/ui"><img alt="GitHub" src="https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white"></a>
8
+ <a href="https://www.npmjs.com/package/@wpmoo/ui"><img alt="npm" src="https://img.shields.io/npm/v/@wpmoo/ui?label=npm&logo=npm&color=cb3837"></a>
9
+ <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg"></a>
10
+ </p>
11
+
12
+ <p align="center">
13
+ <strong>Bootstrap markup. shadcn feel.</strong>
14
+ </p>
15
+
16
+ <p align="center">
17
+ Keep your Bootstrap 5.3 HTML and behavior. Replace the stylesheet and give
18
+ your application a calmer, modern product interface without moving to React or
19
+ Tailwind.
20
+ </p>
21
+
22
+ <p align="center">
23
+ <a href="https://ui.wpmoo.org/"><strong>Explore Moo UI »</strong></a>
24
+ </p>
25
+
26
+ <p align="center">
27
+ <a href="#try-it-in-30-seconds">Try it in 30 seconds</a> ·
28
+ <a href="https://www.npmjs.com/package/@wpmoo/ui">View on npm</a> ·
29
+ <a href="https://github.com/wpmoo-org/ui/issues">Report bug</a>
30
+ </p>
2
31
 
3
- **Bootstrap markup. shadcn feel.**
32
+ # Moo UI
4
33
 
5
- ![Moo UI catalog preview](static/images/readme-hero.webp)
34
+ Moo UI is for teams that already like Bootstrap's durability, documented
35
+ components, and server-rendered friendliness, but want their customer portals,
36
+ admin screens, and business applications to feel more like modern SaaS
37
+ software.
6
38
 
7
- Moo UI is a Bootstrap 5.3 component system for teams that want the calm,
8
- modern feel of shadcn/ui without leaving server-rendered HTML, Bootstrap
9
- classes, Bootstrap Sass, or Bootstrap JavaScript behind.
39
+ It keeps Bootstrap as the public contract: familiar classes, `data-bs-*`
40
+ behavior, CSS variables, Sass customization, and Bootstrap JavaScript plugins.
41
+ Moo UI changes the visual language around that contract.
10
42
 
11
- It keeps Bootstrap as the public contract, then shapes the catalog, component
12
- examples, and composed blocks into a quieter product interface language.
43
+ ## Try It in 30 Seconds
13
44
 
14
- ## Philosophy
45
+ Drop the stylesheet into ordinary Bootstrap markup:
15
46
 
16
- - **Bootstrap is the contract.** Moo UI keeps Bootstrap markup, documented
17
- behavior, `data-bs-*` APIs, Sass knobs, and `--bs-*` variables wherever
18
- Bootstrap can express the need.
19
- - **shadcn is the visual language.** Moo UI studies shadcn/ui for restraint,
20
- spacing, composition, and state language. It does not copy shadcn source,
21
- React code, Tailwind code, Radix code, or example prose.
22
- - **HTML stays first-class.** Component examples are generated from Jinja
23
- macros, so the preview and copyable source share one rendered output.
24
- - **No framework adoption tax.** The catalog can be browsed, built, and
25
- shipped as static HTML without a SPA runtime.
26
- - **Product shells matter.** Moo UI includes primitives, utilities, and
27
- composed blocks for Bootstrap applications that need to feel like modern
28
- product software.
47
+ ```html
48
+ <link rel="stylesheet"
49
+ href="https://unpkg.com/@wpmoo/ui@0.2.0/dist/assets/css/moo-ui.css">
29
50
 
30
- ## Documentation
51
+ <button type="button" class="btn btn-primary">Create workspace</button>
52
+ ```
31
53
 
32
- Browse the catalog at [ui.wpmoo.org](https://ui.wpmoo.org/). Component pages,
33
- blocks, examples, local development notes, and implementation contracts belong
34
- in the documentation rather than this README.
54
+ That is the point of Moo UI: your markup still says Bootstrap, but the surface
55
+ feels quieter, sharper, and more product-ready.
35
56
 
36
- ## Package
57
+ ## Install
37
58
 
38
- The canonical npm package is `@wpmoo/ui`:
59
+ Use the published package when a bundler owns your build:
39
60
 
40
61
  ```bash
41
62
  npm install @wpmoo/ui
42
63
  ```
43
64
 
44
- For CDN usage, load the built CSS artifact from the canonical package:
45
-
46
- ```html
47
- <link rel="stylesheet" href="https://unpkg.com/@wpmoo/ui/dist/assets/css/moo-ui.css">
48
- ```
49
-
50
- Bundlers can import the same stylesheet from the package export:
51
-
52
65
  ```js
53
66
  import "@wpmoo/ui/moo-ui.css";
54
67
  ```
55
68
 
56
- If the shorter `@moo/ui` scope is available to WPMoo, it is reserved as a
57
- small alias package only. Use `@wpmoo/ui` in documentation, CDN examples, and
58
- production installs.
69
+ If a page uses Bootstrap plugins such as Dropdown, Tooltip, Popover, Modal,
70
+ Toast, or Offcanvas, load Bootstrap's JavaScript bundle separately through your
71
+ application. Tooltip and Popover also need the initialization Bootstrap
72
+ documents for those plugins.
73
+
74
+ ## Choose an Adoption Path
59
75
 
60
- ## Build Outputs
76
+ | Situation | Use | Contract |
77
+ | --- | --- | --- |
78
+ | New page or whole application | `moo-ui.css` | Complete Bootstrap CSS build with Moo UI defaults; use it instead of your existing Bootstrap stylesheet. |
79
+ | Gradual adoption inside an existing Bootstrap app | `moo.css` | Scoped Moo component layer under a `.moo-ui` boundary for gradual adoption inside an existing Bootstrap app. |
61
80
 
62
- The static build emits three CSS artifacts under `dist/assets/css/`:
81
+ ## Why Bootstrap Teams Try It
63
82
 
64
- - `moo-ui.css` for the standalone catalog and examples.
65
- - `catalog.css` for documentation chrome.
66
- - `moo-core.css` for integrations that need the Moo component surface as an
67
- opt-in native `@scope (.moo-ui)` layer.
83
+ - **No frontend rewrite.** Keep server-rendered HTML, Bootstrap classes, and
84
+ the component behavior your team already knows.
85
+ - **Modern product rhythm.** Buttons, forms, overlays, navigation, data
86
+ display, and app shells are tuned toward a restrained shadcn-inspired feel.
87
+ - **Inspectable examples.** The catalog is static HTML. Every component page
88
+ shows rendered examples and copyable markup.
89
+ - **Bootstrap-native customization.** Moo UI uses Bootstrap Sass knobs and
90
+ `--bs-*` variables wherever Bootstrap can express the need, adding Moo-owned
91
+ tokens only for gaps Bootstrap does not model.
92
+ - **Practical migration surface.** Start with one page, one scoped area, or a
93
+ full stylesheet replacement after visual review.
94
+
95
+ ## Philosophy
96
+
97
+ - **Bootstrap is the contract.** Moo UI keeps Bootstrap markup, documented
98
+ behavior, Sass knobs, and `--bs-*` variables wherever Bootstrap can express
99
+ the need.
100
+ - **shadcn is the feeling.** Moo UI studies restraint, rhythm, and product UI
101
+ sensibility without adopting React, Tailwind, Radix, or shadcn source.
102
+ - **HTML stays first-class.** The catalog is static, inspectable, and friendly
103
+ to server-rendered applications.
104
+ - **Extensions stay honest.** Moo-owned classes and behavior are added only
105
+ when Bootstrap has no native component contract for the pattern.
106
+
107
+ ## What Is Included
108
+
109
+ The live catalog is the source of truth for current coverage:
110
+
111
+ - [Components](https://ui.wpmoo.org/components/) for actions, forms,
112
+ data display, feedback, disclosure, overlays, and navigation.
113
+ - [Blocks](https://ui.wpmoo.org/blocks/) for composed application
114
+ surfaces such as sidebar layouts.
115
+ - A static documentation site that can be inspected without a client-side app
116
+ runtime.
117
+
118
+ Representative components include Button, Field, Table, Dialog, Toast, Sheet,
119
+ and Sidebar. More components are being added as the catalog roadmap continues.
120
+
121
+ ## Designed, Not Just Restyled
122
+
123
+ Moo UI uses original sketch-style previews to show the thinking behind each
124
+ primitive: states, spacing, hierarchy, and the product UI feeling Bootstrap
125
+ projects often need. The README wraps a few of those transparent assets in
126
+ theme-aware surfaces so they stay legible on GitHub.
127
+
128
+ <p align="center">
129
+ <a href="https://ui.wpmoo.org/components/button.html">
130
+ <picture>
131
+ <source media="(prefers-color-scheme: dark)" srcset="static/images/readme/button-dark.svg">
132
+ <img src="static/images/readme/button-light.svg" alt="Button preview" width="31%">
133
+ </picture>
134
+ </a>
135
+ <a href="https://ui.wpmoo.org/components/dialog.html">
136
+ <picture>
137
+ <source media="(prefers-color-scheme: dark)" srcset="static/images/readme/dialog-dark.svg">
138
+ <img src="static/images/readme/dialog-light.svg" alt="Dialog preview" width="31%">
139
+ </picture>
140
+ </a>
141
+ <a href="https://ui.wpmoo.org/components/sidebar.html">
142
+ <picture>
143
+ <source media="(prefers-color-scheme: dark)" srcset="static/images/readme/sidebar-dark.svg">
144
+ <img src="static/images/readme/sidebar-light.svg" alt="Sidebar preview" width="31%">
145
+ </picture>
146
+ </a>
147
+ <a href="https://ui.wpmoo.org/components/toast.html">
148
+ <picture>
149
+ <source media="(prefers-color-scheme: dark)" srcset="static/images/readme/toast-dark.svg">
150
+ <img src="static/images/readme/toast-light.svg" alt="Toast preview" width="31%">
151
+ </picture>
152
+ </a>
153
+ <a href="https://ui.wpmoo.org/components/sheet.html">
154
+ <picture>
155
+ <source media="(prefers-color-scheme: dark)" srcset="static/images/readme/sheet-dark.svg">
156
+ <img src="static/images/readme/sheet-light.svg" alt="Sheet preview" width="31%">
157
+ </picture>
158
+ </a>
159
+ <a href="https://ui.wpmoo.org/components/input.html">
160
+ <picture>
161
+ <source media="(prefers-color-scheme: dark)" srcset="static/images/readme/input-dark.svg">
162
+ <img src="static/images/readme/input-light.svg" alt="Input preview" width="31%">
163
+ </picture>
164
+ </a>
165
+ </p>
166
+
167
+ <p align="center">
168
+ <a href="https://ui.wpmoo.org/components/">Browse the full catalog →</a>
169
+ </p>
170
+
171
+ ## Package Boundaries
172
+
173
+ The npm package distributes compiled CSS and license/notice files. It does not
174
+ ship the catalog's generated preview images, Jinja templates, Sass source, or
175
+ Moo-owned catalog JavaScript.
176
+
177
+ The source repository contains the static catalog, component templates, build
178
+ tooling, tests, and documentation.
179
+
180
+ ## Development
181
+
182
+ The catalog is intentionally small-tool friendly:
183
+
184
+ ```bash
185
+ .venv/bin/python build.py
186
+ .venv/bin/python dev.py
187
+ .venv/bin/python -m unittest discover -s tests -v
188
+ ```
189
+
190
+ For developers who prefer npm scripts, the package also exposes:
191
+
192
+ ```bash
193
+ npm run build
194
+ npm run dev
195
+ npm test
196
+ ```
68
197
 
69
- The npm package publishes only built component CSS, the optional Bootstrap
70
- bundle, and license/notice files. WPMoo-owned catalog and preview images are
71
- not included in the package.
198
+ Browse the local catalog at `http://localhost:4173/` when `dev.py` is running.
72
199
 
73
200
  ## Licensing
74
201
 
@@ -79,5 +206,4 @@ are not covered by the MIT source code license and remain copyright WPMoo, all
79
206
  rights reserved.
80
207
 
81
208
  Vendored third-party material keeps its original license and attribution. See
82
- `LICENSE`, `LICENSE-MOO-CORE.txt`, `ASSET_LICENSE.md`, and
83
- `THIRD_PARTY_NOTICES.md`.
209
+ `LICENSE`, `ASSET_LICENSE.md`, and `THIRD_PARTY_NOTICES.md`.