plossy 0.3.1 → 0.5.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 +136 -18
- package/dist/plossy.bootstrap.css +1 -1
- package/dist/plossy.bootstrap.min.css +1 -1
- package/dist/plossy.core.css +3 -3
- package/dist/plossy.core.min.css +2 -2
- package/dist/plossy.css +3 -3
- package/dist/plossy.d.ts +56 -14
- package/dist/plossy.esm.js +616 -231
- package/dist/plossy.js +610 -231
- package/dist/plossy.min.css +2 -2
- package/dist/plossy.min.js +13 -13
- package/dist/presets/editorial.css +1 -1
- package/dist/presets/editorial.min.css +1 -1
- package/dist/presets/elegant.css +1 -1
- package/dist/presets/elegant.min.css +1 -1
- package/dist/presets/flat.css +1 -1
- package/dist/presets/flat.min.css +1 -1
- package/dist/presets/glass.css +1 -1
- package/dist/presets/glass.min.css +1 -1
- package/dist/presets/paper.css +1 -1
- package/dist/presets/paper.min.css +1 -1
- package/dist/presets/pop.css +1 -1
- package/dist/presets/pop.min.css +1 -1
- package/dist/presets/round.css +1 -1
- package/dist/presets/round.min.css +1 -1
- package/dist/presets/tender.css +1 -1
- package/dist/presets/tender.min.css +1 -1
- package/dist/presets/toy.css +1 -1
- package/dist/presets/toy.min.css +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,35 +1,153 @@
|
|
|
1
|
-
|
|
2
1
|
# Plossy
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
**One framework. Many personalities.**
|
|
4
|
+
|
|
5
|
+
Plossy is a UI component library made of clean, token-based CSS and small vanilla JavaScript modules — with ten switchable styles, light and dark themes, and custom accent colors. No dependencies, no build step required.
|
|
6
|
+
|
|
7
|
+
[](https://github.com/plossy-ui/plossy/actions/workflows/test.yml)
|
|
8
|
+
[](https://www.npmjs.com/package/plossy)
|
|
9
|
+
[](./LICENSE)
|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
**[Documentation](https://plossyui.com/docs/start/introduction/)** · **[Guides](https://plossyui.com/docs/guides/migration/)** · **[Components](https://plossyui.com/docs/elements/button/)** · **[Examples](https://plossyui.com/examples/)** · **[Theme builder](https://plossyui.com/builder/)** · [Dokumentacja po polsku](https://plossyui.com/pl/)
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
## Why Plossy
|
|
17
|
+
|
|
18
|
+
- **Zero dependencies.** One CSS file and one JS file. Works with plain HTML, server-rendered pages, CMS themes and SPAs alike.
|
|
19
|
+
- **One attribute, one behavior.** Add `data-pl-modal`, `data-pl-slider` or `data-pl-combobox` and the component starts on its own — also for elements inserted later with AJAX.
|
|
20
|
+
- **Ten styles, one markup.** `data-pl-style="flat"` (or `elegant`, `tender`, `pop`, `glass`, `paper`…) changes the whole character of the UI without touching your HTML.
|
|
21
|
+
- **Design tokens.** Colors, radii, shadows and motion are CSS variables. Dark mode is one attribute; your own accent is three numbers.
|
|
22
|
+
- **Accessible by default.** Keyboard support, focus management, ARIA roles and `prefers-reduced-motion`, checked with automated axe-core audits.
|
|
23
|
+
- **Lifecycle-safe.** Components removed from the DOM are cleaned up automatically, moved ones keep their state — ready for dynamic e-commerce and SPA navigation.
|
|
24
|
+
- **Bootstrap-friendly.** Bootstrap utility classes and grid (`d-flex`, `my-2`, `col-md-6`…) work out of the box.
|
|
25
|
+
- **Multilingual.** UI texts follow the page language — English and Polish built in, more with one function.
|
|
26
|
+
- **TypeScript types included.**
|
|
5
27
|
|
|
6
28
|
## Installation
|
|
7
29
|
|
|
30
|
+
### npm
|
|
31
|
+
|
|
8
32
|
```bash
|
|
9
33
|
npm install plossy
|
|
10
34
|
```
|
|
11
35
|
|
|
12
|
-
|
|
36
|
+
```js
|
|
37
|
+
import 'plossy/dist/plossy.min.css';
|
|
38
|
+
import Plossy from 'plossy';
|
|
39
|
+
```
|
|
13
40
|
|
|
14
|
-
|
|
15
|
-
- CSS utilities with `pl-` prefix
|
|
16
|
-
- Responsive layouts
|
|
17
|
-
- Vanilla JavaScript
|
|
18
|
-
- Bootstrap compatibility
|
|
19
|
-
- Custom themes
|
|
41
|
+
### CDN
|
|
20
42
|
|
|
21
|
-
|
|
43
|
+
```html
|
|
44
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/plossy@0.4/dist/plossy.min.css">
|
|
45
|
+
<script src="https://cdn.jsdelivr.net/npm/plossy@0.4/dist/plossy.min.js" defer></script>
|
|
46
|
+
```
|
|
22
47
|
|
|
23
|
-
|
|
48
|
+
## Quick start
|
|
24
49
|
|
|
25
|
-
|
|
50
|
+
```html
|
|
51
|
+
<html data-pl-style="soft" data-pl-theme="light">
|
|
52
|
+
…
|
|
53
|
+
<button class="pl-button pl-button-primary" type="button" data-pl-modal-open="#hello">Say hello</button>
|
|
54
|
+
|
|
55
|
+
<dialog class="pl-modal" id="hello" data-pl-modal>
|
|
56
|
+
<div class="pl-modal-dialog">
|
|
57
|
+
<div class="pl-modal-body">Hello from Plossy 👋</div>
|
|
58
|
+
<div class="pl-modal-footer">
|
|
59
|
+
<button class="pl-button" type="button" data-pl-modal-close>Close</button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</dialog>
|
|
63
|
+
</html>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
// Everything is also available from JavaScript
|
|
68
|
+
Plossy.modal('#hello').show();
|
|
69
|
+
|
|
70
|
+
document.addEventListener('pl:shown', (event) => console.log('Shown:', event.target));
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Naming conventions: classes start with `pl-`, behavior attributes with `data-pl-`, CSS variables with `--pl-`, and events with `pl:`.
|
|
74
|
+
|
|
75
|
+
## What's inside
|
|
76
|
+
|
|
77
|
+
**96 documented components and utilities** in seven groups: layout, elements, navigation, forms, overlays, interactive and utilities — from buttons, cards and tables to combobox, datepicker, modal, offcanvas, slider, sortable and validation. Browse them all at [plossyui.com](https://plossyui.com/).
|
|
78
|
+
|
|
79
|
+
**Ten styles (presets):** soft (default), flat, elegant, tender, round, pop, editorial, paper, glass and toy — each available as a separate small file, too.
|
|
80
|
+
|
|
81
|
+
### Files and sizes
|
|
82
|
+
|
|
83
|
+
| File | What it is | Minified | Gzipped |
|
|
84
|
+
| --- | --- | --- | --- |
|
|
85
|
+
| `plossy.min.css` | Everything: core, all styles, Bootstrap layer | 773 kB | 87 kB |
|
|
86
|
+
| `plossy.core.min.css` | Core with the default style, both themes, all accents | 498 kB | 66 kB |
|
|
87
|
+
| `presets/{style}.min.css` | One extra style | ~20 kB | ~2 kB |
|
|
88
|
+
| `plossy.bootstrap.min.css` | Bootstrap utility classes and grid | 189 kB | 25 kB |
|
|
89
|
+
| `plossy.min.js` | All components, icons included | 254 kB | 76 kB |
|
|
90
|
+
| `plossy.esm.js` / `plossy.d.ts` | ES module build and TypeScript types | | |
|
|
91
|
+
|
|
92
|
+
Need less? Load the core, add only the style you use, and skip the Bootstrap layer.
|
|
26
93
|
|
|
27
|
-
|
|
94
|
+
## Browser support
|
|
28
95
|
|
|
29
|
-
|
|
96
|
+
Plossy uses modern CSS (`oklch`, `color-mix`, `:has`, the Popover API, `<dialog>`), so it targets current versions of **Chrome, Edge, Firefox and Safari**.
|
|
97
|
+
|
|
98
|
+
## Quality
|
|
99
|
+
|
|
100
|
+
The documentation site doubles as the test bed: **417 automated Playwright tests** run against every page of the built docs.
|
|
101
|
+
|
|
102
|
+
| Suite | What it checks |
|
|
103
|
+
| --- | --- |
|
|
104
|
+
| Pages | Every page loads without JavaScript errors and fits phone, tablet and desktop screens. |
|
|
105
|
+
| Accessibility | axe-core audit (WCAG 2.1 AA) of every page, plus key pages in every style and theme. |
|
|
106
|
+
| Contrast | Text and UI color pairs reach at least 4.5:1 in every style and theme. |
|
|
107
|
+
| Styles | Key pages load without errors and fit the screen in all 10 styles × 2 themes. |
|
|
108
|
+
| Behavior | Keyboard, focus, events and animations of interactive components. |
|
|
109
|
+
| Lifecycle | Automatic cleanup on removal, moving, re-mounting and freeing resources (listeners, timers, requests). |
|
|
110
|
+
| Languages | English/Polish docs: switcher, localized links, alternate-language metadata. |
|
|
111
|
+
| Visual | Screenshot comparison against local reference images. |
|
|
112
|
+
|
|
113
|
+
They run on every push and pull request in [GitHub Actions](https://github.com/plossy-ui/plossy/actions/workflows/test.yml) (all suites except the visual one, whose reference images are local). Locally: `npm test` (requires Google Chrome).
|
|
114
|
+
|
|
115
|
+
## Versioning and compatibility
|
|
116
|
+
|
|
117
|
+
Plossy follows [Semantic Versioning](https://semver.org/). While it is in `0.x`:
|
|
118
|
+
|
|
119
|
+
- **minor** releases (`0.4 → 0.5`) may change behavior; every such change is listed in the [changelog](./CHANGELOG.md), together with a way to keep the previous behavior where possible (for example `Plossy.config.autoDestroy = false`);
|
|
120
|
+
- **patch** releases (`0.4.0 → 0.4.1`) contain only fixes.
|
|
121
|
+
|
|
122
|
+
The CDN links above use `plossy@0.4`, so you get fixes automatically but never an unexpected minor update. From `1.0` on, breaking changes will only happen in major versions.
|
|
123
|
+
|
|
124
|
+
The public interface is what the documentation describes: class names, `data-pl-*` attributes and options, `--pl-*` design tokens, events and the `Plossy` JavaScript API.
|
|
125
|
+
|
|
126
|
+
## Languages
|
|
127
|
+
|
|
128
|
+
Texts the library adds by itself — button labels, validation messages, screen reader announcements — follow the page language (`<html lang="…">`). English and Polish are built in; any other language can be added with `Plossy.addLocale('de', { … })`, and `Plossy.config.locale` forces one for the whole page. See [Localization](https://plossyui.com/docs/start/localization/). The documentation itself is available in English and [Polish](https://plossyui.com/pl/).
|
|
129
|
+
|
|
130
|
+
## For AI assistants
|
|
131
|
+
|
|
132
|
+
The docs are agent-friendly: [`llms.txt`](https://plossyui.com/llms.txt), the full documentation in one file at [`llms-full.txt`](https://plossyui.com/llms-full.txt), and a Markdown version of every page (replace the trailing `/` of a docs URL with `.md`).
|
|
133
|
+
|
|
134
|
+
## Development
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
npm install
|
|
138
|
+
npm run dev # documentation with live reload
|
|
139
|
+
npm run build # dist/ bundles + static documentation
|
|
140
|
+
npm test # build the docs and run all tests
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Requires Node.js 22.12 or newer. Coding conventions are described in [CONVENTIONS.md](./CONVENTIONS.md).
|
|
144
|
+
|
|
145
|
+
## Author
|
|
146
|
+
|
|
147
|
+
Created by **Katarzyna Płoska**. Questions, bugs and ideas: [plossyui.com/contact](https://plossyui.com/contact/) or [GitHub issues](https://github.com/plossy-ui/plossy/issues).
|
|
148
|
+
|
|
149
|
+
## License
|
|
30
150
|
|
|
31
|
-
|
|
32
|
-
and Feather (MIT License).
|
|
151
|
+
[MIT](./LICENSE) © 2026 Katarzyna Płoska
|
|
33
152
|
|
|
34
|
-
|
|
35
|
-
for full license information.
|
|
153
|
+
Icons from [Lucide](https://lucide.dev) (ISC License); the license text ships with the package in `dist/LICENSE-LUCIDE`.
|