@dloizides/ui-layout 1.32.0 → 1.34.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 +9 -0
- package/dist/index.d.mts +39 -5
- package/dist/index.d.ts +39 -5
- package/dist/index.js +189 -101
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +186 -103
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.34.0
|
|
4
|
+
|
|
5
|
+
INVOICE-3 "Invoice interface over a user-chosen folder": extracted from invoice-web.
|
|
6
|
+
|
|
7
|
+
- New `AppText` + `TextKind`: text in six fixed sizes.
|
|
8
|
+
- New `ScreenColumn`: the bounded, centred column a screen sits in.
|
|
9
|
+
- New `useIsWideViewport`: the hook form of `isWideWebViewport`.
|
|
10
|
+
- `Section` gains `variant` (`SectionVariant.Card`), `testID`, and `style` widened to `StyleProp<ViewStyle>`. Default look unchanged.
|
|
11
|
+
|
|
3
12
|
|
|
4
13
|
## 1.32.0
|
|
5
14
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React, { RefObject } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { StyleProp, ViewStyle, TextStyle, Text, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
declare enum SectionVariant {
|
|
5
|
+
Panel = "panel",
|
|
6
|
+
Card = "card"
|
|
7
|
+
}
|
|
3
8
|
|
|
4
9
|
/**
|
|
5
10
|
* Section — a bordered card container that themes its border + surface.
|
|
@@ -7,9 +12,35 @@ import { ViewStyle, Text, StyleProp, TextStyle, View } from 'react-native';
|
|
|
7
12
|
|
|
8
13
|
interface SectionProps {
|
|
9
14
|
children?: React.ReactNode;
|
|
10
|
-
style?: ViewStyle
|
|
15
|
+
style?: StyleProp<ViewStyle>;
|
|
16
|
+
variant?: SectionVariant;
|
|
17
|
+
testID?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const Section: ({ children, style, variant, testID, }: SectionProps) => React.ReactElement;
|
|
20
|
+
|
|
21
|
+
declare enum TextKind {
|
|
22
|
+
Title = "title",
|
|
23
|
+
Heading = "heading",
|
|
24
|
+
Body = "body",
|
|
25
|
+
Strong = "strong",
|
|
26
|
+
Muted = "muted",
|
|
27
|
+
Small = "small"
|
|
11
28
|
}
|
|
12
|
-
|
|
29
|
+
|
|
30
|
+
interface AppTextProps {
|
|
31
|
+
kind?: TextKind;
|
|
32
|
+
color?: string;
|
|
33
|
+
style?: StyleProp<TextStyle>;
|
|
34
|
+
testID?: string;
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
}
|
|
37
|
+
declare const AppText: ({ kind, color, style, testID, children, }: AppTextProps) => React.ReactElement;
|
|
38
|
+
|
|
39
|
+
interface ScreenColumnProps {
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
narrow?: boolean;
|
|
42
|
+
}
|
|
43
|
+
declare const ScreenColumn: ({ children, narrow }: ScreenColumnProps) => React.ReactElement;
|
|
13
44
|
|
|
14
45
|
/**
|
|
15
46
|
* Heading — themed section heading text, rendered as a REAL `<h1>`–`<h6>` on web.
|
|
@@ -60,11 +91,12 @@ interface StatusBadgeProps {
|
|
|
60
91
|
color: string;
|
|
61
92
|
backgroundColor: string;
|
|
62
93
|
icon?: React.ReactNode;
|
|
94
|
+
dashed?: boolean;
|
|
63
95
|
testID?: string;
|
|
64
96
|
accessibilityLabel?: string;
|
|
65
97
|
accessibilityHint?: string;
|
|
66
98
|
}
|
|
67
|
-
declare const StatusBadge: ({ label, color, backgroundColor, icon, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
99
|
+
declare const StatusBadge: ({ label, color, backgroundColor, icon, dashed, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
68
100
|
|
|
69
101
|
interface StickyPreviewProps {
|
|
70
102
|
full: React.ReactNode;
|
|
@@ -803,6 +835,8 @@ declare function useApiCommit(apiBaseUrl?: string, fetchImpl?: typeof fetch): st
|
|
|
803
835
|
|
|
804
836
|
declare function useFocusTrap(containerRef: RefObject<View | null>, enabled: boolean, initialFocusTestID?: string): void;
|
|
805
837
|
|
|
838
|
+
declare function useIsWideViewport(breakpoint?: number): boolean;
|
|
839
|
+
|
|
806
840
|
/** Default testIDs — match the apps' existing values so Playwright selectors keep working. */
|
|
807
841
|
declare const LAYOUT_TEST_IDS: {
|
|
808
842
|
readonly headingText: "heading-text";
|
|
@@ -922,4 +956,4 @@ declare const MIN_TARGET_PX = 44;
|
|
|
922
956
|
*/
|
|
923
957
|
declare function isWideWebViewport(width: number, platformOS: string, breakpoint?: number): boolean;
|
|
924
958
|
|
|
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 };
|
|
959
|
+
export { 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, MIN_TARGET_PX, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, 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, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useVisibleViewport };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React, { RefObject } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { StyleProp, ViewStyle, TextStyle, Text, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
declare enum SectionVariant {
|
|
5
|
+
Panel = "panel",
|
|
6
|
+
Card = "card"
|
|
7
|
+
}
|
|
3
8
|
|
|
4
9
|
/**
|
|
5
10
|
* Section — a bordered card container that themes its border + surface.
|
|
@@ -7,9 +12,35 @@ import { ViewStyle, Text, StyleProp, TextStyle, View } from 'react-native';
|
|
|
7
12
|
|
|
8
13
|
interface SectionProps {
|
|
9
14
|
children?: React.ReactNode;
|
|
10
|
-
style?: ViewStyle
|
|
15
|
+
style?: StyleProp<ViewStyle>;
|
|
16
|
+
variant?: SectionVariant;
|
|
17
|
+
testID?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const Section: ({ children, style, variant, testID, }: SectionProps) => React.ReactElement;
|
|
20
|
+
|
|
21
|
+
declare enum TextKind {
|
|
22
|
+
Title = "title",
|
|
23
|
+
Heading = "heading",
|
|
24
|
+
Body = "body",
|
|
25
|
+
Strong = "strong",
|
|
26
|
+
Muted = "muted",
|
|
27
|
+
Small = "small"
|
|
11
28
|
}
|
|
12
|
-
|
|
29
|
+
|
|
30
|
+
interface AppTextProps {
|
|
31
|
+
kind?: TextKind;
|
|
32
|
+
color?: string;
|
|
33
|
+
style?: StyleProp<TextStyle>;
|
|
34
|
+
testID?: string;
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
}
|
|
37
|
+
declare const AppText: ({ kind, color, style, testID, children, }: AppTextProps) => React.ReactElement;
|
|
38
|
+
|
|
39
|
+
interface ScreenColumnProps {
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
narrow?: boolean;
|
|
42
|
+
}
|
|
43
|
+
declare const ScreenColumn: ({ children, narrow }: ScreenColumnProps) => React.ReactElement;
|
|
13
44
|
|
|
14
45
|
/**
|
|
15
46
|
* Heading — themed section heading text, rendered as a REAL `<h1>`–`<h6>` on web.
|
|
@@ -60,11 +91,12 @@ interface StatusBadgeProps {
|
|
|
60
91
|
color: string;
|
|
61
92
|
backgroundColor: string;
|
|
62
93
|
icon?: React.ReactNode;
|
|
94
|
+
dashed?: boolean;
|
|
63
95
|
testID?: string;
|
|
64
96
|
accessibilityLabel?: string;
|
|
65
97
|
accessibilityHint?: string;
|
|
66
98
|
}
|
|
67
|
-
declare const StatusBadge: ({ label, color, backgroundColor, icon, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
99
|
+
declare const StatusBadge: ({ label, color, backgroundColor, icon, dashed, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
68
100
|
|
|
69
101
|
interface StickyPreviewProps {
|
|
70
102
|
full: React.ReactNode;
|
|
@@ -803,6 +835,8 @@ declare function useApiCommit(apiBaseUrl?: string, fetchImpl?: typeof fetch): st
|
|
|
803
835
|
|
|
804
836
|
declare function useFocusTrap(containerRef: RefObject<View | null>, enabled: boolean, initialFocusTestID?: string): void;
|
|
805
837
|
|
|
838
|
+
declare function useIsWideViewport(breakpoint?: number): boolean;
|
|
839
|
+
|
|
806
840
|
/** Default testIDs — match the apps' existing values so Playwright selectors keep working. */
|
|
807
841
|
declare const LAYOUT_TEST_IDS: {
|
|
808
842
|
readonly headingText: "heading-text";
|
|
@@ -922,4 +956,4 @@ declare const MIN_TARGET_PX = 44;
|
|
|
922
956
|
*/
|
|
923
957
|
declare function isWideWebViewport(width: number, platformOS: string, breakpoint?: number): boolean;
|
|
924
958
|
|
|
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 };
|
|
959
|
+
export { 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, MIN_TARGET_PX, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, 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, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useVisibleViewport };
|