@dloizides/ui-layout 1.31.0 → 1.33.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 +25 -2
- package/dist/index.d.ts +25 -2
- package/dist/index.js +284 -172
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +211 -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,33 @@ interface StatusBadgeProps {
|
|
|
59
59
|
label: string;
|
|
60
60
|
color: string;
|
|
61
61
|
backgroundColor: string;
|
|
62
|
+
icon?: React.ReactNode;
|
|
63
|
+
dashed?: boolean;
|
|
62
64
|
testID?: string;
|
|
63
65
|
accessibilityLabel?: string;
|
|
64
66
|
accessibilityHint?: string;
|
|
65
67
|
}
|
|
66
|
-
declare const StatusBadge: ({ label, color, backgroundColor, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
68
|
+
declare const StatusBadge: ({ label, color, backgroundColor, icon, dashed, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
69
|
+
|
|
70
|
+
interface StickyPreviewProps {
|
|
71
|
+
full: React.ReactNode;
|
|
72
|
+
compact: React.ReactNode;
|
|
73
|
+
forceCompact?: boolean;
|
|
74
|
+
topOffset?: number;
|
|
75
|
+
accessibilityLabel: string;
|
|
76
|
+
testID?: string;
|
|
77
|
+
}
|
|
78
|
+
/** Keeps a preview at the top of the visible viewport, swapping to its compact slot while space is short. */
|
|
79
|
+
declare const StickyPreview: ({ full, compact, forceCompact, topOffset, accessibilityLabel, testID, }: StickyPreviewProps) => React.ReactElement;
|
|
80
|
+
|
|
81
|
+
interface VisibleViewport {
|
|
82
|
+
offsetTop: number;
|
|
83
|
+
keyboardOpen: boolean;
|
|
84
|
+
}
|
|
85
|
+
/** True when the visible height has dropped far enough below the tallest height seen at this width. */
|
|
86
|
+
declare function isKeyboardOpen(visibleHeight: number, tallestHeight: number): boolean;
|
|
87
|
+
/** Tracks the Visual Viewport offset and keyboard state; stays at its initial value where the API is absent. */
|
|
88
|
+
declare function useVisibleViewport(): VisibleViewport;
|
|
67
89
|
|
|
68
90
|
/**
|
|
69
91
|
* SegmentedControl — a single rounded pill *track* holding N mutually-exclusive segments
|
|
@@ -786,6 +808,7 @@ declare function useFocusTrap(containerRef: RefObject<View | null>, enabled: boo
|
|
|
786
808
|
declare const LAYOUT_TEST_IDS: {
|
|
787
809
|
readonly headingText: "heading-text";
|
|
788
810
|
readonly statusLabel: "status-label";
|
|
811
|
+
readonly stickyPreview: "sticky-preview";
|
|
789
812
|
readonly upgradePrompt: "upgrade-prompt";
|
|
790
813
|
readonly upgradePromptCta: "upgrade-prompt-cta";
|
|
791
814
|
readonly upgradePromptDismiss: "upgrade-prompt-dismiss";
|
|
@@ -900,4 +923,4 @@ declare const MIN_TARGET_PX = 44;
|
|
|
900
923
|
*/
|
|
901
924
|
declare function isWideWebViewport(width: number, platformOS: string, breakpoint?: number): boolean;
|
|
902
925
|
|
|
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 };
|
|
926
|
+
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,33 @@ interface StatusBadgeProps {
|
|
|
59
59
|
label: string;
|
|
60
60
|
color: string;
|
|
61
61
|
backgroundColor: string;
|
|
62
|
+
icon?: React.ReactNode;
|
|
63
|
+
dashed?: boolean;
|
|
62
64
|
testID?: string;
|
|
63
65
|
accessibilityLabel?: string;
|
|
64
66
|
accessibilityHint?: string;
|
|
65
67
|
}
|
|
66
|
-
declare const StatusBadge: ({ label, color, backgroundColor, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
68
|
+
declare const StatusBadge: ({ label, color, backgroundColor, icon, dashed, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
69
|
+
|
|
70
|
+
interface StickyPreviewProps {
|
|
71
|
+
full: React.ReactNode;
|
|
72
|
+
compact: React.ReactNode;
|
|
73
|
+
forceCompact?: boolean;
|
|
74
|
+
topOffset?: number;
|
|
75
|
+
accessibilityLabel: string;
|
|
76
|
+
testID?: string;
|
|
77
|
+
}
|
|
78
|
+
/** Keeps a preview at the top of the visible viewport, swapping to its compact slot while space is short. */
|
|
79
|
+
declare const StickyPreview: ({ full, compact, forceCompact, topOffset, accessibilityLabel, testID, }: StickyPreviewProps) => React.ReactElement;
|
|
80
|
+
|
|
81
|
+
interface VisibleViewport {
|
|
82
|
+
offsetTop: number;
|
|
83
|
+
keyboardOpen: boolean;
|
|
84
|
+
}
|
|
85
|
+
/** True when the visible height has dropped far enough below the tallest height seen at this width. */
|
|
86
|
+
declare function isKeyboardOpen(visibleHeight: number, tallestHeight: number): boolean;
|
|
87
|
+
/** Tracks the Visual Viewport offset and keyboard state; stays at its initial value where the API is absent. */
|
|
88
|
+
declare function useVisibleViewport(): VisibleViewport;
|
|
67
89
|
|
|
68
90
|
/**
|
|
69
91
|
* SegmentedControl — a single rounded pill *track* holding N mutually-exclusive segments
|
|
@@ -786,6 +808,7 @@ declare function useFocusTrap(containerRef: RefObject<View | null>, enabled: boo
|
|
|
786
808
|
declare const LAYOUT_TEST_IDS: {
|
|
787
809
|
readonly headingText: "heading-text";
|
|
788
810
|
readonly statusLabel: "status-label";
|
|
811
|
+
readonly stickyPreview: "sticky-preview";
|
|
789
812
|
readonly upgradePrompt: "upgrade-prompt";
|
|
790
813
|
readonly upgradePromptCta: "upgrade-prompt-cta";
|
|
791
814
|
readonly upgradePromptDismiss: "upgrade-prompt-dismiss";
|
|
@@ -900,4 +923,4 @@ declare const MIN_TARGET_PX = 44;
|
|
|
900
923
|
*/
|
|
901
924
|
declare function isWideWebViewport(width: number, platformOS: string, breakpoint?: number): boolean;
|
|
902
925
|
|
|
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 };
|
|
926
|
+
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 };
|