@extrachill/components 0.4.2 → 0.4.4

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.
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface BlockIntroProps {
3
+ title?: ReactNode;
4
+ description?: ReactNode;
5
+ className?: string;
6
+ classPrefix?: string;
7
+ }
8
+ export declare function BlockIntro({ title, description, className, classPrefix, }: BlockIntroProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=BlockIntro.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockIntro.d.ts","sourceRoot":"","sources":["../src/BlockIntro.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAE,EAC3B,KAAK,EACL,WAAW,EACX,SAAc,EACd,WAA8B,GAC9B,EAAE,eAAe,2CAOjB"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function BlockIntro({ title, description, className = '', classPrefix = 'ec-block-intro', }) {
3
+ return (_jsxs("div", { className: [classPrefix, className].filter(Boolean).join(' '), children: [title && _jsx("div", { className: `${classPrefix}__title`, children: title }), description && _jsx("div", { className: `${classPrefix}__description`, children: description })] }));
4
+ }
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface BlockShellProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ classPrefix?: string;
6
+ compact?: boolean;
7
+ }
8
+ export declare function BlockShell({ children, className, classPrefix, compact, }: BlockShellProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=BlockShell.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function BlockShell({ children, className = '', classPrefix = 'ec-block-shell', compact = false, }) {
3
+ const shellClass = [
4
+ classPrefix,
5
+ compact ? `${classPrefix}--compact` : '',
6
+ className,
7
+ ].filter(Boolean).join(' ');
8
+ return _jsx("div", { className: shellClass, children: children });
9
+ }
package/dist/index.d.ts CHANGED
@@ -16,4 +16,6 @@ export { InlineStatus, type InlineStatusProps } from './InlineStatus.tsx';
16
16
  export { Badge, type BadgeProps } from './Badge.tsx';
17
17
  export { ImagePreview, type ImagePreviewProps } from './ImagePreview.tsx';
18
18
  export { MediaField, type MediaFieldProps } from './MediaField.tsx';
19
+ export { BlockShell, type BlockShellProps } from './BlockShell.tsx';
20
+ export { BlockIntro, type BlockIntroProps } from './BlockIntro.tsx';
19
21
  //# 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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M,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"}
package/dist/index.js CHANGED
@@ -16,3 +16,5 @@ export { InlineStatus } from "./InlineStatus.js";
16
16
  export { Badge } from "./Badge.js";
17
17
  export { ImagePreview } from "./ImagePreview.js";
18
18
  export { MediaField } from "./MediaField.js";
19
+ export { BlockShell } from "./BlockShell.js";
20
+ export { BlockIntro } from "./BlockIntro.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrachill/components",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Shared React components for the Extra Chill Platform.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export interface BlockIntroProps {
4
+ title?: ReactNode;
5
+ description?: ReactNode;
6
+ className?: string;
7
+ classPrefix?: string;
8
+ }
9
+
10
+ export function BlockIntro( {
11
+ title,
12
+ description,
13
+ className = '',
14
+ classPrefix = 'ec-block-intro',
15
+ }: BlockIntroProps ) {
16
+ return (
17
+ <div className={ [ classPrefix, className ].filter( Boolean ).join( ' ' ) }>
18
+ { title && <div className={ `${ classPrefix }__title` }>{ title }</div> }
19
+ { description && <div className={ `${ classPrefix }__description` }>{ description }</div> }
20
+ </div>
21
+ );
22
+ }
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export interface BlockShellProps {
4
+ children: ReactNode;
5
+ className?: string;
6
+ classPrefix?: string;
7
+ compact?: boolean;
8
+ }
9
+
10
+ export function BlockShell( {
11
+ children,
12
+ className = '',
13
+ classPrefix = 'ec-block-shell',
14
+ compact = false,
15
+ }: BlockShellProps ) {
16
+ const shellClass = [
17
+ classPrefix,
18
+ compact ? `${ classPrefix }--compact` : '',
19
+ className,
20
+ ].filter( Boolean ).join( ' ' );
21
+
22
+ return <div className={ shellClass }>{ children }</div>;
23
+ }
package/src/index.tsx CHANGED
@@ -17,3 +17,5 @@ export { InlineStatus, type InlineStatusProps } from './InlineStatus.tsx';
17
17
  export { Badge, type BadgeProps } from './Badge.tsx';
18
18
  export { ImagePreview, type ImagePreviewProps } from './ImagePreview.tsx';
19
19
  export { MediaField, type MediaFieldProps } from './MediaField.tsx';
20
+ export { BlockShell, type BlockShellProps } from './BlockShell.tsx';
21
+ export { BlockIntro, type BlockIntroProps } from './BlockIntro.tsx';
@@ -138,6 +138,43 @@
138
138
  gap: var(--spacing-md, 1rem);
139
139
  }
