@lotics/ui 13.7.0 → 13.7.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/docs/catalog.md +2 -1
- package/examples/tpl_item_list.tsx +0 -1
- package/package.json +1 -1
- package/src/drawer.tsx +10 -2
package/docs/catalog.md
CHANGED
|
@@ -740,7 +740,8 @@ source (`src/<module>.tsx`/`.ts`) is the API reference.
|
|
|
740
740
|
`useDialogNavigation`): the centered card over a scrim; BAKES a screen router in
|
|
741
741
|
(`<Dialog><Screen route="">…` — see `screen_router`).
|
|
742
742
|
- **`drawer`** — `Drawer` + `DrawerFooter`: the docked side panel with scrim; the register
|
|
743
|
-
row's edit surface.
|
|
743
|
+
row's edit surface. ONE standard width (600px) — pass `width` only for a genuinely
|
|
744
|
+
exceptional panel; full-width on small screens.
|
|
744
745
|
- **`modal`** — `Modal` + `ModalHeader` + `ModalBody` + `ModalFooter` — the full-bleed,
|
|
745
746
|
edge-to-edge takeover: an OPAQUE surface that COVERS THE WHOLE SCREEN, so unlike Dialog
|
|
746
747
|
(centered card WITH scrim) and Drawer (docked panel WITH scrim) there is nothing behind it
|
|
@@ -957,7 +957,6 @@ function RecordDrawer({ hs, daThu, onPaid, tasks, onTasksChange, suggestions, on
|
|
|
957
957
|
hs.khach
|
|
958
958
|
)
|
|
959
959
|
}
|
|
960
|
-
width={440}
|
|
961
960
|
onPrev={canGoBack ? undefined : onPrev}
|
|
962
961
|
onNext={canGoBack ? undefined : onNext}
|
|
963
962
|
position={canGoBack ? undefined : position}
|
package/package.json
CHANGED
package/src/drawer.tsx
CHANGED
|
@@ -13,7 +13,11 @@ export interface DrawerProps {
|
|
|
13
13
|
onOpenChange: (open: boolean) => void;
|
|
14
14
|
/** Header title. A string renders as the standard title; a node renders as-is. */
|
|
15
15
|
title?: ReactNode;
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Panel width on non-small screens (number = px, or a `%` string). Rarely set —
|
|
18
|
+
* the ONE standard width (600) fits record side-panels and lighter detail alike;
|
|
19
|
+
* override only for a genuinely exceptional panel. Full-width on small screens.
|
|
20
|
+
*/
|
|
17
21
|
width?: number | `${number}%`;
|
|
18
22
|
/**
|
|
19
23
|
* Record sequencing — step to the previous/next record WITHOUT closing the
|
|
@@ -43,8 +47,12 @@ export interface DrawerProps {
|
|
|
43
47
|
* the scrim and the header close button both dismiss it. The panel goes
|
|
44
48
|
* full-width on small screens.
|
|
45
49
|
*/
|
|
50
|
+
/** The ONE standard drawer width — every drawer is this wide unless it passes an
|
|
51
|
+
* explicit `width` for a genuinely exceptional case. */
|
|
52
|
+
const DRAWER_WIDTH = 600;
|
|
53
|
+
|
|
46
54
|
export function Drawer(props: DrawerProps) {
|
|
47
|
-
const { open, onOpenChange, title, width =
|
|
55
|
+
const { open, onOpenChange, title, width = DRAWER_WIDTH, onPrev, onNext, position, children, testID } = props;
|
|
48
56
|
const loc = useLoticsLocale().drawer;
|
|
49
57
|
const screenSize = useScreenSize();
|
|
50
58
|
useOverlayScope(open);
|