@bouku/core 0.0.9 → 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.
@@ -1,15 +1,17 @@
1
- import { ReactNode } from "react";
1
+ type Props = {
2
+ style?: string;
3
+ title: string;
4
+ children: React.ReactNode;
5
+ };
2
6
  /**
3
- * Settings Section Component.
7
+ * Layout Section Component.
4
8
  *
5
- * Generic layout wrapper used to group related settings or content
6
- * under a titled section with a visual separator for consistency.
9
+ * Generic layout wrapper used to group related content under
10
+ * a titled section with a visual separator for consistency.
7
11
  *
8
- * @param {string} title - The section title displayed at top.
9
- * @param {ReactNode} content - Rendered below the separator.
12
+ * @param style - Custom classes for the content container.
13
+ * @param title - The section title displayed at top.
14
+ * @param content - Element(s) rendered below the separator.
10
15
  **/
11
- declare const Section: ({ title, content }: {
12
- title: string;
13
- content: ReactNode;
14
- }) => import("react").JSX.Element;
16
+ declare const Section: ({ style, title, children }: Props) => import("react").JSX.Element;
15
17
  export default Section;
@@ -2,18 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const flex_1 = require("./flex");
5
+ const separator_1 = require("./separator");
6
+ const style_1 = require("@bouko/style");
5
7
  /**
6
- * Settings Section Component.
8
+ * Layout Section Component.
7
9
  *
8
- * Generic layout wrapper used to group related settings or content
9
- * under a titled section with a visual separator for consistency.
10
+ * Generic layout wrapper used to group related content under
11
+ * a titled section with a visual separator for consistency.
10
12
  *
11
- * @param {string} title - The section title displayed at top.
12
- * @param {ReactNode} content - Rendered below the separator.
13
+ * @param style - Custom classes for the content container.
14
+ * @param title - The section title displayed at top.
15
+ * @param content - Element(s) rendered below the separator.
13
16
  **/
14
- const Section = ({ title, content }) => ((0, jsx_runtime_1.jsxs)(flex_1.ColumnBox, { style: styles.container, children: [title, (0, jsx_runtime_1.jsx)("hr", { className: styles.separator }), content] }));
15
- const styles = {
16
- container: "gap-2 items-start text-primary",
17
- separator: "mb-2 w-full text-border-dark"
17
+ const Section = ({ style, title, children }) => ((0, jsx_runtime_1.jsxs)(flex_1.ColumnBox, { style: s.container, children: [(0, jsx_runtime_1.jsx)("span", { className: s.title, children: title }), (0, jsx_runtime_1.jsx)(separator_1.Separator, { style: "mb-2" }), (0, jsx_runtime_1.jsx)("div", { className: (0, style_1.cn)(s.content, style), children: children })] }));
18
+ const s = {
19
+ container: "gap-3 w-full",
20
+ title: "text-xl font-bold text-primary",
21
+ content: "w-full"
18
22
  };
19
23
  exports.default = Section;
@@ -1,3 +1,4 @@
1
- export default function Separator({ style }: {
1
+ export declare function Separator({ style }: {
2
2
  style?: string;
3
3
  }): import("react").JSX.Element;
4
+ export default Separator;
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = Separator;
3
+ exports.Separator = Separator;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const style_1 = require("@bouko/style");
6
6
  function Separator({ style }) {
7
7
  return (0, jsx_runtime_1.jsx)("hr", { className: (0, style_1.cn)("w-full text-border-dark", style) });
8
8
  }
9
+ exports.default = Separator;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bouku/core",
3
- "version": "0.0.9",
3
+ "version": "0.1.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",