plossy 0.4.0 → 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 CHANGED
@@ -1,37 +1,153 @@
1
-
2
1
  # Plossy
3
2
 
4
- A modern CSS and Vanilla JavaScript UI framework.
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
+ [![Tests](https://github.com/plossy-ui/plossy/actions/workflows/test.yml/badge.svg)](https://github.com/plossy-ui/plossy/actions/workflows/test.yml)
8
+ [![npm](https://img.shields.io/npm/v/plossy?color=5b4fd9)](https://www.npmjs.com/package/plossy)
9
+ [![license: MIT](https://img.shields.io/badge/license-MIT-5b4fd9)](./LICENSE)
10
+ ![dependencies: 0](https://img.shields.io/badge/dependencies-0-5b4fd9)
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
+ ![Plossy — One framework. Many personalities.](https://plossyui.com/og.png)
15
+
16
+ ## Why Plossy
5
17
 
6
- Documentation, examples and theme builder: https://plossyui.com
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.**
7
27
 
8
28
  ## Installation
9
29
 
30
+ ### npm
31
+
10
32
  ```bash
11
33
  npm install plossy
12
34
  ```
13
35
 
14
- ## Features
36
+ ```js
37
+ import 'plossy/dist/plossy.min.css';
38
+ import Plossy from 'plossy';
39
+ ```
15
40
 
16
- - Modular UI components
17
- - CSS utilities with `pl-` prefix
18
- - Responsive layouts
19
- - Vanilla JavaScript
20
- - Bootstrap compatibility
21
- - Custom themes
41
+ ### CDN
22
42
 
23
- ## Author
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
+ ```
24
47
 
25
- Katarzyna Płoska
48
+ ## Quick start
26
49
 
27
- ## License
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.
28
93
 
29
- MIT © 2026 Katarzyna Płoska
94
+ ## Browser support
30
95
 
31
- ## Third-party licenses
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
32
150
 
33
- Plossy includes icons from Lucide (ISC License)
34
- and Feather (MIT License).
151
+ [MIT](./LICENSE) © 2026 Katarzyna Płoska
35
152
 
36
- See [LICENSE-LUCIDE](./dist/LICENSE-LUCIDE)
37
- for full license information.
153
+ Icons from [Lucide](https://lucide.dev) (ISC License); the license text ships with the package in `dist/LICENSE-LUCIDE`.
@@ -1,4 +1,4 @@
1
- /*! Plossy v0.4.0 | zgodność z klasami Bootstrapa | MIT License | wymaga plossy.core.css */
1
+ /*! Plossy v0.5.0 | zgodność z klasami Bootstrapa | MIT License | wymaga plossy.core.css */
2
2
  @charset "UTF-8";
3
3
  .container,
4
4
  .container-fluid,