@memobit/libs 3.35.0 → 3.36.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/dist/components/PageShell/AppNav.js +38 -27
- package/dist/components/PageShell/FilterField.css +1 -1
- package/dist/components/PageShell/FilterField2.js +243 -190
- package/dist/components/PageShell/FocusShell.js +60 -0
- package/dist/components/PageShell/PageParts.js +176 -155
- package/dist/components/PageShell/PageShell.css +1 -1
- package/dist/components/PageShell/PageShell2.js +11 -6
- package/dist/components/PageShell/WorkbenchPhone.js +75 -65
- package/dist/components/PageShell/WorkbenchShell.js +78 -64
- package/dist/components/PageShell/shellText.js +1 -1
- package/dist/components/PageShell/useConfirmedActions.js +35 -0
- package/dist/components/RouterAppFrame/RouterAppFrame.js +18 -16
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/index.d.ts +57 -7
- package/dist/router.d.ts +11 -2
- package/dist/version.js +1 -1
- package/dist/version.json +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -215,7 +215,12 @@ export declare interface AppNavItem {
|
|
|
215
215
|
id: string;
|
|
216
216
|
label: string;
|
|
217
217
|
icon: IconName;
|
|
218
|
-
|
|
218
|
+
/** A number or short text beside the label ("3/12"). */
|
|
219
|
+
count?: number | string;
|
|
220
|
+
/** Sections with the same group are listed together under that heading in the side list. */
|
|
221
|
+
group?: string;
|
|
222
|
+
/** Tints the section's icon, e.g. a category colour. */
|
|
223
|
+
color?: string;
|
|
219
224
|
isActive: boolean;
|
|
220
225
|
onSelect: () => void;
|
|
221
226
|
}
|
|
@@ -808,6 +813,7 @@ export declare interface ContextToastAction {
|
|
|
808
813
|
onClick: () => void;
|
|
809
814
|
}
|
|
810
815
|
|
|
816
|
+
/** @deprecated Use PageShell inside an AppFrame / RouterAppFrame (see the page-shell-usage skill). Kept for the showcase demos. */
|
|
811
817
|
export declare const ControlPanel: default_2.FC<ControlPanelProps>;
|
|
812
818
|
|
|
813
819
|
export declare interface ControlPanelAction {
|
|
@@ -1079,6 +1085,7 @@ export declare interface ControlPanelProps {
|
|
|
1079
1085
|
visibleColumns?: ControlPanelVisibleColumnsConfig;
|
|
1080
1086
|
}
|
|
1081
1087
|
|
|
1088
|
+
/** @deprecated Use PageShell inside an AppFrame / RouterAppFrame (see the page-shell-usage skill). Kept for the showcase demos. */
|
|
1082
1089
|
export declare const ControlPanelProvider: default_2.FC<ControlPanelProviderProps>;
|
|
1083
1090
|
|
|
1084
1091
|
declare interface ControlPanelProviderProps {
|
|
@@ -1849,6 +1856,10 @@ export declare interface FilterOption {
|
|
|
1849
1856
|
count?: number | string;
|
|
1850
1857
|
icon?: IconName;
|
|
1851
1858
|
color?: string;
|
|
1859
|
+
/** A small round picture before the label: a face, a product. */
|
|
1860
|
+
imageUrl?: string;
|
|
1861
|
+
/** A hover hint on the option, for what its label can't say ("5–50 km out"). */
|
|
1862
|
+
hint?: string;
|
|
1852
1863
|
}
|
|
1853
1864
|
|
|
1854
1865
|
/**
|
|
@@ -3044,9 +3055,21 @@ export declare interface PageAction {
|
|
|
3044
3055
|
menu?: boolean;
|
|
3045
3056
|
/** In the menu, draws a divider above this action to start a new group. */
|
|
3046
3057
|
separator?: boolean;
|
|
3058
|
+
/** Asks first, in a dialog, and runs `onClick` only on yes: for actions that can't be undone. */
|
|
3059
|
+
confirm?: PageActionConfirm;
|
|
3047
3060
|
onClick: () => void;
|
|
3048
3061
|
}
|
|
3049
3062
|
|
|
3063
|
+
export declare interface PageActionConfirm {
|
|
3064
|
+
/** Defaults to the action's label. */
|
|
3065
|
+
title?: string;
|
|
3066
|
+
message: string;
|
|
3067
|
+
/** Defaults to "Confirm". */
|
|
3068
|
+
confirmLabel?: string;
|
|
3069
|
+
/** Defaults to `danger`. */
|
|
3070
|
+
variant?: ButtonVariant;
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3050
3073
|
export declare interface PageColumns {
|
|
3051
3074
|
options: Array<{
|
|
3052
3075
|
value: string;
|
|
@@ -3100,8 +3123,11 @@ export declare interface PageSearch {
|
|
|
3100
3123
|
/** Lays out a page's title, actions, search, sort, filters and view options around its content, per device. */
|
|
3101
3124
|
export declare const PageShell: FC<PageShellProps>;
|
|
3102
3125
|
|
|
3103
|
-
/**
|
|
3104
|
-
|
|
3126
|
+
/**
|
|
3127
|
+
* `workbench` (the default) is the full layout. `focus` is for a page that needs the whole screen and none of the
|
|
3128
|
+
* list chrome, such as a running quiz: a slim top bar with the title, actions and menu, and no side column.
|
|
3129
|
+
*/
|
|
3130
|
+
export declare type PageShellLayout = 'workbench' | 'focus';
|
|
3105
3131
|
|
|
3106
3132
|
export declare interface PageShellProps {
|
|
3107
3133
|
layout?: PageShellLayout;
|
|
@@ -3129,14 +3155,15 @@ export declare interface PageShellProps {
|
|
|
3129
3155
|
tabs?: PageTabs;
|
|
3130
3156
|
/** This page's own indicator (e.g. an overdue bell), shown where the frame's `status` goes, in its place. */
|
|
3131
3157
|
status?: ReactNode;
|
|
3158
|
+
/** A panel docked on the right on desktop (details of the picked item, a map legend); below the content elsewhere. */
|
|
3159
|
+
aside?: ReactNode;
|
|
3160
|
+
/** A bar that stays at the bottom of the screen while the page scrolls, such as a player; above the phone tab bar. */
|
|
3161
|
+
footer?: ReactNode;
|
|
3132
3162
|
children: ReactNode;
|
|
3133
3163
|
}
|
|
3134
3164
|
|
|
3135
3165
|
export declare interface PageSort {
|
|
3136
|
-
fields:
|
|
3137
|
-
value: string;
|
|
3138
|
-
label: string;
|
|
3139
|
-
}>;
|
|
3166
|
+
fields: PageSortField[];
|
|
3140
3167
|
value: PageSortValue;
|
|
3141
3168
|
/** Marks the sort as changed from the page's default. */
|
|
3142
3169
|
highlighted?: boolean;
|
|
@@ -3145,6 +3172,13 @@ export declare interface PageSort {
|
|
|
3145
3172
|
|
|
3146
3173
|
export declare type PageSortDirection = 'asc' | 'desc';
|
|
3147
3174
|
|
|
3175
|
+
export declare interface PageSortField {
|
|
3176
|
+
value: string;
|
|
3177
|
+
label: string;
|
|
3178
|
+
/** A field that only sorts one way ("Newest first"): picking it sets this direction and hides the direction switch. */
|
|
3179
|
+
direction?: PageSortDirection;
|
|
3180
|
+
}
|
|
3181
|
+
|
|
3148
3182
|
export declare interface PageSortValue {
|
|
3149
3183
|
field: string;
|
|
3150
3184
|
direction: PageSortDirection;
|
|
@@ -3176,6 +3210,7 @@ export declare interface PageView {
|
|
|
3176
3210
|
groupBy?: PageGroupBy;
|
|
3177
3211
|
toggles?: PageViewToggle[];
|
|
3178
3212
|
choices?: PageViewChoice[];
|
|
3213
|
+
sliders?: PageViewSlider[];
|
|
3179
3214
|
}
|
|
3180
3215
|
|
|
3181
3216
|
/** A display setting that always holds one of its options (currency, whose figures). Not a filter: it never counts as applied. */
|
|
@@ -3196,6 +3231,18 @@ export declare interface PageViewMode {
|
|
|
3196
3231
|
icon: IconName;
|
|
3197
3232
|
}
|
|
3198
3233
|
|
|
3234
|
+
/** A sized display preference shown with the view options, e.g. photo size. */
|
|
3235
|
+
export declare interface PageViewSlider {
|
|
3236
|
+
id: string;
|
|
3237
|
+
label: string;
|
|
3238
|
+
min: number;
|
|
3239
|
+
max: number;
|
|
3240
|
+
step?: number;
|
|
3241
|
+
unit?: string;
|
|
3242
|
+
value: number;
|
|
3243
|
+
onChange: (value: number) => void;
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3199
3246
|
/** An on/off display preference shown with the view options, e.g. "Hide empty fields in cards". */
|
|
3200
3247
|
export declare interface PageViewToggle {
|
|
3201
3248
|
id: string;
|
|
@@ -3398,6 +3445,8 @@ export declare interface RangeFilterSpec extends FilterSpecBase {
|
|
|
3398
3445
|
max: number;
|
|
3399
3446
|
step?: number;
|
|
3400
3447
|
unit?: string;
|
|
3448
|
+
/** Adds from/to number boxes under the slider, for exact values the thumbs can't hit. */
|
|
3449
|
+
inputs?: boolean;
|
|
3401
3450
|
}
|
|
3402
3451
|
|
|
3403
3452
|
export declare const RangeSlider: FC<RangeSliderProps>;
|
|
@@ -4101,6 +4150,7 @@ export declare interface ToggleSwitchProps {
|
|
|
4101
4150
|
|
|
4102
4151
|
export declare type ToggleSwitchVariant = 'plain' | 'default' | 'success' | 'info' | 'warning' | 'danger';
|
|
4103
4152
|
|
|
4153
|
+
/** @deprecated Use PageShell inside an AppFrame / RouterAppFrame (see the page-shell-usage skill). Kept for the showcase demos. */
|
|
4104
4154
|
export declare const Toolbar: default_2.FC<ToolbarProps>;
|
|
4105
4155
|
|
|
4106
4156
|
export declare interface ToolbarControlPanelToggleConfig {
|
package/dist/router.d.ts
CHANGED
|
@@ -43,7 +43,12 @@ declare interface AppNavItem {
|
|
|
43
43
|
id: string;
|
|
44
44
|
label: string;
|
|
45
45
|
icon: IconName;
|
|
46
|
-
|
|
46
|
+
/** A number or short text beside the label ("3/12"). */
|
|
47
|
+
count?: number | string;
|
|
48
|
+
/** Sections with the same group are listed together under that heading in the side list. */
|
|
49
|
+
group?: string;
|
|
50
|
+
/** Tints the section's icon, e.g. a category colour. */
|
|
51
|
+
color?: string;
|
|
47
52
|
isActive: boolean;
|
|
48
53
|
onSelect: () => void;
|
|
49
54
|
}
|
|
@@ -52,7 +57,11 @@ export declare interface AppRouteNavItem {
|
|
|
52
57
|
path: string;
|
|
53
58
|
label: string;
|
|
54
59
|
icon: IconName;
|
|
55
|
-
count?: number;
|
|
60
|
+
count?: number | string;
|
|
61
|
+
/** Sections with the same group are listed together under that heading. */
|
|
62
|
+
group?: string;
|
|
63
|
+
/** Tints the section's icon. */
|
|
64
|
+
color?: string;
|
|
56
65
|
/** Whether only the exact path counts as this section. Defaults to true for '/' and false otherwise, so '/archive/12' still lights up Archive. */
|
|
57
66
|
end?: boolean;
|
|
58
67
|
/** Other paths that belong to this section, e.g. ['/person/:id/*'] for a People section's detail pages. */
|
package/dist/version.js
CHANGED
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memobit/libs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.36.0",
|
|
4
4
|
"description": "React component library powering the Memobit apps — 100+ components, helpers and hooks. Icons ship as @memobit/icons and themes as @memobit/themes. TypeScript-first, ESM-only, React 19.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|