@betterinternship/components 1.0.1 → 1.3.1
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/dist/components/Button.d.ts +12 -0
- package/dist/hooks/ClientTask.d.ts +21 -0
- package/dist/index.css +101 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.d.ts +6 -34
- package/dist/index.esm.js +5 -1500
- package/dist/index.esm.js.map +1 -1
- package/dist/index.mjs +98 -0
- package/dist/tailwind.css +126 -0
- package/dist/utils.d.ts +2 -0
- package/package.json +121 -82
- package/dist/index.js +0 -1580
- package/dist/index.js.map +0 -1
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// src/components/Button.tsx
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
|
|
6
|
+
// src/utils.ts
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { twMerge } from "tailwind-merge";
|
|
9
|
+
function cn(...inputs) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// src/components/Button.tsx
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var buttonVariants = cva(
|
|
16
|
+
[
|
|
17
|
+
"inline-flex",
|
|
18
|
+
"items-center",
|
|
19
|
+
"justify-center",
|
|
20
|
+
"gap-2",
|
|
21
|
+
"whitespace-nowrap",
|
|
22
|
+
"rounded-[0.33em]",
|
|
23
|
+
"text-sm",
|
|
24
|
+
"font-medium",
|
|
25
|
+
"transition-colors",
|
|
26
|
+
"focus:outline-none",
|
|
27
|
+
"focus:ring-transparent",
|
|
28
|
+
"disabled:pointer-events-none",
|
|
29
|
+
"disabled:opacity-50",
|
|
30
|
+
"[&_svg]:pointer-events-none",
|
|
31
|
+
"[&_svg]:size-4",
|
|
32
|
+
"[&_svg]:shrink-0"
|
|
33
|
+
],
|
|
34
|
+
{
|
|
35
|
+
variants: {
|
|
36
|
+
variant: {
|
|
37
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
38
|
+
outline: "border border-gray-300 text-gray-700 bg-background hover:bg-accent",
|
|
39
|
+
ghost: "hover:bg-accent text-gray-700 hover:text-accent-foreground",
|
|
40
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
41
|
+
},
|
|
42
|
+
scheme: {
|
|
43
|
+
default: "",
|
|
44
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
45
|
+
supportive: "bg-supportive text-supportive-foreground hover:bg-supportive/90",
|
|
46
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
47
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80"
|
|
48
|
+
},
|
|
49
|
+
size: {
|
|
50
|
+
default: "h-8 px-[1em] py-[0.33em]",
|
|
51
|
+
sm: "h-8 px-3",
|
|
52
|
+
lg: "h-11 px-8",
|
|
53
|
+
md: "h-10 px-6",
|
|
54
|
+
icon: "h-10 w-10",
|
|
55
|
+
xs: "h-6 px-3 text-xs"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
compoundVariants: [
|
|
59
|
+
{
|
|
60
|
+
variant: "outline",
|
|
61
|
+
scheme: "primary",
|
|
62
|
+
class: "bg-background border border-primary text-primary hover:bg-blue-50"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
variant: "outline",
|
|
66
|
+
scheme: "supportive",
|
|
67
|
+
class: "bg-background border border-supportive text-supportive hover:bg-green-50"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
variant: "outline",
|
|
71
|
+
scheme: "destructive",
|
|
72
|
+
class: "bg-background border border-destructive text-destructive hover:bg-red-50"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
defaultVariants: {
|
|
76
|
+
variant: "default",
|
|
77
|
+
size: "default"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
var Button = React.forwardRef(
|
|
82
|
+
({ className, variant, scheme, size, asChild = false, ...props }, ref) => {
|
|
83
|
+
const Comp = asChild ? Slot : "button";
|
|
84
|
+
return /* @__PURE__ */ jsx(
|
|
85
|
+
Comp,
|
|
86
|
+
{
|
|
87
|
+
className: cn(buttonVariants({ variant, scheme, size, className })),
|
|
88
|
+
ref,
|
|
89
|
+
...props
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
Button.displayName = "Button";
|
|
95
|
+
export {
|
|
96
|
+
Button,
|
|
97
|
+
buttonVariants
|
|
98
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties;
|
|
3
|
+
.inline-flex {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
}
|
|
6
|
+
.flex-shrink {
|
|
7
|
+
flex-shrink: 1;
|
|
8
|
+
}
|
|
9
|
+
.transform {
|
|
10
|
+
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
|
11
|
+
}
|
|
12
|
+
.items-center {
|
|
13
|
+
align-items: center;
|
|
14
|
+
}
|
|
15
|
+
.justify-center {
|
|
16
|
+
justify-content: center;
|
|
17
|
+
}
|
|
18
|
+
.rounded-\[0\.33em\] {
|
|
19
|
+
border-radius: 0.33em;
|
|
20
|
+
}
|
|
21
|
+
.border {
|
|
22
|
+
border-style: var(--tw-border-style);
|
|
23
|
+
border-width: 1px;
|
|
24
|
+
}
|
|
25
|
+
.px-\[1em\] {
|
|
26
|
+
padding-inline: 1em;
|
|
27
|
+
}
|
|
28
|
+
.py-\[0\.33em\] {
|
|
29
|
+
padding-block: 0.33em;
|
|
30
|
+
}
|
|
31
|
+
.whitespace-nowrap {
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
}
|
|
34
|
+
.underline-offset-4 {
|
|
35
|
+
text-underline-offset: 4px;
|
|
36
|
+
}
|
|
37
|
+
.outline {
|
|
38
|
+
outline-style: var(--tw-outline-style);
|
|
39
|
+
outline-width: 1px;
|
|
40
|
+
}
|
|
41
|
+
.transition-colors {
|
|
42
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
43
|
+
transition-timing-function: var(--tw-ease, ease);
|
|
44
|
+
transition-duration: var(--tw-duration, 0s);
|
|
45
|
+
}
|
|
46
|
+
.hover\:underline {
|
|
47
|
+
&:hover {
|
|
48
|
+
@media (hover: hover) {
|
|
49
|
+
text-decoration-line: underline;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
.focus\:ring-transparent {
|
|
54
|
+
&:focus {
|
|
55
|
+
--tw-ring-color: transparent;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
.focus\:outline-none {
|
|
59
|
+
&:focus {
|
|
60
|
+
--tw-outline-style: none;
|
|
61
|
+
outline-style: none;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
.disabled\:pointer-events-none {
|
|
65
|
+
&:disabled {
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
.disabled\:opacity-50 {
|
|
70
|
+
&:disabled {
|
|
71
|
+
opacity: 50%;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.\[\&_svg\]\:pointer-events-none {
|
|
75
|
+
& svg {
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
.\[\&_svg\]\:shrink-0 {
|
|
80
|
+
& svg {
|
|
81
|
+
flex-shrink: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
@property --tw-rotate-x {
|
|
85
|
+
syntax: "*";
|
|
86
|
+
inherits: false;
|
|
87
|
+
}
|
|
88
|
+
@property --tw-rotate-y {
|
|
89
|
+
syntax: "*";
|
|
90
|
+
inherits: false;
|
|
91
|
+
}
|
|
92
|
+
@property --tw-rotate-z {
|
|
93
|
+
syntax: "*";
|
|
94
|
+
inherits: false;
|
|
95
|
+
}
|
|
96
|
+
@property --tw-skew-x {
|
|
97
|
+
syntax: "*";
|
|
98
|
+
inherits: false;
|
|
99
|
+
}
|
|
100
|
+
@property --tw-skew-y {
|
|
101
|
+
syntax: "*";
|
|
102
|
+
inherits: false;
|
|
103
|
+
}
|
|
104
|
+
@property --tw-border-style {
|
|
105
|
+
syntax: "*";
|
|
106
|
+
inherits: false;
|
|
107
|
+
initial-value: solid;
|
|
108
|
+
}
|
|
109
|
+
@property --tw-outline-style {
|
|
110
|
+
syntax: "*";
|
|
111
|
+
inherits: false;
|
|
112
|
+
initial-value: solid;
|
|
113
|
+
}
|
|
114
|
+
@layer properties {
|
|
115
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
116
|
+
*, ::before, ::after, ::backdrop {
|
|
117
|
+
--tw-rotate-x: initial;
|
|
118
|
+
--tw-rotate-y: initial;
|
|
119
|
+
--tw-rotate-z: initial;
|
|
120
|
+
--tw-skew-x: initial;
|
|
121
|
+
--tw-skew-y: initial;
|
|
122
|
+
--tw-border-style: solid;
|
|
123
|
+
--tw-outline-style: solid;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
package/dist/utils.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,82 +1,121 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@betterinternship/components",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"main": "dist/index.
|
|
5
|
-
"module": "dist/index.esm.js",
|
|
6
|
-
"types": "dist/index.d.
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
},
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"@radix-ui/
|
|
31
|
-
"@
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"radix-ui": "^1.
|
|
35
|
-
"react": "^
|
|
36
|
-
"react-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"@radix-ui/react-
|
|
40
|
-
"@radix-ui/react-
|
|
41
|
-
"@radix-ui/react-
|
|
42
|
-
"@radix-ui/react-
|
|
43
|
-
"@radix-ui/react-
|
|
44
|
-
"@radix-ui/react-
|
|
45
|
-
"@radix-ui/react-
|
|
46
|
-
"@radix-ui/react-
|
|
47
|
-
"@radix-ui/react-
|
|
48
|
-
"@radix-ui/react-
|
|
49
|
-
"@radix-ui/react-
|
|
50
|
-
"@radix-ui/react-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"@
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"@
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@betterinternship/components",
|
|
3
|
+
"version": "1.3.1",
|
|
4
|
+
"main": "dist/index.esm.js",
|
|
5
|
+
"module": "dist/index.esm.js",
|
|
6
|
+
"types": "dist/index.d.mts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "rollup -c",
|
|
9
|
+
"prepare": "npm run build"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/BetterInternship/Components.git"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/BetterInternship/Components/issues"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/BetterInternship/Components#readme",
|
|
22
|
+
"description": "",
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@radix-ui/react-accordion": "^1.2.11",
|
|
25
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
26
|
+
"@radix-ui/react-aspect-ratio": "^1.1.1",
|
|
27
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
28
|
+
"@radix-ui/react-checkbox": "^1.3.2",
|
|
29
|
+
"@radix-ui/react-collapsible": "^1.1.11",
|
|
30
|
+
"@radix-ui/react-context-menu": "^2.2.4",
|
|
31
|
+
"@radix-ui/react-dialog": "^1.1.14",
|
|
32
|
+
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
33
|
+
"@radix-ui/react-hover-card": "^1.1.4",
|
|
34
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
35
|
+
"@radix-ui/react-menubar": "^1.1.4",
|
|
36
|
+
"@radix-ui/react-navigation-menu": "^1.2.3",
|
|
37
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
38
|
+
"@radix-ui/react-progress": "^1.1.7",
|
|
39
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
40
|
+
"@radix-ui/react-scroll-area": "^1.2.2",
|
|
41
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
42
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
43
|
+
"@radix-ui/react-slider": "^1.2.2",
|
|
44
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
45
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
46
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
47
|
+
"@radix-ui/react-toast": "^1.2.4",
|
|
48
|
+
"@radix-ui/react-toggle": "^1.1.1",
|
|
49
|
+
"@radix-ui/react-toggle-group": "^1.1.1",
|
|
50
|
+
"@radix-ui/react-tooltip": "^1.2.7",
|
|
51
|
+
"react": "^19",
|
|
52
|
+
"react-dom": "^19",
|
|
53
|
+
"@tanstack/react-query": "^5.0.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependenciesMeta": {
|
|
56
|
+
"react": {
|
|
57
|
+
"optional": false
|
|
58
|
+
},
|
|
59
|
+
"react-dom": {
|
|
60
|
+
"optional": false
|
|
61
|
+
},
|
|
62
|
+
"@tanstack/react-query": {
|
|
63
|
+
"optional": false
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@radix-ui/react-accordion": "^1.2.11",
|
|
68
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
69
|
+
"@radix-ui/react-aspect-ratio": "^1.1.1",
|
|
70
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
71
|
+
"@radix-ui/react-checkbox": "^1.3.2",
|
|
72
|
+
"@radix-ui/react-collapsible": "^1.1.11",
|
|
73
|
+
"@radix-ui/react-context-menu": "^2.2.4",
|
|
74
|
+
"@radix-ui/react-dialog": "^1.1.14",
|
|
75
|
+
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
76
|
+
"@radix-ui/react-hover-card": "^1.1.4",
|
|
77
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
78
|
+
"@radix-ui/react-menubar": "^1.1.4",
|
|
79
|
+
"@radix-ui/react-navigation-menu": "^1.2.3",
|
|
80
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
81
|
+
"@radix-ui/react-progress": "^1.1.7",
|
|
82
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
83
|
+
"@radix-ui/react-scroll-area": "^1.2.2",
|
|
84
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
85
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
86
|
+
"@radix-ui/react-slider": "^1.2.2",
|
|
87
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
88
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
89
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
90
|
+
"@radix-ui/react-toast": "^1.2.4",
|
|
91
|
+
"@radix-ui/react-toggle": "^1.1.1",
|
|
92
|
+
"@radix-ui/react-toggle-group": "^1.1.1",
|
|
93
|
+
"@radix-ui/react-tooltip": "^1.2.7",
|
|
94
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
95
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
96
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
97
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
98
|
+
"@types/react": "^19.2.7",
|
|
99
|
+
"autoprefixer": "^10.4.22",
|
|
100
|
+
"esbuild-css-modules-plugin": "^3.1.5",
|
|
101
|
+
"esbuild-style-plugin": "^1.6.3",
|
|
102
|
+
"postcss": "^8.5.6",
|
|
103
|
+
"postcss-cli": "^11.0.1",
|
|
104
|
+
"react": "^19",
|
|
105
|
+
"react-dom": "^19",
|
|
106
|
+
"rollup": "^4.53.3",
|
|
107
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
108
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
109
|
+
"tailwindcss": "^4.1.17",
|
|
110
|
+
"tw-animate-css": "^1.4.0",
|
|
111
|
+
"typescript": "^5.9.3"
|
|
112
|
+
},
|
|
113
|
+
"files": [
|
|
114
|
+
"dist"
|
|
115
|
+
],
|
|
116
|
+
"dependencies": {
|
|
117
|
+
"class-variance-authority": "^0.7.1",
|
|
118
|
+
"clsx": "^2.1.1",
|
|
119
|
+
"tailwind-merge": "^3.4.0"
|
|
120
|
+
}
|
|
121
|
+
}
|