@extrachill/components 0.4.4 → 0.4.6

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.6] - 2026-03-25
4
+
5
+ ### Changed
6
+ - Add explicit surface depth primitives for shared mobile shell layering
7
+
8
+ ## [0.4.5] - 2026-03-25
9
+
10
+ ### Changed
11
+ - Add shared shell-contained header primitive
12
+
3
13
  ## [0.4.2] - 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 });
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface BlockShellHeaderProps {
3
+ title?: ReactNode;
4
+ description?: ReactNode;
5
+ actions?: ReactNode;
6
+ className?: string;
7
+ classPrefix?: string;
8
+ }
9
+ export declare function BlockShellHeader({ title, description, actions, className, classPrefix, }: BlockShellHeaderProps): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=BlockShellHeader.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,4 @@
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 })] }));
4
+ }
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,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
@@ -9,7 +9,10 @@ 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
11
  export { Panel, type PanelProps } from './Panel.tsx';
12
+ export { Surface, type SurfaceProps } from './Surface.tsx';
12
13
  export { PanelHeader, type PanelHeaderProps } from './PanelHeader.tsx';
14
+ export { Section, type SectionProps } from './Section.tsx';
15
+ export { Subsection, type SubsectionProps } from './Subsection.tsx';
13
16
  export { ActionRow, type ActionRowProps } from './ActionRow.tsx';
14
17
  export { FieldGroup, type FieldGroupProps } from './FieldGroup.tsx';
15
18
  export { InlineStatus, type InlineStatusProps } from './InlineStatus.tsx';
@@ -18,4 +21,5 @@ export { ImagePreview, type ImagePreviewProps } from './ImagePreview.tsx';
18
21
  export { MediaField, type MediaFieldProps } from './MediaField.tsx';
19
22
  export { BlockShell, type BlockShellProps } from './BlockShell.tsx';
20
23
  export { BlockIntro, type BlockIntroProps } from './BlockIntro.tsx';
24
+ export { BlockShellHeader, type BlockShellHeaderProps } from './BlockShellHeader.tsx';
21
25
  //# sourceMappingURL=index.d.ts.map
@@ -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;AAC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9
9
  export { Modal } from "./Modal.js";
10
10
  export { Tabs } from "./Tabs.js";
11
11
  export { Panel } from "./Panel.js";
12
+ export { Surface } from "./Surface.js";
12
13
  export { PanelHeader } from "./PanelHeader.js";
14
+ export { Section } from "./Section.js";
15
+ export { Subsection } from "./Subsection.js";
13
16
  export { ActionRow } from "./ActionRow.js";
14
17
  export { FieldGroup } from "./FieldGroup.js";
15
18
  export { InlineStatus } from "./InlineStatus.js";
@@ -18,3 +21,4 @@ export { ImagePreview } from "./ImagePreview.js";
18
21
  export { MediaField } from "./MediaField.js";
19
22
  export { BlockShell } from "./BlockShell.js";
20
23
  export { BlockIntro } from "./BlockIntro.js";
24
+ export { BlockShellHeader } from "./BlockShellHeader.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrachill/components",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
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
 
@@ -0,0 +1,27 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export interface BlockShellHeaderProps {
4
+ title?: ReactNode;
5
+ description?: ReactNode;
6
+ actions?: ReactNode;
7
+ className?: string;
8
+ classPrefix?: string;
9
+ }
10
+
11
+ export function BlockShellHeader( {
12
+ title,
13
+ description,
14
+ actions,
15
+ className = '',
16
+ classPrefix = 'ec-block-shell-header',
17
+ }: BlockShellHeaderProps ) {
18
+ return (
19
+ <div className={ [ classPrefix, className ].filter( Boolean ).join( ' ' ) }>
20
+ <div className={ `${ classPrefix }__main` }>
21
+ { title && <div className={ `${ classPrefix }__title` }>{ title }</div> }
22
+ { description && <div className={ `${ classPrefix }__description` }>{ description }</div> }
23
+ </div>
24
+ { actions && <div className={ `${ classPrefix }__actions` }>{ actions }</div> }
25
+ </div>
26
+ );
27
+ }
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,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
@@ -10,7 +10,10 @@ 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
12
  export { Panel, type PanelProps } from './Panel.tsx';
13
+ export { Surface, type SurfaceProps } from './Surface.tsx';
13
14
  export { PanelHeader, type PanelHeaderProps } from './PanelHeader.tsx';
15
+ export { Section, type SectionProps } from './Section.tsx';
16
+ export { Subsection, type SubsectionProps } from './Subsection.tsx';
14
17
  export { ActionRow, type ActionRowProps } from './ActionRow.tsx';
15
18
  export { FieldGroup, type FieldGroupProps } from './FieldGroup.tsx';
16
19
  export { InlineStatus, type InlineStatusProps } from './InlineStatus.tsx';
@@ -19,3 +22,4 @@ export { ImagePreview, type ImagePreviewProps } from './ImagePreview.tsx';
19
22
  export { MediaField, type MediaFieldProps } from './MediaField.tsx';
20
23
  export { BlockShell, type BlockShellProps } from './BlockShell.tsx';
21
24
  export { BlockIntro, type BlockIntroProps } from './BlockIntro.tsx';
