@neuralytics/alpine-ds 0.2.0 → 0.2.2
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/CHANGELOG.md +13 -0
- package/README.md +81 -0
- package/package.json +8 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @neuralytics/alpine-ds
|
|
2
|
+
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f03ebe4: Include CHANGELOG.md in the published npm package.
|
|
8
|
+
|
|
9
|
+
## 0.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fa5d634: Set up automated npm publishing and CI (verification on PRs, versioning and release via Changesets).
|
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# @neuralytics/alpine-ds
|
|
2
|
+
|
|
3
|
+
⚠️ **Work in progress** — this design system is under active development. Expect breaking changes between minor versions until `1.0.0`.
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Component playground (Histoire): -
|
|
8
|
+
|
|
9
|
+
Changelog: [CHANGELOG.md](./CHANGELOG.md)
|
|
10
|
+
|
|
11
|
+
## Components already available
|
|
12
|
+
|
|
13
|
+
- `AlpineButton`
|
|
14
|
+
- `AlpineIcon`
|
|
15
|
+
|
|
16
|
+
## Integration
|
|
17
|
+
|
|
18
|
+
1. Install the package: `pnpm add @neuralytics/alpine-ds`
|
|
19
|
+
2. Install the dependencies: `pnpm add -D tailwindcss @tailwindcss/vite`
|
|
20
|
+
3. Register the Tailwind Vite plugin in your `vite.config.ts` (required for Tailwind to actually process anything — without it your styles silently stay empty):
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import tailwindcss from "@tailwindcss/vite"
|
|
24
|
+
import { defineConfig } from "vite"
|
|
25
|
+
|
|
26
|
+
export default defineConfig({
|
|
27
|
+
plugins: [
|
|
28
|
+
// ... your other plugins ...
|
|
29
|
+
tailwindcss(),
|
|
30
|
+
],
|
|
31
|
+
})
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
4. Import the Tailwind configuration in your main style file. The path in `@config` is relative to this CSS file — adjust it if your `tailwind.config.ts` isn't next to it (e.g. `../tailwind.config.ts` if your CSS lives in `src/` and the config is at your project root):
|
|
35
|
+
|
|
36
|
+
```css
|
|
37
|
+
@import "tailwindcss";
|
|
38
|
+
@config "./tailwind.config.ts";
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
5. Configure Tailwind (`tailwind.config.ts`) using the design system's preset, which already handles detection of the package's classes and the icon plugin:
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import type { Config } from "tailwindcss"
|
|
45
|
+
import alpineDsPreset from "@neuralytics/alpine-ds/tailwind-preset"
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
presets: [alpineDsPreset],
|
|
49
|
+
content: [
|
|
50
|
+
// ... your source files ...
|
|
51
|
+
],
|
|
52
|
+
} as Config
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
6. Set the accent color in your project's `main.ts`:
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
import { setAccentColorTheme } from "@neuralytics/alpine-ds"
|
|
59
|
+
|
|
60
|
+
setAccentColorTheme("#fe4e29")
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Note that this function can be called at any time. Calling it in your `main.ts` gives you a default value.
|
|
64
|
+
|
|
65
|
+
7. (Optional) Set the text color of the primary `AlpineButton` if `white` doesn't fit your accent color:
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
import { setButtonTextColor } from "@neuralytics/alpine-ds"
|
|
69
|
+
|
|
70
|
+
setButtonTextColor("#000000")
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This only affects the primary button's text (not disabled or loading states) and defaults to `white` if never called.
|
|
74
|
+
|
|
75
|
+
8. Import a component in a `.vue` file
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
import { AlpineButton } from "@neuralytics/alpine-ds"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
For monorepo-level docs, see the [repository README](https://github.com/neuralytics/alpine-design-system#readme).
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neuralytics/alpine-ds",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
5
8
|
"exports": {
|
|
6
9
|
".": {
|
|
7
10
|
"types": "./dist/index.d.ts",
|
|
@@ -15,8 +18,12 @@
|
|
|
15
18
|
"main": "./dist/index.mjs",
|
|
16
19
|
"types": "dist/index.d.ts",
|
|
17
20
|
"files": [
|
|
21
|
+
"CHANGELOG.md",
|
|
18
22
|
"dist"
|
|
19
23
|
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=24"
|
|
26
|
+
},
|
|
20
27
|
"scripts": {
|
|
21
28
|
"build": "vite build",
|
|
22
29
|
"test": "vitest run",
|