@dloizides/ui-layout 1.33.0 → 1.35.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 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 { ViewStyle, Text, StyleProp, TextStyle, View } from 'react-native';
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 | 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
- declare const Section: ({ children, style }: SectionProps) => React.ReactElement;
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.
@@ -73,10 +104,11 @@ interface StickyPreviewProps {
73
104
  forceCompact?: boolean;
74
105
  topOffset?: number;
75
106
  accessibilityLabel: string;
107
+ accessibilityHint?: string;
76
108
  testID?: string;
77
109
  }
78
110
  /** 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;
111
+ declare const StickyPreview: ({ full, compact, forceCompact, topOffset, accessibilityLabel, accessibilityHint, testID, }: StickyPreviewProps) => React.ReactElement;
80
112
 
81
113
  interface VisibleViewport {
82
114
  offsetTop: number;
@@ -804,6 +836,8 @@ declare function useApiCommit(apiBaseUrl?: string, fetchImpl?: typeof fetch): st
804
836
 
805
837
  declare function useFocusTrap(containerRef: RefObject<View | null>, enabled: boolean, initialFocusTestID?: string): void;
806
838
 
839
+ declare function useIsWideViewport(breakpoint?: number): boolean;
840
+
807
841
  /** Default testIDs — match the apps' existing values so Playwright selectors keep working. */
808
842
  declare const LAYOUT_TEST_IDS: {
809
843
  readonly headingText: "heading-text";
@@ -923,4 +957,4 @@ declare const MIN_TARGET_PX = 44;
923
957
  */
924
958
  declare function isWideWebViewport(width: number, platformOS: string, breakpoint?: number): boolean;
925
959
 
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 };
960
+ 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 { ViewStyle, Text, StyleProp, TextStyle, View } from 'react-native';
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 | 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
- declare const Section: ({ children, style }: SectionProps) => React.ReactElement;
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.
@@ -73,10 +104,11 @@ interface StickyPreviewProps {
73
104
  forceCompact?: boolean;
74
105
  topOffset?: number;
75
106
  accessibilityLabel: string;
107
+ accessibilityHint?: string;
76
108
  testID?: string;
77
109
  }
78
110
  /** 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;
111
+ declare const StickyPreview: ({ full, compact, forceCompact, topOffset, accessibilityLabel, accessibilityHint, testID, }: StickyPreviewProps) => React.ReactElement;
80
112
 
81
113
  interface VisibleViewport {
82
114
  offsetTop: number;
@@ -804,6 +836,8 @@ declare function useApiCommit(apiBaseUrl?: string, fetchImpl?: typeof fetch): st
804
836
 
805
837
  declare function useFocusTrap(containerRef: RefObject<View | null>, enabled: boolean, initialFocusTestID?: string): void;
806
838
 
839
+ declare function useIsWideViewport(breakpoint?: number): boolean;
840
+
807
841
  /** Default testIDs — match the apps' existing values so Playwright selectors keep working. */
808
842
  declare const LAYOUT_TEST_IDS: {
809
843
  readonly headingText: "heading-text";
@@ -923,4 +957,4 @@ declare const MIN_TARGET_PX = 44;
923
957
  */
924
958
  declare function isWideWebViewport(width: number, platformOS: string, breakpoint?: number): boolean;
925
959
 
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 };
960
+ 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 };