@extrachill/components 0.4.1 → 0.4.3
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 +5 -0
- package/dist/BlockIntro.d.ts +9 -0
- package/dist/BlockIntro.d.ts.map +1 -0
- package/dist/BlockIntro.js +4 -0
- package/dist/BlockShell.d.ts +9 -0
- package/dist/BlockShell.d.ts.map +1 -0
- package/dist/BlockShell.js +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/package.json +1 -1
- package/src/BlockIntro.tsx +22 -0
- package/src/BlockShell.tsx +23 -0
- package/src/index.tsx +2 -0
- package/styles/components.scss +73 -0
package/CHANGELOG.md
CHANGED
|
@@ -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
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,kBA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,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
|
@@ -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';
|
package/styles/components.scss
CHANGED
|
@@ -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);
|
|
@@ -249,6 +286,42 @@
|
|
|
249
286
|
color: #004085;
|
|
250
287
|
}
|
|
251
288
|
|
|
289
|
+
// Mobile edge-to-edge panel principle
|
|
290
|
+
// Matches the established theme pattern: small phone screens go full-width,
|
|
291
|
+
// drop rounded corners, and reduce wasted side space.
|
|
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
|
+
margin: 0;
|
|
299
|
+
max-width: 100%;
|
|
300
|
+
padding: var(--spacing-md, 1rem);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.ec-panel {
|
|
304
|
+
border-radius: 0;
|
|
305
|
+
padding: var(--spacing-sm, 0.5rem) 0;
|
|
306
|
+
margin-left: calc(var(--spacing-md, 1rem) * -1);
|
|
307
|
+
margin-right: calc(var(--spacing-md, 1rem) * -1);
|
|
308
|
+
padding-left: var(--spacing-md, 1rem);
|
|
309
|
+
padding-right: var(--spacing-md, 1rem);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.ec-panel-header {
|
|
313
|
+
padding-bottom: var(--spacing-sm, 0.5rem);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.ec-action-row {
|
|
317
|
+
align-items: stretch;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.ec-action-row > * {
|
|
321
|
+
max-width: 100%;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
252
325
|
// Image Preview
|
|
253
326
|
.ec-image-preview {
|
|
254
327
|
display: inline-flex;
|