@extrachill/components 0.4.5 → 0.4.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.7] - 2026-03-25
4
+
5
+ ### Changed
6
+ - Add shell-level tabs layout for consistent block structure
7
+
8
+ ## [0.4.6] - 2026-03-25
9
+
10
+ ### Changed
11
+ - Add explicit surface depth primitives for shared mobile shell layering
12
+
3
13
  ## [0.4.5] - 2026-03-25
4
14
 
5
15
  ### Changed
@@ -4,6 +4,7 @@ export interface BlockShellProps {
4
4
  className?: string;
5
5
  classPrefix?: string;
6
6
  compact?: boolean;
7
+ depth?: 0 | 1 | 2 | 3;
7
8
  }
8
- export declare function BlockShell({ children, className, classPrefix, compact, }: BlockShellProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function BlockShell({ children, className, classPrefix, compact, depth, }: BlockShellProps): import("react/jsx-runtime").JSX.Element;
9
10
  //# sourceMappingURL=BlockShell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockShell.d.ts","sourceRoot":"","sources":["../src/BlockShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,UAAU,CAAE,EAC3B,QAAQ,EACR,SAAc,EACd,WAA8B,EAC9B,OAAe,GACf,EAAE,eAAe,2CAQjB"}
1
+ {"version":3,"file":"BlockShell.d.ts","sourceRoot":"","sources":["../src/BlockShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAE,EAC3B,QAAQ,EACR,SAAc,EACd,WAA8B,EAC9B,OAAe,EACf,KAAS,GACT,EAAE,eAAe,2CASjB"}
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- export function BlockShell({ children, className = '', classPrefix = 'ec-block-shell', compact = false, }) {
2
+ export function BlockShell({ children, className = '', classPrefix = 'ec-block-shell', compact = false, depth = 0, }) {
3
3
  const shellClass = [
4
4
  classPrefix,
5
5
  compact ? `${classPrefix}--compact` : '',
6
+ `${classPrefix}--depth-${depth}`,
6
7
  className,
7
8
  ].filter(Boolean).join(' ');
8
9
  return _jsx("div", { className: shellClass, children: children });
@@ -5,6 +5,7 @@ export interface BlockShellHeaderProps {
5
5
  actions?: ReactNode;
6
6
  className?: string;
7
7
  classPrefix?: string;
8
+ showDivider?: boolean;
8
9
  }
9
- export declare function BlockShellHeader({ title, description, actions, className, classPrefix, }: BlockShellHeaderProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function BlockShellHeader({ title, description, actions, className, classPrefix, showDivider, }: BlockShellHeaderProps): import("react/jsx-runtime").JSX.Element;
10
11
  //# sourceMappingURL=BlockShellHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockShellHeader.d.ts","sourceRoot":"","sources":["../src/BlockShellHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,qBAAqB;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAE,EACjC,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAc,EACd,WAAqC,GACrC,EAAE,qBAAqB,2CAUvB"}
1
+ {"version":3,"file":"BlockShellHeader.d.ts","sourceRoot":"","sources":["../src/BlockShellHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,qBAAqB;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAE,EACjC,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAc,EACd,WAAqC,EACrC,WAAkB,GAClB,EAAE,qBAAqB,2CAgBvB"}
@@ -1,4 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function BlockShellHeader({ title, description, actions, className = '', classPrefix = 'ec-block-shell-header', }) {
3
- return (_jsxs("div", { className: [classPrefix, className].filter(Boolean).join(' '), children: [_jsxs("div", { className: `${classPrefix}__main`, children: [title && _jsx("div", { className: `${classPrefix}__title`, children: title }), description && _jsx("div", { className: `${classPrefix}__description`, children: description })] }), actions && _jsx("div", { className: `${classPrefix}__actions`, children: actions })] }));
2
+ export function BlockShellHeader({ title, description, actions, className = '', classPrefix = 'ec-block-shell-header', showDivider = true, }) {
3
+ return (_jsxs("div", { className: [
4
+ classPrefix,
5
+ showDivider ? `${classPrefix}--with-divider` : `${classPrefix}--without-divider`,
6
+ className,
7
+ ].filter(Boolean).join(' '), children: [_jsxs("div", { className: `${classPrefix}__main`, children: [title && _jsx("div", { className: `${classPrefix}__title`, children: title }), description && _jsx("div", { className: `${classPrefix}__description`, children: description })] }), actions && _jsx("div", { className: `${classPrefix}__actions`, children: actions })] }));
4
8
  }
package/dist/Panel.d.ts CHANGED
@@ -4,6 +4,7 @@ export interface PanelProps {
4
4
  className?: string;
5
5
  classPrefix?: string;
6
6
  compact?: boolean;
7
+ depth?: 0 | 1 | 2 | 3;
7
8
  }
8
- export declare function Panel({ children, className, classPrefix, compact, }: PanelProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function Panel({ children, className, classPrefix, compact, depth, }: PanelProps): import("react/jsx-runtime").JSX.Element;
9
10
  //# sourceMappingURL=Panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../src/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,UAAU;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,KAAK,CAAE,EACtB,QAAQ,EACR,SAAc,EACd,WAAwB,EACxB,OAAe,GACf,EAAE,UAAU,2CAQZ"}
1
+ {"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../src/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,UAAU;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACtB;AAED,wBAAgB,KAAK,CAAE,EACtB,QAAQ,EACR,SAAc,EACd,WAAwB,EACxB,OAAe,EACf,KAAS,GACT,EAAE,UAAU,2CASZ"}
package/dist/Panel.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- export function Panel({ children, className = '', classPrefix = 'ec-panel', compact = false, }) {
2
+ export function Panel({ children, className = '', classPrefix = 'ec-panel', compact = false, depth = 1, }) {
3
3
  const panelClass = [
4
4
  classPrefix,
5
5
  compact ? `${classPrefix}--compact` : '',
6
+ `${classPrefix}--depth-${depth}`,
6
7
  className,
7
8
  ].filter(Boolean).join(' ');
8
9
  return _jsx("div", { className: panelClass, children: children });
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface SectionProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ classPrefix?: string;
6
+ depth?: 0 | 1 | 2 | 3;
7
+ }
8
+ export declare function Section({ children, className, classPrefix, depth, }: SectionProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=Section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../src/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,YAAY;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAE,EACxB,QAAQ,EACR,SAAc,EACd,WAA0B,EAC1B,KAAS,GACT,EAAE,YAAY,2CAMd"}
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function Section({ children, className = '', classPrefix = 'ec-section', depth = 2, }) {
3
+ const classes = [classPrefix, `${classPrefix}--depth-${depth}`, className]
4
+ .filter(Boolean)
5
+ .join(' ');
6
+ return _jsx("div", { className: classes, children: children });
7
+ }
@@ -0,0 +1,12 @@
1
+ import { type TabsProps } from './Tabs.tsx';
2
+ export interface ShellTabsProps {
3
+ tabs: TabsProps['tabs'];
4
+ active: TabsProps['active'];
5
+ onChange: TabsProps['onChange'];
6
+ className?: string;
7
+ classPrefix?: string;
8
+ tabsClassName?: string;
9
+ tabsClassPrefix?: string;
10
+ }
11
+ export declare function ShellTabs({ tabs, active, onChange, className, classPrefix, tabsClassName, tabsClassPrefix, }: ShellTabsProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=ShellTabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShellTabs.d.ts","sourceRoot":"","sources":["../src/ShellTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC5B,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,SAAS,CAAE,EAC1B,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,SAAc,EACd,WAA6B,EAC7B,aAAkB,EAClB,eAA2B,GAC3B,EAAE,cAAc,2CAYhB"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Tabs } from "./Tabs.js";
3
+ export function ShellTabs({ tabs, active, onChange, className = '', classPrefix = 'ec-shell-tabs', tabsClassName = '', tabsClassPrefix = 'ec-tabs', }) {
4
+ return (_jsx("div", { className: [classPrefix, className].filter(Boolean).join(' '), children: _jsx(Tabs, { tabs: tabs, active: active, onChange: onChange, className: tabsClassName, classPrefix: tabsClassPrefix }) }));
5
+ }
@@ -0,0 +1,5 @@
1
+ import { type SectionProps } from './Section.tsx';
2
+ export interface SubsectionProps extends SectionProps {
3
+ }
4
+ export declare function Subsection(props: SubsectionProps): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=Subsection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Subsection.d.ts","sourceRoot":"","sources":["../src/Subsection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAE3D,MAAM,WAAW,eAAgB,SAAQ,YAAY;CAAG;AAExD,wBAAgB,UAAU,CAAE,KAAK,EAAE,eAAe,2CAEjD"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Section } from "./Section.js";
3
+ export function Subsection(props) {
4
+ return _jsx(Section, { ...props });
5
+ }
@@ -0,0 +1,5 @@
1
+ import { type PanelProps } from './Panel.tsx';
2
+ export interface SurfaceProps extends PanelProps {
3
+ }
4
+ export declare function Surface(props: SurfaceProps): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=Surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../src/Surface.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,YAAa,SAAQ,UAAU;CAAG;AAEnD,wBAAgB,OAAO,CAAE,KAAK,EAAE,YAAY,2CAE3C"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Panel } from "./Panel.js";
3
+ export function Surface(props) {
4
+ return _jsx(Panel, { ...props });
5
+ }
package/dist/index.d.ts CHANGED
@@ -8,8 +8,12 @@ export { Pagination, type PaginationProps } from './Pagination.tsx';
8
8
  export { SearchBox, type SearchBoxProps } from './SearchBox.tsx';
9
9
  export { Modal, type ModalProps } from './Modal.tsx';
10
10
  export { Tabs, type TabsProps, type TabItem } from './Tabs.tsx';
11
+ export { ShellTabs, type ShellTabsProps } from './ShellTabs.tsx';
11
12
  export { Panel, type PanelProps } from './Panel.tsx';
13
+ export { Surface, type SurfaceProps } from './Surface.tsx';
12
14
  export { PanelHeader, type PanelHeaderProps } from './PanelHeader.tsx';
15
+ export { Section, type SectionProps } from './Section.tsx';
16
+ export { Subsection, type SubsectionProps } from './Subsection.tsx';
13
17
  export { ActionRow, type ActionRowProps } from './ActionRow.tsx';
14
18
  export { FieldGroup, type FieldGroupProps } from './FieldGroup.tsx';
15
19
  export { InlineStatus, type InlineStatusProps } from './InlineStatus.tsx';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -8,8 +8,12 @@ export { Pagination } from "./Pagination.js";
8
8
  export { SearchBox } from "./SearchBox.js";
9
9
  export { Modal } from "./Modal.js";
10
10
  export { Tabs } from "./Tabs.js";
11
+ export { ShellTabs } from "./ShellTabs.js";
11
12
  export { Panel } from "./Panel.js";
13
+ export { Surface } from "./Surface.js";
12
14
  export { PanelHeader } from "./PanelHeader.js";
15
+ export { Section } from "./Section.js";
16
+ export { Subsection } from "./Subsection.js";
13
17
  export { ActionRow } from "./ActionRow.js";
14
18
  export { FieldGroup } from "./FieldGroup.js";
15
19
  export { InlineStatus } from "./InlineStatus.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrachill/components",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Shared React components for the Extra Chill Platform.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -5,6 +5,7 @@ export interface BlockShellProps {
5
5
  className?: string;
6
6
  classPrefix?: string;
7
7
  compact?: boolean;
8
+ depth?: 0 | 1 | 2 | 3;
8
9
  }
9
10
 
10
11
  export function BlockShell( {
@@ -12,10 +13,12 @@ export function BlockShell( {
12
13
  className = '',
13
14
  classPrefix = 'ec-block-shell',
14
15
  compact = false,
16
+ depth = 0,
15
17
  }: BlockShellProps ) {
16
18
  const shellClass = [
17
19
  classPrefix,
18
20
  compact ? `${ classPrefix }--compact` : '',
21
+ `${ classPrefix }--depth-${ depth }`,
19
22
  className,
20
23
  ].filter( Boolean ).join( ' ' );
21
24
 
@@ -6,6 +6,7 @@ export interface BlockShellHeaderProps {
6
6
  actions?: ReactNode;
7
7
  className?: string;
8
8
  classPrefix?: string;
9
+ showDivider?: boolean;
9
10
  }
10
11
 
11
12
  export function BlockShellHeader( {
@@ -14,9 +15,16 @@ export function BlockShellHeader( {
14
15
  actions,
15
16
  className = '',
16
17
  classPrefix = 'ec-block-shell-header',
18
+ showDivider = true,
17
19
  }: BlockShellHeaderProps ) {
18
20
  return (
19
- <div className={ [ classPrefix, className ].filter( Boolean ).join( ' ' ) }>
21
+ <div
22
+ className={ [
23
+ classPrefix,
24
+ showDivider ? `${ classPrefix }--with-divider` : `${ classPrefix }--without-divider`,
25
+ className,
26
+ ].filter( Boolean ).join( ' ' ) }
27
+ >
20
28
  <div className={ `${ classPrefix }__main` }>
21
29
  { title && <div className={ `${ classPrefix }__title` }>{ title }</div> }
22
30
  { description && <div className={ `${ classPrefix }__description` }>{ description }</div> }
package/src/Panel.tsx CHANGED
@@ -5,6 +5,7 @@ export interface PanelProps {
5
5
  className?: string;
6
6
  classPrefix?: string;
7
7
  compact?: boolean;
8
+ depth?: 0 | 1 | 2 | 3;
8
9
  }
9
10
 
10
11
  export function Panel( {
@@ -12,10 +13,12 @@ export function Panel( {
12
13
  className = '',
13
14
  classPrefix = 'ec-panel',
14
15
  compact = false,
16
+ depth = 1,
15
17
  }: PanelProps ) {
16
18
  const panelClass = [
17
19
  classPrefix,
18
20
  compact ? `${ classPrefix }--compact` : '',
21
+ `${ classPrefix }--depth-${ depth }`,
19
22
  className,
20
23
  ].filter( Boolean ).join( ' ' );
21
24
 
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export interface SectionProps {
4
+ children: ReactNode;
5
+ className?: string;
6
+ classPrefix?: string;
7
+ depth?: 0 | 1 | 2 | 3;
8
+ }
9
+
10
+ export function Section( {
11
+ children,
12
+ className = '',
13
+ classPrefix = 'ec-section',
14
+ depth = 2,
15
+ }: SectionProps ) {
16
+ const classes = [ classPrefix, `${ classPrefix }--depth-${ depth }`, className ]
17
+ .filter( Boolean )
18
+ .join( ' ' );
19
+
20
+ return <div className={ classes }>{ children }</div>;
21
+ }
@@ -0,0 +1,33 @@
1
+ import { Tabs, type TabsProps } from './Tabs.tsx';
2
+
3
+ export interface ShellTabsProps {
4
+ tabs: TabsProps['tabs'];
5
+ active: TabsProps['active'];
6
+ onChange: TabsProps['onChange'];
7
+ className?: string;
8
+ classPrefix?: string;
9
+ tabsClassName?: string;
10
+ tabsClassPrefix?: string;
11
+ }
12
+
13
+ export function ShellTabs( {
14
+ tabs,
15
+ active,
16
+ onChange,
17
+ className = '',
18
+ classPrefix = 'ec-shell-tabs',
19
+ tabsClassName = '',
20
+ tabsClassPrefix = 'ec-tabs',
21
+ }: ShellTabsProps ) {
22
+ return (
23
+ <div className={ [ classPrefix, className ].filter( Boolean ).join( ' ' ) }>
24
+ <Tabs
25
+ tabs={ tabs }
26
+ active={ active }
27
+ onChange={ onChange }
28
+ className={ tabsClassName }
29
+ classPrefix={ tabsClassPrefix }
30
+ />
31
+ </div>
32
+ );
33
+ }
@@ -0,0 +1,7 @@
1
+ import { Section, type SectionProps } from './Section.tsx';
2
+
3
+ export interface SubsectionProps extends SectionProps {}
4
+
5
+ export function Subsection( props: SubsectionProps ) {
6
+ return <Section { ...props } />;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { Panel, type PanelProps } from './Panel.tsx';
2
+
3
+ export interface SurfaceProps extends PanelProps {}
4
+
5
+ export function Surface( props: SurfaceProps ) {
6
+ return <Panel { ...props } />;
7
+ }
package/src/index.tsx CHANGED
@@ -9,8 +9,12 @@ export { Pagination, type PaginationProps } from './Pagination.tsx';
9
9
  export { SearchBox, type SearchBoxProps } from './SearchBox.tsx';
10
10
  export { Modal, type ModalProps } from './Modal.tsx';
11
11
  export { Tabs, type TabsProps, type TabItem } from './Tabs.tsx';
12
+ export { ShellTabs, type ShellTabsProps } from './ShellTabs.tsx';
12
13
  export { Panel, type PanelProps } from './Panel.tsx';
14
+ export { Surface, type SurfaceProps } from './Surface.tsx';
13
15
  export { PanelHeader, type PanelHeaderProps } from './PanelHeader.tsx';
16
+ export { Section, type SectionProps } from './Section.tsx';
17
+ export { Subsection, type SubsectionProps } from './Subsection.tsx';
14
18
  export { ActionRow, type ActionRowProps } from './ActionRow.tsx';
15
19
  export { FieldGroup, type FieldGroupProps } from './FieldGroup.tsx';
16
20
  export { InlineStatus, type InlineStatusProps } from './InlineStatus.tsx';
@@ -128,12 +128,20 @@
128
128
  }
129
129
  }
130
130
 
131
+ .ec-shell-tabs {
132
+ display: grid;
133
+ gap: var(--spacing-sm, 0.5rem);
134
+ padding-bottom: var(--spacing-md, 1rem);
135
+ border-bottom: 1px solid var(--border-color, #ddd);
136
+ background: var(--card-background, #f1f5f9);
137
+ }
138
+
131
139
  // Panel
132
140
  .ec-panel {
133
141
  border: 1px solid var(--border-color, #ddd);
134
142
  border-radius: var(--border-radius-lg, 8px);
135
143
  padding: var(--spacing-md, 1rem);
136
- background: var(--card-background, #f8f8f8);
144
+ background: var(--background-color, #fff);
137
145
  display: grid;
138
146
  gap: var(--spacing-md, 1rem);
139
147
  }
@@ -149,6 +157,19 @@
149
157
  gap: var(--spacing-lg, 1.5rem);
150
158
  }
151
159
 
160
+ .ec-block-shell--depth-0 {
161
+ background: var(--card-background, #f1f5f9);
162
+ }
163
+
164
+ .ec-block-shell--depth-1,
165
+ .ec-block-shell--depth-3 {
166
+ background: var(--background-color, #fff);
167
+ }
168
+
169
+ .ec-block-shell--depth-2 {
170
+ background: var(--card-background, #f1f5f9);
171
+ }
172
+
152
173
  .ec-block-shell--compact {
153
174
  padding: var(--spacing-md, 1rem);
154
175
  border-radius: var(--border-radius-lg, 8px);
@@ -182,10 +203,18 @@
182
203
  gap: var(--spacing-md, 1rem);
183
204
  flex-wrap: wrap;
184
205
  padding-bottom: var(--spacing-md, 1rem);
185
- border-bottom: 1px solid var(--border-color, #ddd);
186
206
  background: var(--card-background, #f1f5f9);
187
207
  }
188
208
 
209
+ .ec-block-shell-header--with-divider {
210
+ border-bottom: 1px solid var(--border-color, #ddd);
211
+ }
212
+
213
+ .ec-block-shell-header--without-divider {
214
+ border-bottom: 0;
215
+ padding-bottom: 0;
216
+ }
217
+
189
218
  .ec-block-shell-header__main {
190
219
  display: grid;
191
220
  gap: var(--spacing-xs, 0.25rem);
@@ -218,6 +247,34 @@
218
247
  border-radius: var(--border-radius-md, 6px);
219
248
  }
220
249
 
250
+ .ec-panel--depth-0,
251
+ .ec-panel--depth-2 {
252
+ background: var(--card-background, #f8f8f8);
253
+ }
254
+
255
+ .ec-panel--depth-1,
256
+ .ec-panel--depth-3 {
257
+ background: var(--background-color, #fff);
258
+ }
259
+
260
+ .ec-section {
261
+ display: grid;
262
+ gap: var(--spacing-md, 1rem);
263
+ padding: var(--spacing-md, 1rem);
264
+ border: 1px solid var(--border-color, #ddd);
265
+ border-radius: var(--border-radius-md, 6px);
266
+ }
267
+
268
+ .ec-section--depth-0,
269
+ .ec-section--depth-2 {
270
+ background: var(--card-background, #f8f8f8);
271
+ }
272
+
273
+ .ec-section--depth-1,
274
+ .ec-section--depth-3 {
275
+ background: var(--background-color, #fff);
276
+ }
277
+
221
278
  // Panel Header
222
279
  .ec-panel-header {
223
280
  display: flex;
@@ -344,6 +401,13 @@
344
401
  padding-bottom: var(--spacing-sm, 0.5rem);
345
402
  }
346
403
 
404
+ .ec-shell-tabs {
405
+ margin-left: calc(var(--spacing-md, 1rem) * -1);
406
+ margin-right: calc(var(--spacing-md, 1rem) * -1);
407
+ padding-left: var(--spacing-md, 1rem);
408
+ padding-right: var(--spacing-md, 1rem);
409
+ }
410
+
347
411
  .ec-panel {
348
412
  background: var(--background-color, #fff);
349
413
  border-radius: 0;
@@ -356,10 +420,30 @@
356
420
  padding-right: var(--spacing-md, 1rem);
357
421
  }
358
422
 
359
- .ec-panel .ec-panel {
423
+ .ec-panel--depth-0,
424
+ .ec-panel--depth-2,
425
+ .ec-section--depth-0,
426
+ .ec-section--depth-2 {
360
427
  background: var(--card-background, #f1f5f9);
361
428
  }
362
429
 
430
+ .ec-panel--depth-1,
431
+ .ec-panel--depth-3,
432
+ .ec-section--depth-1,
433
+ .ec-section--depth-3 {
434
+ background: var(--background-color, #fff);
435
+ }
436
+
437
+ .ec-section {
438
+ border-radius: 0;
439
+ border-left: 0;
440
+ border-right: 0;
441
+ margin-left: calc(var(--spacing-md, 1rem) * -1);
442
+ margin-right: calc(var(--spacing-md, 1rem) * -1);
443
+ padding-left: var(--spacing-md, 1rem);
444
+ padding-right: var(--spacing-md, 1rem);
445
+ }
446
+
363
447
  .ec-panel-header {
364
448
  padding-bottom: var(--spacing-sm, 0.5rem);
365
449
  }