25
+ export { BlockShellHeader, type BlockShellHeaderProps } from './BlockShellHeader.tsx';
@@ -133,7 +133,7 @@
133
133
  border: 1px solid var(--border-color, #ddd);
134
134
  border-radius: var(--border-radius-lg, 8px);
135
135
  padding: var(--spacing-md, 1rem);
136
- background: var(--card-background, #f8f8f8);
136
+ background: var(--background-color, #fff);
137
137
  display: grid;
138
138
  gap: var(--spacing-md, 1rem);
139
139
  }
@@ -149,6 +149,19 @@
149
149
  gap: var(--spacing-lg, 1.5rem);
150
150
  }
151
151
 
152
+ .ec-block-shell--depth-0 {
153
+ background: var(--card-background, #f1f5f9);
154
+ }
155
+
156
+ .ec-block-shell--depth-1,
157
+ .ec-block-shell--depth-3 {
158
+ background: var(--background-color, #fff);
159
+ }
160
+
161
+ .ec-block-shell--depth-2 {
162
+ background: var(--card-background, #f1f5f9);
163
+ }
164
+
152
165
  .ec-block-shell--compact {
153
166
  padding: var(--spacing-md, 1rem);
154
167
  border-radius: var(--border-radius-lg, 8px);
@@ -175,11 +188,77 @@
175
188
  color: var(--text-color, #111);
176
189
  }
177
190
 
191
+ .ec-block-shell-header {
192
+ display: flex;
193
+ justify-content: space-between;
194
+ align-items: center;
195
+ gap: var(--spacing-md, 1rem);
196
+ flex-wrap: wrap;
197
+ padding-bottom: var(--spacing-md, 1rem);
198
+ border-bottom: 1px solid var(--border-color, #ddd);
199
+ background: var(--card-background, #f1f5f9);
200
+ }
201
+
202
+ .ec-block-shell-header__main {
203
+ display: grid;
204
+ gap: var(--spacing-xs, 0.25rem);
205
+ }
206
+
207
+ .ec-block-shell-header__title {
208
+ margin: 0;
209
+ font-family: var(--font-family-heading, inherit);
210
+ font-size: var(--font-size-2xl, 1.75rem);
211
+ font-weight: 700;
212
+ color: var(--text-color, #111);
213
+ }
214
+
215
+ .ec-block-shell-header__description {
216
+ margin: 0;
217
+ font-size: var(--font-size-body, 1.125rem);
218
+ line-height: 1.6;
219
+ color: var(--text-color, #111);
220
+ }
221
+
222
+ .ec-block-shell-header__actions {
223
+ display: flex;
224
+ align-items: center;
225
+ gap: var(--spacing-sm, 0.5rem);
226
+ flex-wrap: wrap;
227
+ }
228
+
178
229
  .ec-panel--compact {
179
230
  padding: var(--spacing-sm, 0.5rem) var(--spacing-md, 1rem);
180
231
  border-radius: var(--border-radius-md, 6px);
181
232
  }
182
233
 
234
+ .ec-panel--depth-0,
235
+ .ec-panel--depth-2 {
236
+ background: var(--card-background, #f8f8f8);
237
+ }
238
+
239
+ .ec-panel--depth-1,
240
+ .ec-panel--depth-3 {
241
+ background: var(--background-color, #fff);
242
+ }
243
+
244
+ .ec-section {
245
+ display: grid;
246
+ gap: var(--spacing-md, 1rem);
247
+ padding: var(--spacing-md, 1rem);
248
+ border: 1px solid var(--border-color, #ddd);
249
+ border-radius: var(--border-radius-md, 6px);
250
+ }
251
+
252
+ .ec-section--depth-0,
253
+ .ec-section--depth-2 {
254
+ background: var(--card-background, #f8f8f8);
255
+ }
256
+
257
+ .ec-section--depth-1,
258
+ .ec-section--depth-3 {
259
+ background: var(--background-color, #fff);
260
+ }
261
+
183
262
  // Panel Header
184
263
  .ec-panel-header {
185
264
  display: flex;
@@ -302,6 +381,10 @@
302
381
  padding: var(--spacing-md, 1rem);
303
382
  }
304
383
 
384
+ .ec-block-shell-header {
385
+ padding-bottom: var(--spacing-sm, 0.5rem);
386
+ }
387
+
305
388
  .ec-panel {
306
389
  background: var(--background-color, #fff);
307
390
  border-radius: 0;
@@ -314,10 +397,30 @@
314
397
  padding-right: var(--spacing-md, 1rem);
315
398
  }
316
399
 
317
- .ec-panel .ec-panel {
400
+ .ec-panel--depth-0,
401
+ .ec-panel--depth-2,
402
+ .ec-section--depth-0,
403
+ .ec-section--depth-2 {
318
404
  background: var(--card-background, #f1f5f9);
319
405
  }
320
406
 
407
+ .ec-panel--depth-1,
408
+ .ec-panel--depth-3,
409
+ .ec-section--depth-1,
410
+ .ec-section--depth-3 {
411
+ background: var(--background-color, #fff);
412
+ }
413
+
414
+ .ec-section {
415
+ border-radius: 0;
416
+ border-left: 0;
417
+ border-right: 0;
418
+ margin-left: calc(var(--spacing-md, 1rem) * -1);
419
+ margin-right: calc(var(--spacing-md, 1rem) * -1);
420
+ padding-left: var(--spacing-md, 1rem);
421
+ padding-right: var(--spacing-md, 1rem);
422
+ }
423
+
321
424
  .ec-panel-header {
322
425
  padding-bottom: var(--spacing-sm, 0.5rem);
323
426
  }