mirror of
https://github.com/anotherhadi/ilovetui.git
synced 2026-10-05 10:58:26 +02:00
Vendored
+23
@@ -0,0 +1,23 @@
|
|||||||
|
// @bun
|
||||||
|
import {
|
||||||
|
theme
|
||||||
|
} from "./chunk-57mam43k.js";
|
||||||
|
|
||||||
|
// src/components/Box.tsx
|
||||||
|
import { spread as _$spread } from "@opentui/solid";
|
||||||
|
import { mergeProps as _$mergeProps } from "@opentui/solid";
|
||||||
|
import { memo as _$memo } from "@opentui/solid";
|
||||||
|
import { createElement as _$createElement } from "@opentui/solid";
|
||||||
|
function Box(props) {
|
||||||
|
return (() => {
|
||||||
|
var _el$ = _$createElement("box");
|
||||||
|
_$spread(_el$, _$mergeProps(props, {
|
||||||
|
get borderStyle() {
|
||||||
|
return props.borderStyle ?? theme.borderStyle;
|
||||||
|
}
|
||||||
|
}), false);
|
||||||
|
return _el$;
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
|
||||||
|
export { Box };
|
||||||
Vendored
+11
@@ -0,0 +1,11 @@
|
|||||||
|
// @bun
|
||||||
|
import {
|
||||||
|
Box
|
||||||
|
} from "../chunk-n96bgmbh.js";
|
||||||
|
import"../chunk-57mam43k.js";
|
||||||
|
import"../chunk-ergc99dh.js";
|
||||||
|
import"../chunk-7f8jagy5.js";
|
||||||
|
import"../chunk-hcq62p48.js";
|
||||||
|
export {
|
||||||
|
Box
|
||||||
|
};
|
||||||
Vendored
+10
-6
@@ -1,11 +1,7 @@
|
|||||||
// @bun
|
// @bun
|
||||||
import {
|
import {
|
||||||
Tabs,
|
Box
|
||||||
stepTabValue
|
} from "../chunk-n96bgmbh.js";
|
||||||
} from "../chunk-jb965p47.js";
|
|
||||||
import {
|
|
||||||
SignalBars
|
|
||||||
} from "../chunk-xab9ag99.js";
|
|
||||||
import {
|
import {
|
||||||
NotificationHost
|
NotificationHost
|
||||||
} from "../chunk-g7p0f33m.js";
|
} from "../chunk-g7p0f33m.js";
|
||||||
@@ -18,6 +14,10 @@ import {
|
|||||||
import {
|
import {
|
||||||
Sidebar
|
Sidebar
|
||||||
} from "../chunk-vve1k0ax.js";
|
} from "../chunk-vve1k0ax.js";
|
||||||
|
import {
|
||||||
|
Tabs,
|
||||||
|
stepTabValue
|
||||||
|
} from "../chunk-jb965p47.js";
|
||||||
import {
|
import {
|
||||||
Modal
|
Modal
|
||||||
} from "../chunk-4j2gzwtd.js";
|
} from "../chunk-4j2gzwtd.js";
|
||||||
@@ -27,6 +27,9 @@ import {
|
|||||||
import {
|
import {
|
||||||
ProgressBar
|
ProgressBar
|
||||||
} from "../chunk-ae0jkf2z.js";
|
} from "../chunk-ae0jkf2z.js";
|
||||||
|
import {
|
||||||
|
SignalBars
|
||||||
|
} from "../chunk-xab9ag99.js";
|
||||||
import"../chunk-57mam43k.js";
|
import"../chunk-57mam43k.js";
|
||||||
import"../chunk-ergc99dh.js";
|
import"../chunk-ergc99dh.js";
|
||||||
import"../chunk-7f8jagy5.js";
|
import"../chunk-7f8jagy5.js";
|
||||||
@@ -42,5 +45,6 @@ export {
|
|||||||
NotificationHost,
|
NotificationHost,
|
||||||
Modal,
|
Modal,
|
||||||
MinSizeGuard,
|
MinSizeGuard,
|
||||||
|
Box,
|
||||||
Badge
|
Badge
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import type { BoxProps as OpenTUIBoxProps } from "@opentui/solid";
|
||||||
|
import { theme } from "../index.ts";
|
||||||
|
|
||||||
|
export interface BoxProps extends OpenTUIBoxProps {}
|
||||||
|
|
||||||
|
// The raw <box> intrinsic has no idea ilovetui's theme exists — its own
|
||||||
|
// borderStyle default ("single") is hardcoded in @opentui/core. Use <Box>
|
||||||
|
// instead of <box> wherever you want theme.borderStyle applied by default,
|
||||||
|
// same as Sidebar/Modal/Tabs already do internally.
|
||||||
|
export function Box(props: BoxProps) {
|
||||||
|
return <box {...props} borderStyle={props.borderStyle ?? theme.borderStyle} />;
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
export { Badge, type BadgeProps } from "./Badge.tsx";
|
export { Badge, type BadgeProps } from "./Badge.tsx";
|
||||||
|
export { Box, type BoxProps } from "./Box.tsx";
|
||||||
export { MinSizeGuard, type MinSizeGuardProps } from "./MinSizeGuard.tsx";
|
export { MinSizeGuard, type MinSizeGuardProps } from "./MinSizeGuard.tsx";
|
||||||
export { Modal, type ModalProps } from "./Modal.tsx";
|
export { Modal, type ModalProps } from "./Modal.tsx";
|
||||||
export { NotificationHost, type NotificationHostProps } from "./NotificationHost.tsx";
|
export { NotificationHost, type NotificationHostProps } from "./NotificationHost.tsx";
|
||||||
|
|||||||
Reference in New Issue
Block a user