@matthiaskrijgsman/mat-ui 0.0.25 → 0.0.27
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 -2
- package/dist/hooks/use-pointer-drag.d.ts +10 -0
- package/dist/index.js +3367 -3360
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +38 -38
- package/dist/index.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/util/color.util.d.ts +8 -0
- package/package.json +4 -16
package/README.md
CHANGED
|
@@ -2,8 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
A React component library providing UI primitives built with React 19, Tailwind CSS v4, and Floating UI.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
[View the components here](https://matthiaskrijgsman.github.io/mat-ui
|
|
5
|
+
## Showcase
|
|
6
|
+
[View the components here](https://matthiaskrijgsman.github.io/mat-ui/)
|
|
7
|
+
|
|
8
|
+
## Development
|
|
9
|
+
|
|
10
|
+
The repo is a pnpm workspace with two packages: the library at the repository root and the showcase Next.js app in [`site/`](site).
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# install workspace deps
|
|
14
|
+
pnpm install
|
|
15
|
+
|
|
16
|
+
# run the showcase against the local library
|
|
17
|
+
pnpm site # → http://localhost:6006
|
|
18
|
+
|
|
19
|
+
# build the library
|
|
20
|
+
pnpm build
|
|
21
|
+
|
|
22
|
+
# build the showcase as a static site (outputs to site/out)
|
|
23
|
+
pnpm site:build
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The showcase pulls in the library via the workspace alias (`workspace:*`), so edits under `src/` are reflected on the next dev rebuild. Deployments to GitHub Pages happen via [.github/workflows/deploy-site.yml](.github/workflows/deploy-site.yml).
|
|
7
27
|
|
|
8
28
|
## Installation
|
|
9
29
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const usePointerDrag: (onPosition: (clientX: number, clientY: number, rect: DOMRect) => void) => {
|
|
3
|
+
isDragging: boolean;
|
|
4
|
+
bind: {
|
|
5
|
+
onPointerDown: (e: React.PointerEvent) => void;
|
|
6
|
+
onPointerMove: (e: React.PointerEvent) => void;
|
|
7
|
+
onPointerUp: (e: React.PointerEvent) => void;
|
|
8
|
+
onPointerCancel: (e: React.PointerEvent) => void;
|
|
9
|
+
};
|
|
10
|
+
};
|