@next-degree/pickle-shared-js 0.1.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/.eslintrc.json +3 -0
- package/README.md +36 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +163 -0
- package/dist/index.mjs +137 -0
- package/next-env.d.ts +5 -0
- package/next.config.ts +7 -0
- package/package.json +47 -0
- package/postcss.config.mjs +8 -0
package/.eslintrc.json
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
First, run the development server:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
# or
|
|
10
|
+
yarn dev
|
|
11
|
+
# or
|
|
12
|
+
pnpm dev
|
|
13
|
+
# or
|
|
14
|
+
bun dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
|
20
|
+
|
|
21
|
+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
|
22
|
+
|
|
23
|
+
## Learn More
|
|
24
|
+
|
|
25
|
+
To learn more about Next.js, take a look at the following resources:
|
|
26
|
+
|
|
27
|
+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
28
|
+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
29
|
+
|
|
30
|
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
|
31
|
+
|
|
32
|
+
## Deploy on Vercel
|
|
33
|
+
|
|
34
|
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
35
|
+
|
|
36
|
+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
var __copyProps = (to, from, except, desc) => {
|
|
35
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
36
|
+
for (let key of __getOwnPropNames(from))
|
|
37
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
38
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
39
|
+
}
|
|
40
|
+
return to;
|
|
41
|
+
};
|
|
42
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
43
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
44
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
45
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
46
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
47
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
48
|
+
mod
|
|
49
|
+
));
|
|
50
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
51
|
+
|
|
52
|
+
// src/app/index.ts
|
|
53
|
+
var app_exports = {};
|
|
54
|
+
module.exports = __toCommonJS(app_exports);
|
|
55
|
+
|
|
56
|
+
// src/components/ui/Button.tsx
|
|
57
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
58
|
+
var import_cva = require("cva");
|
|
59
|
+
var import_react = __toESM(require("react"));
|
|
60
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
61
|
+
var Button = (0, import_react.forwardRef)(
|
|
62
|
+
(_a, ref) => {
|
|
63
|
+
var _b = _a, { className, variant, size, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild"]);
|
|
64
|
+
const Component = asChild ? import_react_slot.Slot : "button";
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
Component,
|
|
67
|
+
__spreadValues({
|
|
68
|
+
className: (0, import_tailwind_merge.twMerge)(buttonVariants({ variant, size, className })),
|
|
69
|
+
ref
|
|
70
|
+
}, props)
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
Button.displayName = "Button";
|
|
75
|
+
var buttonVariants = (0, import_cva.cva)(
|
|
76
|
+
[
|
|
77
|
+
"flex",
|
|
78
|
+
"items-center",
|
|
79
|
+
"justify-center",
|
|
80
|
+
"gap-2",
|
|
81
|
+
"rounded-full",
|
|
82
|
+
"font-bold",
|
|
83
|
+
"outline-2",
|
|
84
|
+
"outline-offset-2",
|
|
85
|
+
"outline-dashed",
|
|
86
|
+
"outline-transparent"
|
|
87
|
+
],
|
|
88
|
+
{
|
|
89
|
+
variants: {
|
|
90
|
+
variant: {
|
|
91
|
+
neutral: [
|
|
92
|
+
"bg-black",
|
|
93
|
+
"text-white",
|
|
94
|
+
"hover:bg-grey-90",
|
|
95
|
+
"active:bg-grey-80",
|
|
96
|
+
"focus:outline-purple-100",
|
|
97
|
+
"disabled:text-grey-40",
|
|
98
|
+
"disabled:bg-grey-10"
|
|
99
|
+
],
|
|
100
|
+
primary: [
|
|
101
|
+
"bg-pickle-100",
|
|
102
|
+
"text-black",
|
|
103
|
+
"hover:bg-pickle-80",
|
|
104
|
+
"active:bg-pickle-60",
|
|
105
|
+
"focus:outline-purple-100",
|
|
106
|
+
"disabled:text-grey-40",
|
|
107
|
+
"disabled:bg-grey-10"
|
|
108
|
+
],
|
|
109
|
+
secondary: [
|
|
110
|
+
"bg-green-80",
|
|
111
|
+
"text-white",
|
|
112
|
+
"hover:bg-green-90",
|
|
113
|
+
"active:bg-green-100",
|
|
114
|
+
"focus:outline-pickle-100",
|
|
115
|
+
"disabled:text-grey-40",
|
|
116
|
+
"disabled:bg-grey-10"
|
|
117
|
+
],
|
|
118
|
+
transparent: [
|
|
119
|
+
"text-white",
|
|
120
|
+
"hover:bg-green-80",
|
|
121
|
+
"active:bg-green-100",
|
|
122
|
+
"focus:outline-pickle-100",
|
|
123
|
+
"disabled:text-grey-40"
|
|
124
|
+
],
|
|
125
|
+
link: [
|
|
126
|
+
"leading-tight",
|
|
127
|
+
"text-black",
|
|
128
|
+
"underline",
|
|
129
|
+
"hover:text-purple-100",
|
|
130
|
+
"focus:text-black",
|
|
131
|
+
"focus:outline-purple-100",
|
|
132
|
+
"active:text-purple-80"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
size: {
|
|
136
|
+
small: ["h-10", "text-sm", "px-4", "py-2"],
|
|
137
|
+
medium: ["h-12", "text-base", "px-6", "py-3"],
|
|
138
|
+
large: ["h-14", "text-lg", "px-8", "py-4"]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
defaultVariants: {
|
|
142
|
+
variant: "neutral",
|
|
143
|
+
size: "medium"
|
|
144
|
+
},
|
|
145
|
+
compoundVariants: [
|
|
146
|
+
{
|
|
147
|
+
variant: "link",
|
|
148
|
+
size: "small",
|
|
149
|
+
class: ["h-3", "text-xs", "p-0"]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
variant: "link",
|
|
153
|
+
size: "medium",
|
|
154
|
+
class: ["h-4", "text-sm", "p-0"]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
variant: "link",
|
|
158
|
+
size: "large",
|
|
159
|
+
class: ["h-6", "text-base", "p-0"]
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
);
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// src/components/ui/Button.tsx
|
|
31
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
32
|
+
import { cva } from "cva";
|
|
33
|
+
import React, { forwardRef } from "react";
|
|
34
|
+
import { twMerge } from "tailwind-merge";
|
|
35
|
+
var Button = forwardRef(
|
|
36
|
+
(_a, ref) => {
|
|
37
|
+
var _b = _a, { className, variant, size, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild"]);
|
|
38
|
+
const Component = asChild ? Slot : "button";
|
|
39
|
+
return /* @__PURE__ */ React.createElement(
|
|
40
|
+
Component,
|
|
41
|
+
__spreadValues({
|
|
42
|
+
className: twMerge(buttonVariants({ variant, size, className })),
|
|
43
|
+
ref
|
|
44
|
+
}, props)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
Button.displayName = "Button";
|
|
49
|
+
var buttonVariants = cva(
|
|
50
|
+
[
|
|
51
|
+
"flex",
|
|
52
|
+
"items-center",
|
|
53
|
+
"justify-center",
|
|
54
|
+
"gap-2",
|
|
55
|
+
"rounded-full",
|
|
56
|
+
"font-bold",
|
|
57
|
+
"outline-2",
|
|
58
|
+
"outline-offset-2",
|
|
59
|
+
"outline-dashed",
|
|
60
|
+
"outline-transparent"
|
|
61
|
+
],
|
|
62
|
+
{
|
|
63
|
+
variants: {
|
|
64
|
+
variant: {
|
|
65
|
+
neutral: [
|
|
66
|
+
"bg-black",
|
|
67
|
+
"text-white",
|
|
68
|
+
"hover:bg-grey-90",
|
|
69
|
+
"active:bg-grey-80",
|
|
70
|
+
"focus:outline-purple-100",
|
|
71
|
+
"disabled:text-grey-40",
|
|
72
|
+
"disabled:bg-grey-10"
|
|
73
|
+
],
|
|
74
|
+
primary: [
|
|
75
|
+
"bg-pickle-100",
|
|
76
|
+
"text-black",
|
|
77
|
+
"hover:bg-pickle-80",
|
|
78
|
+
"active:bg-pickle-60",
|
|
79
|
+
"focus:outline-purple-100",
|
|
80
|
+
"disabled:text-grey-40",
|
|
81
|
+
"disabled:bg-grey-10"
|
|
82
|
+
],
|
|
83
|
+
secondary: [
|
|
84
|
+
"bg-green-80",
|
|
85
|
+
"text-white",
|
|
86
|
+
"hover:bg-green-90",
|
|
87
|
+
"active:bg-green-100",
|
|
88
|
+
"focus:outline-pickle-100",
|
|
89
|
+
"disabled:text-grey-40",
|
|
90
|
+
"disabled:bg-grey-10"
|
|
91
|
+
],
|
|
92
|
+
transparent: [
|
|
93
|
+
"text-white",
|
|
94
|
+
"hover:bg-green-80",
|
|
95
|
+
"active:bg-green-100",
|
|
96
|
+
"focus:outline-pickle-100",
|
|
97
|
+
"disabled:text-grey-40"
|
|
98
|
+
],
|
|
99
|
+
link: [
|
|
100
|
+
"leading-tight",
|
|
101
|
+
"text-black",
|
|
102
|
+
"underline",
|
|
103
|
+
"hover:text-purple-100",
|
|
104
|
+
"focus:text-black",
|
|
105
|
+
"focus:outline-purple-100",
|
|
106
|
+
"active:text-purple-80"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
size: {
|
|
110
|
+
small: ["h-10", "text-sm", "px-4", "py-2"],
|
|
111
|
+
medium: ["h-12", "text-base", "px-6", "py-3"],
|
|
112
|
+
large: ["h-14", "text-lg", "px-8", "py-4"]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
defaultVariants: {
|
|
116
|
+
variant: "neutral",
|
|
117
|
+
size: "medium"
|
|
118
|
+
},
|
|
119
|
+
compoundVariants: [
|
|
120
|
+
{
|
|
121
|
+
variant: "link",
|
|
122
|
+
size: "small",
|
|
123
|
+
class: ["h-3", "text-xs", "p-0"]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
variant: "link",
|
|
127
|
+
size: "medium",
|
|
128
|
+
class: ["h-4", "text-sm", "p-0"]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
variant: "link",
|
|
132
|
+
size: "large",
|
|
133
|
+
class: ["h-6", "text-base", "p-0"]
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
);
|
package/next-env.d.ts
ADDED
package/next.config.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@next-degree/pickle-shared-js",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"pickle"
|
|
8
|
+
],
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "next dev",
|
|
12
|
+
"build": "next build",
|
|
13
|
+
"start": "next start",
|
|
14
|
+
"lint": "next lint",
|
|
15
|
+
"bundle": "tsup src/app/index.ts"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
19
|
+
"cva": "npm:class-variance-authority@^0.7.0",
|
|
20
|
+
"next": "15.0.2",
|
|
21
|
+
"react": "19.0.0-rc-02c0e824-20241028",
|
|
22
|
+
"react-dom": "19.0.0-rc-02c0e824-20241028",
|
|
23
|
+
"tailwind-merge": "^2.3.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^20",
|
|
27
|
+
"@types/react": "^18",
|
|
28
|
+
"@types/react-dom": "^18",
|
|
29
|
+
"eslint": "^8",
|
|
30
|
+
"eslint-config-next": "15.0.2",
|
|
31
|
+
"postcss": "^8",
|
|
32
|
+
"tailwindcss": "^3.4.1",
|
|
33
|
+
"tsup": "^8.3.5",
|
|
34
|
+
"typescript": "^5"
|
|
35
|
+
},
|
|
36
|
+
"description": "This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/Next-Degree/pickle-shared-js.git"
|
|
40
|
+
},
|
|
41
|
+
"author": "",
|
|
42
|
+
"types": "./dist/index.d.ts",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/Next-Degree/pickle-shared-js/issues"
|
|
45
|
+
},
|
|
46
|
+
"homepage": "https://github.com/Next-Degree/pickle-shared-js#readme"
|
|
47
|
+
}
|