140
140
 
141
+ // Block shell / top-level wrapper
142
+ .ec-block-shell {
143
+ background: var(--card-background, #f1f5f9);
144
+ border: 1px solid var(--border-color, #ddd);
145
+ border-radius: var(--border-radius-xl, 14px);
146
+ padding: var(--spacing-lg, 1.5rem);
147
+ box-sizing: border-box;
148
+ display: grid;
149
+ gap: var(--spacing-lg, 1.5rem);
150
+ }
151
+
152
+ .ec-block-shell--compact {
153
+ padding: var(--spacing-md, 1rem);
154
+ border-radius: var(--border-radius-lg, 8px);
155
+ }
156
+
157
+ .ec-block-intro {
158
+ display: grid;
159
+ gap: var(--spacing-sm, 0.5rem);
160
+ background: var(--card-background, #f1f5f9);
161
+ }
162
+
163
+ .ec-block-intro__title {
164
+ margin: 0;
165
+ font-family: var(--font-family-heading, inherit);
166
+ font-size: var(--font-size-2xl, 1.75rem);
167
+ font-weight: 700;
168
+ color: var(--text-color, #111);
169
+ }
170
+
171
+ .ec-block-intro__description {
172
+ margin: 0;
173
+ font-size: var(--font-size-body, 1.125rem);
174
+ line-height: 1.6;
175
+ color: var(--text-color, #111);
176
+ }
177
+
141
178
  .ec-panel--compact {
142
179
  padding: var(--spacing-sm, 0.5rem) var(--spacing-md, 1rem);
143
180
  border-radius: var(--border-radius-md, 6px);
@@ -253,8 +290,23 @@
253
290
  // Matches the established theme pattern: small phone screens go full-width,
254
291
  // drop rounded corners, and reduce wasted side space.
255
292
  @media screen and (max-width: 480px) {
293
+ .ec-block-shell {
294
+ background: var(--card-background, #f1f5f9);
295
+ border-radius: 0;
296
+ border-left: 0;
297
+ border-right: 0;
298
+ border-top: 1px solid var(--border-color, #ddd);
299
+ border-bottom: 1px solid var(--border-color, #ddd);
300
+ margin: 0;
301
+ max-width: 100%;
302
+ padding: var(--spacing-md, 1rem);
303
+ }
304
+
256
305
  .ec-panel {
306
+ background: var(--background-color, #fff);
257
307
  border-radius: 0;
308
+ border-left: 0;
309
+ border-right: 0;
258
310
  padding: var(--spacing-sm, 0.5rem) 0;
259
311
  margin-left: calc(var(--spacing-md, 1rem) * -1);
260
312
  margin-right: calc(var(--spacing-md, 1rem) * -1);
@@ -262,6 +314,10 @@
262
314
  padding-right: var(--spacing-md, 1rem);
263
315
  }
264
316
 
317
+ .ec-panel .ec-panel {
318
+ background: var(--card-background, #f1f5f9);
319
+ }
320
+
265
321
  .ec-panel-header {
266
322
  padding-bottom: var(--spacing-sm, 0.5rem);
267
323
  }