@dloizides/ui-layout 1.57.0 → 1.59.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 +6 -0
- package/dist/index.d.mts +17 -5
- package/dist/index.d.ts +17 -5
- package/dist/index.js +39 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.58.0
|
|
4
|
+
|
|
5
|
+
- MODC-1 D-MC-728 "Layout gaps in the package". All new props optional, defaults unchanged.
|
|
6
|
+
- `UnderlineTabs` takes `activeTextColor` (the selected label on underline tabs, the selected chip's ink) and `activeFillColor` (the selected chip's fill and border). Defaults stay theme `colors.text` / `colors.background`.
|
|
7
|
+
- `DayCard` takes `layout` (`DayCardLayout.Grouped`, the default, one shared card; or `Separate`, one card per child, 12 px radius, 8 px gap, testIDs `<id>-item-<n>`). New export `DayCardLayout`.
|
|
8
|
+
|
|
3
9
|
## 1.57.0
|
|
4
10
|
|
|
5
11
|
- MODC-1 D-MC-728 "Layout gaps in the package". All new props optional, defaults unchanged.
|
package/dist/index.d.mts
CHANGED
|
@@ -1284,6 +1284,12 @@ declare const enum DayBadgeFill {
|
|
|
1284
1284
|
Tint = "tint"
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
1287
|
+
/** How a DayCard holds its rows: one shared card (Grouped) or one card per row (Separate). */
|
|
1288
|
+
declare const enum DayCardLayout {
|
|
1289
|
+
Grouped = "grouped",
|
|
1290
|
+
Separate = "separate"
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1287
1293
|
interface DayCardProps {
|
|
1288
1294
|
label: string;
|
|
1289
1295
|
badge: string;
|
|
@@ -1293,11 +1299,12 @@ interface DayCardProps {
|
|
|
1293
1299
|
badgeTone?: BadgeTone;
|
|
1294
1300
|
badgeFill?: DayBadgeFill;
|
|
1295
1301
|
badgeIcon?: IconName;
|
|
1302
|
+
layout?: DayCardLayout;
|
|
1296
1303
|
testID?: string;
|
|
1297
1304
|
children: React.ReactNode;
|
|
1298
1305
|
}
|
|
1299
|
-
/** One day of a list: its label, an age badge and the item count over
|
|
1300
|
-
declare const DayCard: ({ label, badge, count, accessibilityLabel, accessibilityHint, badgeTone, badgeFill, badgeIcon, testID, children, }: DayCardProps) => React.ReactElement;
|
|
1306
|
+
/** One day of a list: its label, an age badge and the item count over the day's rows, in one card or one card per row (`layout`). */
|
|
1307
|
+
declare const DayCard: ({ label, badge, count, accessibilityLabel, accessibilityHint, badgeTone, badgeFill, badgeIcon, layout, testID, children, }: DayCardProps) => React.ReactElement;
|
|
1301
1308
|
|
|
1302
1309
|
/** The style of one figure cell: an equal share of the strip when wide, half a row when narrow; span widens it. */
|
|
1303
1310
|
declare function figureCell(wide: boolean, span?: number): StyleProp<ViewStyle>;
|
|
@@ -1336,14 +1343,17 @@ declare const StickyActionBar: ({ accessibilityLabel, accessibilityHint, childre
|
|
|
1336
1343
|
|
|
1337
1344
|
interface PageHeadProps {
|
|
1338
1345
|
title: string;
|
|
1346
|
+
/** A string is drawn in the secondary text style; any other node is drawn as given. */
|
|
1339
1347
|
subtitle?: React.ReactNode;
|
|
1340
1348
|
actions?: React.ReactNode;
|
|
1341
1349
|
/** Focus the title when the page opens (FOCUS-1); default false. */
|
|
1342
1350
|
initialFocus?: boolean;
|
|
1351
|
+
/** Phone head (22 px title, 12 px subtitle); default true below LAYOUT_COLLAPSE_BREAKPOINT. */
|
|
1352
|
+
compact?: boolean;
|
|
1343
1353
|
testID?: string;
|
|
1344
1354
|
}
|
|
1345
1355
|
/** Page title row: heading and subtitle on the left, page actions on the right; actions wrap below on narrow screens. */
|
|
1346
|
-
declare const PageHead: ({ title, subtitle, actions, initialFocus, testID }: PageHeadProps) => React.ReactElement;
|
|
1356
|
+
declare const PageHead: ({ title, subtitle, actions, initialFocus, compact, testID }: PageHeadProps) => React.ReactElement;
|
|
1347
1357
|
|
|
1348
1358
|
interface TimelineEntry {
|
|
1349
1359
|
key: string;
|
|
@@ -1443,9 +1453,11 @@ interface UnderlineTabsProps {
|
|
|
1443
1453
|
testID?: string;
|
|
1444
1454
|
variant?: TabsVariant;
|
|
1445
1455
|
chipOverflow?: ChipOverflow;
|
|
1456
|
+
activeFillColor?: string;
|
|
1457
|
+
activeTextColor?: string;
|
|
1446
1458
|
}
|
|
1447
1459
|
/** A full-width tab strip: underline tabs (default) or a pill-chip jump row (`variant` Chips), with an optional count per tab. */
|
|
1448
|
-
declare const UnderlineTabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant, chipOverflow }: UnderlineTabsProps) => React.ReactElement;
|
|
1460
|
+
declare const UnderlineTabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant, chipOverflow, activeFillColor, activeTextColor }: UnderlineTabsProps) => React.ReactElement;
|
|
1449
1461
|
|
|
1450
1462
|
interface WidgetCardProps {
|
|
1451
1463
|
title: string;
|
|
@@ -1553,4 +1565,4 @@ interface ListDetailVisibility {
|
|
|
1553
1565
|
/** Wide shows both panes; narrow shows one, the detail only when asked for and present. */
|
|
1554
1566
|
declare function resolveListDetailPanes(wide: boolean, narrowPane: ListDetailPane, hasDetail: boolean): ListDetailVisibility;
|
|
1555
1567
|
|
|
1556
|
-
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, type ConfirmDialogProps, CopyControl, CopyRowEmphasis, CopyStatus, type CopyToClipboard, type CopyValueLabels, CopyValueRow, type CopyValueRowProps, CopyableId, type CopyableIdProps, CountBadge, type CountBadgeProps, DEFAULT_BILLING_ROUTE, DayBadgeFill, DayCard, type DayCardProps, type DropdownOption, type DropdownTriggerState, DropdownVariant, ELLIPSIS, FigureStrip, type FigureStripProps, FormDialog, type FormDialogProps, HEADER_STACK_BREAKPOINT, Heading, type HeadingLevel, type HeadingProps, IdChip, type IdChipProps, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListDetailLayout, type ListDetailLayoutProps, ListDetailPane, type ListDetailVisibility, ListRow, type ListRowProps, type ListRowTone, MIN_TARGET_PX, MODAL_FOOTER_STACK_BELOW, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, PageFrame, type PageFrameProps, PageHead, type PageHeadProps, type PageSize, RecordActionButton, type RecordActionButtonProps, RecordHeader, type RecordHeaderProps, type RowLook, type RowPalette, RowSelectedStyle, type RowSelection, type RowSelectionKeys, type RowState, SECTION_INDEX_BREAKPOINT, SECTION_INDEX_WIDTH, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, SectionChips, type SectionChipsProps, SectionDensity, SectionIndex, type SectionIndexEntry, SectionIndexLayout, type SectionIndexLayoutProps, type SectionIndexProps, type SectionPadding, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SegmentedVariant, SelectedMarker, SideSheet, type SideSheetProps, SplitLayout, SplitPanes, type SplitPanesProps, StatusBadge, type StatusBadgeProps, StickyActionBar, type StickyActionBarProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TabsVariant, TextKind, Timeline, type TimelineEntry, type TimelineProps, ToggleSection, type ToggleSectionProps, type ToneColors, type TotalsItem, TotalsStrip, type TotalsStripProps, TotalsTone, TransferSlip, type TransferSlipProps, TruncatedText, type TruncatedTextProps, type UnderlineTab, UnderlineTabs, type UnderlineTabsProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, WidgetCard, type WidgetCardProps, copyActionLabel, copyText, figureCell, formatBuildInfo, formatCount, formatUrlForDisplay, isKeyboardOpen, isModalFooterStacked, isRecordHeaderCompact, isSplitSideBySide, isWideWebViewport, pageScale, resolveActiveKey, resolveListDetailPanes, resolveRowLook, resolveTintColors, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
|
1568
|
+
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, type ConfirmDialogProps, CopyControl, CopyRowEmphasis, CopyStatus, type CopyToClipboard, type CopyValueLabels, CopyValueRow, type CopyValueRowProps, CopyableId, type CopyableIdProps, CountBadge, type CountBadgeProps, DEFAULT_BILLING_ROUTE, DayBadgeFill, DayCard, DayCardLayout, type DayCardProps, type DropdownOption, type DropdownTriggerState, DropdownVariant, ELLIPSIS, FigureStrip, type FigureStripProps, FormDialog, type FormDialogProps, HEADER_STACK_BREAKPOINT, Heading, type HeadingLevel, type HeadingProps, IdChip, type IdChipProps, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListDetailLayout, type ListDetailLayoutProps, ListDetailPane, type ListDetailVisibility, ListRow, type ListRowProps, type ListRowTone, MIN_TARGET_PX, MODAL_FOOTER_STACK_BELOW, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, PageFrame, type PageFrameProps, PageHead, type PageHeadProps, type PageSize, RecordActionButton, type RecordActionButtonProps, RecordHeader, type RecordHeaderProps, type RowLook, type RowPalette, RowSelectedStyle, type RowSelection, type RowSelectionKeys, type RowState, SECTION_INDEX_BREAKPOINT, SECTION_INDEX_WIDTH, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, SectionChips, type SectionChipsProps, SectionDensity, SectionIndex, type SectionIndexEntry, SectionIndexLayout, type SectionIndexLayoutProps, type SectionIndexProps, type SectionPadding, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SegmentedVariant, SelectedMarker, SideSheet, type SideSheetProps, SplitLayout, SplitPanes, type SplitPanesProps, StatusBadge, type StatusBadgeProps, StickyActionBar, type StickyActionBarProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TabsVariant, TextKind, Timeline, type TimelineEntry, type TimelineProps, ToggleSection, type ToggleSectionProps, type ToneColors, type TotalsItem, TotalsStrip, type TotalsStripProps, TotalsTone, TransferSlip, type TransferSlipProps, TruncatedText, type TruncatedTextProps, type UnderlineTab, UnderlineTabs, type UnderlineTabsProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, WidgetCard, type WidgetCardProps, copyActionLabel, copyText, figureCell, formatBuildInfo, formatCount, formatUrlForDisplay, isKeyboardOpen, isModalFooterStacked, isRecordHeaderCompact, isSplitSideBySide, isWideWebViewport, pageScale, resolveActiveKey, resolveListDetailPanes, resolveRowLook, resolveTintColors, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
package/dist/index.d.ts
CHANGED
|
@@ -1284,6 +1284,12 @@ declare const enum DayBadgeFill {
|
|
|
1284
1284
|
Tint = "tint"
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
1287
|
+
/** How a DayCard holds its rows: one shared card (Grouped) or one card per row (Separate). */
|
|
1288
|
+
declare const enum DayCardLayout {
|
|
1289
|
+
Grouped = "grouped",
|
|
1290
|
+
Separate = "separate"
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1287
1293
|
interface DayCardProps {
|
|
1288
1294
|
label: string;
|
|
1289
1295
|
badge: string;
|
|
@@ -1293,11 +1299,12 @@ interface DayCardProps {
|
|
|
1293
1299
|
badgeTone?: BadgeTone;
|
|
1294
1300
|
badgeFill?: DayBadgeFill;
|
|
1295
1301
|
badgeIcon?: IconName;
|
|
1302
|
+
layout?: DayCardLayout;
|
|
1296
1303
|
testID?: string;
|
|
1297
1304
|
children: React.ReactNode;
|
|
1298
1305
|
}
|
|
1299
|
-
/** One day of a list: its label, an age badge and the item count over
|
|
1300
|
-
declare const DayCard: ({ label, badge, count, accessibilityLabel, accessibilityHint, badgeTone, badgeFill, badgeIcon, testID, children, }: DayCardProps) => React.ReactElement;
|
|
1306
|
+
/** One day of a list: its label, an age badge and the item count over the day's rows, in one card or one card per row (`layout`). */
|
|
1307
|
+
declare const DayCard: ({ label, badge, count, accessibilityLabel, accessibilityHint, badgeTone, badgeFill, badgeIcon, layout, testID, children, }: DayCardProps) => React.ReactElement;
|
|
1301
1308
|
|
|
1302
1309
|
/** The style of one figure cell: an equal share of the strip when wide, half a row when narrow; span widens it. */
|
|
1303
1310
|
declare function figureCell(wide: boolean, span?: number): StyleProp<ViewStyle>;
|
|
@@ -1336,14 +1343,17 @@ declare const StickyActionBar: ({ accessibilityLabel, accessibilityHint, childre
|
|
|
1336
1343
|
|
|
1337
1344
|
interface PageHeadProps {
|
|
1338
1345
|
title: string;
|
|
1346
|
+
/** A string is drawn in the secondary text style; any other node is drawn as given. */
|
|
1339
1347
|
subtitle?: React.ReactNode;
|
|
1340
1348
|
actions?: React.ReactNode;
|
|
1341
1349
|
/** Focus the title when the page opens (FOCUS-1); default false. */
|
|
1342
1350
|
initialFocus?: boolean;
|
|
1351
|
+
/** Phone head (22 px title, 12 px subtitle); default true below LAYOUT_COLLAPSE_BREAKPOINT. */
|
|
1352
|
+
compact?: boolean;
|
|
1343
1353
|
testID?: string;
|
|
1344
1354
|
}
|
|
1345
1355
|
/** Page title row: heading and subtitle on the left, page actions on the right; actions wrap below on narrow screens. */
|
|
1346
|
-
declare const PageHead: ({ title, subtitle, actions, initialFocus, testID }: PageHeadProps) => React.ReactElement;
|
|
1356
|
+
declare const PageHead: ({ title, subtitle, actions, initialFocus, compact, testID }: PageHeadProps) => React.ReactElement;
|
|
1347
1357
|
|
|
1348
1358
|
interface TimelineEntry {
|
|
1349
1359
|
key: string;
|
|
@@ -1443,9 +1453,11 @@ interface UnderlineTabsProps {
|
|
|
1443
1453
|
testID?: string;
|
|
1444
1454
|
variant?: TabsVariant;
|
|
1445
1455
|
chipOverflow?: ChipOverflow;
|
|
1456
|
+
activeFillColor?: string;
|
|
1457
|
+
activeTextColor?: string;
|
|
1446
1458
|
}
|
|
1447
1459
|
/** A full-width tab strip: underline tabs (default) or a pill-chip jump row (`variant` Chips), with an optional count per tab. */
|
|
1448
|
-
declare const UnderlineTabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant, chipOverflow }: UnderlineTabsProps) => React.ReactElement;
|
|
1460
|
+
declare const UnderlineTabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant, chipOverflow, activeFillColor, activeTextColor }: UnderlineTabsProps) => React.ReactElement;
|
|
1449
1461
|
|
|
1450
1462
|
interface WidgetCardProps {
|
|
1451
1463
|
title: string;
|
|
@@ -1553,4 +1565,4 @@ interface ListDetailVisibility {
|
|
|
1553
1565
|
/** Wide shows both panes; narrow shows one, the detail only when asked for and present. */
|
|
1554
1566
|
declare function resolveListDetailPanes(wide: boolean, narrowPane: ListDetailPane, hasDetail: boolean): ListDetailVisibility;
|
|
1555
1567
|
|
|
1556
|
-
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, type ConfirmDialogProps, CopyControl, CopyRowEmphasis, CopyStatus, type CopyToClipboard, type CopyValueLabels, CopyValueRow, type CopyValueRowProps, CopyableId, type CopyableIdProps, CountBadge, type CountBadgeProps, DEFAULT_BILLING_ROUTE, DayBadgeFill, DayCard, type DayCardProps, type DropdownOption, type DropdownTriggerState, DropdownVariant, ELLIPSIS, FigureStrip, type FigureStripProps, FormDialog, type FormDialogProps, HEADER_STACK_BREAKPOINT, Heading, type HeadingLevel, type HeadingProps, IdChip, type IdChipProps, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListDetailLayout, type ListDetailLayoutProps, ListDetailPane, type ListDetailVisibility, ListRow, type ListRowProps, type ListRowTone, MIN_TARGET_PX, MODAL_FOOTER_STACK_BELOW, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, PageFrame, type PageFrameProps, PageHead, type PageHeadProps, type PageSize, RecordActionButton, type RecordActionButtonProps, RecordHeader, type RecordHeaderProps, type RowLook, type RowPalette, RowSelectedStyle, type RowSelection, type RowSelectionKeys, type RowState, SECTION_INDEX_BREAKPOINT, SECTION_INDEX_WIDTH, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, SectionChips, type SectionChipsProps, SectionDensity, SectionIndex, type SectionIndexEntry, SectionIndexLayout, type SectionIndexLayoutProps, type SectionIndexProps, type SectionPadding, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SegmentedVariant, SelectedMarker, SideSheet, type SideSheetProps, SplitLayout, SplitPanes, type SplitPanesProps, StatusBadge, type StatusBadgeProps, StickyActionBar, type StickyActionBarProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TabsVariant, TextKind, Timeline, type TimelineEntry, type TimelineProps, ToggleSection, type ToggleSectionProps, type ToneColors, type TotalsItem, TotalsStrip, type TotalsStripProps, TotalsTone, TransferSlip, type TransferSlipProps, TruncatedText, type TruncatedTextProps, type UnderlineTab, UnderlineTabs, type UnderlineTabsProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, WidgetCard, type WidgetCardProps, copyActionLabel, copyText, figureCell, formatBuildInfo, formatCount, formatUrlForDisplay, isKeyboardOpen, isModalFooterStacked, isRecordHeaderCompact, isSplitSideBySide, isWideWebViewport, pageScale, resolveActiveKey, resolveListDetailPanes, resolveRowLook, resolveTintColors, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
|
1568
|
+
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, type ConfirmDialogProps, CopyControl, CopyRowEmphasis, CopyStatus, type CopyToClipboard, type CopyValueLabels, CopyValueRow, type CopyValueRowProps, CopyableId, type CopyableIdProps, CountBadge, type CountBadgeProps, DEFAULT_BILLING_ROUTE, DayBadgeFill, DayCard, DayCardLayout, type DayCardProps, type DropdownOption, type DropdownTriggerState, DropdownVariant, ELLIPSIS, FigureStrip, type FigureStripProps, FormDialog, type FormDialogProps, HEADER_STACK_BREAKPOINT, Heading, type HeadingLevel, type HeadingProps, IdChip, type IdChipProps, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListDetailLayout, type ListDetailLayoutProps, ListDetailPane, type ListDetailVisibility, ListRow, type ListRowProps, type ListRowTone, MIN_TARGET_PX, MODAL_FOOTER_STACK_BELOW, Modal, ModalDropdown, type ModalDropdownProps, type ModalProps, ModalShell, type ModalShellProps, type ModalSize, PageFrame, type PageFrameProps, PageHead, type PageHeadProps, type PageSize, RecordActionButton, type RecordActionButtonProps, RecordHeader, type RecordHeaderProps, type RowLook, type RowPalette, RowSelectedStyle, type RowSelection, type RowSelectionKeys, type RowState, SECTION_INDEX_BREAKPOINT, SECTION_INDEX_WIDTH, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, SectionChips, type SectionChipsProps, SectionDensity, SectionIndex, type SectionIndexEntry, SectionIndexLayout, type SectionIndexLayoutProps, type SectionIndexProps, type SectionPadding, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SegmentedVariant, SelectedMarker, SideSheet, type SideSheetProps, SplitLayout, SplitPanes, type SplitPanesProps, StatusBadge, type StatusBadgeProps, StickyActionBar, type StickyActionBarProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, TabsVariant, TextKind, Timeline, type TimelineEntry, type TimelineProps, ToggleSection, type ToggleSectionProps, type ToneColors, type TotalsItem, TotalsStrip, type TotalsStripProps, TotalsTone, TransferSlip, type TransferSlipProps, TruncatedText, type TruncatedTextProps, type UnderlineTab, UnderlineTabs, type UnderlineTabsProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, WidgetCard, type WidgetCardProps, copyActionLabel, copyText, figureCell, formatBuildInfo, formatCount, formatUrlForDisplay, isKeyboardOpen, isModalFooterStacked, isRecordHeaderCompact, isSplitSideBySide, isWideWebViewport, pageScale, resolveActiveKey, resolveListDetailPanes, resolveRowLook, resolveTintColors, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
package/dist/index.js
CHANGED
|
@@ -3537,12 +3537,23 @@ var DayBadgeFill = /* @__PURE__ */ ((DayBadgeFill2) => {
|
|
|
3537
3537
|
DayBadgeFill2["Tint"] = "tint";
|
|
3538
3538
|
return DayBadgeFill2;
|
|
3539
3539
|
})(DayBadgeFill || {});
|
|
3540
|
+
|
|
3541
|
+
// src/DayCard/DayCardLayout.ts
|
|
3542
|
+
var DayCardLayout = /* @__PURE__ */ ((DayCardLayout2) => {
|
|
3543
|
+
DayCardLayout2["Grouped"] = "grouped";
|
|
3544
|
+
DayCardLayout2["Separate"] = "separate";
|
|
3545
|
+
return DayCardLayout2;
|
|
3546
|
+
})(DayCardLayout || {});
|
|
3540
3547
|
var PILL_RADIUS2 = 999;
|
|
3541
3548
|
var BADGE_ICON_SIZE = 12;
|
|
3549
|
+
var ITEM_RADIUS = 12;
|
|
3550
|
+
var ITEM_GAP = 8;
|
|
3542
3551
|
var styles32 = reactNative.StyleSheet.create({
|
|
3543
3552
|
body: { borderRadius: 8, borderWidth: 1, overflow: "hidden" },
|
|
3544
3553
|
count: { borderRadius: PILL_RADIUS2, borderWidth: 1, fontSize: 12, fontWeight: "700", paddingHorizontal: 8 },
|
|
3545
3554
|
head: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: 8 },
|
|
3555
|
+
item: { borderRadius: ITEM_RADIUS, borderWidth: 1, overflow: "hidden" },
|
|
3556
|
+
items: { gap: ITEM_GAP },
|
|
3546
3557
|
label: { fontSize: 13, fontWeight: "600" },
|
|
3547
3558
|
stack: { gap: 6 }
|
|
3548
3559
|
});
|
|
@@ -3555,12 +3566,14 @@ var DayCard = ({
|
|
|
3555
3566
|
badgeTone = "warning" /* Warning */,
|
|
3556
3567
|
badgeFill = "solid" /* Solid */,
|
|
3557
3568
|
badgeIcon,
|
|
3569
|
+
layout = "grouped" /* Grouped */,
|
|
3558
3570
|
testID,
|
|
3559
3571
|
children
|
|
3560
3572
|
}) => {
|
|
3561
3573
|
const { theme } = uiFeedback.useUi();
|
|
3562
3574
|
const { colors } = theme;
|
|
3563
3575
|
const tint = badgeFill === "tint" /* Tint */ ? resolveTintColors(theme, badgeTone) : void 0;
|
|
3576
|
+
const surface = { backgroundColor: colors.surface, borderColor: colors.border };
|
|
3564
3577
|
const iconInk = tint?.color ?? colors.textSecondary;
|
|
3565
3578
|
const icon = badgeIcon === void 0 ? void 0 : /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: iconInk, name: badgeIcon, size: BADGE_ICON_SIZE });
|
|
3566
3579
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.stack, testID, children: [
|
|
@@ -3569,7 +3582,7 @@ var DayCard = ({
|
|
|
3569
3582
|
/* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { backgroundColor: tint?.backgroundColor, color: tint?.color, icon, label: badge, testID: testID === void 0 ? void 0 : `${testID}-badge`, tone: badgeTone }),
|
|
3570
3583
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles32.count, { borderColor: colors.border, color: colors.textSecondary }], children: String(count) })
|
|
3571
3584
|
] }),
|
|
3572
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3585
|
+
layout === "separate" /* Separate */ ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.items, children: React16__default.default.Children.toArray(children).map((child, index) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles32.item, surface], testID: testID === void 0 ? void 0 : `${testID}-item-${String(index)}`, children: child }, index)) }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles32.body, surface], children })
|
|
3573
3586
|
] });
|
|
3574
3587
|
};
|
|
3575
3588
|
var styles33 = reactNative.StyleSheet.create({
|
|
@@ -3629,21 +3642,29 @@ var StickyActionBar = ({
|
|
|
3629
3642
|
var TITLE_BASIS = 280;
|
|
3630
3643
|
var styles36 = reactNative.StyleSheet.create({
|
|
3631
3644
|
row: { flexDirection: "row", flexWrap: "wrap", alignItems: "flex-start", justifyContent: "space-between", gap: 12 },
|
|
3645
|
+
rowCompact: { gap: 10 },
|
|
3632
3646
|
text: { gap: 4, flexGrow: 1, flexShrink: 1, flexBasis: TITLE_BASIS, minWidth: 0 },
|
|
3647
|
+
textCompact: { gap: 2 },
|
|
3633
3648
|
title: { fontSize: 24, fontWeight: "800" },
|
|
3649
|
+
titleCompact: { fontSize: 22, lineHeight: 26, fontWeight: "700" },
|
|
3650
|
+
subtitle: { fontSize: 14, lineHeight: 20 },
|
|
3651
|
+
subtitleCompact: { fontSize: 12, lineHeight: 16 },
|
|
3634
3652
|
actions: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 8, maxWidth: "100%" }
|
|
3635
3653
|
});
|
|
3636
3654
|
function hasContent(node) {
|
|
3637
3655
|
return node !== void 0 && node !== null && node !== false;
|
|
3638
3656
|
}
|
|
3639
|
-
var PageHead = ({ title, subtitle, actions, initialFocus = false, testID = LAYOUT_TEST_IDS.pageHead }) => {
|
|
3657
|
+
var PageHead = ({ title, subtitle, actions, initialFocus = false, compact, testID = LAYOUT_TEST_IDS.pageHead }) => {
|
|
3640
3658
|
const { colors } = uiFeedback.useUi().theme;
|
|
3659
|
+
const { width } = reactNative.useWindowDimensions();
|
|
3660
|
+
const isCompact = compact ?? width < LAYOUT_COLLAPSE_BREAKPOINT;
|
|
3641
3661
|
const titleRef = rnWebHooks.useInitialFocus();
|
|
3642
3662
|
const focusProps = initialFocus ? { ref: titleRef, ...rnWebHooks.INITIAL_FOCUS_PROPS } : {};
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3663
|
+
const subtitleNode = typeof subtitle === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [isCompact ? styles36.subtitleCompact : styles36.subtitle, { color: colors.textSecondary }], testID: `${testID}-subtitle`, children: subtitle }) : subtitle;
|
|
3664
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles36.row, isCompact ? styles36.rowCompact : null], testID, children: [
|
|
3665
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles36.text, isCompact ? styles36.textCompact : null], children: [
|
|
3666
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { ...focusProps, accessibilityRole: "header", style: [isCompact ? styles36.titleCompact : styles36.title, { color: colors.text }], testID: `${testID}-title`, children: title }),
|
|
3667
|
+
subtitleNode
|
|
3647
3668
|
] }),
|
|
3648
3669
|
hasContent(actions) ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles36.actions, testID: `${testID}-actions`, children: actions }) : null
|
|
3649
3670
|
] });
|
|
@@ -3853,19 +3874,21 @@ var TabPressable = ({ tab, selected, onChange, style, children }) => /* @__PURE_
|
|
|
3853
3874
|
children
|
|
3854
3875
|
}
|
|
3855
3876
|
);
|
|
3856
|
-
var UnderlineTabItem = ({ underline, ...item }) => {
|
|
3877
|
+
var UnderlineTabItem = ({ underline, activeText, ...item }) => {
|
|
3857
3878
|
const { theme } = uiFeedback.useUi();
|
|
3879
|
+
const selectedInk = activeText ?? theme.colors.text;
|
|
3858
3880
|
return /* @__PURE__ */ jsxRuntime.jsxs(TabPressable, { ...item, style: [styles43.tab, { borderBottomColor: item.selected ? underline : "transparent" }], children: [
|
|
3859
3881
|
item.tab.icon ?? null,
|
|
3860
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.label, { color: item.selected ?
|
|
3882
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.label, { color: item.selected ? selectedInk : theme.colors.textSecondary }], children: item.tab.label }),
|
|
3861
3883
|
item.tab.count === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.count, { backgroundColor: theme.colors.border, color: theme.colors.text }], children: String(item.tab.count) })
|
|
3862
3884
|
] });
|
|
3863
3885
|
};
|
|
3864
|
-
var ChipTabItem = (item) => {
|
|
3886
|
+
var ChipTabItem = ({ activeFill, activeText, ...item }) => {
|
|
3865
3887
|
const { theme } = uiFeedback.useUi();
|
|
3866
|
-
const
|
|
3867
|
-
const
|
|
3868
|
-
|
|
3888
|
+
const selectedFill = activeFill ?? theme.colors.text;
|
|
3889
|
+
const fill = item.selected ? selectedFill : "transparent";
|
|
3890
|
+
const ink = item.selected ? activeText ?? theme.colors.background : theme.colors.text;
|
|
3891
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(TabPressable, { ...item, style: [styles43.chip, { backgroundColor: fill, borderColor: item.selected ? selectedFill : theme.colors.border }], children: [
|
|
3869
3892
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.label, { color: ink }], children: item.tab.label }),
|
|
3870
3893
|
item.tab.count === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.chipCount, { color: ink }], children: String(item.tab.count) })
|
|
3871
3894
|
] });
|
|
@@ -3886,14 +3909,14 @@ var styles44 = reactNative.StyleSheet.create({
|
|
|
3886
3909
|
chipWrap: { flexWrap: "wrap" },
|
|
3887
3910
|
strip: { position: "relative", width: "100%" }
|
|
3888
3911
|
});
|
|
3889
|
-
var UnderlineTabs = ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant = "underline" /* Underline */, chipOverflow = "scroll" /* Scroll
|
|
3912
|
+
var UnderlineTabs = ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant = "underline" /* Underline */, chipOverflow = "scroll" /* Scroll */, activeFillColor, activeTextColor }) => {
|
|
3890
3913
|
const { theme } = uiFeedback.useUi();
|
|
3891
3914
|
const underline = underlineColor ?? theme.palette.primary[DEFAULT_UNDERLINE_STEP];
|
|
3892
3915
|
const fade = useEdgeFade();
|
|
3893
3916
|
const chips = variant === "chips" /* Chips */;
|
|
3894
3917
|
const items = tabs.map((tab) => {
|
|
3895
|
-
const item = { tab, selected: tab.key === activeKey, onChange };
|
|
3896
|
-
return chips ? /* @__PURE__ */ jsxRuntime.jsx(ChipTabItem, { ...item }, tab.key) : /* @__PURE__ */ jsxRuntime.jsx(UnderlineTabItem, { ...item, underline }, tab.key);
|
|
3918
|
+
const item = { tab, selected: tab.key === activeKey, onChange, activeText: activeTextColor };
|
|
3919
|
+
return chips ? /* @__PURE__ */ jsxRuntime.jsx(ChipTabItem, { ...item, activeFill: activeFillColor }, tab.key) : /* @__PURE__ */ jsxRuntime.jsx(UnderlineTabItem, { ...item, underline }, tab.key);
|
|
3897
3920
|
});
|
|
3898
3921
|
const stripStyle = chips ? styles44.strip : [styles44.strip, { borderBottomColor: theme.colors.border, borderBottomWidth: 1 }];
|
|
3899
3922
|
if (chips && chipOverflow === "wrap" /* Wrap */) {
|
|
@@ -4144,6 +4167,7 @@ exports.CountBadge = CountBadge;
|
|
|
4144
4167
|
exports.DEFAULT_BILLING_ROUTE = DEFAULT_BILLING_ROUTE;
|
|
4145
4168
|
exports.DayBadgeFill = DayBadgeFill;
|
|
4146
4169
|
exports.DayCard = DayCard;
|
|
4170
|
+
exports.DayCardLayout = DayCardLayout;
|
|
4147
4171
|
exports.DropdownVariant = DropdownVariant;
|
|
4148
4172
|
exports.ELLIPSIS = ELLIPSIS;
|
|
4149
4173
|
exports.FigureStrip = FigureStrip;
|