@marktiderman/genesis-ui 2.11.0 → 2.12.1
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/SKILL.md +57 -0
- package/dist/AppShell-D5nD0mcL.d.ts +348 -0
- package/dist/chunk-424PT5DM.js +21 -0
- package/dist/chunk-424PT5DM.js.map +1 -0
- package/dist/{chunk-UYI3GLFJ.js → chunk-6N6MUN3T.js} +722 -159
- package/dist/chunk-6N6MUN3T.js.map +1 -0
- package/dist/chunk-J45FHL7D.js +46 -0
- package/dist/chunk-J45FHL7D.js.map +1 -0
- package/dist/{chunk-OITWCIG2.js → chunk-PMCUHSZS.js} +3 -3
- package/dist/{chunk-OITWCIG2.js.map → chunk-PMCUHSZS.js.map} +1 -1
- package/dist/{chunk-5GOQ72WB.js → chunk-STZVZUYO.js} +3 -3
- package/dist/{chunk-5GOQ72WB.js.map → chunk-STZVZUYO.js.map} +1 -1
- package/dist/chunk-WALJMVEF.js +10 -0
- package/dist/chunk-WALJMVEF.js.map +1 -0
- package/dist/components/data/index.d.ts +7 -6
- package/dist/components/data/index.js +15 -13
- package/dist/components/data/index.js.map +1 -1
- package/dist/components/layout/dashboard-page.js +1 -0
- package/dist/components/layout/detail-page.js +1 -0
- package/dist/components/layout/form-page.js +1 -0
- package/dist/components/layout/index.d.ts +3 -2
- package/dist/components/layout/index.js +4 -2
- package/dist/components/layout/settings-page.js +1 -0
- package/dist/components/patterns/empty-state.js +1 -0
- package/dist/components/patterns/form-field.js +1 -0
- package/dist/components/patterns/index.js +1 -0
- package/dist/components/patterns/page-loading.js +1 -0
- package/dist/components/patterns/settings-row.js +1 -0
- package/dist/components/patterns/sortable-list.js +1 -0
- package/dist/components/patterns/status-badge.js +1 -0
- package/dist/components/patterns/toggle-row.js +1 -0
- package/dist/components/patterns/user-avatar.js +1 -0
- package/dist/components/rich-text/rich-text-editor.js +2 -1
- package/dist/components/rich-text/rich-text-editor.js.map +1 -1
- package/dist/components/rich-text/rich-text.js +1 -0
- package/dist/components/sheet-grid/sheet-grid.js +1 -0
- package/dist/components/sheet-grid/sheet-grid.js.map +1 -1
- package/dist/components/ui/accessible-icon.js +1 -0
- package/dist/components/ui/accordion.js +1 -0
- package/dist/components/ui/alert-dialog.js +1 -0
- package/dist/components/ui/alert.js +1 -0
- package/dist/components/ui/aspect-ratio.js +1 -0
- package/dist/components/ui/avatar.js +1 -0
- package/dist/components/ui/badge.js +1 -0
- package/dist/components/ui/breadcrumb.js +1 -0
- package/dist/components/ui/button-group.js +1 -0
- package/dist/components/ui/button.js +1 -0
- package/dist/components/ui/calendar.js +1 -0
- package/dist/components/ui/card.js +1 -0
- package/dist/components/ui/carousel.js +1 -0
- package/dist/components/ui/chart.js +1 -0
- package/dist/components/ui/checkbox.js +1 -0
- package/dist/components/ui/collapsible.js +1 -0
- package/dist/components/ui/command-palette.js +1 -0
- package/dist/components/ui/command.js +1 -0
- package/dist/components/ui/context-menu.js +1 -0
- package/dist/components/ui/date-picker.js +1 -0
- package/dist/components/ui/dialog.js +1 -0
- package/dist/components/ui/drawer.js +1 -0
- package/dist/components/ui/dropdown-menu.js +1 -0
- package/dist/components/ui/hover-card.js +1 -0
- package/dist/components/ui/input-group.js +1 -0
- package/dist/components/ui/input-otp.js +1 -0
- package/dist/components/ui/input.js +1 -0
- package/dist/components/ui/kbd.js +1 -0
- package/dist/components/ui/label.js +1 -0
- package/dist/components/ui/menubar.js +1 -0
- package/dist/components/ui/navigation-menu.js +1 -0
- package/dist/components/ui/pagination.js +1 -0
- package/dist/components/ui/password-toggle-field.js +1 -0
- package/dist/components/ui/popover.js +1 -0
- package/dist/components/ui/progress.js +1 -0
- package/dist/components/ui/radio-group.js +1 -0
- package/dist/components/ui/resizable.js +1 -0
- package/dist/components/ui/scroll-area.js +1 -0
- package/dist/components/ui/select.js +1 -0
- package/dist/components/ui/separator.js +1 -0
- package/dist/components/ui/sheet.js +1 -0
- package/dist/components/ui/skeleton.js +1 -0
- package/dist/components/ui/slider.js +1 -0
- package/dist/components/ui/sonner.js +1 -0
- package/dist/components/ui/spinner.js +1 -0
- package/dist/components/ui/switch.js +1 -0
- package/dist/components/ui/table.js +1 -0
- package/dist/components/ui/tabs.js +1 -0
- package/dist/components/ui/textarea.js +1 -0
- package/dist/components/ui/toggle-group.js +1 -0
- package/dist/components/ui/toggle.js +1 -0
- package/dist/components/ui/toolbar.js +1 -0
- package/dist/components/ui/tooltip.js +1 -0
- package/dist/components/ui/typography.js +1 -0
- package/dist/components/ui/visually-hidden.js +1 -0
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.js +4 -3
- package/dist/hooks/use-data-filters.d.ts +1 -1
- package/dist/hooks/use-data-filters.js +3 -2
- package/dist/hooks/use-keyboard-navigation.js +1 -0
- package/dist/hooks/use-mobile.js +1 -0
- package/dist/hooks/use-prefetch.js +1 -0
- package/dist/hooks/use-resource-page.js +1 -0
- package/dist/hooks/use-resource-url-state.d.ts +1 -1
- package/dist/hooks/use-resource-url-state.js +1 -0
- package/dist/hooks/use-saved-views.js +1 -0
- package/dist/hooks/use-view-preference.js +1 -0
- package/dist/hooks/use-view-settings.js +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +361 -3
- package/dist/index.js.map +1 -1
- package/dist/navigation-vmFJ6r1m.d.ts +90 -0
- package/dist/router/react-router.d.ts +1 -1
- package/dist/router/react-router.js +1 -0
- package/dist/router/react-router.js.map +1 -1
- package/dist/router/tanstack-router.d.ts +1 -1
- package/dist/router/tanstack-router.js +2 -1
- package/dist/router/tanstack-router.js.map +1 -1
- package/dist/status-colors.js +2 -0
- package/dist/status-colors.js.map +1 -1
- package/dist/{use-resource-table-Dx1OZRne.d.ts → use-resource-table-easmRDQI.d.ts} +2 -2
- package/dist/utils.js +1 -0
- package/package.json +6 -5
- package/dist/AppShell-BVr4V0UK.d.ts +0 -174
- package/dist/chunk-7S7LKQBD.js +0 -12
- package/dist/chunk-7S7LKQBD.js.map +0 -1
- package/dist/chunk-UYI3GLFJ.js.map +0 -1
- package/dist/chunk-WGMEVX3Y.js +0 -141
- package/dist/chunk-WGMEVX3Y.js.map +0 -1
- package/dist/navigation-Bha0R3Fu.d.ts +0 -166
- package/dist/slots-tR0wf89f.d.ts +0 -60
package/dist/slots-tR0wf89f.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ComponentType, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The slot contract — genesis's escape hatch from an all-or-nothing pattern.
|
|
5
|
-
*
|
|
6
|
-
* A pattern component (`ResourcePage`, `DataPageShell`, …) is a composition of
|
|
7
|
-
* interior parts. Without a way to reach those parts, a consumer who needs ONE
|
|
8
|
-
* of them to differ has exactly two options: accept the whole thing as shipped,
|
|
9
|
-
* or fork it. Both are bad, and the second is what actually happens — which is
|
|
10
|
-
* how a downstream app ends up maintaining its own copy of a header it only
|
|
11
|
-
* wanted to change one button in.
|
|
12
|
-
*
|
|
13
|
-
* Genesis offers a customisation ladder, and this is its missing rung:
|
|
14
|
-
*
|
|
15
|
-
* 1. the pattern `<ResourcePage title="Questions" />`
|
|
16
|
-
* 2. the pattern + slots ← here: keep the wiring, swap or drop one part
|
|
17
|
-
* 3. the primitives `<DataPageShell><DataTable/></DataPageShell>`
|
|
18
|
-
* 4. the hook `useResourcePage()`, render it all yourself
|
|
19
|
-
*
|
|
20
|
-
* Rungs 1, 3 and 4 already existed (75 subpath exports, 9 hooks). Rung 2 is
|
|
21
|
-
* the one that keeps a consumer ON the ladder: dropping to rung 3 because a
|
|
22
|
-
* single part was wrong means re-deriving all the wiring that was already
|
|
23
|
-
* right, and that re-derivation is where the forks come from.
|
|
24
|
-
*
|
|
25
|
-
* Two knobs, following the `slots`/`slotProps` convention Material UI settled
|
|
26
|
-
* on (mui/material-ui#33416) so the shape is one a React developer already
|
|
27
|
-
* knows rather than one genesis invented:
|
|
28
|
-
*
|
|
29
|
-
* `slots` — REPLACE a part. Your component receives exactly the props
|
|
30
|
-
* genesis would have passed the default, so it can wrap the
|
|
31
|
-
* default and change one thing rather than reimplement it.
|
|
32
|
-
* `slotProps` — KEEP the part, pass it more props. The common case: a
|
|
33
|
-
* `className`, a `data-testid`, an `aria-label`.
|
|
34
|
-
*
|
|
35
|
-
* And the eject button: `slots={{ bulkBar: null }}` drops that part entirely.
|
|
36
|
-
* A pattern is a default, not a mandate — a consumer who wants the shell and
|
|
37
|
-
* the grid but none of the bulk bar should not have to leave to get that.
|
|
38
|
-
*/
|
|
39
|
-
/** Replace a part (`ComponentType`), or eject it (`null`). */
|
|
40
|
-
type SlotOverride<P> = ComponentType<P> | null;
|
|
41
|
-
/** `{ [part]: Component | null }` — see {@link renderSlot}. */
|
|
42
|
-
type Slots<M extends Record<string, object>> = {
|
|
43
|
-
[K in keyof M]?: SlotOverride<M[K]>;
|
|
44
|
-
};
|
|
45
|
-
/** `{ [part]: extraProps }` — merged over what genesis passes. */
|
|
46
|
-
type SlotPropsFor<M extends Record<string, object>> = {
|
|
47
|
-
[K in keyof M]?: Partial<M[K]>;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Renders one slot: the override if given, the default otherwise, nothing if
|
|
51
|
-
* ejected with `null`.
|
|
52
|
-
*
|
|
53
|
-
* `extra` merges LAST, so `slotProps` wins over genesis's own value. That is
|
|
54
|
-
* deliberate: a consumer reaching for `slotProps` is overriding on purpose,
|
|
55
|
-
* and a hatch that silently loses to the default is not a hatch. `className`
|
|
56
|
-
* is the one prop a caller should merge with `cn()` instead of replacing.
|
|
57
|
-
*/
|
|
58
|
-
declare function renderSlot<P extends object>(Default: ComponentType<P>, override: SlotOverride<P> | undefined, props: P, extra?: Partial<P>): ReactNode;
|
|
59
|
-
|
|
60
|
-
export { type SlotOverride as S, type SlotPropsFor as a, type Slots as b, renderSlot as r };
|