@xzibit/ui 0.2.0 → 0.3.0
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 +22 -0
- package/README.md +1 -1
- package/dist/index.cjs +16 -5
- package/dist/index.d.cts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +16 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@xzibit/ui` are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/) loosely; versioning follows [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [0.3.0] — 2026-05-24
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **`disablePadding` prop on `<ContentContainer>`** — when `true`, renders no padding (only `max-width` + `margin: 0 auto`). For app-shell integration where the parent layout already provides padding (e.g. left-nav offset), preventing the tier padding from stacking and reducing effective content width.
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
<ContentContainer tier="reference" disablePadding>
|
|
13
|
+
{/* shell-managed padding flows through */}
|
|
14
|
+
</ContentContainer>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Why
|
|
18
|
+
|
|
19
|
+
ERP Overview Phase 1.13 (the canonical `<ContentContainer>` migration ship 2026-05-24) surfaced a left-nav stacking conflict: the per-page outer div uses `padding: '2.5rem 2.5rem 2.5rem 280px'` (left-nav offset), and stacking the container's `3rem 2rem` reduces effective width on wide monitors from the spec's 1200px to ~816px. Their resolution — `className="content-container--layout"` + `!important` padding zero — works but is a smell. `disablePadding` is the canonical API. Every left-nav-bearing portfolio app will hit this same conflict; this prop is the right answer for v0.3 before the portfolio-wide broadcast.
|
|
20
|
+
|
|
21
|
+
### Backward compatible
|
|
22
|
+
|
|
23
|
+
`disablePadding` defaults to `false`. v0.2.x adopters who don't set it see no change. v0.3+ is the recommended version for app-shell integration; v0.2.x is fine for page-level adoption where shell padding isn't a concern.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
5
27
|
## [0.2.0] — 2026-05-24
|
|
6
28
|
|
|
7
29
|
### Added
|
package/README.md
CHANGED
|
@@ -146,7 +146,7 @@ This sets `--xz-charcoal`, `--xz-teal`, `--xz-white`, `--border`, etc. — and `
|
|
|
146
146
|
| `<AppsDropdown />` | Sectioned + alphabetical apps dropdown driven by `/api/me/apps` |
|
|
147
147
|
| `<XzibitMark size={28} />` | Xzibit X brand mark as inline SVG (any size, any density) |
|
|
148
148
|
| `useApps()` | React hook fetching `/api/me/apps` with loading + error + refetch |
|
|
149
|
-
| `<ContentContainer tier="reference">` *(v0.2+)* | Content max-width container per DESIGN-STANDARD v2.4 §Content Density Tiers — tiers: `'editorial'` (720px), `'reference'` (1200px, default), `'data'` (unconstrained). Wraps `<main>` content. |
|
|
149
|
+
| `<ContentContainer tier="reference">` *(v0.2+)* | Content max-width container per DESIGN-STANDARD v2.4 §Content Density Tiers — tiers: `'editorial'` (720px), `'reference'` (1200px, default), `'data'` (unconstrained). Wraps `<main>` content. v0.3+ adds `disablePadding` prop for app-shell integration where layout already provides padding (e.g. left-nav offset). |
|
|
150
150
|
|
|
151
151
|
---
|
|
152
152
|
|
package/dist/index.cjs
CHANGED
|
@@ -563,17 +563,28 @@ function BuildBadge({
|
|
|
563
563
|
|
|
564
564
|
// src/ContentContainer.tsx
|
|
565
565
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
566
|
-
var
|
|
567
|
-
editorial:
|
|
568
|
-
reference:
|
|
569
|
-
data:
|
|
566
|
+
var TIER_MAX_WIDTH = {
|
|
567
|
+
editorial: 720,
|
|
568
|
+
reference: 1200,
|
|
569
|
+
data: "100%"
|
|
570
|
+
};
|
|
571
|
+
var TIER_PADDING = {
|
|
572
|
+
editorial: "3rem 2rem",
|
|
573
|
+
reference: "3rem 2rem",
|
|
574
|
+
data: "1.5rem 2rem"
|
|
570
575
|
};
|
|
571
576
|
function ContentContainer({
|
|
572
577
|
tier = "reference",
|
|
578
|
+
disablePadding = false,
|
|
573
579
|
className,
|
|
574
580
|
children
|
|
575
581
|
}) {
|
|
576
|
-
|
|
582
|
+
const style = {
|
|
583
|
+
maxWidth: TIER_MAX_WIDTH[tier],
|
|
584
|
+
margin: "0 auto",
|
|
585
|
+
...disablePadding ? {} : { padding: TIER_PADDING[tier] }
|
|
586
|
+
};
|
|
587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className, style, children });
|
|
577
588
|
}
|
|
578
589
|
// Annotate the CommonJS export names for ESM import in node:
|
|
579
590
|
0 && (module.exports = {
|
package/dist/index.d.cts
CHANGED
|
@@ -196,6 +196,22 @@ interface ContentContainerProps {
|
|
|
196
196
|
* Defaults to `'reference'` (the portfolio default per v2.4).
|
|
197
197
|
*/
|
|
198
198
|
tier?: ContentTier;
|
|
199
|
+
/**
|
|
200
|
+
* If `true`, render no padding — useful when the parent app shell already
|
|
201
|
+
* provides layout-level padding (e.g. left-nav offset).
|
|
202
|
+
*
|
|
203
|
+
* Default: `false` (tier padding is applied).
|
|
204
|
+
*
|
|
205
|
+
* **Common use case:** app-shell `layout.tsx` integration where the surrounding
|
|
206
|
+
* layout div sets `padding: '2.5rem 2.5rem 2.5rem 280px'` for left-nav offset.
|
|
207
|
+
* Without `disablePadding`, the container's `3rem 2rem` stacks with the shell
|
|
208
|
+
* padding and reduces effective content width (e.g. 1200px ContentContainer
|
|
209
|
+
* minus 64px container padding minus 320px shell padding ≈ 816px actual).
|
|
210
|
+
*
|
|
211
|
+
* Added in v0.3.0 (2026-05-24) after ERP Overview Phase 1.13 surfaced the
|
|
212
|
+
* left-nav stacking conflict.
|
|
213
|
+
*/
|
|
214
|
+
disablePadding?: boolean;
|
|
199
215
|
/** Optional className for additional styling. */
|
|
200
216
|
className?: string;
|
|
201
217
|
/** Children to render inside the container. */
|
|
@@ -226,6 +242,6 @@ interface ContentContainerProps {
|
|
|
226
242
|
* </ContentContainer>
|
|
227
243
|
* ```
|
|
228
244
|
*/
|
|
229
|
-
declare function ContentContainer({ tier, className, children, }: ContentContainerProps): react_jsx_runtime.JSX.Element;
|
|
245
|
+
declare function ContentContainer({ tier, disablePadding, className, children, }: ContentContainerProps): react_jsx_runtime.JSX.Element;
|
|
230
246
|
|
|
231
247
|
export { type App, AppsDropdown, type AppsDropdownProps, type AppsResponse, BackToLauncher, type BackToLauncherProps, ContentContainer, type ContentContainerProps, type ContentTier, type RawApp, TopBar, type TopBarProps, type UseAppsOptions, type UseAppsResult, XzibitMark, type XzibitMarkProps, normalizeApp, useApps };
|
package/dist/index.d.ts
CHANGED
|
@@ -196,6 +196,22 @@ interface ContentContainerProps {
|
|
|
196
196
|
* Defaults to `'reference'` (the portfolio default per v2.4).
|
|
197
197
|
*/
|
|
198
198
|
tier?: ContentTier;
|
|
199
|
+
/**
|
|
200
|
+
* If `true`, render no padding — useful when the parent app shell already
|
|
201
|
+
* provides layout-level padding (e.g. left-nav offset).
|
|
202
|
+
*
|
|
203
|
+
* Default: `false` (tier padding is applied).
|
|
204
|
+
*
|
|
205
|
+
* **Common use case:** app-shell `layout.tsx` integration where the surrounding
|
|
206
|
+
* layout div sets `padding: '2.5rem 2.5rem 2.5rem 280px'` for left-nav offset.
|
|
207
|
+
* Without `disablePadding`, the container's `3rem 2rem` stacks with the shell
|
|
208
|
+
* padding and reduces effective content width (e.g. 1200px ContentContainer
|
|
209
|
+
* minus 64px container padding minus 320px shell padding ≈ 816px actual).
|
|
210
|
+
*
|
|
211
|
+
* Added in v0.3.0 (2026-05-24) after ERP Overview Phase 1.13 surfaced the
|
|
212
|
+
* left-nav stacking conflict.
|
|
213
|
+
*/
|
|
214
|
+
disablePadding?: boolean;
|
|
199
215
|
/** Optional className for additional styling. */
|
|
200
216
|
className?: string;
|
|
201
217
|
/** Children to render inside the container. */
|
|
@@ -226,6 +242,6 @@ interface ContentContainerProps {
|
|
|
226
242
|
* </ContentContainer>
|
|
227
243
|
* ```
|
|
228
244
|
*/
|
|
229
|
-
declare function ContentContainer({ tier, className, children, }: ContentContainerProps): react_jsx_runtime.JSX.Element;
|
|
245
|
+
declare function ContentContainer({ tier, disablePadding, className, children, }: ContentContainerProps): react_jsx_runtime.JSX.Element;
|
|
230
246
|
|
|
231
247
|
export { type App, AppsDropdown, type AppsDropdownProps, type AppsResponse, BackToLauncher, type BackToLauncherProps, ContentContainer, type ContentContainerProps, type ContentTier, type RawApp, TopBar, type TopBarProps, type UseAppsOptions, type UseAppsResult, XzibitMark, type XzibitMarkProps, normalizeApp, useApps };
|
package/dist/index.js
CHANGED
|
@@ -531,17 +531,28 @@ function BuildBadge({
|
|
|
531
531
|
|
|
532
532
|
// src/ContentContainer.tsx
|
|
533
533
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
534
|
-
var
|
|
535
|
-
editorial:
|
|
536
|
-
reference:
|
|
537
|
-
data:
|
|
534
|
+
var TIER_MAX_WIDTH = {
|
|
535
|
+
editorial: 720,
|
|
536
|
+
reference: 1200,
|
|
537
|
+
data: "100%"
|
|
538
|
+
};
|
|
539
|
+
var TIER_PADDING = {
|
|
540
|
+
editorial: "3rem 2rem",
|
|
541
|
+
reference: "3rem 2rem",
|
|
542
|
+
data: "1.5rem 2rem"
|
|
538
543
|
};
|
|
539
544
|
function ContentContainer({
|
|
540
545
|
tier = "reference",
|
|
546
|
+
disablePadding = false,
|
|
541
547
|
className,
|
|
542
548
|
children
|
|
543
549
|
}) {
|
|
544
|
-
|
|
550
|
+
const style = {
|
|
551
|
+
maxWidth: TIER_MAX_WIDTH[tier],
|
|
552
|
+
margin: "0 auto",
|
|
553
|
+
...disablePadding ? {} : { padding: TIER_PADDING[tier] }
|
|
554
|
+
};
|
|
555
|
+
return /* @__PURE__ */ jsx5("div", { className, style, children });
|
|
545
556
|
}
|
|
546
557
|
export {
|
|
547
558
|
AppsDropdown,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xzibit/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Shared chrome components for the Xzibit Apps portfolio. v0.1: TopBar + BackToLauncher + AppsDropdown + XzibitMark + useApps hook. Single source of truth for portfolio chrome — tweak once, every app picks it up on next deploy.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Xzibit Apps",
|