@rudra-studio/common-layout-containers 0.0.0-stage → 1.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/README.md CHANGED
@@ -1,3 +1,7 @@
1
- # Temporary Holding Version
1
+ # common-layout-containers
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test common-layout-containers` to execute the unit tests via [Vitest](https://vitest.dev/).
@@ -0,0 +1,53 @@
1
+ import { default as React } from 'react';
2
+ export type ContainerBoxThemeMode = "light" | "dark";
3
+ export type ContainerMaxWidth = "sm" | "md" | "lg" | "xl" | "full";
4
+ export type ContainerPadding = "none" | "sm" | "md" | "lg";
5
+ export interface ContainerBoxProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "title"> {
6
+ /**
7
+ * Theme appearance mode.
8
+ *
9
+ * @select|light|dark
10
+ */
11
+ themeMode?: ContainerBoxThemeMode;
12
+ /**
13
+ * Maximum width constraint for the container.
14
+ *
15
+ * @select|sm|md|lg|xl|full
16
+ */
17
+ maxWidth?: ContainerMaxWidth;
18
+ /**
19
+ * Inner spacing padding preset.
20
+ *
21
+ * @select|none|sm|md|lg
22
+ */
23
+ padding?: ContainerPadding;
24
+ /**
25
+ * Horizontally center the container within its parent.
26
+ *
27
+ * @schema {"type":"boolean"}
28
+ */
29
+ centered?: boolean;
30
+ /**
31
+ * Optional container title.
32
+ *
33
+ * @translate
34
+ */
35
+ title?: string;
36
+ /**
37
+ * Optional supporting subtitle.
38
+ *
39
+ * @translate
40
+ */
41
+ subtitle?: string;
42
+ /**
43
+ * Optional nested elements inside the container.
44
+ */
45
+ children?: React.ReactNode;
46
+ /**
47
+ * Root container customization.
48
+ *
49
+ * @type|class
50
+ */
51
+ className?: string;
52
+ }
53
+ export default function ContainerBox({ themeMode, maxWidth, padding, centered, title, subtitle, children, className, ...props }: ContainerBoxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import e from "./styles.js";
2
+ import "react";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ //#region src/components/ContainerBox/index.tsx
5
+ function r({ themeMode: r = "light", maxWidth: i = "lg", padding: a = "md", centered: o = !0, title: s = "Bounded Content Container", subtitle: c = "Consistent width constraints and spacing across screens.", children: l, className: u = "", ...d }) {
6
+ let f = r === "dark" ? e.mode_dark : e.mode_light, p = e[`mw_${i}`] || e.mw_lg, m = e[`pad_${a}`] || e.pad_md;
7
+ return /* @__PURE__ */ n("div", {
8
+ ...d,
9
+ "data-theme": r,
10
+ className: [
11
+ e.box,
12
+ f,
13
+ p,
14
+ m,
15
+ o ? e.centered : "",
16
+ u
17
+ ].filter(Boolean).join(" "),
18
+ children: [(s || c) && /* @__PURE__ */ n("div", {
19
+ className: e.head,
20
+ children: [s && /* @__PURE__ */ t("h3", {
21
+ className: e.title,
22
+ children: s
23
+ }), c && /* @__PURE__ */ t("p", {
24
+ className: e.subtitle,
25
+ children: c
26
+ })]
27
+ }), l]
28
+ });
29
+ }
30
+ //#endregion
31
+ export { r as default };
@@ -0,0 +1 @@
1
+ ._box_e678j_1{--cb-bg:#fff;--cb-border:#e2e8f0;--cb-text:#0f172a;--cb-muted:#64748b;border:1px solid var(--cb-border);background-color:var(--cb-bg);width:100%;color:var(--cb-text);box-sizing:border-box;border-radius:1rem}._mode_dark_e678j_14{--cb-bg:#0f172a;--cb-border:#334155;--cb-text:#f8fafc;--cb-muted:#94a3b8}._centered_e678j_21{margin-left:auto;margin-right:auto}._mw_sm_e678j_26{max-width:32rem}._mw_md_e678j_30{max-width:48rem}._mw_lg_e678j_34{max-width:64rem}._mw_xl_e678j_38{max-width:80rem}._mw_full_e678j_42{max-width:100%}._pad_none_e678j_46{padding:0}._pad_sm_e678j_50{padding:.75rem}._pad_md_e678j_54{padding:1.15rem}._pad_lg_e678j_58{padding:1.75rem}._head_e678j_62{flex-direction:column;gap:.25rem;display:flex}._title_e678j_68{margin:0;font-size:1rem;font-weight:800}._subtitle_e678j_74{color:var(--cb-muted);margin:0;font-size:.825rem}
@@ -0,0 +1,20 @@
1
+ //#region src/components/ContainerBox/styles.module.scss
2
+ var e = "_box_e678j_1", t = "_mode_dark_e678j_14", n = "_centered_e678j_21", r = "_mw_sm_e678j_26", i = "_mw_md_e678j_30", a = "_mw_lg_e678j_34", o = "_mw_xl_e678j_38", s = "_mw_full_e678j_42", c = "_pad_none_e678j_46", l = "_pad_sm_e678j_50", u = "_pad_md_e678j_54", d = "_pad_lg_e678j_58", f = "_head_e678j_62", p = "_title_e678j_68", m = "_subtitle_e678j_74", h = {
3
+ box: e,
4
+ mode_dark: t,
5
+ centered: n,
6
+ mw_sm: r,
7
+ mw_md: i,
8
+ mw_lg: a,
9
+ mw_xl: o,
10
+ mw_full: s,
11
+ pad_none: c,
12
+ pad_sm: l,
13
+ pad_md: u,
14
+ pad_lg: d,
15
+ head: f,
16
+ title: p,
17
+ subtitle: m
18
+ };
19
+ //#endregion
20
+ export { e as box, n as centered, h as default, f as head, t as mode_dark, s as mw_full, a as mw_lg, i as mw_md, r as mw_sm, o as mw_xl, d as pad_lg, u as pad_md, c as pad_none, l as pad_sm, m as subtitle, p as title };
@@ -0,0 +1,41 @@
1
+ import { default as React } from 'react';
2
+ export type GridLayoutThemeMode = "light" | "dark";
3
+ export type GridColumns = 1 | 2 | 3 | 4;
4
+ export type GridGap = "sm" | "md" | "lg";
5
+ export interface GridCardItem {
6
+ id: string;
7
+ title: string;
8
+ value?: string;
9
+ subtitle?: string;
10
+ }
11
+ export interface GridLayoutProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "children"> {
12
+ /**
13
+ * Theme appearance mode.
14
+ *
15
+ * @select|light|dark
16
+ */
17
+ themeMode?: GridLayoutThemeMode;
18
+ /**
19
+ * Number of columns on desktop grid.
20
+ *
21
+ * @select|1|2|3|4
22
+ */
23
+ columns?: GridColumns;
24
+ /**
25
+ * Gap size between grid cards.
26
+ *
27
+ * @select|sm|md|lg
28
+ */
29
+ gap?: GridGap;
30
+ /**
31
+ * Cards arranged inside the grid.
32
+ */
33
+ cards?: GridCardItem[];
34
+ /**
35
+ * Root container customization.
36
+ *
37
+ * @type|class
38
+ */
39
+ className?: string;
40
+ }
41
+ export default function GridLayout({ themeMode, columns, gap, cards, className, ...props }: GridLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,68 @@
1
+ import e from "./styles.js";
2
+ import "react";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ //#region src/components/GridLayout/index.tsx
5
+ var r = [
6
+ {
7
+ id: "g1",
8
+ title: "Libraries",
9
+ value: "05",
10
+ subtitle: "Reusable UI sets"
11
+ },
12
+ {
13
+ id: "g2",
14
+ title: "Modules",
15
+ value: "18",
16
+ subtitle: "Canvas compositions"
17
+ },
18
+ {
19
+ id: "g3",
20
+ title: "Apps",
21
+ value: "04",
22
+ subtitle: "Published targets"
23
+ },
24
+ {
25
+ id: "g4",
26
+ title: "Themes",
27
+ value: "2",
28
+ subtitle: "Light & Dark"
29
+ }
30
+ ];
31
+ function i({ themeMode: i = "light", columns: a = 2, gap: o = "md", cards: s = r, className: c = "", ...l }) {
32
+ let u = i === "dark" ? e.mode_dark : e.mode_light, d = e[`cols_${[
33
+ 1,
34
+ 2,
35
+ 3,
36
+ 4
37
+ ].includes(Number(a)) ? Number(a) : 2}`] || e.cols_2, f = e[`gap_${o}`] || e.gap_md, p = Array.isArray(s) && s.length > 0 ? s : r;
38
+ return /* @__PURE__ */ t("div", {
39
+ ...l,
40
+ "data-theme": i,
41
+ className: [
42
+ e.grid,
43
+ u,
44
+ d,
45
+ f,
46
+ "w-full",
47
+ c
48
+ ].filter(Boolean).join(" "),
49
+ children: p.map((r, i) => /* @__PURE__ */ n("div", {
50
+ className: e.tile,
51
+ children: [/* @__PURE__ */ n("div", {
52
+ className: e.tileTop,
53
+ children: [/* @__PURE__ */ t("span", {
54
+ className: e.tileTitle,
55
+ children: r.title
56
+ }), r.value && /* @__PURE__ */ t("span", {
57
+ className: e.tileVal,
58
+ children: r.value
59
+ })]
60
+ }), r.subtitle && /* @__PURE__ */ t("span", {
61
+ className: e.tileSub,
62
+ children: r.subtitle
63
+ })]
64
+ }, r.id || i))
65
+ });
66
+ }
67
+ //#endregion
68
+ export { i as default };
@@ -0,0 +1 @@
1
+ ._grid_jxlxw_1{--gl-bg:#fff;--gl-tile:#f8fafc;--gl-border:#e2e8f0;--gl-text:#0f172a;--gl-muted:#64748b;--gl-accent:#2563eb;border:1px solid var(--gl-border);background-color:var(--gl-bg);color:var(--gl-text);box-sizing:border-box;border-radius:1rem;padding:1rem;display:grid}._mode_dark_jxlxw_17{--gl-bg:#0f172a;--gl-tile:#1e293b;--gl-border:#334155;--gl-text:#f8fafc;--gl-muted:#94a3b8;--gl-accent:#60a5fa}._cols_1_jxlxw_26{grid-template-columns:minmax(0,1fr)}._cols_2_jxlxw_30{grid-template-columns:repeat(auto-fit,minmax(13rem,1fr))}._cols_3_jxlxw_34{grid-template-columns:repeat(auto-fit,minmax(11rem,1fr))}._cols_4_jxlxw_38{grid-template-columns:repeat(auto-fit,minmax(9.5rem,1fr))}._gap_sm_jxlxw_42{gap:.6rem}._gap_md_jxlxw_46{gap:.95rem}._gap_lg_jxlxw_50{gap:1.4rem}._tile_jxlxw_54{border:1px solid var(--gl-border);background-color:var(--gl-tile);border-radius:.75rem;flex-direction:column;gap:.25rem;padding:.85rem 1rem;display:flex}._tileTop_jxlxw_64{justify-content:space-between;align-items:baseline;gap:.5rem;display:flex}._tileTitle_jxlxw_71{font-size:.86rem;font-weight:800}._tileVal_jxlxw_76{font-variant-numeric:tabular-nums;color:var(--gl-accent);font-size:1rem;font-weight:900}._tileSub_jxlxw_83{color:var(--gl-muted);font-size:.76rem}
@@ -0,0 +1,19 @@
1
+ //#region src/components/GridLayout/styles.module.scss
2
+ var e = "_grid_jxlxw_1", t = "_mode_dark_jxlxw_17", n = "_cols_1_jxlxw_26", r = "_cols_2_jxlxw_30", i = "_cols_3_jxlxw_34", a = "_cols_4_jxlxw_38", o = "_gap_sm_jxlxw_42", s = "_gap_md_jxlxw_46", c = "_gap_lg_jxlxw_50", l = "_tile_jxlxw_54", u = "_tileTop_jxlxw_64", d = "_tileTitle_jxlxw_71", f = "_tileVal_jxlxw_76", p = "_tileSub_jxlxw_83", m = {
3
+ grid: e,
4
+ mode_dark: t,
5
+ cols_1: n,
6
+ cols_2: r,
7
+ cols_3: i,
8
+ cols_4: a,
9
+ gap_sm: o,
10
+ gap_md: s,
11
+ gap_lg: c,
12
+ tile: l,
13
+ tileTop: u,
14
+ tileTitle: d,
15
+ tileVal: f,
16
+ tileSub: p
17
+ };
18
+ //#endregion
19
+ export { n as cols_1, r as cols_2, i as cols_3, a as cols_4, m as default, c as gap_lg, s as gap_md, o as gap_sm, e as grid, t as mode_dark, l as tile, p as tileSub, d as tileTitle, u as tileTop, f as tileVal };
@@ -0,0 +1,41 @@
1
+ import { default as React } from 'react';
2
+ export type SectionFrameThemeMode = "light" | "dark";
3
+ export interface SectionFrameProps extends Omit<React.HTMLAttributes<HTMLElement>, "className" | "children"> {
4
+ /**
5
+ * Theme appearance mode.
6
+ *
7
+ * @select|light|dark
8
+ */
9
+ themeMode?: SectionFrameThemeMode;
10
+ /**
11
+ * Section heading text.
12
+ *
13
+ * @translate
14
+ */
15
+ heading?: string;
16
+ /**
17
+ * Supporting section description.
18
+ *
19
+ * @translate
20
+ */
21
+ description?: string;
22
+ /**
23
+ * Optional badge text displayed beside the heading.
24
+ *
25
+ * @translate
26
+ */
27
+ badgeText?: string;
28
+ /**
29
+ * Optional summary note below the header.
30
+ *
31
+ * @translate
32
+ */
33
+ summaryText?: string;
34
+ /**
35
+ * Root container customization.
36
+ *
37
+ * @type|class
38
+ */
39
+ className?: string;
40
+ }
41
+ export default function SectionFrame({ themeMode, heading, description, badgeText, summaryText, className, ...props }: SectionFrameProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,42 @@
1
+ import e from "./styles.js";
2
+ import "react";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ //#region src/components/SectionFrame/index.tsx
5
+ function r({ themeMode: r = "light", heading: i = "Section Overview", description: a = "Group related metrics, forms, or panels into a clear structural band.", badgeText: o = "Layout", summaryText: s = "Theme-aware section surface with light and dark mode support.", className: c = "", ...l }) {
6
+ let u = r === "dark" ? e.mode_dark : e.mode_light;
7
+ return /* @__PURE__ */ n("section", {
8
+ ...l,
9
+ "data-theme": r,
10
+ className: [
11
+ e.section,
12
+ u,
13
+ "w-full",
14
+ c
15
+ ].filter(Boolean).join(" "),
16
+ children: [
17
+ /* @__PURE__ */ t("div", {
18
+ className: e.topRow,
19
+ children: /* @__PURE__ */ n("div", {
20
+ className: e.titleWrap,
21
+ children: [i && /* @__PURE__ */ t("h3", {
22
+ className: e.heading,
23
+ children: i
24
+ }), o && /* @__PURE__ */ t("span", {
25
+ className: e.badge,
26
+ children: o
27
+ })]
28
+ })
29
+ }),
30
+ a && /* @__PURE__ */ t("p", {
31
+ className: e.desc,
32
+ children: a
33
+ }),
34
+ s && /* @__PURE__ */ t("div", {
35
+ className: e.summary,
36
+ children: s
37
+ })
38
+ ]
39
+ });
40
+ }
41
+ //#endregion
42
+ export { r as default };
@@ -0,0 +1 @@
1
+ ._section_epe0e_1{--sf-bg:#fff;--sf-surface:#f8fafc;--sf-border:#e2e8f0;--sf-text:#0f172a;--sf-muted:#64748b;--sf-accent:#2563eb;--sf-pill:#2563eb1f;border:1px solid var(--sf-border);background-color:var(--sf-bg);color:var(--sf-text);box-sizing:border-box;border-radius:1rem;flex-direction:column;gap:.45rem;padding:1.15rem 1.25rem;display:flex}._mode_dark_epe0e_20{--sf-bg:#0f172a;--sf-surface:#1e293b;--sf-border:#334155;--sf-text:#f8fafc;--sf-muted:#94a3b8;--sf-accent:#60a5fa;--sf-pill:#60a5fa2e}._topRow_epe0e_30{justify-content:space-between;align-items:center;gap:.5rem;display:flex}._titleWrap_epe0e_37{flex-wrap:wrap;align-items:center;gap:.5rem;display:inline-flex}._heading_epe0e_44{margin:0;font-size:1rem;font-weight:800}._badge_epe0e_50{background-color:var(--sf-pill);color:var(--sf-accent);border-radius:9999px;padding:.12rem .5rem;font-size:.7rem;font-weight:800}._desc_epe0e_59{color:var(--sf-muted);margin:0;font-size:.825rem;line-height:1.45}._summary_epe0e_66{background-color:var(--sf-surface);border:1px dashed var(--sf-border);color:var(--sf-muted);border-radius:.65rem;margin-top:.25rem;padding:.65rem .8rem;font-size:.78rem}
@@ -0,0 +1,13 @@
1
+ //#region src/components/SectionFrame/styles.module.scss
2
+ var e = "_section_epe0e_1", t = "_mode_dark_epe0e_20", n = "_topRow_epe0e_30", r = "_titleWrap_epe0e_37", i = "_heading_epe0e_44", a = "_badge_epe0e_50", o = "_desc_epe0e_59", s = "_summary_epe0e_66", c = {
3
+ section: e,
4
+ mode_dark: t,
5
+ topRow: n,
6
+ titleWrap: r,
7
+ heading: i,
8
+ badge: a,
9
+ desc: o,
10
+ summary: s
11
+ };
12
+ //#endregion
13
+ export { a as badge, c as default, o as desc, i as heading, t as mode_dark, e as section, s as summary, r as titleWrap, n as topRow };
@@ -0,0 +1,48 @@
1
+ import { default as React } from 'react';
2
+ export type SplitPaneThemeMode = "light" | "dark";
3
+ export type SplitRatio = "50-50" | "65-35" | "35-65";
4
+ export interface SplitPaneLayoutProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "children"> {
5
+ /**
6
+ * Theme appearance mode.
7
+ *
8
+ * @select|light|dark
9
+ */
10
+ themeMode?: SplitPaneThemeMode;
11
+ /**
12
+ * Width ratio between primary and secondary panes.
13
+ *
14
+ * @select|50-50|65-35|35-65
15
+ */
16
+ ratio?: SplitRatio;
17
+ /**
18
+ * Title for the primary pane.
19
+ *
20
+ * @translate
21
+ */
22
+ primaryTitle?: string;
23
+ /**
24
+ * Body copy for the primary pane.
25
+ *
26
+ * @translate
27
+ */
28
+ primaryBody?: string;
29
+ /**
30
+ * Title for the secondary pane.
31
+ *
32
+ * @translate
33
+ */
34
+ secondaryTitle?: string;
35
+ /**
36
+ * Body copy for the secondary pane.
37
+ *
38
+ * @translate
39
+ */
40
+ secondaryBody?: string;
41
+ /**
42
+ * Root container customization.
43
+ *
44
+ * @type|class
45
+ */
46
+ className?: string;
47
+ }
48
+ export default function SplitPaneLayout({ themeMode, ratio, primaryTitle, primaryBody, secondaryTitle, secondaryBody, className, ...props }: SplitPaneLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,39 @@
1
+ import e from "./styles.js";
2
+ import "react";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ //#region src/components/SplitPaneLayout/index.tsx
5
+ function r({ themeMode: r = "light", ratio: i = "65-35", primaryTitle: a = "Primary Workspace", primaryBody: o = "Main content area, live preview, or primary table view.", secondaryTitle: s = "Secondary Inspector", secondaryBody: c = "Contextual controls, metadata, or summary details.", className: l = "", ...u }) {
6
+ let d = r === "dark" ? e.mode_dark : e.mode_light, f = e[`ratio_${i.replace("-", "_")}`] || e.ratio_65_35;
7
+ return /* @__PURE__ */ n("div", {
8
+ ...u,
9
+ "data-theme": r,
10
+ className: [
11
+ e.split,
12
+ d,
13
+ f,
14
+ "w-full",
15
+ l
16
+ ].filter(Boolean).join(" "),
17
+ children: [/* @__PURE__ */ n("div", {
18
+ className: e.pane,
19
+ children: [a && /* @__PURE__ */ t("h4", {
20
+ className: e.paneTitle,
21
+ children: a
22
+ }), o && /* @__PURE__ */ t("p", {
23
+ className: e.paneBody,
24
+ children: o
25
+ })]
26
+ }), /* @__PURE__ */ n("div", {
27
+ className: e.pane,
28
+ children: [s && /* @__PURE__ */ t("h4", {
29
+ className: e.paneTitle,
30
+ children: s
31
+ }), c && /* @__PURE__ */ t("p", {
32
+ className: e.paneBody,
33
+ children: c
34
+ })]
35
+ })]
36
+ });
37
+ }
38
+ //#endregion
39
+ export { r as default };
@@ -0,0 +1 @@
1
+ ._split_8bxyl_1{--sp-bg:#fff;--sp-pane:#f8fafc;--sp-border:#e2e8f0;--sp-text:#0f172a;--sp-muted:#64748b;border:1px solid var(--sp-border);background-color:var(--sp-bg);color:var(--sp-text);box-sizing:border-box;border-radius:1rem;gap:1rem;padding:1rem;display:grid}._mode_dark_8bxyl_17{--sp-bg:#0f172a;--sp-pane:#1e293b;--sp-border:#334155;--sp-text:#f8fafc;--sp-muted:#94a3b8}._ratio_50_50_8bxyl_25{grid-template-columns:repeat(auto-fit,minmax(15rem,1fr))}._ratio_65_35_8bxyl_29{grid-template-columns:minmax(0,1.85fr) minmax(0,1fr)}._ratio_35_65_8bxyl_33{grid-template-columns:minmax(0,1fr) minmax(0,1.85fr)}@media (width<=768px){._ratio_65_35_8bxyl_29,._ratio_35_65_8bxyl_33{grid-template-columns:minmax(0,1fr)}}._pane_8bxyl_43{border:1px solid var(--sp-border);background-color:var(--sp-pane);border-radius:.75rem;flex-direction:column;gap:.3rem;padding:.9rem 1rem;display:flex}._paneTitle_8bxyl_53{margin:0;font-size:.9rem;font-weight:800}._paneBody_8bxyl_59{color:var(--sp-muted);margin:0;font-size:.8rem;line-height:1.45}
@@ -0,0 +1,13 @@
1
+ //#region src/components/SplitPaneLayout/styles.module.scss
2
+ var e = "_split_8bxyl_1", t = "_mode_dark_8bxyl_17", n = "_ratio_50_50_8bxyl_25", r = "_ratio_65_35_8bxyl_29", i = "_ratio_35_65_8bxyl_33", a = "_pane_8bxyl_43", o = "_paneTitle_8bxyl_53", s = "_paneBody_8bxyl_59", c = {
3
+ split: e,
4
+ mode_dark: t,
5
+ ratio_50_50: n,
6
+ ratio_65_35: r,
7
+ ratio_35_65: i,
8
+ pane: a,
9
+ paneTitle: o,
10
+ paneBody: s
11
+ };
12
+ //#endregion
13
+ export { c as default, t as mode_dark, a as pane, s as paneBody, o as paneTitle, i as ratio_35_65, n as ratio_50_50, r as ratio_65_35, e as split };
@@ -0,0 +1,53 @@
1
+ import { default as React } from 'react';
2
+ export type StackLayoutThemeMode = "light" | "dark";
3
+ export type StackDirection = "row" | "column";
4
+ export type StackGap = "xs" | "sm" | "md" | "lg";
5
+ export type StackAlign = "start" | "center" | "end" | "stretch";
6
+ export interface StackEntry {
7
+ id: string;
8
+ title: string;
9
+ detail?: string;
10
+ }
11
+ export interface StackLayoutProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "children"> {
12
+ /**
13
+ * Theme appearance mode.
14
+ *
15
+ * @select|light|dark
16
+ */
17
+ themeMode?: StackLayoutThemeMode;
18
+ /**
19
+ * Flex stack direction.
20
+ *
21
+ * @select|row|column
22
+ */
23
+ direction?: StackDirection;
24
+ /**
25
+ * Spacing gap between stacked items.
26
+ *
27
+ * @select|xs|sm|md|lg
28
+ */
29
+ gap?: StackGap;
30
+ /**
31
+ * Cross-axis alignment along the stack.
32
+ *
33
+ * @select|start|center|end|stretch
34
+ */
35
+ align?: StackAlign;
36
+ /**
37
+ * Allow flex items to wrap onto multiple lines.
38
+ *
39
+ * @schema {"type":"boolean"}
40
+ */
41
+ wrap?: boolean;
42
+ /**
43
+ * Stack block items.
44
+ */
45
+ items?: StackEntry[];
46
+ /**
47
+ * Root container customization.
48
+ *
49
+ * @type|class
50
+ */
51
+ className?: string;
52
+ }
53
+ export default function StackLayout({ themeMode, direction, gap, align, wrap, items, className, ...props }: StackLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,50 @@
1
+ import e from "./styles.js";
2
+ import "react";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ //#region src/components/StackLayout/index.tsx
5
+ var r = [
6
+ {
7
+ id: "st1",
8
+ title: "Header Slot",
9
+ detail: "Top bar or toolbar region"
10
+ },
11
+ {
12
+ id: "st2",
13
+ title: "Main Slot",
14
+ detail: "Primary interactive workspace"
15
+ },
16
+ {
17
+ id: "st3",
18
+ title: "Footer Slot",
19
+ detail: "Summary or pagination bar"
20
+ }
21
+ ];
22
+ function i({ themeMode: i = "light", direction: a = "column", gap: o = "md", align: s = "stretch", wrap: c = !0, items: l = r, className: u = "", ...d }) {
23
+ let f = i === "dark" ? e.mode_dark : e.mode_light, p = a === "row" ? e.dir_row : e.dir_col, m = e[`gap_${o}`] || e.gap_md, h = e[`align_${s}`] || e.align_stretch, g = Array.isArray(l) && l.length > 0 ? l : r;
24
+ return /* @__PURE__ */ t("div", {
25
+ ...d,
26
+ "data-theme": i,
27
+ className: [
28
+ e.stack,
29
+ f,
30
+ p,
31
+ m,
32
+ h,
33
+ c ? e.wrap : "",
34
+ "w-full",
35
+ u
36
+ ].filter(Boolean).join(" "),
37
+ children: g.map((r, i) => /* @__PURE__ */ n("div", {
38
+ className: e.cell,
39
+ children: [/* @__PURE__ */ t("div", {
40
+ className: e.cellTitle,
41
+ children: r.title
42
+ }), r.detail && /* @__PURE__ */ t("div", {
43
+ className: e.cellDetail,
44
+ children: r.detail
45
+ })]
46
+ }, r.id || i))
47
+ });
48
+ }
49
+ //#endregion
50
+ export { i as default };
@@ -0,0 +1 @@
1
+ ._stack_1ra6v_1{--sl-bg:#fff;--sl-surface:#f8fafc;--sl-border:#e2e8f0;--sl-text:#0f172a;--sl-muted:#64748b;border:1px solid var(--sl-border);background-color:var(--sl-bg);color:var(--sl-text);box-sizing:border-box;border-radius:1rem;padding:1rem;display:flex}._mode_dark_1ra6v_16{--sl-bg:#0f172a;--sl-surface:#1e293b;--sl-border:#334155;--sl-text:#f8fafc;--sl-muted:#94a3b8}._dir_row_1ra6v_24{flex-direction:row}._dir_col_1ra6v_28{flex-direction:column}._wrap_1ra6v_32{flex-wrap:wrap}._gap_xs_1ra6v_36{gap:.35rem}._gap_sm_1ra6v_40{gap:.6rem}._gap_md_1ra6v_44{gap:.9rem}._gap_lg_1ra6v_48{gap:1.35rem}._align_start_1ra6v_52{align-items:flex-start}._align_center_1ra6v_56{align-items:center}._align_end_1ra6v_60{align-items:flex-end}._align_stretch_1ra6v_64{align-items:stretch}._cell_1ra6v_68{border:1px dashed var(--sl-border);background-color:var(--sl-surface);border-radius:.65rem;flex-direction:column;flex:11rem;gap:.2rem;padding:.75rem .9rem;display:flex}._cellTitle_1ra6v_79{font-size:.85rem;font-weight:800}._cellDetail_1ra6v_84{color:var(--sl-muted);font-size:.78rem}
@@ -0,0 +1,21 @@
1
+ //#region src/components/StackLayout/styles.module.scss
2
+ var e = "_stack_1ra6v_1", t = "_mode_dark_1ra6v_16", n = "_dir_row_1ra6v_24", r = "_dir_col_1ra6v_28", i = "_wrap_1ra6v_32", a = "_gap_xs_1ra6v_36", o = "_gap_sm_1ra6v_40", s = "_gap_md_1ra6v_44", c = "_gap_lg_1ra6v_48", l = "_align_start_1ra6v_52", u = "_align_center_1ra6v_56", d = "_align_end_1ra6v_60", f = "_align_stretch_1ra6v_64", p = "_cell_1ra6v_68", m = "_cellTitle_1ra6v_79", h = "_cellDetail_1ra6v_84", g = {
3
+ stack: e,
4
+ mode_dark: t,
5
+ dir_row: n,
6
+ dir_col: r,
7
+ wrap: i,
8
+ gap_xs: a,
9
+ gap_sm: o,
10
+ gap_md: s,
11
+ gap_lg: c,
12
+ align_start: l,
13
+ align_center: u,
14
+ align_end: d,
15
+ align_stretch: f,
16
+ cell: p,
17
+ cellTitle: m,
18
+ cellDetail: h
19
+ };
20
+ //#endregion
21
+ export { u as align_center, d as align_end, l as align_start, f as align_stretch, p as cell, h as cellDetail, m as cellTitle, g as default, r as dir_col, n as dir_row, c as gap_lg, s as gap_md, o as gap_sm, a as gap_xs, t as mode_dark, e as stack, i as wrap };
@@ -0,0 +1,42 @@
1
+ import { default as React } from 'react';
2
+ export type SurfaceCardThemeMode = "light" | "dark";
3
+ export type SurfaceCardElevation = "flat" | "bordered" | "elevated";
4
+ export interface SurfaceCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "children"> {
5
+ /**
6
+ * Theme appearance mode.
7
+ *
8
+ * @select|light|dark
9
+ */
10
+ themeMode?: SurfaceCardThemeMode;
11
+ /**
12
+ * Surface border and shadow elevation style.
13
+ *
14
+ * @select|flat|bordered|elevated
15
+ */
16
+ elevation?: SurfaceCardElevation;
17
+ /**
18
+ * Card header title.
19
+ *
20
+ * @translate
21
+ */
22
+ headerText?: string;
23
+ /**
24
+ * Main card body text.
25
+ *
26
+ * @translate
27
+ */
28
+ bodyText?: string;
29
+ /**
30
+ * Optional footer metadata text.
31
+ *
32
+ * @translate
33
+ */
34
+ footerText?: string;
35
+ /**
36
+ * Root container customization.
37
+ *
38
+ * @type|class
39
+ */
40
+ className?: string;
41
+ }
42
+ export default function SurfaceCard({ themeMode, elevation, headerText, bodyText, footerText, className, ...props }: SurfaceCardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import e from "./styles.js";
2
+ import "react";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ //#region src/components/SurfaceCard/index.tsx
5
+ function r({ themeMode: r = "light", elevation: i = "bordered", headerText: a = "Reusable Surface Card", bodyText: o = "Clean surface container for summaries, feature highlights, and module blocks.", footerText: s = "Ready for composition", className: c = "", ...l }) {
6
+ let u = r === "dark" ? e.mode_dark : e.mode_light, d = e[`elev_${i}`] || e.elev_bordered;
7
+ return /* @__PURE__ */ n("div", {
8
+ ...l,
9
+ "data-theme": r,
10
+ className: [
11
+ e.card,
12
+ u,
13
+ d,
14
+ "w-full",
15
+ c
16
+ ].filter(Boolean).join(" "),
17
+ children: [
18
+ a && /* @__PURE__ */ t("div", {
19
+ className: e.header,
20
+ children: a
21
+ }),
22
+ o && /* @__PURE__ */ t("p", {
23
+ className: e.body,
24
+ children: o
25
+ }),
26
+ s && /* @__PURE__ */ t("div", {
27
+ className: e.footer,
28
+ children: s
29
+ })
30
+ ]
31
+ });
32
+ }
33
+ //#endregion
34
+ export { r as default };
@@ -0,0 +1 @@
1
+ ._card_6hnrt_1{--sc-bg:#fff;--sc-border:#e2e8f0;--sc-text:#0f172a;--sc-muted:#64748b;background-color:var(--sc-bg);color:var(--sc-text);box-sizing:border-box;border-radius:1rem;flex-direction:column;gap:.5rem;padding:1.15rem 1.25rem;display:flex}._mode_dark_6hnrt_16{--sc-bg:#0f172a;--sc-border:#334155;--sc-text:#f8fafc;--sc-muted:#94a3b8}._elev_flat_6hnrt_23{box-shadow:none;border:1px solid #0000}._elev_bordered_6hnrt_28{border:1px solid var(--sc-border);box-shadow:none}._elev_elevated_6hnrt_33{border:1px solid var(--sc-border);box-shadow:0 10px 24px #0f172a1a}._header_6hnrt_38{font-size:.95rem;font-weight:800}._body_6hnrt_43{color:var(--sc-muted);margin:0;font-size:.825rem;line-height:1.5}._footer_6hnrt_50{border-top:1px solid var(--sc-border);color:var(--sc-muted);padding-top:.45rem;font-size:.74rem;font-weight:700}
@@ -0,0 +1,13 @@
1
+ //#region src/components/SurfaceCard/styles.module.scss
2
+ var e = "_card_6hnrt_1", t = "_mode_dark_6hnrt_16", n = "_elev_flat_6hnrt_23", r = "_elev_bordered_6hnrt_28", i = "_elev_elevated_6hnrt_33", a = "_header_6hnrt_38", o = "_body_6hnrt_43", s = "_footer_6hnrt_50", c = {
3
+ card: e,
4
+ mode_dark: t,
5
+ elev_flat: n,
6
+ elev_bordered: r,
7
+ elev_elevated: i,
8
+ header: a,
9
+ body: o,
10
+ footer: s
11
+ };
12
+ //#endregion
13
+ export { o as body, e as card, c as default, r as elev_bordered, i as elev_elevated, n as elev_flat, s as footer, a as header, t as mode_dark };
package/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ export type { ContainerBoxProps, ContainerBoxThemeMode, ContainerMaxWidth, ContainerPadding } from './components/ContainerBox';
2
+ export { default as ContainerBox } from './components/ContainerBox';
3
+ export type { GridCardItem, GridColumns, GridGap, GridLayoutProps, GridLayoutThemeMode } from './components/GridLayout';
4
+ export { default as GridLayout } from './components/GridLayout';
5
+ export type { SectionFrameProps, SectionFrameThemeMode } from './components/SectionFrame';
6
+ export { default as SectionFrame } from './components/SectionFrame';
7
+ export type { SplitPaneLayoutProps, SplitPaneThemeMode, SplitRatio } from './components/SplitPaneLayout';
8
+ export { default as SplitPaneLayout } from './components/SplitPaneLayout';
9
+ export type { StackAlign, StackDirection, StackEntry, StackGap, StackLayoutProps, StackLayoutThemeMode } from './components/StackLayout';
10
+ export { default as StackLayout } from './components/StackLayout';
11
+ export type { SurfaceCardElevation, SurfaceCardProps, SurfaceCardThemeMode } from './components/SurfaceCard';
12
+ export { default as SurfaceCard } from './components/SurfaceCard';
package/index.js ADDED
@@ -0,0 +1,7 @@
1
+ import e from "./components/ContainerBox/index.js";
2
+ import t from "./components/GridLayout/index.js";
3
+ import n from "./components/SectionFrame/index.js";
4
+ import r from "./components/SplitPaneLayout/index.js";
5
+ import i from "./components/StackLayout/index.js";
6
+ import a from "./components/SurfaceCard/index.js";
7
+ export { e as ContainerBox, t as GridLayout, n as SectionFrame, r as SplitPaneLayout, i as StackLayout, a as SurfaceCard };
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
+ "dependencies": {},
3
+ "devDependencies": {
4
+ "sass": "^1.72.0",
5
+ "tailwindcss": "^4.0.0"
6
+ },
7
+ "exports": {
8
+ ".": {
9
+ "import": "./index.js",
10
+ "require": "./index.js",
11
+ "types": "./index.d.ts"
12
+ },
13
+ "./*": {
14
+ "import": "./*.js",
15
+ "require": "./*.js",
16
+ "types": "./*.d.ts"
17
+ },
18
+ "./components/*/styles.css": "./components/*/styles.css",
19
+ "./global.css": "./global.css"
20
+ },
21
+ "jsdelivr": "./index.umd.js",
22
+ "main": "./index.js",
2
23
  "name": "@rudra-studio/common-layout-containers",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
24
+ "peerDependencies": {
25
+ "react": "^19.0.0",
26
+ "react-dom": "^19.0.0",
27
+ "tailwindcss": "^4.0.0"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "scripts": {
33
+ "test": "echo 'Skipping unit tests for now...' && exit 0"
34
+ },
35
+ "type": "module",
36
+ "types": "./index.d.ts",
37
+ "unpkg": "./index.umd.js",
38
+ "version": "1.0.1"
39
+ }