@extrachill/components 0.4.4 → 0.4.5

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,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.5] - 2026-03-25
4
+
5
+ ### Changed
6
+ - Add shared shell-contained header primitive
7
+
3
8
  ## [0.4.2] - 2026-03-25
4
9
 
5
10
  ### Changed
@@ -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/index.d.ts CHANGED
@@ -18,4 +18,5 @@ export { ImagePreview, type ImagePreviewProps } from './ImagePreview.tsx';
18
18
  export { MediaField, type MediaFieldProps } from './MediaField.tsx';
19
19
  export { BlockShell, type BlockShellProps } from './BlockShell.tsx';
20
20
  export { BlockIntro, type BlockIntroProps } from './BlockIntro.tsx';
21
+ export { BlockShellHeader, type BlockShellHeaderProps } from './BlockShellHeader.tsx';
21
22
  //# 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;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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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
@@ -18,3 +18,4 @@ export { ImagePreview } from "./ImagePreview.js";
18
18
  export { MediaField } from "./MediaField.js";
19
19
  export { BlockShell } from "./BlockShell.js";
20
20
  export { BlockIntro } from "./BlockIntro.js";
21
+ 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.5",
4
4
  "description": "Shared React components for the Extra Chill Platform.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -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/index.tsx CHANGED
@@ -19,3 +19,4 @@ export { ImagePreview, type ImagePreviewProps } from './ImagePreview.tsx';
19
19
  export { MediaField, type MediaFieldProps } from './MediaField.tsx';
20
20
  export { BlockShell, type BlockShellProps } from './BlockShell.tsx';
21
21
  export { BlockIntro, type BlockIntroProps } from './BlockIntro.tsx';
22
+ export { BlockShellHeader, type BlockShellHeaderProps } from './BlockShellHeader.tsx';
@@ -175,6 +175,44 @@
175
175
  color: var(--text-color, #111);
176
176
  }
177
177
 
178
+ .ec-block-shell-header {
179
+ display: flex;
180
+ justify-content: space-between;
181
+ align-items: center;
182
+ gap: var(--spacing-md, 1rem);
183
+ flex-wrap: wrap;
184
+ padding-bottom: var(--spacing-md, 1rem);
185
+ border-bottom: 1px solid var(--border-color, #ddd);
186
+ background: var(--card-background, #f1f5f9);
187
+ }
188
+
189
+ .ec-block-shell-header__main {
190
+ display: grid;
191
+ gap: var(--spacing-xs, 0.25rem);
192
+ }
193
+
194
+ .ec-block-shell-header__title {
195
+ margin: 0;
196
+ font-family: var(--font-family-heading, inherit);
197
+ font-size: var(--font-size-2xl, 1.75rem);
198
+ font-weight: 700;
199
+ color: var(--text-color, #111);
200
+ }
201
+
202
+ .ec-block-shell-header__description {
203
+ margin: 0;
204
+ font-size: var(--font-size-body, 1.125rem);
205
+ line-height: 1.6;
206
+ color: var(--text-color, #111);
207
+ }
208
+
209
+ .ec-block-shell-header__actions {
210
+ display: flex;
211
+ align-items: center;
212
+ gap: var(--spacing-sm, 0.5rem);
213
+ flex-wrap: wrap;
214
+ }
215
+
178
216
  .ec-panel--compact {
179
217
  padding: var(--spacing-sm, 0.5rem) var(--spacing-md, 1rem);
180
218
  border-radius: var(--border-radius-md, 6px);
@@ -302,6 +340,10 @@
302
340
  padding: var(--spacing-md, 1rem);
303
341
  }
304
342
 
343
+ .ec-block-shell-header {
344
+ padding-bottom: var(--spacing-sm, 0.5rem);
345
+ }
346
+
305
347
  .ec-panel {
306
348
  background: var(--background-color, #fff);
307
349
  border-radius: 0;