prime-ui-kit 0.5.1 → 0.6.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/README.md +11 -2
- package/dist/components/index.css +24 -9
- package/dist/components/index.css.map +3 -3
- package/dist/components/index.js +3 -19
- package/dist/components/index.js.map +3 -3
- package/dist/index.css +24 -9
- package/dist/index.css.map +3 -3
- package/dist/index.js +3 -19
- package/dist/index.js.map +3 -3
- package/dist/layout/app-shell/AppShell.d.ts +0 -8
- package/dist/layout/app-shell/AppShell.d.ts.map +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/sidebar/examples/01-app-shell-nav.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/page-content/COMPONENT.md +9 -5
- package/src/layout/app-shell/COMPONENT.md +77 -27
- package/src/layout/sidebar/COMPONENT.md +1 -1
- package/src/layout/sidebar/examples/01-app-shell-nav.tsx +11 -13
- package/src/layout/sidebar/examples/examples.module.css +0 -10
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ A **React 19** component library built with **CSS Modules**, **design tokens** a
|
|
|
25
25
|
- [Component catalog](#component-catalog)
|
|
26
26
|
- [Package exports (`package.json` / `exports`)](#package-exports-packagejson--exports)
|
|
27
27
|
- [TypeScript](#typescript)
|
|
28
|
+
- [Application shell layout](#application-shell-layout)
|
|
28
29
|
- [Where component docs live](#where-component-docs-live)
|
|
29
30
|
- [License](#license)
|
|
30
31
|
|
|
@@ -203,7 +204,7 @@ Documentation base URL in the repo: `https://github.com/esurkov1/prime-ui/blob/m
|
|
|
203
204
|
| Navigation & layout | **Stepper** | Multi-step flow on `<ol>` / `<li>` plus horizontal/vertical primitives. | [COMPONENT.md](https://github.com/esurkov1/prime-ui/blob/main/src/components/stepper/COMPONENT.md) |
|
|
204
205
|
| Navigation & layout | **Tabs** | Tablist, indicator, one visible panel at a time. | [COMPONENT.md](https://github.com/esurkov1/prime-ui/blob/main/src/components/tabs/COMPONENT.md) |
|
|
205
206
|
| Navigation & layout | **PageContent** | Main column: `Section` or `Root`, title, description (`measure`), body. | [COMPONENT.md](https://github.com/esurkov1/prime-ui/blob/main/src/components/page-content/COMPONENT.md) |
|
|
206
|
-
| Navigation & layout | **AppShell** | Application shell: grid root, nav slot, main
|
|
207
|
+
| Navigation & layout | **AppShell** | Application shell: grid root, nav slot, scrollable **`main`** with page gutters (`x6`) on **`Main`**. | [COMPONENT.md](https://github.com/esurkov1/prime-ui/blob/main/src/layout/app-shell/COMPONENT.md) |
|
|
207
208
|
| Navigation & layout | **ScrollContainer** | Scrollable region with horizontal or vertical axis (overflow wrapper). | [Source](https://github.com/esurkov1/prime-ui/tree/main/src/components/scroll-container) |
|
|
208
209
|
| Data | **DataTable** | Table with scroll, sorting, pagination or infinite scroll, sticky regions. | [COMPONENT.md](https://github.com/esurkov1/prime-ui/blob/main/src/components/data-table/COMPONENT.md) |
|
|
209
210
|
| Display & content | **Avatar** | Circular avatar: image, fallback, group with overflow cell. | [COMPONENT.md](https://github.com/esurkov1/prime-ui/blob/main/src/components/avatar/COMPONENT.md) |
|
|
@@ -252,7 +253,15 @@ Type definitions ship with the package (`dist/*.d.ts`).
|
|
|
252
253
|
- **Why separate files (not one `examples.md`):** each file is one scenario with a clear filename — easier for humans to navigate and for LLMs to retrieve the right chunk without loading an entire mega-document.
|
|
253
254
|
- **In the installed package:** `COMPONENT.md` and `examples/**` are published (`package.json` → `files`), e.g. `node_modules/prime-ui-kit/src/components/button/examples/` and `node_modules/prime-ui-kit/src/layout/sidebar/COMPONENT.md`.
|
|
254
255
|
|
|
255
|
-
**
|
|
256
|
+
**ExampleFrame** and **ScrollContainer** do not have a dedicated `COMPONENT.md`; refer to the linked source folders and types in the `.tsx` files.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Application shell layout
|
|
261
|
+
|
|
262
|
+
Use **`AppShell.Template`** so routes render inside **`AppShell.Main`**, which applies canonical **`--prime-sys-spacing-x6`** padding (no extra wrapper). **`PageContent.Root`** does **not** add edge padding; pair **`PageContent`** with the shell. Import **`prime-ui-kit/styles.css`** and **`prime-ui-kit/bundle.css`** so layout CSS applies.
|
|
263
|
+
|
|
264
|
+
**Full diagram, token table, and troubleshooting** (“margins disappeared”): [src/layout/app-shell/COMPONENT.md](https://github.com/esurkov1/prime-ui/blob/main/src/layout/app-shell/COMPONENT.md).
|
|
256
265
|
|
|
257
266
|
---
|
|
258
267
|
|
|
@@ -66,16 +66,8 @@
|
|
|
66
66
|
flex-direction: column;
|
|
67
67
|
min-width: 0;
|
|
68
68
|
min-height: 0;
|
|
69
|
-
padding: 0;
|
|
70
69
|
margin: 0;
|
|
71
70
|
background: transparent;
|
|
72
|
-
}
|
|
73
|
-
.AppShell_layoutMainInset2 {
|
|
74
|
-
box-sizing: border-box;
|
|
75
|
-
flex: 1 1 auto;
|
|
76
|
-
min-height: 0;
|
|
77
|
-
min-width: 0;
|
|
78
|
-
width: 100%;
|
|
79
71
|
padding-block: var(--prime-sys-spacing-x6);
|
|
80
72
|
padding-inline: var(--prime-sys-spacing-x6);
|
|
81
73
|
}
|
|
@@ -633,6 +625,12 @@
|
|
|
633
625
|
outline: var(--prime-sys-border-width-focusRing) solid var(--prime-sys-color-focus-ring);
|
|
634
626
|
outline-offset: var(--prime-sys-unit-2px);
|
|
635
627
|
}
|
|
628
|
+
.Sidebar_menuButtonActive2:focus-visible,
|
|
629
|
+
.Sidebar_menuButton2[data-active=true]:focus-visible,
|
|
630
|
+
.Sidebar_menuButton2[aria-current=page]:focus-visible {
|
|
631
|
+
outline: none;
|
|
632
|
+
box-shadow: var(--prime-sys-elevation-shadow-primaryFocus);
|
|
633
|
+
}
|
|
636
634
|
.Sidebar_menuButton2:disabled {
|
|
637
635
|
opacity: 0.56;
|
|
638
636
|
cursor: not-allowed;
|
|
@@ -640,7 +638,13 @@
|
|
|
640
638
|
.Sidebar_menuButtonActive2,
|
|
641
639
|
.Sidebar_menuButton2[data-active=true],
|
|
642
640
|
.Sidebar_menuButton2[aria-current=page] {
|
|
643
|
-
background: var(--prime-sys-color-action-
|
|
641
|
+
background: var(--prime-sys-color-action-primaryBackground);
|
|
642
|
+
color: var(--prime-sys-color-action-primaryForeground);
|
|
643
|
+
}
|
|
644
|
+
.Sidebar_menuButtonActive2:hover:not(:disabled),
|
|
645
|
+
.Sidebar_menuButton2[data-active=true]:hover:not(:disabled),
|
|
646
|
+
.Sidebar_menuButton2[aria-current=page]:hover:not(:disabled) {
|
|
647
|
+
background: var(--prime-sys-color-action-primaryBackgroundHover);
|
|
644
648
|
}
|
|
645
649
|
.Sidebar_menuIcon2 {
|
|
646
650
|
display: inline-flex;
|
|
@@ -673,6 +677,17 @@
|
|
|
673
677
|
opacity: var(--sb-item-trailing-opacity);
|
|
674
678
|
transform: scale(var(--sb-item-trailing-scale));
|
|
675
679
|
}
|
|
680
|
+
.Sidebar_menuButtonActive2 .Sidebar_menuIcon2,
|
|
681
|
+
.Sidebar_menuButton2[data-active=true] .Sidebar_menuIcon2,
|
|
682
|
+
.Sidebar_menuButton2[aria-current=page] .Sidebar_menuIcon2 {
|
|
683
|
+
color: var(--prime-sys-color-action-primaryForeground);
|
|
684
|
+
}
|
|
685
|
+
.Sidebar_menuButtonActive2 .Sidebar_menuTrailing2,
|
|
686
|
+
.Sidebar_menuButton2[data-active=true] .Sidebar_menuTrailing2,
|
|
687
|
+
.Sidebar_menuButton2[aria-current=page] .Sidebar_menuTrailing2 {
|
|
688
|
+
color: var(--prime-sys-color-action-primaryForeground);
|
|
689
|
+
opacity: 0.72;
|
|
690
|
+
}
|
|
676
691
|
.Sidebar_menuAction2 {
|
|
677
692
|
box-sizing: border-box;
|
|
678
693
|
display: inline-flex;
|