prime-ui-kit 0.4.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 +27 -4
- package/dist/components/index.css.map +2 -2
- package/dist/components/index.js +33 -17
- package/dist/components/index.js.map +3 -3
- package/dist/index.css +1448 -4
- package/dist/index.css.map +3 -3
- package/dist/index.js +33 -17
- package/dist/index.js.map +3 -3
- package/dist/layout/app-shell/AppShell.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 +45 -41
- package/src/layout/app-shell/COMPONENT.md +140 -0
- 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,9 +66,10 @@
|
|
|
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;
|
|
71
|
+
padding-block: var(--prime-sys-spacing-x6);
|
|
72
|
+
padding-inline: var(--prime-sys-spacing-x6);
|
|
72
73
|
}
|
|
73
74
|
@media (min-width: 48rem) {
|
|
74
75
|
.AppShell_layoutRoot2[data-layout-template=app]:has([data-sidebar-root=true][data-state=expanded], [data-sidebar-root=true][data-state=compact]) {
|
|
@@ -624,6 +625,12 @@
|
|
|
624
625
|
outline: var(--prime-sys-border-width-focusRing) solid var(--prime-sys-color-focus-ring);
|
|
625
626
|
outline-offset: var(--prime-sys-unit-2px);
|
|
626
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
|
+
}
|
|
627
634
|
.Sidebar_menuButton2:disabled {
|
|
628
635
|
opacity: 0.56;
|
|
629
636
|
cursor: not-allowed;
|
|
@@ -631,7 +638,13 @@
|
|
|
631
638
|
.Sidebar_menuButtonActive2,
|
|
632
639
|
.Sidebar_menuButton2[data-active=true],
|
|
633
640
|
.Sidebar_menuButton2[aria-current=page] {
|
|
634
|
-
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);
|
|
635
648
|
}
|
|
636
649
|
.Sidebar_menuIcon2 {
|
|
637
650
|
display: inline-flex;
|
|
@@ -664,6 +677,17 @@
|
|
|
664
677
|
opacity: var(--sb-item-trailing-opacity);
|
|
665
678
|
transform: scale(var(--sb-item-trailing-scale));
|
|
666
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
|
+
}
|
|
667
691
|
.Sidebar_menuAction2 {
|
|
668
692
|
box-sizing: border-box;
|
|
669
693
|
display: inline-flex;
|
|
@@ -7072,8 +7096,7 @@
|
|
|
7072
7096
|
box-sizing: border-box;
|
|
7073
7097
|
width: 100%;
|
|
7074
7098
|
margin: 0 auto;
|
|
7075
|
-
padding
|
|
7076
|
-
padding-inline: var(--prime-sys-spacing-4xl);
|
|
7099
|
+
padding: 0;
|
|
7077
7100
|
}
|
|
7078
7101
|
.PageContent_root2[data-max-width=readable] {
|
|
7079
7102
|
max-width: var(--prime-sys-unit-48rem);
|