@dloizides/ui-layout 1.31.0 → 1.32.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/CHANGELOG.md +8 -0
- package/dist/index.d.mts +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +278 -172
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +205 -102
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## 1.32.0
|
|
5
|
+
|
|
6
|
+
### Added
|
|
7
|
+
|
|
8
|
+
- `StatusBadge` `icon`: an optional decorative slot before the label. INVOICE-3 "Invoice interface over a user-chosen folder".
|
|
9
|
+
- `StickyPreview`: sticks to the top of the visible viewport; shows its `full` slot, or its `compact` slot once scrolled past, while the on-screen keyboard is open, or on `forceCompact`.
|
|
10
|
+
- `useVisibleViewport`, `isKeyboardOpen`: read the Visual Viewport offset and keyboard state.
|
|
11
|
+
|
|
4
12
|
## 1.30.0
|
|
5
13
|
|
|
6
14
|
### Added
|
package/dist/index.d.mts
CHANGED
|
@@ -59,11 +59,32 @@ interface StatusBadgeProps {
|
|
|
59
59
|
label: string;
|
|
60
60
|
color: string;
|
|
61
61
|
backgroundColor: string;
|
|
62
|
+
icon?: React.ReactNode;
|
|
62
63
|
testID?: string;
|
|
63
64
|
accessibilityLabel?: string;
|
|
64
65
|
accessibilityHint?: string;
|
|
65
66
|
}
|
|
66
|
-
declare const StatusBadge: ({ label, color, backgroundColor, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
67
|
+
declare const StatusBadge: ({ label, color, backgroundColor, icon, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
68
|
+
|
|
69
|
+
interface StickyPreviewProps {
|
|
70
|
+
full: React.ReactNode;
|
|
71
|
+
compact: React.ReactNode;
|
|
72
|
+
forceCompact?: boolean;
|
|
73
|
+
topOffset?: number;
|
|
74
|
+
accessibilityLabel: string;
|
|
75
|
+
testID?: string;
|
|
76
|
+
}
|
|
77
|
+
/** Keeps a preview at the top of the visible viewport, swapping to its compact slot while space is short. */
|
|
78
|
+
declare const StickyPreview: ({ full, compact, forceCompact, topOffset, accessibilityLabel, testID, }: StickyPreviewProps) => React.ReactElement;
|
|
79
|
+
|
|
80
|
+
interface VisibleViewport {
|
|
81
|
+
offsetTop: number;
|
|
82
|
+
keyboardOpen: boolean;
|
|
83
|
+
}
|
|
84
|
+
/** True when the visible height has dropped far enough below the tallest height seen at this width. */
|
|
85
|
+
declare function isKeyboardOpen(visibleHeight: number, tallestHeight: number): boolean;
|
|
86
|
+
/** Tracks the Visual Viewport offset and keyboard state; stays at its initial value where the API is absent. */
|
|
87
|
+
declare function useVisibleViewport(): VisibleViewport;
|
|
67
88
|
|
|
68
89
|
/**
|
|
69
90
|
* SegmentedControl — a single rounded pill *track* holding N mutually-exclusive segments
|
|
@@ -786,6 +807,7 @@ declare function useFocusTrap(containerRef: RefObject<View | null>, enabled: boo
|
|
|
786
807
|
declare const LAYOUT_TEST_IDS: {
|
|
787
808
|
readonly headingText: "heading-text";
|
|
788
809
|
readonly statusLabel: "status-label";
|
|
810
|
+
readonly stickyPreview: "sticky-preview";
|
|
789
811
|
readonly upgradePrompt: "upgrade-prompt";
|
|
790
812
|
readonly upgradePromptCta: "upgrade-prompt-cta";
|
|
791
813
|
readonly upgradePromptDismiss: "upgrade-prompt-dismiss";
|
|
@@ -900,4 +922,4 @@ declare const MIN_TARGET_PX = 44;
|
|
|
900
922
|
*/
|
|
901
923
|
declare function isWideWebViewport(width: number, platformOS: string, breakpoint?: number): boolean;
|
|
902
924
|
|
|
903
|
-
export { API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, 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, MIN_TARGET_PX, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, Section, type SectionProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, StatusBadge, type StatusBadgeProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, copyText, formatBuildInfo, formatUrlForDisplay, isWideWebViewport, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap };
|
|
925
|
+
export { API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, 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, MIN_TARGET_PX, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, Section, type SectionProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, StatusBadge, type StatusBadgeProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, copyText, formatBuildInfo, formatUrlForDisplay, isKeyboardOpen, isWideWebViewport, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useVisibleViewport };
|
package/dist/index.d.ts
CHANGED
|
@@ -59,11 +59,32 @@ interface StatusBadgeProps {
|
|
|
59
59
|
label: string;
|
|
60
60
|
color: string;
|
|
61
61
|
backgroundColor: string;
|
|
62
|
+
icon?: React.ReactNode;
|
|
62
63
|
testID?: string;
|
|
63
64
|
accessibilityLabel?: string;
|
|
64
65
|
accessibilityHint?: string;
|
|
65
66
|
}
|
|
66
|
-
declare const StatusBadge: ({ label, color, backgroundColor, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
67
|
+
declare const StatusBadge: ({ label, color, backgroundColor, icon, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
68
|
+
|
|
69
|
+
interface StickyPreviewProps {
|
|
70
|
+
full: React.ReactNode;
|
|
71
|
+
compact: React.ReactNode;
|
|
72
|
+
forceCompact?: boolean;
|
|
73
|
+
topOffset?: number;
|
|
74
|
+
accessibilityLabel: string;
|
|
75
|
+
testID?: string;
|
|
76
|
+
}
|
|
77
|
+
/** Keeps a preview at the top of the visible viewport, swapping to its compact slot while space is short. */
|
|
78
|
+
declare const StickyPreview: ({ full, compact, forceCompact, topOffset, accessibilityLabel, testID, }: StickyPreviewProps) => React.ReactElement;
|
|
79
|
+
|
|
80
|
+
interface VisibleViewport {
|
|
81
|
+
offsetTop: number;
|
|
82
|
+
keyboardOpen: boolean;
|
|
83
|
+
}
|
|
84
|
+
/** True when the visible height has dropped far enough below the tallest height seen at this width. */
|
|
85
|
+
declare function isKeyboardOpen(visibleHeight: number, tallestHeight: number): boolean;
|
|
86
|
+
/** Tracks the Visual Viewport offset and keyboard state; stays at its initial value where the API is absent. */
|
|
87
|
+
declare function useVisibleViewport(): VisibleViewport;
|
|
67
88
|
|
|
68
89
|
/**
|
|
69
90
|
* SegmentedControl — a single rounded pill *track* holding N mutually-exclusive segments
|
|
@@ -786,6 +807,7 @@ declare function useFocusTrap(containerRef: RefObject<View | null>, enabled: boo
|
|
|
786
807
|
declare const LAYOUT_TEST_IDS: {
|
|
787
808
|
readonly headingText: "heading-text";
|
|
788
809
|
readonly statusLabel: "status-label";
|
|
810
|
+
readonly stickyPreview: "sticky-preview";
|
|
789
811
|
readonly upgradePrompt: "upgrade-prompt";
|
|
790
812
|
readonly upgradePromptCta: "upgrade-prompt-cta";
|
|
791
813
|
readonly upgradePromptDismiss: "upgrade-prompt-dismiss";
|
|
@@ -900,4 +922,4 @@ declare const MIN_TARGET_PX = 44;
|
|
|
900
922
|
*/
|
|
901
923
|
declare function isWideWebViewport(width: number, platformOS: string, breakpoint?: number): boolean;
|
|
902
924
|
|
|
903
|
-
export { API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, 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, MIN_TARGET_PX, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, Section, type SectionProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, StatusBadge, type StatusBadgeProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, copyText, formatBuildInfo, formatUrlForDisplay, isWideWebViewport, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap };
|
|
925
|
+
export { API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, 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, MIN_TARGET_PX, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, Section, type SectionProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, StatusBadge, type StatusBadgeProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, copyText, formatBuildInfo, formatUrlForDisplay, isKeyboardOpen, isWideWebViewport, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useVisibleViewport };
|