@bouku/core 0.2.2 → 0.2.3
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 +1 -0
- package/dist/components/button/_.js +3 -1
- package/dist/components/button/actions.d.ts +14 -0
- package/dist/components/button/actions.js +8 -0
- package/dist/utils/types/element.d.ts +5 -0
- package/package.json +7 -2
- package/dist/assets/styles/button.css +0 -76
- package/dist/components/accordion/index.d.ts +0 -6
- package/dist/components/accordion/index.js +0 -12
- package/dist/components/accordion/tab.d.ts +0 -4
- package/dist/components/accordion/tab.js +0 -35
- package/dist/components/dropdown/normal.d.ts +0 -10
- package/dist/components/dropdown/normal.js +0 -22
- package/dist/components/fade/_.d.ts +0 -1
- package/dist/components/fade/_.js +0 -8
- package/dist/components/fade/circle.d.ts +0 -10
- package/dist/components/fade/circle.js +0 -8
- package/dist/components/heading/_.d.ts +0 -2
- package/dist/components/heading/_.js +0 -10
- package/dist/components/heading/normal.d.ts +0 -24
- package/dist/components/heading/normal.js +0 -26
- package/dist/components/heading/page.d.ts +0 -25
- package/dist/components/heading/page.js +0 -26
- package/dist/components/information/_.d.ts +0 -1
- package/dist/components/information/_.js +0 -8
- package/dist/components/information/card.d.ts +0 -8
- package/dist/components/information/card.js +0 -22
- package/dist/components/layout/absolute.d.ts +0 -9
- package/dist/components/layout/absolute.js +0 -12
- package/dist/components/layout/fade.d.ts +0 -7
- package/dist/components/layout/fade.js +0 -20
- package/dist/components/layout/flex.d.ts +0 -17
- package/dist/components/layout/flex.js +0 -49
- package/dist/components/layout/media-row.d.ts +0 -15
- package/dist/components/layout/media-row.js +0 -11
- package/dist/components/layout/rnd.d.ts +0 -10
- package/dist/components/layout/rnd.js +0 -32
- package/dist/components/layout/scroll-box.d.ts +0 -14
- package/dist/components/layout/scroll-box.js +0 -11
- package/dist/components/pagination/index.d.ts +0 -9
- package/dist/components/pagination/index.js +0 -21
- package/dist/components/progress/_.d.ts +0 -1
- package/dist/components/progress/_.js +0 -8
- package/dist/components/progress/bar.d.ts +0 -4
- package/dist/components/progress/bar.js +0 -12
- package/dist/components/table/_.d.ts +0 -1
- package/dist/components/table/_.js +0 -8
- package/dist/components/table/header.d.ts +0 -10
- package/dist/components/table/header.js +0 -20
- package/dist/components/table/index.d.ts +0 -15
- package/dist/components/table/index.js +0 -37
- package/dist/components/table/normal.d.ts +0 -7
- package/dist/components/table/normal.js +0 -20
- package/dist/components/table/row.d.ts +0 -22
- package/dist/components/table/row.js +0 -40
- package/dist/components/table/sorter.d.ts +0 -10
- package/dist/components/table/sorter.js +0 -53
- package/dist/ui/button/_.d.ts +0 -2
- package/dist/ui/button/_.js +0 -10
- package/dist/ui/button/copy.d.ts +0 -6
- package/dist/ui/button/copy.js +0 -16
- package/dist/ui/button/normal.d.ts +0 -11
- package/dist/ui/button/normal.js +0 -48
- package/dist/ui/date/_.d.ts +0 -1
- package/dist/ui/date/_.js +0 -8
- package/dist/ui/date/time-ago.d.ts +0 -7
- package/dist/ui/date/time-ago.js +0 -13
- package/dist/ui/dropdown/normal.d.ts +0 -10
- package/dist/ui/dropdown/normal.js +0 -22
- package/dist/ui/fade/_.d.ts +0 -1
- package/dist/ui/fade/_.js +0 -8
- package/dist/ui/fade/circle.d.ts +0 -10
- package/dist/ui/fade/circle.js +0 -8
- package/dist/ui/heading/_.d.ts +0 -2
- package/dist/ui/heading/_.js +0 -10
- package/dist/ui/heading/normal.d.ts +0 -24
- package/dist/ui/heading/normal.js +0 -26
- package/dist/ui/heading/page.d.ts +0 -25
- package/dist/ui/heading/page.js +0 -26
- package/dist/ui/index.d.ts +0 -19
- package/dist/ui/index.js +0 -45
- package/dist/ui/information/_.d.ts +0 -1
- package/dist/ui/information/_.js +0 -8
- package/dist/ui/information/card.d.ts +0 -7
- package/dist/ui/information/card.js +0 -20
- package/dist/ui/layout/_.d.ts +0 -2
- package/dist/ui/layout/_.js +0 -10
- package/dist/ui/layout/absolute.d.ts +0 -9
- package/dist/ui/layout/absolute.js +0 -12
- package/dist/ui/layout/fade.d.ts +0 -7
- package/dist/ui/layout/fade.js +0 -20
- package/dist/ui/layout/flex.d.ts +0 -17
- package/dist/ui/layout/flex.js +0 -49
- package/dist/ui/layout/footer.d.ts +0 -15
- package/dist/ui/layout/footer.js +0 -13
- package/dist/ui/layout/media-row.d.ts +0 -15
- package/dist/ui/layout/media-row.js +0 -11
- package/dist/ui/layout/rnd.d.ts +0 -10
- package/dist/ui/layout/rnd.js +0 -32
- package/dist/ui/layout/scroll-box.d.ts +0 -14
- package/dist/ui/layout/scroll-box.js +0 -11
- package/dist/ui/layout/section.d.ts +0 -15
- package/dist/ui/layout/section.js +0 -19
- package/dist/ui/layout/separator.d.ts +0 -3
- package/dist/ui/layout/separator.js +0 -8
- package/dist/ui/link/_.d.ts +0 -1
- package/dist/ui/link/_.js +0 -8
- package/dist/ui/link/tab.d.ts +0 -22
- package/dist/ui/link/tab.js +0 -30
- package/dist/ui/list/index.d.ts +0 -2
- package/dist/ui/list/index.js +0 -10
- package/dist/ui/list/item.d.ts +0 -9
- package/dist/ui/list/item.js +0 -9
- package/dist/ui/list/search-bar.d.ts +0 -14
- package/dist/ui/list/search-bar.js +0 -33
- package/dist/ui/list/variants/bullet.d.ts +0 -9
- package/dist/ui/list/variants/bullet.js +0 -21
- package/dist/ui/list/variants/number.d.ts +0 -10
- package/dist/ui/list/variants/number.js +0 -23
- package/dist/ui/pagination/index.d.ts +0 -9
- package/dist/ui/pagination/index.js +0 -21
- package/dist/ui/progress/_.d.ts +0 -1
- package/dist/ui/progress/_.js +0 -8
- package/dist/ui/progress/bar.d.ts +0 -4
- package/dist/ui/progress/bar.js +0 -12
- package/dist/ui/table/_.d.ts +0 -1
- package/dist/ui/table/_.js +0 -8
- package/dist/ui/table/normal.d.ts +0 -7
- package/dist/ui/table/normal.js +0 -20
- package/dist/ui/text/_.d.ts +0 -2
- package/dist/ui/text/_.js +0 -10
- package/dist/ui/text/badge.d.ts +0 -18
- package/dist/ui/text/badge.js +0 -42
- package/dist/ui/text/input.d.ts +0 -39
- package/dist/ui/text/input.js +0 -50
|
@@ -12,11 +12,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.FileUploader = exports.CopyButton = exports.Button = void 0;
|
|
15
|
+
exports.Actions = exports.FileUploader = exports.CopyButton = exports.Button = void 0;
|
|
16
16
|
var normal_1 = require("./normal");
|
|
17
17
|
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(normal_1).default; } });
|
|
18
18
|
var copy_1 = require("./copy");
|
|
19
19
|
Object.defineProperty(exports, "CopyButton", { enumerable: true, get: function () { return __importDefault(copy_1).default; } });
|
|
20
20
|
var upload_1 = require("./upload");
|
|
21
21
|
Object.defineProperty(exports, "FileUploader", { enumerable: true, get: function () { return __importDefault(upload_1).default; } });
|
|
22
|
+
var actions_1 = require("./actions");
|
|
23
|
+
Object.defineProperty(exports, "Actions", { enumerable: true, get: function () { return __importDefault(actions_1).default; } });
|
|
22
24
|
//
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ButtonProps } from "./normal";
|
|
2
|
+
type Props = {
|
|
3
|
+
style?: string;
|
|
4
|
+
size?: ButtonProps["size"];
|
|
5
|
+
items: Item[];
|
|
6
|
+
};
|
|
7
|
+
type Item = {
|
|
8
|
+
variant?: ButtonProps["variant"];
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
action?: () => void;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
declare const Actions: ({ style, size, items }: Props) => import("react").JSX.Element;
|
|
14
|
+
export default Actions;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const flex_1 = require("../container/flex");
|
|
5
|
+
const normal_1 = require("./normal");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
const Actions = ({ style, size = "md", items }) => ((0, jsx_runtime_1.jsx)(flex_1.RowBox, { style: (0, utils_1.cn)("gap-2 items-center", style), children: items.map(({ variant, icon, action, children }, i) => ((0, jsx_runtime_1.jsx)(normal_1.Button, { size: size, variant: variant, icon: icon, action: action, children: children }, i))) }));
|
|
8
|
+
exports.default = Actions;
|
|
@@ -11,6 +11,11 @@ export type Component = {
|
|
|
11
11
|
style?: string;
|
|
12
12
|
children?: ReactNode;
|
|
13
13
|
};
|
|
14
|
+
export type Clickable = Component & {
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
action?: () => void;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
};
|
|
14
19
|
export type Hoverable = {
|
|
15
20
|
onHover?: () => void;
|
|
16
21
|
onLeave?: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
|
|
2
3
|
"name": "@bouku/core",
|
|
3
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.3",
|
|
4
5
|
"main": "./dist/index.js",
|
|
5
6
|
"types": "./dist/index.d.ts",
|
|
6
7
|
"license": "MIT",
|
|
@@ -20,9 +21,11 @@
|
|
|
20
21
|
"./styles.css": "./dist/styles.css"
|
|
21
22
|
},
|
|
22
23
|
"engines": {},
|
|
24
|
+
|
|
23
25
|
"scripts": {
|
|
24
26
|
"build": "tsc"
|
|
25
27
|
},
|
|
28
|
+
|
|
26
29
|
"dependencies": {
|
|
27
30
|
"clsx": "^2.1.1",
|
|
28
31
|
"framer-motion": "^12.23.6",
|
|
@@ -33,6 +36,7 @@
|
|
|
33
36
|
"tailwind-variants": "^1.0.0",
|
|
34
37
|
"ts-helper-kit": "^0.0.9"
|
|
35
38
|
},
|
|
39
|
+
|
|
36
40
|
"devDependencies": {
|
|
37
41
|
"@types/node": "^24.3.1",
|
|
38
42
|
"@types/react": "^19.1.10",
|
|
@@ -42,4 +46,5 @@
|
|
|
42
46
|
"react-router-dom": "^7.12.0",
|
|
43
47
|
"typescript": "^5.9.2"
|
|
44
48
|
}
|
|
45
|
-
|
|
49
|
+
|
|
50
|
+
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
.test-button::before {
|
|
2
|
-
content: "";
|
|
3
|
-
display: block;
|
|
4
|
-
position: absolute;
|
|
5
|
-
top: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
background:
|
|
10
|
-
linear-gradient(
|
|
11
|
-
180deg,
|
|
12
|
-
rgba(20, 60, 140, 0) 0%,
|
|
13
|
-
rgba(20, 60, 140, .32) 100%
|
|
14
|
-
),
|
|
15
|
-
rgba(60, 120, 255, .12);
|
|
16
|
-
border-radius: inherit;
|
|
17
|
-
box-shadow: inset 0 0 12px #7fb0ff3d;
|
|
18
|
-
transition: .2s opacity cubic-bezier(.6, .6, 0, 1);
|
|
19
|
-
z-index: -1;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.test-button::after {
|
|
23
|
-
content: "";
|
|
24
|
-
display: block;
|
|
25
|
-
position: absolute;
|
|
26
|
-
top: 0;
|
|
27
|
-
left: 0;
|
|
28
|
-
width: 100%;
|
|
29
|
-
height: 100%;
|
|
30
|
-
background:
|
|
31
|
-
linear-gradient(
|
|
32
|
-
180deg,
|
|
33
|
-
rgba(20, 60, 140, 0) 0%,
|
|
34
|
-
rgba(20, 60, 140, .42) 100%
|
|
35
|
-
),
|
|
36
|
-
rgba(60, 120, 255, .24);
|
|
37
|
-
border-radius: inherit;
|
|
38
|
-
box-shadow: inset 0 0 12px #7fb0ff70;
|
|
39
|
-
transition: .2s opacity cubic-bezier(.6, .6, 0, 1);
|
|
40
|
-
opacity: 0;
|
|
41
|
-
z-index: -1;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.test-button-border {
|
|
45
|
-
position: absolute;
|
|
46
|
-
top: 0;
|
|
47
|
-
left: 0;
|
|
48
|
-
width: 100%;
|
|
49
|
-
height: 100%;
|
|
50
|
-
border-radius: inherit;
|
|
51
|
-
z-index: -1;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.test-button-border::before {
|
|
55
|
-
content: "";
|
|
56
|
-
position: absolute;
|
|
57
|
-
inset: 0;
|
|
58
|
-
padding: 1px;
|
|
59
|
-
background:
|
|
60
|
-
linear-gradient(
|
|
61
|
-
180deg,
|
|
62
|
-
rgba(180, 210, 255, .24) 0%,
|
|
63
|
-
rgba(180, 210, 255, 0) 100%
|
|
64
|
-
),
|
|
65
|
-
linear-gradient(
|
|
66
|
-
0deg,
|
|
67
|
-
rgba(180, 210, 255, .32),
|
|
68
|
-
rgba(180, 210, 255, .32)
|
|
69
|
-
);
|
|
70
|
-
border-radius: inherit;
|
|
71
|
-
mask:
|
|
72
|
-
linear-gradient(#fff 0 0) content-box,
|
|
73
|
-
linear-gradient(#fff 0 0);
|
|
74
|
-
mask-composite: exclude;
|
|
75
|
-
pointer-events: none;
|
|
76
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.default = Accordion;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const flex_1 = require("../layout/flex");
|
|
8
|
-
const tab_1 = require("./tab");
|
|
9
|
-
function Accordion({ items }) {
|
|
10
|
-
const [activeItem, setActiveItem] = (0, react_1.useState)(0);
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(flex_1.ColumnBox, { style: "gap-5 overflow-y-auto scrollbar-none", children: items.map(({ label, content }, i) => ((0, jsx_runtime_1.jsxs)(flex_1.ColumnBox, { style: "gap-5", children: [(0, jsx_runtime_1.jsx)("div", { onClick: () => setActiveItem(i === activeItem ? null : i), children: (0, jsx_runtime_1.jsx)(tab_1.SectionHeader, { isActive: i === activeItem, label: label }) }), i === activeItem && ((0, jsx_runtime_1.jsx)(flex_1.RowBox, { style: "w-full", center: true, children: content }))] }, i))) }));
|
|
12
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.SectionHeader = SectionHeader;
|
|
8
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
const chevron_up_svg_1 = __importDefault(require("../../assets/icons/chevron-up.svg"));
|
|
10
|
-
const tailwind_variants_1 = require("tailwind-variants");
|
|
11
|
-
function SectionHeader({ isActive, label }) {
|
|
12
|
-
const s = getStyles({ isActive });
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: s.container(), children: [(0, jsx_runtime_1.jsx)("span", { className: s.label(), children: label }), (0, jsx_runtime_1.jsx)(chevron_up_svg_1.default, { className: s.chevron() })] }));
|
|
14
|
-
}
|
|
15
|
-
const getStyles = (0, tailwind_variants_1.tv)({
|
|
16
|
-
slots: {
|
|
17
|
-
container: "flex justify-between items-center gap-8 px-3 py-2 border rounded duration-200 cursor-pointer",
|
|
18
|
-
label: "font-bold",
|
|
19
|
-
chevron: "duration-200"
|
|
20
|
-
},
|
|
21
|
-
variants: {
|
|
22
|
-
isActive: {
|
|
23
|
-
true: {
|
|
24
|
-
container: "bg-surface-light border-border-light",
|
|
25
|
-
label: "text-primary",
|
|
26
|
-
chevron: "text-accent rotate-180"
|
|
27
|
-
},
|
|
28
|
-
false: {
|
|
29
|
-
container: "bg-surface hover:bg-surface-light border-border",
|
|
30
|
-
label: "text-primary-dark",
|
|
31
|
-
chevron: "text-primary-dark"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.default = Dropdown;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const framer_motion_1 = require("framer-motion");
|
|
8
|
-
function Dropdown({ options, children }) {
|
|
9
|
-
const [isOpen, setOpen] = (0, react_1.useState)(false);
|
|
10
|
-
const boom = (action) => {
|
|
11
|
-
action();
|
|
12
|
-
setOpen(false);
|
|
13
|
-
};
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: styles.container, children: [(0, jsx_runtime_1.jsx)("div", { onClick: () => setOpen(true), children: children }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: isOpen && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles.dropdown, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, children: options.map(({ label, action }, i) => ((0, jsx_runtime_1.jsx)("div", { className: "cursor-pointer duration-200 hover:brightness-115", onClick: () => boom(action), children: label }, i))) }, "dropdown")) })] }));
|
|
15
|
-
}
|
|
16
|
-
const styles = {
|
|
17
|
-
container: "relative shrink-0",
|
|
18
|
-
subcontainer: "flex flex-col gap-1 w-full",
|
|
19
|
-
label: "text-xs text-slate-600",
|
|
20
|
-
trigger: "flex justify-between items-center px-3 py-2 bg-slate-200/50 hover:bg-slate-200/80 border border-slate-300 outline-blue-500 rounded text-sm duration-200 cursor-pointer",
|
|
21
|
-
dropdown: "absolute mt-2 z-50 flex flex-col items-end justify-end gap-1 w-full bg-slate-950 rounded border border-border-dark p-3 pr-4 text-sm max-h-46 overflow-y-auto"
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as CircleFade } from "./circle";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CircleFade = void 0;
|
|
7
|
-
var circle_1 = require("./circle");
|
|
8
|
-
Object.defineProperty(exports, "CircleFade", { enumerable: true, get: function () { return __importDefault(circle_1).default; } });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = CircleFade;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const style_1 = require("../../utils/functions/style");
|
|
6
|
-
function CircleFade({ className, style }) {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.cn)("absolute size-24 bg-radial from-background", className), style: style }));
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PageHeading = exports.Heading = void 0;
|
|
7
|
-
var normal_1 = require("./normal");
|
|
8
|
-
Object.defineProperty(exports, "Heading", { enumerable: true, get: function () { return __importDefault(normal_1).default; } });
|
|
9
|
-
var page_1 = require("./page");
|
|
10
|
-
Object.defineProperty(exports, "PageHeading", { enumerable: true, get: function () { return __importDefault(page_1).default; } });
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
type Props = {
|
|
3
|
-
badge?: string;
|
|
4
|
-
image?: string;
|
|
5
|
-
title: ReactNode;
|
|
6
|
-
subtitle?: ReactNode;
|
|
7
|
-
style?: Styles;
|
|
8
|
-
};
|
|
9
|
-
type Styles = {
|
|
10
|
-
container?: string;
|
|
11
|
-
badge?: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
subtitle?: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Text heading with badge, title, subtitle.
|
|
17
|
-
*
|
|
18
|
-
* @param {string} badge - Little note above the title (optional).
|
|
19
|
-
* @param {ReactNode} title - Main title content.
|
|
20
|
-
* @param {ReactNode} subtitle - Subtitle content (optional).
|
|
21
|
-
* @param {Styles} style - Additional styles (optional).
|
|
22
|
-
**/
|
|
23
|
-
export default function Heading({ badge, image, title, subtitle, style }: Props): import("react").JSX.Element;
|
|
24
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = Heading;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const style_1 = require("../../utils/functions/style");
|
|
6
|
-
const flex_1 = require("../layout/flex");
|
|
7
|
-
const badge_1 = require("../text/badge");
|
|
8
|
-
/**
|
|
9
|
-
* Text heading with badge, title, subtitle.
|
|
10
|
-
*
|
|
11
|
-
* @param {string} badge - Little note above the title (optional).
|
|
12
|
-
* @param {ReactNode} title - Main title content.
|
|
13
|
-
* @param {ReactNode} subtitle - Subtitle content (optional).
|
|
14
|
-
* @param {Styles} style - Additional styles (optional).
|
|
15
|
-
**/
|
|
16
|
-
function Heading({ badge, image, title, subtitle, style = {} }) {
|
|
17
|
-
const styles = (0, style_1.mergeStyles)(base, style);
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(flex_1.ColumnBox, { style: styles.container, children: [(0, jsx_runtime_1.jsx)(badge_1.Badge, { style: styles.badge, children: badge }), image && (0, jsx_runtime_1.jsx)("img", { className: styles.logo, src: image, alt: "Logo" }), (0, jsx_runtime_1.jsx)(flex_1.RowBox, { style: styles.title, children: title }), (0, jsx_runtime_1.jsx)(flex_1.RowBox, { style: styles.subtitle, children: subtitle })] }));
|
|
19
|
-
}
|
|
20
|
-
const base = {
|
|
21
|
-
container: "items-center",
|
|
22
|
-
badge: "mb-2",
|
|
23
|
-
logo: "mb-5 w-12",
|
|
24
|
-
title: "items-center gap-2 text-2xl sm:text-3xl 2xl:text-4xl font-bold text-primary",
|
|
25
|
-
subtitle: "items-center gap-2 max-sm:text-sm 2xl:text-lg text-center text-primary-light dark:text-primary-dark"
|
|
26
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
type Props = {
|
|
3
|
-
style?: Styles;
|
|
4
|
-
badge?: string;
|
|
5
|
-
icon?: ReactNode;
|
|
6
|
-
title: string;
|
|
7
|
-
subtitle?: string;
|
|
8
|
-
};
|
|
9
|
-
type Styles = {
|
|
10
|
-
container?: string;
|
|
11
|
-
badge?: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
subtitle?: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Text heading with badge, title, subtitle.
|
|
17
|
-
*
|
|
18
|
-
* @param {Styles} style - Additional styles. (optional)
|
|
19
|
-
* @param {string} badge - Little note above the title. (optional)
|
|
20
|
-
* @param {ReactNode} icon - Component displayed left of title. (optional)
|
|
21
|
-
* @param {string} title - Main title content.
|
|
22
|
-
* @param {string} subtitle - Subtitle content. (optional)
|
|
23
|
-
**/
|
|
24
|
-
export default function PageHeading({ style, badge, icon, title, subtitle }: Props): import("react").JSX.Element;
|
|
25
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = PageHeading;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const style_1 = require("../../utils/functions/style");
|
|
6
|
-
const flex_1 = require("../layout/flex");
|
|
7
|
-
const badge_1 = require("../text/badge");
|
|
8
|
-
/**
|
|
9
|
-
* Text heading with badge, title, subtitle.
|
|
10
|
-
*
|
|
11
|
-
* @param {Styles} style - Additional styles. (optional)
|
|
12
|
-
* @param {string} badge - Little note above the title. (optional)
|
|
13
|
-
* @param {ReactNode} icon - Component displayed left of title. (optional)
|
|
14
|
-
* @param {string} title - Main title content.
|
|
15
|
-
* @param {string} subtitle - Subtitle content. (optional)
|
|
16
|
-
**/
|
|
17
|
-
function PageHeading({ style = {}, badge, icon, title, subtitle }) {
|
|
18
|
-
const styles = (0, style_1.mergeStyles)(base, style);
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)(flex_1.ColumnBox, { style: styles.container, children: [(0, jsx_runtime_1.jsx)(badge_1.Badge, { style: styles.badge, children: badge }), (0, jsx_runtime_1.jsxs)(flex_1.RowBox, { style: styles.title, children: [icon, title] }), (0, jsx_runtime_1.jsx)(flex_1.RowBox, { style: styles.subtitle, children: subtitle })] }));
|
|
20
|
-
}
|
|
21
|
-
const base = {
|
|
22
|
-
container: "w-full items-center font-mono",
|
|
23
|
-
badge: "mb-2",
|
|
24
|
-
title: "items-center gap-2 mb-3 text-4xl sm:text-5xl 2xl:text-6xl text-center font-bold text-primary",
|
|
25
|
-
subtitle: "items-center gap-2 text-sm sm:text-base 2xl:text-lg text-center text-primary-light dark:text-primary-dark"
|
|
26
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Card } from "./card";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Card = void 0;
|
|
7
|
-
var card_1 = require("./card");
|
|
8
|
-
Object.defineProperty(exports, "Card", { enumerable: true, get: function () { return __importDefault(card_1).default; } });
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Card = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const flex_1 = require("../layout/flex");
|
|
6
|
-
const Card = ({ label, value, units, note }) => ((0, jsx_runtime_1.jsxs)(flex_1.ColumnBox, { style: s.card, children: [(0, jsx_runtime_1.jsx)("span", { className: s.label, children: label }), (0, jsx_runtime_1.jsxs)("span", { className: s.value, children: [formatValue(value), " ", units] }), (0, jsx_runtime_1.jsx)("span", { className: s.note, children: note })] }));
|
|
7
|
-
exports.Card = Card;
|
|
8
|
-
const formatValue = (x) => {
|
|
9
|
-
if (!x)
|
|
10
|
-
return "N/A";
|
|
11
|
-
if (typeof x === "string")
|
|
12
|
-
return x;
|
|
13
|
-
else if (typeof x === "number")
|
|
14
|
-
return x.toLocaleString("en-US");
|
|
15
|
-
};
|
|
16
|
-
const s = {
|
|
17
|
-
card: "gap-2 flex-1 p-5 bg-surface border border-border-light rounded-md shadow hover:brightness-120 duration-200",
|
|
18
|
-
label: "text-sm font-mono tracking-wide text-primary-dark uppercase",
|
|
19
|
-
value: "text-5xl font-bold",
|
|
20
|
-
note: "text-xs text-primary-dark"
|
|
21
|
-
};
|
|
22
|
-
exports.default = exports.Card;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactNode, RefObject } from "react";
|
|
2
|
-
type Props = {
|
|
3
|
-
pos?: string;
|
|
4
|
-
style?: string;
|
|
5
|
-
ref?: RefObject<HTMLDivElement | null>;
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
};
|
|
8
|
-
export default function AbsoluteBox({ pos, style, ref, children }: Props): import("react").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = AbsoluteBox;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const style_1 = require("../../utils/functions/style");
|
|
6
|
-
function AbsoluteBox({ pos, style, ref, children }) {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.cn)(styles.container, pos), ref: ref, children: (0, jsx_runtime_1.jsx)("div", { className: (0, style_1.cn)(styles.subcontainer, style), children: children }) }));
|
|
8
|
-
}
|
|
9
|
-
const styles = {
|
|
10
|
-
container: "absolute",
|
|
11
|
-
subcontainer: "relative w-full h-full"
|
|
12
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Component } from "../../utils/types/element";
|
|
2
|
-
type Props = Component & {
|
|
3
|
-
direction?: "up" | "left" | "down";
|
|
4
|
-
gradient?: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function FadeBox({ style, direction, gradient, children }: Props): import("react").JSX.Element;
|
|
7
|
-
export default FadeBox;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FadeBox = FadeBox;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const style_1 = require("../../utils/functions/style");
|
|
6
|
-
const tailwind_variants_1 = require("tailwind-variants");
|
|
7
|
-
function FadeBox({ style, direction = "up", gradient, children }) {
|
|
8
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.cn)("relative", style), children: [children, (0, jsx_runtime_1.jsx)("div", { className: (0, style_1.cn)(styles({ direction }), gradient) })] }));
|
|
9
|
-
}
|
|
10
|
-
const styles = (0, tailwind_variants_1.tv)({
|
|
11
|
-
base: "absolute from-background",
|
|
12
|
-
variants: {
|
|
13
|
-
direction: {
|
|
14
|
-
up: "left-0 bottom-0 w-full h-full bg-gradient-to-t",
|
|
15
|
-
left: "top-0 right-0 w-12 h-full bg-gradient-to-l",
|
|
16
|
-
down: "top-0 left-0 w-full h-full bg-gradient-to-b"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
exports.default = FadeBox;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Component, Hoverable } from "../../utils";
|
|
2
|
-
type Props = Component & Hoverable & {
|
|
3
|
-
center?: boolean;
|
|
4
|
-
centerX?: boolean;
|
|
5
|
-
centerY?: boolean;
|
|
6
|
-
equal?: boolean;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Flex containers with configurable alignment and styling.
|
|
10
|
-
*
|
|
11
|
-
* @param {string} style - Additional styles for container.
|
|
12
|
-
* @param {ReactNode} children - Child elements to render inside the row.
|
|
13
|
-
* @param {Props} opts - Variant options for styling.
|
|
14
|
-
**/
|
|
15
|
-
export declare function RowBox({ style, children, onHover, onLeave, ...opts }: Props): import("react").JSX.Element | null;
|
|
16
|
-
export declare function ColumnBox({ style, children, onHover, onLeave, ...opts }: Props): import("react").JSX.Element | null;
|
|
17
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RowBox = RowBox;
|
|
4
|
-
exports.ColumnBox = ColumnBox;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const style_1 = require("../../utils/functions/style");
|
|
7
|
-
const tailwind_variants_1 = require("tailwind-variants");
|
|
8
|
-
/**
|
|
9
|
-
* Flex containers with configurable alignment and styling.
|
|
10
|
-
*
|
|
11
|
-
* @param {string} style - Additional styles for container.
|
|
12
|
-
* @param {ReactNode} children - Child elements to render inside the row.
|
|
13
|
-
* @param {Props} opts - Variant options for styling.
|
|
14
|
-
**/
|
|
15
|
-
function RowBox({ style, children, onHover, onLeave, ...opts }) {
|
|
16
|
-
if (!children)
|
|
17
|
-
return null;
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.cn)(row(opts), style), onMouseEnter: onHover, onMouseLeave: onLeave, children: children }));
|
|
19
|
-
}
|
|
20
|
-
function ColumnBox({ style, children, onHover, onLeave, ...opts }) {
|
|
21
|
-
if (!children)
|
|
22
|
-
return null;
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.cn)(column(opts), style), onMouseEnter: onHover, onMouseLeave: onLeave, children: children }));
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Styling variants for flex options.
|
|
27
|
-
*
|
|
28
|
-
* @param {boolean} centerX - center children horizontally
|
|
29
|
-
* @param {boolean} centerY - center children vertically
|
|
30
|
-
* @param {boolean} center - center children on both axis
|
|
31
|
-
**/
|
|
32
|
-
const row = (0, tailwind_variants_1.tv)({
|
|
33
|
-
base: "flex",
|
|
34
|
-
variants: {
|
|
35
|
-
centerX: { true: "justify-center" },
|
|
36
|
-
centerY: { true: "items-center" },
|
|
37
|
-
center: { true: "items-center justify-center" },
|
|
38
|
-
equal: { true: "[&>*]:flex-1 [&>*]:shrink-0" }
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
const column = (0, tailwind_variants_1.tv)({
|
|
42
|
-
base: "flex flex-col",
|
|
43
|
-
variants: {
|
|
44
|
-
centerX: { true: "items-center" },
|
|
45
|
-
centerY: { true: "justify-center" },
|
|
46
|
-
center: { true: "items-center justify-center" },
|
|
47
|
-
equal: { true: "[&>*]:flex-1" }
|
|
48
|
-
}
|
|
49
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
type MediaRowProps = {
|
|
3
|
-
media: string;
|
|
4
|
-
title: string;
|
|
5
|
-
subtitle?: ReactNode;
|
|
6
|
-
badge?: string;
|
|
7
|
-
styles?: {
|
|
8
|
-
container?: string;
|
|
9
|
-
media?: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
subtitle?: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export declare const MediaRow: ({ media, title, subtitle, badge, styles, }: MediaRowProps) => import("react").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MediaRow = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const flex_1 = require("./flex");
|
|
9
|
-
const badge_1 = __importDefault(require("../text/badge"));
|
|
10
|
-
const MediaRow = ({ media, title, subtitle, badge, styles = {}, }) => ((0, jsx_runtime_1.jsxs)(flex_1.RowBox, { style: `items-center gap-3 ${styles.container ?? ""}`, children: [(0, jsx_runtime_1.jsx)("img", { src: media, className: "size-10 w-10 h-10 border border-border rounded", alt: title }), (0, jsx_runtime_1.jsxs)(flex_1.ColumnBox, { style: "gap-px min-w-0", children: [(0, jsx_runtime_1.jsxs)(flex_1.RowBox, { style: "items-center gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)("span", { className: `text-primary text-sm font-semibold truncate ${styles.title ?? ""}`, children: title }), badge && (0, jsx_runtime_1.jsx)(badge_1.default, { size: "xs", children: badge })] }), subtitle && ((0, jsx_runtime_1.jsx)("span", { className: `text-xs text-primary-dark ${styles.subtitle}`, children: subtitle }))] })] }));
|
|
11
|
-
exports.MediaRow = MediaRow;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type Props = {
|
|
2
|
-
style?: string;
|
|
3
|
-
min: number;
|
|
4
|
-
max: number;
|
|
5
|
-
minWidth?: number;
|
|
6
|
-
update: (min: number, size: number) => void;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
export default function RnD({ style, min, max, minWidth, update, children }: Props): import("react").JSX.Element;
|
|
10
|
-
export {};
|