cladux-html 0.1.0 → 0.3.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 +22 -11
- package/cl.css +2246 -2
- package/cl.js +866 -2
- package/cl.min.css +2 -0
- package/cl.min.js +2 -0
- package/cl.min.mjs +2 -0
- package/cl.mjs +868 -0
- package/components/accordion.css +103 -0
- package/components/accordion.min.css +2 -0
- package/components/badge.css +100 -0
- package/components/badge.min.css +2 -0
- package/components/button.css +178 -0
- package/components/button.min.css +2 -0
- package/components/card.css +88 -0
- package/components/card.min.css +2 -0
- package/components/carousel.css +75 -0
- package/components/carousel.min.css +2 -0
- package/components/checkbox.css +80 -0
- package/components/checkbox.min.css +2 -0
- package/components/combobox.css +260 -0
- package/components/combobox.min.css +2 -0
- package/components/dialog.css +128 -0
- package/components/dialog.min.css +2 -0
- package/components/dropdown-menu.css +178 -0
- package/components/dropdown-menu.min.css +2 -0
- package/components/input.css +71 -0
- package/components/input.min.css +2 -0
- package/components/kbd.css +34 -0
- package/components/kbd.min.css +2 -0
- package/components/label.css +23 -0
- package/components/label.min.css +2 -0
- package/components/popover.css +94 -0
- package/components/popover.min.css +2 -0
- package/components/select.css +89 -0
- package/components/select.min.css +2 -0
- package/components/separator.css +16 -0
- package/components/separator.min.css +2 -0
- package/components/sheet.css +134 -0
- package/components/sheet.min.css +2 -0
- package/components/skeleton.css +15 -0
- package/components/skeleton.min.css +2 -0
- package/components/slider.css +88 -0
- package/components/slider.min.css +2 -0
- package/components/switch.css +84 -0
- package/components/switch.min.css +2 -0
- package/components/tabs.css +121 -0
- package/components/tabs.min.css +2 -0
- package/components/textarea.css +61 -0
- package/components/textarea.min.css +2 -0
- package/components/toast.css +139 -0
- package/components/toast.min.css +2 -0
- package/components/tooltip.css +115 -0
- package/components/tooltip.min.css +2 -0
- package/core.css +178 -0
- package/core.min.css +2 -0
- package/package.json +35 -4
- package/types/accordion.d.ts +1 -0
- package/types/carousel.d.ts +8 -0
- package/types/combobox.d.ts +11 -0
- package/types/dialog.d.ts +3 -0
- package/types/floating.d.ts +12 -0
- package/types/index.d.ts +16 -0
- package/types/position.d.ts +17 -0
- package/types/slider.d.ts +5 -0
- package/types/tabs.d.ts +4 -0
- package/types/toast.d.ts +21 -0
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# cladux-html
|
|
2
2
|
|
|
3
3
|
[Cladux](https://cladux.vercel.app) for plain HTML: accessible components in
|
|
4
|
-
shadcn/ui's look, as `cl-*` classes on ordinary HTML. One stylesheet
|
|
5
|
-
small script, with no React and no build step.
|
|
6
|
-
or a Rails, Django or Laravel view.
|
|
4
|
+
shadcn/ui's look, as `cl-*` classes on ordinary HTML. One stylesheet (or just
|
|
5
|
+
the components you use) and one small script, with no React and no build step.
|
|
6
|
+
Use it on a static page, a CMS, or a Rails, Django or Laravel view.
|
|
7
7
|
|
|
8
8
|
## From a CDN
|
|
9
9
|
|
|
10
10
|
```html
|
|
11
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cladux-html@0.
|
|
12
|
-
<script src="https://cdn.jsdelivr.net/npm/cladux-html@0.
|
|
11
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cladux-html@0.3.0/cl.min.css" />
|
|
12
|
+
<script src="https://cdn.jsdelivr.net/npm/cladux-html@0.3.0/cl.min.js" defer></script>
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
unpkg works the same way: `https://unpkg.com/cladux-html@0.
|
|
15
|
+
unpkg works the same way: `https://unpkg.com/cladux-html@0.3.0/cl.min.css`.
|
|
16
16
|
|
|
17
17
|
Keep the exact version in the link, so an update never changes your site
|
|
18
18
|
without you knowing. jsDelivr shows a [Subresource Integrity](https://www.jsdelivr.com/package/npm/cladux-html)
|
|
@@ -26,15 +26,26 @@ npm install cladux-html
|
|
|
26
26
|
|
|
27
27
|
```js
|
|
28
28
|
import "cladux-html/cl.css";
|
|
29
|
-
import "cladux-html
|
|
29
|
+
import { start, toast } from "cladux-html";
|
|
30
|
+
|
|
31
|
+
start();
|
|
32
|
+
toast.success("Changes saved");
|
|
30
33
|
```
|
|
31
34
|
|
|
35
|
+
`cladux-html` is an ES module with TypeScript types. It starts nothing until
|
|
36
|
+
you call `start()`, and adds no global.
|
|
37
|
+
|
|
32
38
|
## What's in it
|
|
33
39
|
|
|
34
|
-
- `cl.css` (about
|
|
35
|
-
layout helpers.
|
|
36
|
-
- `cl.js` (about
|
|
37
|
-
menus, switches tabs
|
|
40
|
+
- `cl.min.css` (about 8 KB gzipped): the theme, a small reset, the components
|
|
41
|
+
and the layout helpers.
|
|
42
|
+
- `cl.min.js` (about 7 KB gzipped, no dependencies): opens dialogs and sheets,
|
|
43
|
+
positions popovers and menus, switches tabs, filters comboboxes, moves
|
|
44
|
+
carousels and shows toasts. Pages without those don't need it.
|
|
45
|
+
- `core.min.css` and `components/<name>.min.css`: the same CSS split up, so a
|
|
46
|
+
page can load the theme and only the components it uses.
|
|
47
|
+
- `cl.min.mjs`: the script as an ES module, with types in `types/`.
|
|
48
|
+
- Readable versions of each, without `.min`, for looking inside or debugging.
|
|
38
49
|
|
|
39
50
|
```html
|
|
40
51
|
<button class="cl-button" data-variant="outline">Cancel</button>
|