@pathscale/ui 0.0.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/LICENSE +21 -0
- package/README.md +12 -0
- package/dist/Avatar-CzIirpVq.d.ts +33 -0
- package/dist/Button-B50OLXuV.d.ts +63 -0
- package/dist/Input-BQbTzjIO.d.ts +34 -0
- package/dist/Textarea-Cpdk7m6S.d.ts +37 -0
- package/dist/chunk/2JGZSAW5.js +107 -0
- package/dist/chunk/4RCWSX7S.jsx +101 -0
- package/dist/chunk/EB7KXR65.js +102 -0
- package/dist/chunk/G6RG4LR7.js +87 -0
- package/dist/chunk/GA2HCFRS.jsx +228 -0
- package/dist/chunk/HKS7ET6T.js +56 -0
- package/dist/chunk/KACNXPUM.jsx +103 -0
- package/dist/chunk/N7BXP7EI.jsx +102 -0
- package/dist/chunk/NZZRKP74.js +214 -0
- package/dist/chunk/P7WPLZNA.jsx +59 -0
- package/dist/chunk/T2DPPLBQ.js +100 -0
- package/dist/chunk/WB6NEEQV.jsx +107 -0
- package/dist/classes-B_S9K-9I.d.ts +13 -0
- package/dist/components/Progress/index.d.ts +42 -0
- package/dist/components/Progress/index.js +278 -0
- package/dist/components/Progress/index.jsx +202 -0
- package/dist/components/accordion/index.d.ts +27 -0
- package/dist/components/accordion/index.js +118 -0
- package/dist/components/accordion/index.jsx +104 -0
- package/dist/components/avatar/index.d.ts +8 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/avatar/index.jsx +7 -0
- package/dist/components/breadcrumb/index.d.ts +47 -0
- package/dist/components/breadcrumb/index.js +133 -0
- package/dist/components/breadcrumb/index.jsx +125 -0
- package/dist/components/button/index.d.ts +9 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/button/index.jsx +8 -0
- package/dist/components/checkbox/index.d.ts +40 -0
- package/dist/components/checkbox/index.js +137 -0
- package/dist/components/checkbox/index.jsx +147 -0
- package/dist/components/input/index.d.ts +8 -0
- package/dist/components/input/index.js +1 -0
- package/dist/components/input/index.jsx +7 -0
- package/dist/components/pagination/index.d.ts +43 -0
- package/dist/components/pagination/index.js +189 -0
- package/dist/components/pagination/index.jsx +178 -0
- package/dist/components/polymorphic/index.d.ts +35 -0
- package/dist/components/polymorphic/index.js +1 -0
- package/dist/components/polymorphic/index.jsx +8 -0
- package/dist/components/select/index.d.ts +44 -0
- package/dist/components/select/index.js +98 -0
- package/dist/components/select/index.jsx +95 -0
- package/dist/components/switch/index.d.ts +72 -0
- package/dist/components/switch/index.js +144 -0
- package/dist/components/switch/index.jsx +159 -0
- package/dist/components/tabs/index.d.ts +42 -0
- package/dist/components/tabs/index.js +166 -0
- package/dist/components/tabs/index.jsx +174 -0
- package/dist/components/tag/index.d.ts +42 -0
- package/dist/components/tag/index.js +115 -0
- package/dist/components/tag/index.jsx +131 -0
- package/dist/components/textarea/index.d.ts +8 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/textarea/index.jsx +7 -0
- package/dist/components/tooltip/index.d.ts +53 -0
- package/dist/components/tooltip/index.js +103 -0
- package/dist/components/tooltip/index.jsx +99 -0
- package/dist/components/upload/index.d.ts +39 -0
- package/dist/components/upload/index.js +98 -0
- package/dist/components/upload/index.jsx +109 -0
- package/dist/index.css +73 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +4 -0
- package/dist/index.jsx +20 -0
- package/package.json +67 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cva
|
|
3
|
+
} from "../../chunk/P7WPLZNA.jsx";
|
|
4
|
+
|
|
5
|
+
// src/components/tooltip/Tooltip.tsx
|
|
6
|
+
import {
|
|
7
|
+
splitProps,
|
|
8
|
+
Show
|
|
9
|
+
} from "solid-js";
|
|
10
|
+
|
|
11
|
+
// src/components/tooltip/Tooltip.styles.ts
|
|
12
|
+
var tooltipVariants = cva(
|
|
13
|
+
[
|
|
14
|
+
"absolute z-10 px-3 py-1 text-white text-sm",
|
|
15
|
+
"opacity-0 group-hover:opacity-100",
|
|
16
|
+
"pointer-events-none transition-opacity duration-200",
|
|
17
|
+
"max-w-xs break-words",
|
|
18
|
+
"after:content-[''] after:absolute after:w-2 after:h-2 after:rotate-45 after:bg-inherit"
|
|
19
|
+
].join(" "),
|
|
20
|
+
{
|
|
21
|
+
variants: {
|
|
22
|
+
type: {
|
|
23
|
+
info: "bg-blue-500",
|
|
24
|
+
success: "bg-green-500",
|
|
25
|
+
warning: "bg-yellow-500",
|
|
26
|
+
danger: "bg-red-500",
|
|
27
|
+
primary: "bg-indigo-500",
|
|
28
|
+
gray: "bg-gray-700"
|
|
29
|
+
},
|
|
30
|
+
size: {
|
|
31
|
+
sm: "text-xs",
|
|
32
|
+
md: "text-sm",
|
|
33
|
+
lg: "text-base"
|
|
34
|
+
},
|
|
35
|
+
rounded: {
|
|
36
|
+
true: "rounded",
|
|
37
|
+
false: "rounded-none"
|
|
38
|
+
},
|
|
39
|
+
dashed: {
|
|
40
|
+
true: "border border-white border-dashed",
|
|
41
|
+
false: ""
|
|
42
|
+
},
|
|
43
|
+
multilined: {
|
|
44
|
+
true: "whitespace-pre-wrap",
|
|
45
|
+
false: "whitespace-nowrap"
|
|
46
|
+
},
|
|
47
|
+
animated: {
|
|
48
|
+
true: "transition-opacity duration-300 ease-in-out",
|
|
49
|
+
false: ""
|
|
50
|
+
},
|
|
51
|
+
position: {
|
|
52
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-1 after:top-full after:left-1/2 after:-translate-x-1/2 after:-mt-1",
|
|
53
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-1 after:bottom-full after:left-1/2 after:-translate-x-1/2 after:-mb-1",
|
|
54
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-1 after:left-full after:top-1/2 after:-translate-y-1/2 after:-ml-1",
|
|
55
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-1 after:right-full after:top-1/2 after:-translate-y-1/2 after:-mr-1"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
type: "primary",
|
|
60
|
+
size: "md",
|
|
61
|
+
rounded: true,
|
|
62
|
+
dashed: false,
|
|
63
|
+
multilined: false,
|
|
64
|
+
animated: true,
|
|
65
|
+
position: "top"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
// src/components/tooltip/Tooltip.tsx
|
|
71
|
+
var Tooltip = (props) => {
|
|
72
|
+
const [local, variantProps, otherProps] = splitProps(
|
|
73
|
+
props,
|
|
74
|
+
["label", "delay", "always", "children"],
|
|
75
|
+
["type", "size", "position", "rounded", "dashed", "multilined", "animated"]
|
|
76
|
+
);
|
|
77
|
+
return <span class="relative inline-block group" {...otherProps}>
|
|
78
|
+
{local.children}
|
|
79
|
+
<Show when={local.label}>
|
|
80
|
+
<span
|
|
81
|
+
class={tooltipVariants(variantProps)}
|
|
82
|
+
style={{
|
|
83
|
+
"transition-delay": `${local.delay ?? 0}ms`,
|
|
84
|
+
opacity: local.always ? 1 : void 0,
|
|
85
|
+
"pointer-events": "none"
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
88
|
+
{local.label}
|
|
89
|
+
</span>
|
|
90
|
+
</Show>
|
|
91
|
+
</span>;
|
|
92
|
+
};
|
|
93
|
+
var Tooltip_default = Tooltip;
|
|
94
|
+
|
|
95
|
+
// src/components/tooltip/index.ts
|
|
96
|
+
var tooltip_default = Tooltip_default;
|
|
97
|
+
export {
|
|
98
|
+
tooltip_default as default
|
|
99
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { JSX, Component } from 'solid-js';
|
|
2
|
+
import { C as ConfigVariants, a as ClassProps, V as VariantProps } from '../../classes-B_S9K-9I.js';
|
|
3
|
+
|
|
4
|
+
declare const uploadWrapperVariants: {
|
|
5
|
+
(props?: (ConfigVariants<{
|
|
6
|
+
style: {
|
|
7
|
+
boxed: string;
|
|
8
|
+
button: string;
|
|
9
|
+
};
|
|
10
|
+
color: {
|
|
11
|
+
primary: string;
|
|
12
|
+
success: string;
|
|
13
|
+
info: string;
|
|
14
|
+
warning: string;
|
|
15
|
+
danger: string;
|
|
16
|
+
gray: string;
|
|
17
|
+
};
|
|
18
|
+
size: {
|
|
19
|
+
sm: string;
|
|
20
|
+
md: string;
|
|
21
|
+
lg: string;
|
|
22
|
+
};
|
|
23
|
+
}> & ClassProps) | undefined): string;
|
|
24
|
+
variantKeys: ("style" | "color" | "size")[];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type UploadProps = {
|
|
28
|
+
icon?: JSX.Element;
|
|
29
|
+
label?: string;
|
|
30
|
+
multiple?: boolean;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
accept?: string;
|
|
33
|
+
dragDrop?: boolean;
|
|
34
|
+
name?: string;
|
|
35
|
+
onChange?: (files: File | File[]) => void;
|
|
36
|
+
} & VariantProps<typeof uploadWrapperVariants> & JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
37
|
+
declare const Upload: Component<UploadProps>;
|
|
38
|
+
|
|
39
|
+
export { type UploadProps, Upload as default };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { cva, classes } from '../../chunk/HKS7ET6T.js';
|
|
2
|
+
import { template, className, spread, mergeProps, insert, createComponent, effect } from 'solid-js/web';
|
|
3
|
+
import { splitProps, Show } from 'solid-js';
|
|
4
|
+
|
|
5
|
+
// src/components/upload/Upload.styles.ts
|
|
6
|
+
var uploadWrapperVariants = cva("", {
|
|
7
|
+
variants: {
|
|
8
|
+
style: {
|
|
9
|
+
boxed: "flex flex-col items-center justify-center border border-gray-300 rounded-md p-4 bg-white dark:bg-gray-800 text-gray-700 hover:text-gray-900 text-center",
|
|
10
|
+
button: "px-4 py-2 rounded inline-flex items-center gap-2 text-white transition-colors"
|
|
11
|
+
},
|
|
12
|
+
color: {
|
|
13
|
+
primary: "bg-blue-500 hover:bg-blue-600",
|
|
14
|
+
success: "bg-green-500 hover:bg-green-600",
|
|
15
|
+
info: "bg-sky-500 hover:bg-sky-600",
|
|
16
|
+
warning: "bg-yellow-500 hover:bg-yellow-600",
|
|
17
|
+
danger: "bg-red-500 hover:bg-red-600",
|
|
18
|
+
gray: ""
|
|
19
|
+
// usado solo en style="boxed"
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
sm: "text-sm",
|
|
23
|
+
md: "text-base",
|
|
24
|
+
lg: "text-lg"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
style: "boxed",
|
|
29
|
+
color: "gray",
|
|
30
|
+
size: "md"
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
var fileInputClass = "absolute inset-0 w-full h-full opacity-0 cursor-pointer";
|
|
34
|
+
var fileIconClass = "w-6 h-6";
|
|
35
|
+
var fileLabelClass = "font-medium";
|
|
36
|
+
|
|
37
|
+
// src/components/upload/Upload.tsx
|
|
38
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
39
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div><label class="cursor-pointer relative w-full h-full"><input type=file><div><span>`);
|
|
40
|
+
var Upload = (props) => {
|
|
41
|
+
const [local, variantProps, otherProps] = splitProps(props, ["icon", "label", "multiple", "disabled", "accept", "dragDrop", "name", "onChange"], ["style", "color", "size"]);
|
|
42
|
+
const handleChange = (e) => {
|
|
43
|
+
const files = e.target.files;
|
|
44
|
+
if (!files || files.length === 0) return;
|
|
45
|
+
const result = local.multiple ? Array.from(files) : files[0];
|
|
46
|
+
if (result) {
|
|
47
|
+
local.onChange?.(result);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return (() => {
|
|
51
|
+
var _el$ = _tmpl$2(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$6 = _el$4.firstChild;
|
|
52
|
+
_el$3.addEventListener("change", handleChange);
|
|
53
|
+
className(_el$3, fileInputClass);
|
|
54
|
+
spread(_el$3, mergeProps({
|
|
55
|
+
get name() {
|
|
56
|
+
return local.name;
|
|
57
|
+
},
|
|
58
|
+
get multiple() {
|
|
59
|
+
return local.multiple;
|
|
60
|
+
},
|
|
61
|
+
get accept() {
|
|
62
|
+
return local.accept;
|
|
63
|
+
},
|
|
64
|
+
get disabled() {
|
|
65
|
+
return local.disabled;
|
|
66
|
+
}
|
|
67
|
+
}, otherProps), false, false);
|
|
68
|
+
insert(_el$4, createComponent(Show, {
|
|
69
|
+
get when() {
|
|
70
|
+
return local.icon;
|
|
71
|
+
},
|
|
72
|
+
get children() {
|
|
73
|
+
var _el$5 = _tmpl$();
|
|
74
|
+
className(_el$5, fileIconClass);
|
|
75
|
+
insert(_el$5, () => local.icon);
|
|
76
|
+
return _el$5;
|
|
77
|
+
}
|
|
78
|
+
}), _el$6);
|
|
79
|
+
className(_el$6, fileLabelClass);
|
|
80
|
+
insert(_el$6, () => local.label);
|
|
81
|
+
effect((_p$) => {
|
|
82
|
+
var _v$ = uploadWrapperVariants(variantProps), _v$2 = classes(variantProps.style === "boxed" ? "flex flex-col items-center justify-center gap-2" : "flex flex-row items-center justify-center gap-2");
|
|
83
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
84
|
+
_v$2 !== _p$.t && className(_el$4, _p$.t = _v$2);
|
|
85
|
+
return _p$;
|
|
86
|
+
}, {
|
|
87
|
+
e: void 0,
|
|
88
|
+
t: void 0
|
|
89
|
+
});
|
|
90
|
+
return _el$;
|
|
91
|
+
})();
|
|
92
|
+
};
|
|
93
|
+
var Upload_default = Upload;
|
|
94
|
+
|
|
95
|
+
// src/components/upload/index.ts
|
|
96
|
+
var upload_default = Upload_default;
|
|
97
|
+
|
|
98
|
+
export { upload_default as default };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {
|
|
2
|
+
classes,
|
|
3
|
+
cva
|
|
4
|
+
} from "../../chunk/P7WPLZNA.jsx";
|
|
5
|
+
|
|
6
|
+
// src/components/upload/Upload.tsx
|
|
7
|
+
import { splitProps, Show } from "solid-js";
|
|
8
|
+
|
|
9
|
+
// src/components/upload/Upload.styles.ts
|
|
10
|
+
var uploadWrapperVariants = cva("", {
|
|
11
|
+
variants: {
|
|
12
|
+
style: {
|
|
13
|
+
boxed: "flex flex-col items-center justify-center border border-gray-300 rounded-md p-4 bg-white dark:bg-gray-800 text-gray-700 hover:text-gray-900 text-center",
|
|
14
|
+
button: "px-4 py-2 rounded inline-flex items-center gap-2 text-white transition-colors"
|
|
15
|
+
},
|
|
16
|
+
color: {
|
|
17
|
+
primary: "bg-blue-500 hover:bg-blue-600",
|
|
18
|
+
success: "bg-green-500 hover:bg-green-600",
|
|
19
|
+
info: "bg-sky-500 hover:bg-sky-600",
|
|
20
|
+
warning: "bg-yellow-500 hover:bg-yellow-600",
|
|
21
|
+
danger: "bg-red-500 hover:bg-red-600",
|
|
22
|
+
gray: ""
|
|
23
|
+
// usado solo en style="boxed"
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
sm: "text-sm",
|
|
27
|
+
md: "text-base",
|
|
28
|
+
lg: "text-lg"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
style: "boxed",
|
|
33
|
+
color: "gray",
|
|
34
|
+
size: "md"
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
var fileInputClass = "absolute inset-0 w-full h-full opacity-0 cursor-pointer";
|
|
38
|
+
var fileIconClass = "w-6 h-6";
|
|
39
|
+
var fileLabelClass = "font-medium";
|
|
40
|
+
|
|
41
|
+
// src/components/upload/Upload.tsx
|
|
42
|
+
var Upload = (props) => {
|
|
43
|
+
const [local, variantProps, otherProps] = splitProps(
|
|
44
|
+
props,
|
|
45
|
+
[
|
|
46
|
+
"icon",
|
|
47
|
+
"label",
|
|
48
|
+
"multiple",
|
|
49
|
+
"disabled",
|
|
50
|
+
"accept",
|
|
51
|
+
"dragDrop",
|
|
52
|
+
"name",
|
|
53
|
+
"onChange"
|
|
54
|
+
],
|
|
55
|
+
["style", "color", "size"]
|
|
56
|
+
);
|
|
57
|
+
const handleChange = (e) => {
|
|
58
|
+
const files = e.target.files;
|
|
59
|
+
if (!files || files.length === 0) return;
|
|
60
|
+
const result = local.multiple ? Array.from(files) : files[0];
|
|
61
|
+
if (result) {
|
|
62
|
+
local.onChange?.(result);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const handleDrop = (e) => {
|
|
66
|
+
if (!local.dragDrop) return;
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
const files = e.dataTransfer?.files;
|
|
69
|
+
if (!files || files.length === 0) return;
|
|
70
|
+
const result = local.multiple ? Array.from(files) : files[0];
|
|
71
|
+
if (result) {
|
|
72
|
+
local.onChange?.(result);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const handleDragOver = (e) => {
|
|
76
|
+
if (local.dragDrop) e.preventDefault();
|
|
77
|
+
};
|
|
78
|
+
return <div class={uploadWrapperVariants(variantProps)}>
|
|
79
|
+
<label class="cursor-pointer relative w-full h-full">
|
|
80
|
+
<input
|
|
81
|
+
type="file"
|
|
82
|
+
class={fileInputClass}
|
|
83
|
+
name={local.name}
|
|
84
|
+
multiple={local.multiple}
|
|
85
|
+
accept={local.accept}
|
|
86
|
+
disabled={local.disabled}
|
|
87
|
+
onChange={handleChange}
|
|
88
|
+
{...otherProps}
|
|
89
|
+
/>
|
|
90
|
+
<div
|
|
91
|
+
class={classes(
|
|
92
|
+
variantProps.style === "boxed" ? "flex flex-col items-center justify-center gap-2" : "flex flex-row items-center justify-center gap-2"
|
|
93
|
+
)}
|
|
94
|
+
>
|
|
95
|
+
<Show when={local.icon}>
|
|
96
|
+
<span class={fileIconClass}>{local.icon}</span>
|
|
97
|
+
</Show>
|
|
98
|
+
<span class={fileLabelClass}>{local.label}</span>
|
|
99
|
+
</div>
|
|
100
|
+
</label>
|
|
101
|
+
</div>;
|
|
102
|
+
};
|
|
103
|
+
var Upload_default = Upload;
|
|
104
|
+
|
|
105
|
+
// src/components/upload/index.ts
|
|
106
|
+
var upload_default = Upload_default;
|
|
107
|
+
export {
|
|
108
|
+
upload_default as default
|
|
109
|
+
};
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* src/styles/base/index.css */
|
|
2
|
+
@layer base {
|
|
3
|
+
html {
|
|
4
|
+
scrollbar-color: var(--color-bg-tertiary) transparent;
|
|
5
|
+
}
|
|
6
|
+
body {
|
|
7
|
+
color: var(--color-fg-body);
|
|
8
|
+
background: var(--color-bg-body);
|
|
9
|
+
overflow-x: clip;
|
|
10
|
+
touch-action: manipulation;
|
|
11
|
+
}
|
|
12
|
+
*::selection {
|
|
13
|
+
color: var(--color-fg-inverse);
|
|
14
|
+
background: var(--color-bg-accent);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* src/styles/themes/dark.css */
|
|
19
|
+
@layer theme {
|
|
20
|
+
[data-theme=dark] {
|
|
21
|
+
--color-bg-body: var(--color-zinc-900);
|
|
22
|
+
--color-bg-inverse: var(--color-zinc-100);
|
|
23
|
+
--color-bg-primary: var(--color-zinc-800);
|
|
24
|
+
--color-bg-secondary: var(--color-zinc-700);
|
|
25
|
+
--color-bg-tertiary: var(--color-zinc-600);
|
|
26
|
+
--color-bg-accent: var(--color-sky-600);
|
|
27
|
+
--color-bg-positive: var(--color-emerald-700);
|
|
28
|
+
--color-bg-destructive: var(--color-rose-800);
|
|
29
|
+
--color-fg-body: var(--color-zinc-100);
|
|
30
|
+
--color-fg-inverse: var(--color-zinc-900);
|
|
31
|
+
--color-fg-primary: var(--color-zinc-200);
|
|
32
|
+
--color-fg-secondary: var(--color-zinc-300);
|
|
33
|
+
--color-fg-tertiary: var(--color-zinc-400);
|
|
34
|
+
--color-fg-accent: var(--color-sky-500);
|
|
35
|
+
--color-fg-positive: var(--color-emerald-600);
|
|
36
|
+
--color-fg-destructive: var(--color-rose-700);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
@layer base {
|
|
40
|
+
[data-theme=dark] {
|
|
41
|
+
color-scheme: only dark;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* src/styles/themes/light.css */
|
|
46
|
+
@layer theme {
|
|
47
|
+
[data-theme=light] {
|
|
48
|
+
--color-bg-body: var(--color-zinc-50);
|
|
49
|
+
--color-bg-inverse: var(--color-zinc-900);
|
|
50
|
+
--color-bg-primary: var(--color-zinc-200);
|
|
51
|
+
--color-bg-secondary: var(--color-zinc-300);
|
|
52
|
+
--color-bg-tertiary: var(--color-zinc-400);
|
|
53
|
+
--color-bg-accent: var(--color-sky-600);
|
|
54
|
+
--color-bg-positive: var(--color-emerald-700);
|
|
55
|
+
--color-bg-destructive: var(--color-rose-700);
|
|
56
|
+
--color-fg-body: var(--color-zinc-900);
|
|
57
|
+
--color-fg-inverse: var(--color-zinc-100);
|
|
58
|
+
--color-fg-primary: var(--color-zinc-800);
|
|
59
|
+
--color-fg-secondary: var(--color-zinc-700);
|
|
60
|
+
--color-fg-tertiary: var(--color-zinc-600);
|
|
61
|
+
--color-fg-accent: var(--color-sky-700);
|
|
62
|
+
--color-fg-positive: var(--color-emerald-800);
|
|
63
|
+
--color-fg-destructive: var(--color-rose-800);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
@layer base {
|
|
67
|
+
[data-theme=light] {
|
|
68
|
+
color-scheme: only light;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* src/index.css */
|
|
73
|
+
@theme { --color-light: var(--color-zinc-100); --color-dark: var(--color-zinc-900); --color-bg-body: var(--color-bg-body); --color-bg-inverse: var(--color-bg-inverse); --color-bg-primary: var(--color-bg-primary); --color-bg-secondary: var(--color-bg-secondary); --color-bg-tertiary: var(--color-bg-tertiary); --color-bg-accent: var(--color-bg-accent); --color-bg-positive: var(--color-bg-positive); --color-bg-destructive: var(--color-bg-destructive); --color-fg-body: var(--color-fg-body); --color-fg-inverse: var(--color-fg-inverse); --color-fg-primary: var(--color-fg-primary); --color-fg-secondary: var(--color-fg-secondary); --color-fg-tertiary: var(--color-fg-tertiary); --color-fg-accent: var(--color-fg-accent); --color-fg-positive: var(--color-fg-positive); --color-fg-destructive: var(--color-fg-destructive); }
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { A as Avatar } from './Avatar-CzIirpVq.js';
|
|
2
|
+
export { B as Button } from './Button-B50OLXuV.js';
|
|
3
|
+
export { I as Input } from './Input-BQbTzjIO.js';
|
|
4
|
+
export { T as Textarea } from './Textarea-Cpdk7m6S.js';
|
|
5
|
+
import 'solid-js';
|
|
6
|
+
import './classes-B_S9K-9I.js';
|
|
7
|
+
import './components/polymorphic/index.js';
|
package/dist/index.js
ADDED
package/dist/index.jsx
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
input_default
|
|
3
|
+
} from "./chunk/N7BXP7EI.jsx";
|
|
4
|
+
import {
|
|
5
|
+
textarea_default
|
|
6
|
+
} from "./chunk/WB6NEEQV.jsx";
|
|
7
|
+
import {
|
|
8
|
+
Avatar_default
|
|
9
|
+
} from "./chunk/4RCWSX7S.jsx";
|
|
10
|
+
import {
|
|
11
|
+
button_default
|
|
12
|
+
} from "./chunk/GA2HCFRS.jsx";
|
|
13
|
+
import "./chunk/KACNXPUM.jsx";
|
|
14
|
+
import "./chunk/P7WPLZNA.jsx";
|
|
15
|
+
export {
|
|
16
|
+
Avatar_default as Avatar,
|
|
17
|
+
button_default as Button,
|
|
18
|
+
input_default as Input,
|
|
19
|
+
textarea_default as Textarea
|
|
20
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pathscale/ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"author": "pathscale",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/pathscale/ui"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@biomejs/biome": "1.9.4",
|
|
12
|
+
"@tailwindcss/vite": "^4.1.6",
|
|
13
|
+
"@types/bun": "^1.2.12",
|
|
14
|
+
"esbuild-plugin-solid": "^0.6.0",
|
|
15
|
+
"tailwindcss": "^4.1.6",
|
|
16
|
+
"tsup": "^8.4.0",
|
|
17
|
+
"typescript": "^5.8.3",
|
|
18
|
+
"vite": "^6.3.5",
|
|
19
|
+
"vite-plugin-solid": "^2.11.6",
|
|
20
|
+
"vite-tsconfig-paths": "^5.1.4"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"solid-js": "^1.8"
|
|
24
|
+
},
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"solid": "./dist/index.jsx",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./*": {
|
|
32
|
+
"types": "./dist/components/*/index.d.ts",
|
|
33
|
+
"solid": "./dist/components/*/index.jsx",
|
|
34
|
+
"default": "./dist/components/*/index.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/pathscale/ui/issues"
|
|
39
|
+
},
|
|
40
|
+
"description": "Highly opinionated SolidJS component library — batteries and kitchen sink included, but optimized and shiny.",
|
|
41
|
+
"files": [
|
|
42
|
+
"dist"
|
|
43
|
+
],
|
|
44
|
+
"homepage": "https://github.com/pathscale/ui",
|
|
45
|
+
"keywords": [
|
|
46
|
+
"solid",
|
|
47
|
+
"solidjs"
|
|
48
|
+
],
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup",
|
|
52
|
+
"clean": "rm -rf dist node_modules",
|
|
53
|
+
"dev": "vite serve playground --host",
|
|
54
|
+
"format": "biome format --write",
|
|
55
|
+
"lint": "biome lint --write"
|
|
56
|
+
},
|
|
57
|
+
"sideEffects": false,
|
|
58
|
+
"type": "module",
|
|
59
|
+
"types": "./dist/index.d.ts",
|
|
60
|
+
"typesVersions": {
|
|
61
|
+
"*": {
|
|
62
|
+
"*": [
|
|
63
|
+
"./dist/index.d.ts"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|