@pondipondi/mimas 0.1.0 → 0.1.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.
@@ -99,14 +99,12 @@ const button = tv({
99
99
  interface ButtonProps
100
100
  extends VariantProps<typeof button>,
101
101
  React.ButtonHTMLAttributes<HTMLButtonElement> {
102
- noise?: "low" | "medium" | "high";
103
102
  loading?: boolean;
104
103
  text?: string;
105
104
  }
106
105
 
107
106
  function Button({
108
107
  size,
109
- noise,
110
108
  colour,
111
109
  width,
112
110
  corners,
@@ -152,7 +150,7 @@ function Button({
152
150
  </div>
153
151
  )}
154
152
 
155
- <Noise strength={noise ?? "medium"} />
153
+ <Noise />
156
154
  </div>
157
155
  </div>
158
156
  </button>
@@ -0,0 +1,19 @@
1
+ function Noise() {
2
+ return (
3
+ <>
4
+ <svg
5
+ className="pointer-events-none absolute inset-0 isolate z-10 h-full w-full opacity-25"
6
+ height="100%"
7
+ id="texture"
8
+ >
9
+ <filter id="noise">
10
+ <feTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="4" stitchTiles="stitch"></feTurbulence>
11
+ <feColorMatrix type="saturate" values="0"></feColorMatrix>
12
+ </filter>
13
+ <rect width="100%" height="100%" filter="url(#noise)"></rect>
14
+ </svg>
15
+ </>
16
+ );
17
+ }
18
+
19
+ export default Noise;
@@ -7,50 +7,6 @@
7
7
  :root {
8
8
  font-family: "Rubik", sans-serif;
9
9
  color: white;
10
-
11
- --lines: 0.0007px;
12
- }
13
-
14
- .noise {
15
- /* nerdy.dev */
16
- mask: repeating-radial-gradient(
17
- circle at center,
18
- #0000,
19
- var(--lines),
20
- #0000,
21
- 0,
22
- rgba(0, 0, 0, 0.02),
23
- calc(var(--lines) * 2),
24
- rgba(0, 0, 0, 0.02) 0
25
- );
26
- }
27
-
28
- .noise-2 {
29
- /* nerdy.dev */
30
- mask: repeating-radial-gradient(
31
- circle at center,
32
- #0000,
33
- var(--lines),
34
- #0000,
35
- 0,
36
- rgba(0, 0, 0, 0.04),
37
- calc(var(--lines) * 2),
38
- rgba(0, 0, 0, 0.04) 0
39
- );
40
- }
41
-
42
- .noise-4 {
43
- /* nerdy.dev */
44
- mask: repeating-radial-gradient(
45
- circle at center,
46
- #0000,
47
- var(--lines),
48
- #0000,
49
- 0,
50
- rgba(0, 0, 0, 0.06),
51
- calc(var(--lines) * 2),
52
- rgba(0, 0, 0, 0.06) 0
53
- );
54
10
  }
55
11
 
56
12
  .shadow-form {
package/dist/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./components";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pondipondi/mimas",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -8,15 +8,13 @@
8
8
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
9
9
  "preview": "vite preview",
10
10
  "storybook": "storybook dev -p 6006",
11
- "build-storybook": "storybook build",
12
- "transpile": "rimraf lib && babel src -d lib --copy-files",
13
- "prepublishOnly": "npm run transpile"
11
+ "build-storybook": "storybook build"
14
12
  },
15
13
  "dependencies": {
16
14
  "autoprefixer": "^10.4.19",
17
15
  "postcss": "^8.4.39",
18
- "react": "^18.3.1",
19
- "react-dom": "^18.3.1",
16
+ "react": ">=18.3.1",
17
+ "react-dom": ">=18.3.1",
20
18
  "tailwind-variants": "^0.2.1",
21
19
  "tailwindcss": "^3.4.4"
22
20
  },
@@ -25,10 +23,6 @@
25
23
  "react-dom": ">=18.3.1"
26
24
  },
27
25
  "devDependencies": {
28
- "@babel/cli": "^7.27.2",
29
- "@babel/core": "^7.27.4",
30
- "@babel/preset-env": "^7.27.2",
31
- "@babel/preset-react": "^7.27.1",
32
26
  "@chromatic-com/storybook": "1.6.1",
33
27
  "@storybook/addon-essentials": "^8.2.2",
34
28
  "@storybook/addon-interactions": "^8.2.2",
@@ -49,22 +43,24 @@
49
43
  "eslint-plugin-react-hooks": "^4.6.2",
50
44
  "eslint-plugin-react-refresh": "^0.4.7",
51
45
  "eslint-plugin-storybook": "^0.8.0",
52
- "rimraf": "^6.0.1",
53
46
  "storybook": "^8.2.1",
54
47
  "storybook-dark-mode": "^4.0.2",
55
48
  "typescript": "^5.2.2",
56
- "vite": "^5.3.1"
49
+ "vite": "^5.4.19",
50
+ "vite-plugin-dts": "^4.5.4"
57
51
  },
58
52
  "description": "This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.",
59
- "main": "dist/index.js",
53
+ "main": "dist/mimas.cjs.js",
54
+ "module": "dist/mimas.es.js",
55
+ "types": "dist/index.d.ts",
56
+ "files": [
57
+ "dist",
58
+ "README.md"
59
+ ],
60
60
  "repository": {
61
61
  "type": "git",
62
62
  "url": "git+https://github.com/bevans-o/mimas.git"
63
63
  },
64
- "files": [
65
- "lib",
66
- "README.md"
67
- ],
68
64
  "keywords": [
69
65
  "react",
70
66
  "components"
@@ -1,25 +0,0 @@
1
- import { tv, VariantProps } from "tailwind-variants";
2
-
3
- const noise = tv({
4
- base: "bg-neutral-200 noise absolute w-full h-full inset-0 z-0",
5
- variants: {
6
- strength: {
7
- low: "noise",
8
- medium: "noise-2",
9
- high: "noise-4",
10
- },
11
- },
12
- defaultVariants: {
13
- strength: "medium",
14
- },
15
- });
16
-
17
- interface NoiseProps extends VariantProps<typeof noise> {
18
- className?: string;
19
- }
20
-
21
- function Noise({ strength, className }: NoiseProps) {
22
- return <div className={noise({ strength, className })} />;
23
- }
24
-
25
- export default Noise;
File without changes
File without changes