@dloizides/ui-layout 1.38.1 → 1.39.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/CHANGELOG.md +13 -0
- package/dist/index.d.mts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +219 -135
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +131 -48
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.39.0
|
|
4
|
+
|
|
5
|
+
INVOICE-6 "Ready-to-send invoice emails with contacts and a sent log", UI-COMPOSE-1 "Extract shared UI from the start": extracted from invoice-web.
|
|
6
|
+
|
|
7
|
+
- New `SideSheet`: a panel from the bottom on a phone and from the right at the wide breakpoint, with `title`, a scrollable body and a required `footer` slot. Closes on scrim, Escape and hardware back; traps focus, names the initial focus with `initialFocusTestID`, returns focus to the opener and locks page scroll.
|
|
8
|
+
- New `LAYOUT_TEST_IDS.sideSheet`.
|
|
9
|
+
|
|
10
|
+
## 1.38.2
|
|
11
|
+
|
|
12
|
+
DROPDOWN-WIDTH-1 "A menu opened from a compact trigger is wide enough to read".
|
|
13
|
+
|
|
14
|
+
- `ModalDropdown` with `renderTrigger` and no `menuMinWidth`: the inline menu is now at least 160px wide. An explicit `menuMinWidth` still wins; a default-trigger field keeps its trigger width.
|
|
15
|
+
|
|
3
16
|
## 1.37.0
|
|
4
17
|
|
|
5
18
|
INVOICE-FU-9 "INVOICE-5 shared look leftovers", AC-PAGE-1.
|
package/dist/index.d.mts
CHANGED
|
@@ -385,7 +385,7 @@ interface ModalDropdownProps<T> {
|
|
|
385
385
|
* Minimum width of the open inline menu. The menu otherwise matches the TRIGGER's width, which
|
|
386
386
|
* is right for a full-width field but leaves a COMPACT anchor (a locale pill, an avatar chip, an
|
|
387
387
|
* icon button — see `renderTrigger`) with a menu too narrow to read its own option labels. It is
|
|
388
|
-
* a floor only: a wider trigger still wins. Omit
|
|
388
|
+
* a floor only: a wider trigger still wins. Omit: a `renderTrigger` menu floors at 160, a field keeps its width.
|
|
389
389
|
*/
|
|
390
390
|
menuMinWidth?: number;
|
|
391
391
|
/**
|
|
@@ -494,6 +494,19 @@ interface ModalProps {
|
|
|
494
494
|
}
|
|
495
495
|
declare const Modal: ({ visible, onClose, title, children, footer, size, showClose, testID, accessibilityLabel, initialFocusTestID, }: ModalProps) => React.ReactElement;
|
|
496
496
|
|
|
497
|
+
interface SideSheetProps {
|
|
498
|
+
visible: boolean;
|
|
499
|
+
onClose: () => void;
|
|
500
|
+
title: string;
|
|
501
|
+
children: React.ReactNode;
|
|
502
|
+
footer: React.ReactNode;
|
|
503
|
+
testID?: string;
|
|
504
|
+
accessibilityLabel?: string;
|
|
505
|
+
initialFocusTestID?: string;
|
|
506
|
+
}
|
|
507
|
+
/** A panel over the screen: from the bottom on a phone, from the right on a computer. */
|
|
508
|
+
declare const SideSheet: ({ visible, onClose, title, children, footer, testID, accessibilityLabel, initialFocusTestID, }: SideSheetProps) => React.ReactElement;
|
|
509
|
+
|
|
497
510
|
/**
|
|
498
511
|
* ConfirmDialog — a confirm/cancel popup built ON {@link Modal}, for the "are you sure?" moment.
|
|
499
512
|
*
|
|
@@ -879,6 +892,7 @@ declare const LAYOUT_TEST_IDS: {
|
|
|
879
892
|
readonly modalShellClose: "cancel-button";
|
|
880
893
|
/** Default base testID for the centered `Modal`; ✕ is `modal-close`, backdrop `modal-backdrop`. */
|
|
881
894
|
readonly modal: "modal";
|
|
895
|
+
readonly sideSheet: "side-sheet";
|
|
882
896
|
/** Default base testID for `ConfirmDialog`; Confirm/Cancel are `confirm-dialog-{confirm,cancel}`. */
|
|
883
897
|
readonly confirmDialog: "confirm-dialog";
|
|
884
898
|
readonly accordion: "accordion";
|
|
@@ -1049,4 +1063,4 @@ interface RowLook {
|
|
|
1049
1063
|
/** Resolves a row's container style and text colours from its selected style and state. */
|
|
1050
1064
|
declare function resolveRowLook(style: RowSelectedStyle, state: RowState, palette: RowPalette): RowLook;
|
|
1051
1065
|
|
|
1052
|
-
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, CopyableId, type CopyableIdProps, DEFAULT_BILLING_ROUTE, type DropdownOption, type DropdownTriggerState, DropdownVariant, ELLIPSIS, Heading, type HeadingLevel, type HeadingProps, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListRow, type ListRowProps, type ListRowTone, MIN_TARGET_PX, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, PageFrame, type PageFrameProps, type PageSize, type RowLook, type RowPalette, RowSelectedStyle, type RowState, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, StatusBadge, type StatusBadgeProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TextKind, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, copyText, formatBuildInfo, formatUrlForDisplay, isKeyboardOpen, isWideWebViewport, pageScale, resolveRowLook, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
|
1066
|
+
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, CopyableId, type CopyableIdProps, DEFAULT_BILLING_ROUTE, type DropdownOption, type DropdownTriggerState, DropdownVariant, ELLIPSIS, Heading, type HeadingLevel, type HeadingProps, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListRow, type ListRowProps, type ListRowTone, MIN_TARGET_PX, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, PageFrame, type PageFrameProps, type PageSize, type RowLook, type RowPalette, RowSelectedStyle, type RowState, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, SideSheet, type SideSheetProps, StatusBadge, type StatusBadgeProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TextKind, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, copyText, formatBuildInfo, formatUrlForDisplay, isKeyboardOpen, isWideWebViewport, pageScale, resolveRowLook, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
package/dist/index.d.ts
CHANGED
|
@@ -385,7 +385,7 @@ interface ModalDropdownProps<T> {
|
|
|
385
385
|
* Minimum width of the open inline menu. The menu otherwise matches the TRIGGER's width, which
|
|
386
386
|
* is right for a full-width field but leaves a COMPACT anchor (a locale pill, an avatar chip, an
|
|
387
387
|
* icon button — see `renderTrigger`) with a menu too narrow to read its own option labels. It is
|
|
388
|
-
* a floor only: a wider trigger still wins. Omit
|
|
388
|
+
* a floor only: a wider trigger still wins. Omit: a `renderTrigger` menu floors at 160, a field keeps its width.
|
|
389
389
|
*/
|
|
390
390
|
menuMinWidth?: number;
|
|
391
391
|
/**
|
|
@@ -494,6 +494,19 @@ interface ModalProps {
|
|
|
494
494
|
}
|
|
495
495
|
declare const Modal: ({ visible, onClose, title, children, footer, size, showClose, testID, accessibilityLabel, initialFocusTestID, }: ModalProps) => React.ReactElement;
|
|
496
496
|
|
|
497
|
+
interface SideSheetProps {
|
|
498
|
+
visible: boolean;
|
|
499
|
+
onClose: () => void;
|
|
500
|
+
title: string;
|
|
501
|
+
children: React.ReactNode;
|
|
502
|
+
footer: React.ReactNode;
|
|
503
|
+
testID?: string;
|
|
504
|
+
accessibilityLabel?: string;
|
|
505
|
+
initialFocusTestID?: string;
|
|
506
|
+
}
|
|
507
|
+
/** A panel over the screen: from the bottom on a phone, from the right on a computer. */
|
|
508
|
+
declare const SideSheet: ({ visible, onClose, title, children, footer, testID, accessibilityLabel, initialFocusTestID, }: SideSheetProps) => React.ReactElement;
|
|
509
|
+
|
|
497
510
|
/**
|
|
498
511
|
* ConfirmDialog — a confirm/cancel popup built ON {@link Modal}, for the "are you sure?" moment.
|
|
499
512
|
*
|
|
@@ -879,6 +892,7 @@ declare const LAYOUT_TEST_IDS: {
|
|
|
879
892
|
readonly modalShellClose: "cancel-button";
|
|
880
893
|
/** Default base testID for the centered `Modal`; ✕ is `modal-close`, backdrop `modal-backdrop`. */
|
|
881
894
|
readonly modal: "modal";
|
|
895
|
+
readonly sideSheet: "side-sheet";
|
|
882
896
|
/** Default base testID for `ConfirmDialog`; Confirm/Cancel are `confirm-dialog-{confirm,cancel}`. */
|
|
883
897
|
readonly confirmDialog: "confirm-dialog";
|
|
884
898
|
readonly accordion: "accordion";
|
|
@@ -1049,4 +1063,4 @@ interface RowLook {
|
|
|
1049
1063
|
/** Resolves a row's container style and text colours from its selected style and state. */
|
|
1050
1064
|
declare function resolveRowLook(style: RowSelectedStyle, state: RowState, palette: RowPalette): RowLook;
|
|
1051
1065
|
|
|
1052
|
-
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, CopyableId, type CopyableIdProps, DEFAULT_BILLING_ROUTE, type DropdownOption, type DropdownTriggerState, DropdownVariant, ELLIPSIS, Heading, type HeadingLevel, type HeadingProps, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListRow, type ListRowProps, type ListRowTone, MIN_TARGET_PX, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, PageFrame, type PageFrameProps, type PageSize, type RowLook, type RowPalette, RowSelectedStyle, type RowState, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, StatusBadge, type StatusBadgeProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TextKind, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, copyText, formatBuildInfo, formatUrlForDisplay, isKeyboardOpen, isWideWebViewport, pageScale, resolveRowLook, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
|
1066
|
+
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, CopyableId, type CopyableIdProps, DEFAULT_BILLING_ROUTE, type DropdownOption, type DropdownTriggerState, DropdownVariant, ELLIPSIS, Heading, type HeadingLevel, type HeadingProps, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListRow, type ListRowProps, type ListRowTone, MIN_TARGET_PX, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, PageFrame, type PageFrameProps, type PageSize, type RowLook, type RowPalette, RowSelectedStyle, type RowState, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, SideSheet, type SideSheetProps, StatusBadge, type StatusBadgeProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TextKind, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, copyText, formatBuildInfo, formatUrlForDisplay, isKeyboardOpen, isWideWebViewport, pageScale, resolveRowLook, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|