@dloizides/ui-layout 1.65.0 → 1.66.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/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1333,6 +1333,11 @@ declare const enum DayCardLayout {
|
|
|
1333
1333
|
Separate = "separate"
|
|
1334
1334
|
}
|
|
1335
1335
|
|
|
1336
|
+
/** Explicit badge fill and ink, e.g. a brand colour from the app's theme config. */
|
|
1337
|
+
interface DayBadgeColors {
|
|
1338
|
+
backgroundColor: string;
|
|
1339
|
+
color: string;
|
|
1340
|
+
}
|
|
1336
1341
|
interface DayCardProps {
|
|
1337
1342
|
label: string;
|
|
1338
1343
|
badge: string;
|
|
@@ -1341,13 +1346,14 @@ interface DayCardProps {
|
|
|
1341
1346
|
accessibilityHint: string;
|
|
1342
1347
|
badgeTone?: BadgeTone;
|
|
1343
1348
|
badgeFill?: DayBadgeFill;
|
|
1349
|
+
badgeColors?: DayBadgeColors;
|
|
1344
1350
|
badgeIcon?: IconName;
|
|
1345
1351
|
layout?: DayCardLayout;
|
|
1346
1352
|
testID?: string;
|
|
1347
1353
|
children: React.ReactNode;
|
|
1348
1354
|
}
|
|
1349
1355
|
/** 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`). */
|
|
1350
|
-
declare const DayCard: ({ label, badge, count, accessibilityLabel, accessibilityHint, badgeTone, badgeFill, badgeIcon, layout, testID, children, }: DayCardProps) => React.ReactElement;
|
|
1356
|
+
declare const DayCard: ({ label, badge, count, accessibilityLabel, accessibilityHint, badgeTone, badgeFill, badgeColors, badgeIcon, layout, testID, children, }: DayCardProps) => React.ReactElement;
|
|
1351
1357
|
|
|
1352
1358
|
/** The style of one figure cell: an equal share of the strip when wide, half a row when narrow; span widens it. */
|
|
1353
1359
|
declare function figureCell(wide: boolean, span?: number): StyleProp<ViewStyle>;
|
|
@@ -1608,4 +1614,4 @@ interface ListDetailVisibility {
|
|
|
1608
1614
|
/** Wide shows both panes; narrow shows one, the detail only when asked for and present. */
|
|
1609
1615
|
declare function resolveListDetailPanes(wide: boolean, narrowPane: ListDetailPane, hasDetail: boolean): ListDetailVisibility;
|
|
1610
1616
|
|
|
1611
|
-
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeSize, 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, SPY_ACTIVATION_RATIO, SPY_CLICK_LOCK_MS, type ScaledFrame, ScreenColumn, type ScreenColumnProps, type ScrollSpyControl, type ScrollSpyOptions, Section, SectionChips, type SectionChipsProps, SectionDensity, type SectionFold, 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, type StickyIndexConfig, 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, pickActiveIndex, resolveActiveKey, resolveListDetailPanes, resolveRowLook, resolveTintColors, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useScrollSpy, useVisibleViewport };
|
|
1617
|
+
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeSize, 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, type DayBadgeColors, 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, SPY_ACTIVATION_RATIO, SPY_CLICK_LOCK_MS, type ScaledFrame, ScreenColumn, type ScreenColumnProps, type ScrollSpyControl, type ScrollSpyOptions, Section, SectionChips, type SectionChipsProps, SectionDensity, type SectionFold, 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, type StickyIndexConfig, 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, pickActiveIndex, resolveActiveKey, resolveListDetailPanes, resolveRowLook, resolveTintColors, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useScrollSpy, useVisibleViewport };
|
package/dist/index.d.ts
CHANGED
|
@@ -1333,6 +1333,11 @@ declare const enum DayCardLayout {
|
|
|
1333
1333
|
Separate = "separate"
|
|
1334
1334
|
}
|
|
1335
1335
|
|
|
1336
|
+
/** Explicit badge fill and ink, e.g. a brand colour from the app's theme config. */
|
|
1337
|
+
interface DayBadgeColors {
|
|
1338
|
+
backgroundColor: string;
|
|
1339
|
+
color: string;
|
|
1340
|
+
}
|
|
1336
1341
|
interface DayCardProps {
|
|
1337
1342
|
label: string;
|
|
1338
1343
|
badge: string;
|
|
@@ -1341,13 +1346,14 @@ interface DayCardProps {
|
|
|
1341
1346
|
accessibilityHint: string;
|
|
1342
1347
|
badgeTone?: BadgeTone;
|
|
1343
1348
|
badgeFill?: DayBadgeFill;
|
|
1349
|
+
badgeColors?: DayBadgeColors;
|
|
1344
1350
|
badgeIcon?: IconName;
|
|
1345
1351
|
layout?: DayCardLayout;
|
|
1346
1352
|
testID?: string;
|
|
1347
1353
|
children: React.ReactNode;
|
|
1348
1354
|
}
|
|
1349
1355
|
/** 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`). */
|
|
1350
|
-
declare const DayCard: ({ label, badge, count, accessibilityLabel, accessibilityHint, badgeTone, badgeFill, badgeIcon, layout, testID, children, }: DayCardProps) => React.ReactElement;
|
|
1356
|
+
declare const DayCard: ({ label, badge, count, accessibilityLabel, accessibilityHint, badgeTone, badgeFill, badgeColors, badgeIcon, layout, testID, children, }: DayCardProps) => React.ReactElement;
|
|
1351
1357
|
|
|
1352
1358
|
/** The style of one figure cell: an equal share of the strip when wide, half a row when narrow; span widens it. */
|
|
1353
1359
|
declare function figureCell(wide: boolean, span?: number): StyleProp<ViewStyle>;
|
|
@@ -1608,4 +1614,4 @@ interface ListDetailVisibility {
|
|
|
1608
1614
|
/** Wide shows both panes; narrow shows one, the detail only when asked for and present. */
|
|
1609
1615
|
declare function resolveListDetailPanes(wide: boolean, narrowPane: ListDetailPane, hasDetail: boolean): ListDetailVisibility;
|
|
1610
1616
|
|
|
1611
|
-
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeSize, 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, SPY_ACTIVATION_RATIO, SPY_CLICK_LOCK_MS, type ScaledFrame, ScreenColumn, type ScreenColumnProps, type ScrollSpyControl, type ScrollSpyOptions, Section, SectionChips, type SectionChipsProps, SectionDensity, type SectionFold, 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, type StickyIndexConfig, 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, pickActiveIndex, resolveActiveKey, resolveListDetailPanes, resolveRowLook, resolveTintColors, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useScrollSpy, useVisibleViewport };
|
|
1617
|
+
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeSize, 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, type DayBadgeColors, 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, SPY_ACTIVATION_RATIO, SPY_CLICK_LOCK_MS, type ScaledFrame, ScreenColumn, type ScreenColumnProps, type ScrollSpyControl, type ScrollSpyOptions, Section, SectionChips, type SectionChipsProps, SectionDensity, type SectionFold, 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, type StickyIndexConfig, 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, pickActiveIndex, resolveActiveKey, resolveListDetailPanes, resolveRowLook, resolveTintColors, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useScrollSpy, useVisibleViewport };
|
package/dist/index.js
CHANGED
|
@@ -1014,6 +1014,7 @@ var styles11 = reactNative.StyleSheet.create({
|
|
|
1014
1014
|
track: {
|
|
1015
1015
|
flexDirection: "row",
|
|
1016
1016
|
alignSelf: "flex-start",
|
|
1017
|
+
maxWidth: "100%",
|
|
1017
1018
|
alignItems: "center",
|
|
1018
1019
|
gap: TRACK_PADDING + 1,
|
|
1019
1020
|
padding: TRACK_PADDING,
|
|
@@ -1021,6 +1022,7 @@ var styles11 = reactNative.StyleSheet.create({
|
|
|
1021
1022
|
borderWidth: BORDER_WIDTH
|
|
1022
1023
|
},
|
|
1023
1024
|
segment: {
|
|
1025
|
+
flexShrink: 1,
|
|
1024
1026
|
minHeight: MIN_TARGET_PX,
|
|
1025
1027
|
justifyContent: "center",
|
|
1026
1028
|
paddingHorizontal: SEGMENT_PAD_H,
|
|
@@ -3765,6 +3767,7 @@ var DayCard = ({
|
|
|
3765
3767
|
accessibilityHint,
|
|
3766
3768
|
badgeTone = "warning" /* Warning */,
|
|
3767
3769
|
badgeFill = "solid" /* Solid */,
|
|
3770
|
+
badgeColors,
|
|
3768
3771
|
badgeIcon,
|
|
3769
3772
|
layout = "grouped" /* Grouped */,
|
|
3770
3773
|
testID,
|
|
@@ -3772,7 +3775,7 @@ var DayCard = ({
|
|
|
3772
3775
|
}) => {
|
|
3773
3776
|
const { theme } = uiFeedback.useUi();
|
|
3774
3777
|
const { colors } = theme;
|
|
3775
|
-
const tint = badgeFill === "tint" /* Tint */ ? resolveTintColors(theme, badgeTone) : void 0;
|
|
3778
|
+
const tint = badgeColors ?? (badgeFill === "tint" /* Tint */ ? resolveTintColors(theme, badgeTone) : void 0);
|
|
3776
3779
|
const surface = { backgroundColor: colors.surface, borderColor: colors.border };
|
|
3777
3780
|
const iconInk = tint?.color ?? colors.textSecondary;
|
|
3778
3781
|
const icon = badgeIcon === void 0 ? void 0 : /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: iconInk, name: badgeIcon, size: BADGE_ICON_SIZE });
|