@dloizides/ui-layout 1.57.0 → 1.58.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 +13 -4
- package/dist/index.d.ts +13 -4
- package/dist/index.js +26 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -11
- 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>;
|
|
@@ -1443,9 +1450,11 @@ interface UnderlineTabsProps {
|
|
|
1443
1450
|
testID?: string;
|
|
1444
1451
|
variant?: TabsVariant;
|
|
1445
1452
|
chipOverflow?: ChipOverflow;
|
|
1453
|
+
activeFillColor?: string;
|
|
1454
|
+
activeTextColor?: string;
|
|
1446
1455
|
}
|
|
1447
1456
|
/** 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;
|
|
1457
|
+
declare const UnderlineTabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant, chipOverflow, activeFillColor, activeTextColor }: UnderlineTabsProps) => React.ReactElement;
|
|
1449
1458
|
|
|
1450
1459
|
interface WidgetCardProps {
|
|
1451
1460
|
title: string;
|
|
@@ -1553,4 +1562,4 @@ interface ListDetailVisibility {
|
|
|
1553
1562
|
/** Wide shows both panes; narrow shows one, the detail only when asked for and present. */
|
|
1554
1563
|
declare function resolveListDetailPanes(wide: boolean, narrowPane: ListDetailPane, hasDetail: boolean): ListDetailVisibility;
|
|
1555
1564
|
|
|
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 };
|
|
1565
|
+
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>;
|
|
@@ -1443,9 +1450,11 @@ interface UnderlineTabsProps {
|
|
|
1443
1450
|
testID?: string;
|
|
1444
1451
|
variant?: TabsVariant;
|
|
1445
1452
|
chipOverflow?: ChipOverflow;
|
|
1453
|
+
activeFillColor?: string;
|
|
1454
|
+
activeTextColor?: string;
|
|
1446
1455
|
}
|
|
1447
1456
|
/** 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;
|
|
1457
|
+
declare const UnderlineTabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant, chipOverflow, activeFillColor, activeTextColor }: UnderlineTabsProps) => React.ReactElement;
|
|
1449
1458
|
|
|
1450
1459
|
interface WidgetCardProps {
|
|
1451
1460
|
title: string;
|
|
@@ -1553,4 +1562,4 @@ interface ListDetailVisibility {
|
|
|
1553
1562
|
/** Wide shows both panes; narrow shows one, the detail only when asked for and present. */
|
|
1554
1563
|
declare function resolveListDetailPanes(wide: boolean, narrowPane: ListDetailPane, hasDetail: boolean): ListDetailVisibility;
|
|
1555
1564
|
|
|
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 };
|
|
1565
|
+
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({
|
|
@@ -3853,19 +3866,21 @@ var TabPressable = ({ tab, selected, onChange, style, children }) => /* @__PURE_
|
|
|
3853
3866
|
children
|
|
3854
3867
|
}
|
|
3855
3868
|
);
|
|
3856
|
-
var UnderlineTabItem = ({ underline, ...item }) => {
|
|
3869
|
+
var UnderlineTabItem = ({ underline, activeText, ...item }) => {
|
|
3857
3870
|
const { theme } = uiFeedback.useUi();
|
|
3871
|
+
const selectedInk = activeText ?? theme.colors.text;
|
|
3858
3872
|
return /* @__PURE__ */ jsxRuntime.jsxs(TabPressable, { ...item, style: [styles43.tab, { borderBottomColor: item.selected ? underline : "transparent" }], children: [
|
|
3859
3873
|
item.tab.icon ?? null,
|
|
3860
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.label, { color: item.selected ?
|
|
3874
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.label, { color: item.selected ? selectedInk : theme.colors.textSecondary }], children: item.tab.label }),
|
|
3861
3875
|
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
3876
|
] });
|
|
3863
3877
|
};
|
|
3864
|
-
var ChipTabItem = (item) => {
|
|
3878
|
+
var ChipTabItem = ({ activeFill, activeText, ...item }) => {
|
|
3865
3879
|
const { theme } = uiFeedback.useUi();
|
|
3866
|
-
const
|
|
3867
|
-
const
|
|
3868
|
-
|
|
3880
|
+
const selectedFill = activeFill ?? theme.colors.text;
|
|
3881
|
+
const fill = item.selected ? selectedFill : "transparent";
|
|
3882
|
+
const ink = item.selected ? activeText ?? theme.colors.background : theme.colors.text;
|
|
3883
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(TabPressable, { ...item, style: [styles43.chip, { backgroundColor: fill, borderColor: item.selected ? selectedFill : theme.colors.border }], children: [
|
|
3869
3884
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.label, { color: ink }], children: item.tab.label }),
|
|
3870
3885
|
item.tab.count === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles43.chipCount, { color: ink }], children: String(item.tab.count) })
|
|
3871
3886
|
] });
|
|
@@ -3886,14 +3901,14 @@ var styles44 = reactNative.StyleSheet.create({
|
|
|
3886
3901
|
chipWrap: { flexWrap: "wrap" },
|
|
3887
3902
|
strip: { position: "relative", width: "100%" }
|
|
3888
3903
|
});
|
|
3889
|
-
var UnderlineTabs = ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant = "underline" /* Underline */, chipOverflow = "scroll" /* Scroll
|
|
3904
|
+
var UnderlineTabs = ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant = "underline" /* Underline */, chipOverflow = "scroll" /* Scroll */, activeFillColor, activeTextColor }) => {
|
|
3890
3905
|
const { theme } = uiFeedback.useUi();
|
|
3891
3906
|
const underline = underlineColor ?? theme.palette.primary[DEFAULT_UNDERLINE_STEP];
|
|
3892
3907
|
const fade = useEdgeFade();
|
|
3893
3908
|
const chips = variant === "chips" /* Chips */;
|
|
3894
3909
|
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);
|
|
3910
|
+
const item = { tab, selected: tab.key === activeKey, onChange, activeText: activeTextColor };
|
|
3911
|
+
return chips ? /* @__PURE__ */ jsxRuntime.jsx(ChipTabItem, { ...item, activeFill: activeFillColor }, tab.key) : /* @__PURE__ */ jsxRuntime.jsx(UnderlineTabItem, { ...item, underline }, tab.key);
|
|
3897
3912
|
});
|
|
3898
3913
|
const stripStyle = chips ? styles44.strip : [styles44.strip, { borderBottomColor: theme.colors.border, borderBottomWidth: 1 }];
|
|
3899
3914
|
if (chips && chipOverflow === "wrap" /* Wrap */) {
|
|
@@ -4144,6 +4159,7 @@ exports.CountBadge = CountBadge;
|
|
|
4144
4159
|
exports.DEFAULT_BILLING_ROUTE = DEFAULT_BILLING_ROUTE;
|
|
4145
4160
|
exports.DayBadgeFill = DayBadgeFill;
|
|
4146
4161
|
exports.DayCard = DayCard;
|
|
4162
|
+
exports.DayCardLayout = DayCardLayout;
|
|
4147
4163
|
exports.DropdownVariant = DropdownVariant;
|
|
4148
4164
|
exports.ELLIPSIS = ELLIPSIS;
|
|
4149
4165
|
exports.FigureStrip = FigureStrip;
|