@dloizides/ui-layout 1.51.0 → 1.52.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 +4 -0
- package/dist/index.d.mts +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.js +84 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +84 -49
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.52.0
|
|
4
|
+
|
|
5
|
+
- MODC-1 D-MC-705 "Chip jump row for the applicant page", UI-PKG-FIRST-1. `UnderlineTabs` takes `variant` (`TabsVariant` Underline, the default, or Chips): Chips draws each tab as a pill (selected = filled with the theme text colour and background ink, others = 1 px border outline, radius full, >= 44 px hit box) with the count after the label. `chipOverflow` (`ChipOverflow`, default Scroll) scrolls the row sideways at 360 with the end-edge fade, or Wrap wraps it. Every chip keeps role tab with the selected state as `accessibilityState` and `aria-selected`; the row is one labelled tablist.
|
|
6
|
+
|
|
3
7
|
## 1.51.0
|
|
4
8
|
|
|
5
9
|
- INV-BILLS-1 D-BILLS-9 "Every Bills UI part is shared", UI-ATOMIC-1. New molecule `CopyValueRow` (label, value, copy button that shows copied / failed through `useCopyToClipboard`; `emphasis` `CopyRowEmphasis` inline or prominent with a wide button; `copyValue` copies a different string than shown, e.g. an IBAN without spaces; `monospace`). New organism `TransferSlip` (amount and recipient lead, copy rows as children, optional `footer`). New molecule `TotalsStrip` (`TotalsItem[]` over `FigureStrip`, `TotalsTone.Alert` colours the value). New organism `ListDetailLayout` (list beside the chosen record from the breakpoint, one pane below it chosen by `narrowPane` `ListDetailPane`; `resolveListDetailPanes`). All labels are pre-localized props.
|
package/dist/index.d.mts
CHANGED
|
@@ -1355,6 +1355,11 @@ interface IdChipProps {
|
|
|
1355
1355
|
/** An id chip: label and monospace value inside one box with a copy glyph; pressing it copies the full value */
|
|
1356
1356
|
declare const IdChip: ({ label, value, testID, accessibilityLabel, accessibilityHint, display, valueTestID, writer }: IdChipProps) => React.ReactElement;
|
|
1357
1357
|
|
|
1358
|
+
declare enum TabsVariant {
|
|
1359
|
+
Underline = "underline",
|
|
1360
|
+
Chips = "chips"
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1358
1363
|
interface UnderlineTab {
|
|
1359
1364
|
key: string;
|
|
1360
1365
|
label: string;
|
|
@@ -1362,6 +1367,7 @@ interface UnderlineTab {
|
|
|
1362
1367
|
testID?: string;
|
|
1363
1368
|
accessibilityHint?: string;
|
|
1364
1369
|
}
|
|
1370
|
+
|
|
1365
1371
|
interface UnderlineTabsProps {
|
|
1366
1372
|
tabs: ReadonlyArray<UnderlineTab>;
|
|
1367
1373
|
activeKey: string;
|
|
@@ -1371,9 +1377,11 @@ interface UnderlineTabsProps {
|
|
|
1371
1377
|
underlineColor?: string;
|
|
1372
1378
|
fadeColor?: string;
|
|
1373
1379
|
testID?: string;
|
|
1380
|
+
variant?: TabsVariant;
|
|
1381
|
+
chipOverflow?: ChipOverflow;
|
|
1374
1382
|
}
|
|
1375
|
-
/** A full-width tab strip
|
|
1376
|
-
declare const UnderlineTabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID }: UnderlineTabsProps) => React.ReactElement;
|
|
1383
|
+
/** A full-width tab strip: underline tabs (default) or a pill-chip jump row (`variant` Chips), with an optional count per tab. */
|
|
1384
|
+
declare const UnderlineTabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant, chipOverflow }: UnderlineTabsProps) => React.ReactElement;
|
|
1377
1385
|
|
|
1378
1386
|
interface WidgetCardProps {
|
|
1379
1387
|
title: string;
|
|
@@ -1474,4 +1482,4 @@ interface ListDetailVisibility {
|
|
|
1474
1482
|
/** Wide shows both panes; narrow shows one, the detail only when asked for and present. */
|
|
1475
1483
|
declare function resolveListDetailPanes(wide: boolean, narrowPane: ListDetailPane, hasDetail: boolean): ListDetailVisibility;
|
|
1476
1484
|
|
|
1477
|
-
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, CopyRowEmphasis, CopyStatus, type CopyToClipboard, type CopyValueLabels, CopyValueRow, type CopyValueRowProps, CopyableId, type CopyableIdProps, CountBadge, type CountBadgeProps, DEFAULT_BILLING_ROUTE, 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, type PageSize, RecordActionButton, type RecordActionButtonProps, RecordHeader, type RecordHeaderProps, type RowLook, type RowPalette, RowSelectedStyle, type RowSelection, type RowSelectionKeys, type RowState, SECTION_INDEX_BREAKPOINT, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, SectionChips, type SectionChipsProps, SectionDensity, SectionIndex, type SectionIndexEntry, SectionIndexLayout, type SectionIndexLayoutProps, type SectionIndexProps, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, SideSheet, type SideSheetProps, SplitLayout, SplitPanes, type SplitPanesProps, StatusBadge, type StatusBadgeProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, 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, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
|
1485
|
+
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, CopyRowEmphasis, CopyStatus, type CopyToClipboard, type CopyValueLabels, CopyValueRow, type CopyValueRowProps, CopyableId, type CopyableIdProps, CountBadge, type CountBadgeProps, DEFAULT_BILLING_ROUTE, 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, type PageSize, RecordActionButton, type RecordActionButtonProps, RecordHeader, type RecordHeaderProps, type RowLook, type RowPalette, RowSelectedStyle, type RowSelection, type RowSelectionKeys, type RowState, SECTION_INDEX_BREAKPOINT, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, SectionChips, type SectionChipsProps, SectionDensity, SectionIndex, type SectionIndexEntry, SectionIndexLayout, type SectionIndexLayoutProps, type SectionIndexProps, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, SideSheet, type SideSheetProps, SplitLayout, SplitPanes, type SplitPanesProps, StatusBadge, type StatusBadgeProps, 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, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
package/dist/index.d.ts
CHANGED
|
@@ -1355,6 +1355,11 @@ interface IdChipProps {
|
|
|
1355
1355
|
/** An id chip: label and monospace value inside one box with a copy glyph; pressing it copies the full value */
|
|
1356
1356
|
declare const IdChip: ({ label, value, testID, accessibilityLabel, accessibilityHint, display, valueTestID, writer }: IdChipProps) => React.ReactElement;
|
|
1357
1357
|
|
|
1358
|
+
declare enum TabsVariant {
|
|
1359
|
+
Underline = "underline",
|
|
1360
|
+
Chips = "chips"
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1358
1363
|
interface UnderlineTab {
|
|
1359
1364
|
key: string;
|
|
1360
1365
|
label: string;
|
|
@@ -1362,6 +1367,7 @@ interface UnderlineTab {
|
|
|
1362
1367
|
testID?: string;
|
|
1363
1368
|
accessibilityHint?: string;
|
|
1364
1369
|
}
|
|
1370
|
+
|
|
1365
1371
|
interface UnderlineTabsProps {
|
|
1366
1372
|
tabs: ReadonlyArray<UnderlineTab>;
|
|
1367
1373
|
activeKey: string;
|
|
@@ -1371,9 +1377,11 @@ interface UnderlineTabsProps {
|
|
|
1371
1377
|
underlineColor?: string;
|
|
1372
1378
|
fadeColor?: string;
|
|
1373
1379
|
testID?: string;
|
|
1380
|
+
variant?: TabsVariant;
|
|
1381
|
+
chipOverflow?: ChipOverflow;
|
|
1374
1382
|
}
|
|
1375
|
-
/** A full-width tab strip
|
|
1376
|
-
declare const UnderlineTabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID }: UnderlineTabsProps) => React.ReactElement;
|
|
1383
|
+
/** A full-width tab strip: underline tabs (default) or a pill-chip jump row (`variant` Chips), with an optional count per tab. */
|
|
1384
|
+
declare const UnderlineTabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant, chipOverflow }: UnderlineTabsProps) => React.ReactElement;
|
|
1377
1385
|
|
|
1378
1386
|
interface WidgetCardProps {
|
|
1379
1387
|
title: string;
|
|
@@ -1474,4 +1482,4 @@ interface ListDetailVisibility {
|
|
|
1474
1482
|
/** Wide shows both panes; narrow shows one, the detail only when asked for and present. */
|
|
1475
1483
|
declare function resolveListDetailPanes(wide: boolean, narrowPane: ListDetailPane, hasDetail: boolean): ListDetailVisibility;
|
|
1476
1484
|
|
|
1477
|
-
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, CopyRowEmphasis, CopyStatus, type CopyToClipboard, type CopyValueLabels, CopyValueRow, type CopyValueRowProps, CopyableId, type CopyableIdProps, CountBadge, type CountBadgeProps, DEFAULT_BILLING_ROUTE, 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, type PageSize, RecordActionButton, type RecordActionButtonProps, RecordHeader, type RecordHeaderProps, type RowLook, type RowPalette, RowSelectedStyle, type RowSelection, type RowSelectionKeys, type RowState, SECTION_INDEX_BREAKPOINT, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, SectionChips, type SectionChipsProps, SectionDensity, SectionIndex, type SectionIndexEntry, SectionIndexLayout, type SectionIndexLayoutProps, type SectionIndexProps, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, SideSheet, type SideSheetProps, SplitLayout, SplitPanes, type SplitPanesProps, StatusBadge, type StatusBadgeProps, StickyPreview, type StickyPreviewProps, TYPE_SCALE_BREAKPOINT, type TabDescriptor, Tabs, TabsCollapsedTrigger, type TabsProps, 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, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
|
1485
|
+
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, CopyRowEmphasis, CopyStatus, type CopyToClipboard, type CopyValueLabels, CopyValueRow, type CopyValueRowProps, CopyableId, type CopyableIdProps, CountBadge, type CountBadgeProps, DEFAULT_BILLING_ROUTE, 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, type PageSize, RecordActionButton, type RecordActionButtonProps, RecordHeader, type RecordHeaderProps, type RowLook, type RowPalette, RowSelectedStyle, type RowSelection, type RowSelectionKeys, type RowState, SECTION_INDEX_BREAKPOINT, type ScaledFrame, ScreenColumn, type ScreenColumnProps, Section, SectionChips, type SectionChipsProps, SectionDensity, SectionIndex, type SectionIndexEntry, SectionIndexLayout, type SectionIndexLayoutProps, type SectionIndexProps, type SectionProps, SectionVariant, SegmentedControl, type SegmentedControlProps, type SegmentedOption, SelectedMarker, SideSheet, type SideSheetProps, SplitLayout, SplitPanes, type SplitPanesProps, StatusBadge, type StatusBadgeProps, 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, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
package/dist/index.js
CHANGED
|
@@ -3689,46 +3689,81 @@ function useEdgeFade() {
|
|
|
3689
3689
|
}
|
|
3690
3690
|
var UNDERLINE = 3;
|
|
3691
3691
|
var PAD_H4 = 12;
|
|
3692
|
+
var CHIP_PAD_H = 16;
|
|
3692
3693
|
var GAP6 = 6;
|
|
3693
3694
|
var FONT_SIZE4 = 14;
|
|
3694
3695
|
var COUNT_FONT = 12;
|
|
3695
3696
|
var COUNT_MIN = 22;
|
|
3696
3697
|
var COUNT_PAD = 6;
|
|
3697
3698
|
var PILL = 999;
|
|
3698
|
-
var DEFAULT_UNDERLINE_STEP = "700";
|
|
3699
|
-
var SCROLL_THROTTLE_MS = 16;
|
|
3700
3699
|
var styles40 = reactNative.StyleSheet.create({
|
|
3700
|
+
chip: { alignItems: "center", borderRadius: PILL, borderWidth: 1, flexDirection: "row", gap: GAP6, justifyContent: "center", minHeight: MIN_TARGET_PX, minWidth: MIN_TARGET_PX, paddingHorizontal: CHIP_PAD_H },
|
|
3701
|
+
chipCount: { fontSize: FONT_SIZE4, fontWeight: "700" },
|
|
3701
3702
|
count: { borderRadius: PILL, fontSize: COUNT_FONT, fontWeight: "700", minWidth: COUNT_MIN, paddingHorizontal: COUNT_PAD, textAlign: "center" },
|
|
3702
3703
|
label: { fontSize: FONT_SIZE4, fontWeight: "600" },
|
|
3703
|
-
strip: { borderBottomWidth: 1, position: "relative", width: "100%" },
|
|
3704
3704
|
tab: { alignItems: "center", borderBottomWidth: UNDERLINE, flexDirection: "row", gap: GAP6, justifyContent: "center", minHeight: MIN_TARGET_PX, minWidth: MIN_TARGET_PX, paddingHorizontal: PAD_H4 }
|
|
3705
3705
|
});
|
|
3706
|
-
var
|
|
3706
|
+
var TabPressable = ({ tab, selected, onChange, style, children }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3707
|
+
reactNative.Pressable,
|
|
3708
|
+
{
|
|
3709
|
+
accessibilityHint: tab.accessibilityHint,
|
|
3710
|
+
accessibilityLabel: tab.label,
|
|
3711
|
+
accessibilityRole: "tab",
|
|
3712
|
+
accessibilityState: { selected },
|
|
3713
|
+
"aria-selected": selected,
|
|
3714
|
+
style,
|
|
3715
|
+
testID: tab.testID,
|
|
3716
|
+
onPress: () => onChange(tab.key),
|
|
3717
|
+
children
|
|
3718
|
+
}
|
|
3719
|
+
);
|
|
3720
|
+
var UnderlineTabItem = ({ underline, ...item }) => {
|
|
3721
|
+
const { theme } = uiFeedback.useUi();
|
|
3722
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(TabPressable, { ...item, style: [styles40.tab, { borderBottomColor: item.selected ? underline : "transparent" }], children: [
|
|
3723
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles40.label, { color: item.selected ? theme.colors.text : theme.colors.textSecondary }], children: item.tab.label }),
|
|
3724
|
+
item.tab.count === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles40.count, { backgroundColor: theme.colors.border, color: theme.colors.text }], children: String(item.tab.count) })
|
|
3725
|
+
] });
|
|
3726
|
+
};
|
|
3727
|
+
var ChipTabItem = (item) => {
|
|
3728
|
+
const { theme } = uiFeedback.useUi();
|
|
3729
|
+
const fill = item.selected ? theme.colors.text : "transparent";
|
|
3730
|
+
const ink = item.selected ? theme.colors.background : theme.colors.text;
|
|
3731
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(TabPressable, { ...item, style: [styles40.chip, { backgroundColor: fill, borderColor: item.selected ? theme.colors.text : theme.colors.border }], children: [
|
|
3732
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles40.label, { color: ink }], children: item.tab.label }),
|
|
3733
|
+
item.tab.count === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles40.chipCount, { color: ink }], children: String(item.tab.count) })
|
|
3734
|
+
] });
|
|
3735
|
+
};
|
|
3736
|
+
|
|
3737
|
+
// src/Tabs/TabsVariant.ts
|
|
3738
|
+
var TabsVariant = /* @__PURE__ */ ((TabsVariant2) => {
|
|
3739
|
+
TabsVariant2["Underline"] = "underline";
|
|
3740
|
+
TabsVariant2["Chips"] = "chips";
|
|
3741
|
+
return TabsVariant2;
|
|
3742
|
+
})(TabsVariant || {});
|
|
3743
|
+
var DEFAULT_UNDERLINE_STEP = "700";
|
|
3744
|
+
var SCROLL_THROTTLE_MS = 16;
|
|
3745
|
+
var CHIP_GAP = 8;
|
|
3746
|
+
var CHIP_PAD_V = 4;
|
|
3747
|
+
var styles41 = reactNative.StyleSheet.create({
|
|
3748
|
+
chipRow: { alignItems: "center", flexDirection: "row", gap: CHIP_GAP, paddingVertical: CHIP_PAD_V },
|
|
3749
|
+
chipWrap: { flexWrap: "wrap" },
|
|
3750
|
+
strip: { position: "relative", width: "100%" }
|
|
3751
|
+
});
|
|
3752
|
+
var UnderlineTabs = ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant = "underline" /* Underline */, chipOverflow = "scroll" /* Scroll */ }) => {
|
|
3707
3753
|
const { theme } = uiFeedback.useUi();
|
|
3708
3754
|
const underline = underlineColor ?? theme.palette.primary[DEFAULT_UNDERLINE_STEP];
|
|
3709
3755
|
const fade = useEdgeFade();
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
style: [styles40.tab, { borderBottomColor: selected ? underline : "transparent" }],
|
|
3722
|
-
testID: tab.testID,
|
|
3723
|
-
onPress: () => onChange(tab.key),
|
|
3724
|
-
children: [
|
|
3725
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles40.label, { color: selected ? theme.colors.text : theme.colors.textSecondary }], children: tab.label }),
|
|
3726
|
-
tab.count === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles40.count, { backgroundColor: theme.colors.border, color: theme.colors.text }], children: String(tab.count) })
|
|
3727
|
-
]
|
|
3728
|
-
},
|
|
3729
|
-
tab.key
|
|
3730
|
-
);
|
|
3731
|
-
}) }),
|
|
3756
|
+
const chips = variant === "chips" /* Chips */;
|
|
3757
|
+
const items = tabs.map((tab) => {
|
|
3758
|
+
const item = { tab, selected: tab.key === activeKey, onChange };
|
|
3759
|
+
return chips ? /* @__PURE__ */ jsxRuntime.jsx(ChipTabItem, { ...item }, tab.key) : /* @__PURE__ */ jsxRuntime.jsx(UnderlineTabItem, { ...item, underline }, tab.key);
|
|
3760
|
+
});
|
|
3761
|
+
const stripStyle = chips ? styles41.strip : [styles41.strip, { borderBottomColor: theme.colors.border, borderBottomWidth: 1 }];
|
|
3762
|
+
if (chips && chipOverflow === "wrap" /* Wrap */) {
|
|
3763
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityHint, accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles41.chipRow, styles41.chipWrap], testID, children: items });
|
|
3764
|
+
}
|
|
3765
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: stripStyle, testID, children: [
|
|
3766
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { horizontal: true, accessibilityHint, accessibilityRole: "tablist", "aria-label": accessibilityLabel, contentContainerStyle: chips ? styles41.chipRow : void 0, scrollEventThrottle: SCROLL_THROTTLE_MS, showsHorizontalScrollIndicator: false, onContentSizeChange: fade.onContentSizeChange, onLayout: fade.onLayout, onScroll: fade.onScroll, children: items }),
|
|
3732
3767
|
fade.visible ? /* @__PURE__ */ jsxRuntime.jsx(EdgeFadeStrip, { color: fadeColor ?? theme.colors.background }) : null
|
|
3733
3768
|
] });
|
|
3734
3769
|
};
|
|
@@ -3736,7 +3771,7 @@ var RADIUS3 = 12;
|
|
|
3736
3771
|
var PAD = 16;
|
|
3737
3772
|
var GAP7 = 8;
|
|
3738
3773
|
var TITLE_FONT = 15;
|
|
3739
|
-
var
|
|
3774
|
+
var styles42 = reactNative.StyleSheet.create({
|
|
3740
3775
|
card: { borderRadius: RADIUS3, borderWidth: 1, gap: GAP7, minWidth: 0, padding: PAD },
|
|
3741
3776
|
footer: { alignItems: "flex-start", flexDirection: "row", flexWrap: "wrap", gap: GAP7 },
|
|
3742
3777
|
head: { alignItems: "center", flexDirection: "row", gap: GAP7 },
|
|
@@ -3744,14 +3779,14 @@ var styles41 = reactNative.StyleSheet.create({
|
|
|
3744
3779
|
});
|
|
3745
3780
|
var WidgetCard = ({ title, children, icon, headerRight, footer, testID }) => {
|
|
3746
3781
|
const { theme } = uiFeedback.useUi();
|
|
3747
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
3748
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3782
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles42.card, { backgroundColor: theme.colors.surfaceElevated, borderColor: theme.colors.border }], testID, children: [
|
|
3783
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles42.head, children: [
|
|
3749
3784
|
icon === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, children: icon }),
|
|
3750
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [
|
|
3785
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [styles42.title, { color: theme.colors.text }], children: title }),
|
|
3751
3786
|
headerRight
|
|
3752
3787
|
] }),
|
|
3753
3788
|
children,
|
|
3754
|
-
footer === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3789
|
+
footer === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles42.footer, children: footer })
|
|
3755
3790
|
] });
|
|
3756
3791
|
};
|
|
3757
3792
|
var LEAD_LABEL_SIZE = 14;
|
|
@@ -3763,7 +3798,7 @@ var GAP8 = 12;
|
|
|
3763
3798
|
var LEAD_GAP = 4;
|
|
3764
3799
|
var LEAD_BORDER = 1.5;
|
|
3765
3800
|
var ACCENT_STEP = "500";
|
|
3766
|
-
var
|
|
3801
|
+
var styles43 = reactNative.StyleSheet.create({
|
|
3767
3802
|
slip: { gap: GAP8, width: "100%" },
|
|
3768
3803
|
lead: { padding: LEAD_PAD, borderRadius: LEAD_RADIUS, borderWidth: LEAD_BORDER, gap: LEAD_GAP },
|
|
3769
3804
|
leadLabel: { fontSize: LEAD_LABEL_SIZE },
|
|
@@ -3775,13 +3810,13 @@ var TransferSlip = ({ leadLabel, amount, recipient, children, footer, testID })
|
|
|
3775
3810
|
const { theme } = uiFeedback.useUi();
|
|
3776
3811
|
const { colors } = theme;
|
|
3777
3812
|
const accent = theme.palette.primary[ACCENT_STEP];
|
|
3778
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3779
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
3780
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3781
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3782
|
-
recipient !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3813
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles43.slip, testID, children: [
|
|
3814
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles43.lead, { borderColor: accent, backgroundColor: colors.surface }], testID: `${testID}-lead`, children: [
|
|
3815
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.leadLabel, { color: colors.textSecondary }], children: leadLabel }),
|
|
3816
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.amount, { color: colors.text }], testID: `${testID}-amount`, children: amount }),
|
|
3817
|
+
recipient !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.recipient, { color: colors.text }], children: recipient })
|
|
3783
3818
|
] }),
|
|
3784
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3819
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles43.rows, children }),
|
|
3785
3820
|
footer
|
|
3786
3821
|
] });
|
|
3787
3822
|
};
|
|
@@ -3807,7 +3842,7 @@ var STACK_GAP = 8;
|
|
|
3807
3842
|
var ROW_PAD = 10;
|
|
3808
3843
|
var TEXT_GAP = 2;
|
|
3809
3844
|
var MONO_SPACING = 1;
|
|
3810
|
-
var
|
|
3845
|
+
var styles44 = reactNative.StyleSheet.create({
|
|
3811
3846
|
inline: { flexDirection: "row", alignItems: "center", gap: ROW_GAP3, paddingVertical: ROW_PAD, borderTopWidth: reactNative.StyleSheet.hairlineWidth },
|
|
3812
3847
|
prominent: { gap: STACK_GAP, paddingVertical: ROW_PAD },
|
|
3813
3848
|
text: { flex: 1, minWidth: 0, gap: TEXT_GAP },
|
|
@@ -3830,10 +3865,10 @@ var CopyValueRow = ({
|
|
|
3830
3865
|
const { status, copy } = useCopyToClipboard(copyValue ?? value, writer);
|
|
3831
3866
|
const action = copyActionLabel(status, labels);
|
|
3832
3867
|
const prominent = emphasis === "prominent" /* Prominent */;
|
|
3833
|
-
const valueStyle = prominent || monospace ?
|
|
3834
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: prominent ?
|
|
3835
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3836
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3868
|
+
const valueStyle = prominent || monospace ? styles44.big : styles44.value;
|
|
3869
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: prominent ? styles44.prominent : [styles44.inline, { borderTopColor: colors.border }], testID, children: [
|
|
3870
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles44.text, children: [
|
|
3871
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles44.label, { color: colors.textSecondary }], children: label }),
|
|
3837
3872
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { selectable: true, style: [valueStyle, { color: colors.text }], testID: `${testID}-value`, children: value })
|
|
3838
3873
|
] }),
|
|
3839
3874
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3865,7 +3900,7 @@ var TILE_PAD = 12;
|
|
|
3865
3900
|
var TILE_RADIUS = 10;
|
|
3866
3901
|
var TILE_GAP = 2;
|
|
3867
3902
|
var ALERT_STEP = "500";
|
|
3868
|
-
var
|
|
3903
|
+
var styles45 = reactNative.StyleSheet.create({
|
|
3869
3904
|
tile: { padding: TILE_PAD, borderRadius: TILE_RADIUS, borderWidth: reactNative.StyleSheet.hairlineWidth, gap: TILE_GAP },
|
|
3870
3905
|
label: { fontSize: LABEL_SIZE2, fontWeight: "600" },
|
|
3871
3906
|
value: { fontSize: VALUE_SIZE2, fontWeight: "700" },
|
|
@@ -3879,19 +3914,19 @@ var TotalsStrip = ({ items, breakpoint = LAYOUT_COLLAPSE_BREAKPOINT, testID }) =
|
|
|
3879
3914
|
return /* @__PURE__ */ jsxRuntime.jsx(FigureStrip, { testID, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3880
3915
|
reactNative.View,
|
|
3881
3916
|
{
|
|
3882
|
-
style: [
|
|
3917
|
+
style: [styles45.tile, figureCell(wide), { borderColor: colors.border, backgroundColor: colors.surfaceElevated }],
|
|
3883
3918
|
testID: `${testID}-${item.key}`,
|
|
3884
3919
|
children: [
|
|
3885
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3920
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles45.label, { color: colors.textSecondary }], children: item.label }),
|
|
3886
3921
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3887
3922
|
reactNative.Text,
|
|
3888
3923
|
{
|
|
3889
|
-
style: [
|
|
3924
|
+
style: [styles45.value, { color: item.tone === "alert" /* Alert */ ? theme.semantic.error[ALERT_STEP] : colors.text }],
|
|
3890
3925
|
testID: `${testID}-${item.key}-value`,
|
|
3891
3926
|
children: item.value
|
|
3892
3927
|
}
|
|
3893
3928
|
),
|
|
3894
|
-
item.caption !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3929
|
+
item.caption !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles45.caption, { color: colors.textSecondary }], children: item.caption })
|
|
3895
3930
|
]
|
|
3896
3931
|
},
|
|
3897
3932
|
item.key
|
|
@@ -3991,6 +4026,7 @@ exports.StickyPreview = StickyPreview;
|
|
|
3991
4026
|
exports.TYPE_SCALE_BREAKPOINT = TYPE_SCALE_BREAKPOINT;
|
|
3992
4027
|
exports.Tabs = Tabs;
|
|
3993
4028
|
exports.TabsCollapsedTrigger = TabsCollapsedTrigger;
|
|
4029
|
+
exports.TabsVariant = TabsVariant;
|
|
3994
4030
|
exports.TextKind = TextKind;
|
|
3995
4031
|
exports.Timeline = Timeline;
|
|
3996
4032
|
exports.ToggleSection = ToggleSection;
|