@dloizides/ui-layout 1.60.2 → 1.62.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 +20 -4
- package/dist/index.d.ts +20 -4
- package/dist/index.js +40 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -93,6 +93,15 @@ interface ScreenColumnProps {
|
|
|
93
93
|
}
|
|
94
94
|
declare const ScreenColumn: ({ children, narrow }: ScreenColumnProps) => React.ReactElement;
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* StatusBadge box: `Regular` is the default 10x4 px pill with a 12 px radius; `Compact` is the
|
|
98
|
+
* table-cell chip (8x1 px padding, fully round, 17 px line), sized to sit inside a 34 px compact row.
|
|
99
|
+
*/
|
|
100
|
+
declare const enum BadgeSize {
|
|
101
|
+
Regular = "regular",
|
|
102
|
+
Compact = "compact"
|
|
103
|
+
}
|
|
104
|
+
|
|
96
105
|
declare const enum BadgeTone {
|
|
97
106
|
Neutral = "neutral",
|
|
98
107
|
Info = "info",
|
|
@@ -113,11 +122,13 @@ interface StatusBadgeProps {
|
|
|
113
122
|
backgroundColor?: string;
|
|
114
123
|
icon?: React.ReactNode;
|
|
115
124
|
dashed?: boolean;
|
|
125
|
+
/** `BadgeSize.Compact` is the chip for a compact table cell. Default regular. */
|
|
126
|
+
size?: BadgeSize;
|
|
116
127
|
testID?: string;
|
|
117
128
|
accessibilityLabel?: string;
|
|
118
129
|
accessibilityHint?: string;
|
|
119
130
|
}
|
|
120
|
-
declare const StatusBadge: ({ label, tone, color: rawColor, backgroundColor: rawBackground, icon, dashed, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
131
|
+
declare const StatusBadge: ({ label, tone, color: rawColor, backgroundColor: rawBackground, icon, dashed, size, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
121
132
|
|
|
122
133
|
interface ToneColors {
|
|
123
134
|
color: string;
|
|
@@ -1234,6 +1245,11 @@ interface SectionIndexEntry {
|
|
|
1234
1245
|
title: string;
|
|
1235
1246
|
content: React.ReactNode;
|
|
1236
1247
|
}
|
|
1248
|
+
/** Fold widths: from `wide` the index rail shows; from `stackFrom` up to `wide` every section shows stacked, below it chips. */
|
|
1249
|
+
interface SectionFold {
|
|
1250
|
+
wide: number;
|
|
1251
|
+
stackFrom: number;
|
|
1252
|
+
}
|
|
1237
1253
|
|
|
1238
1254
|
interface SectionIndexLayoutProps {
|
|
1239
1255
|
sections: ReadonlyArray<SectionIndexEntry>;
|
|
@@ -1241,7 +1257,7 @@ interface SectionIndexLayoutProps {
|
|
|
1241
1257
|
itemHint: string;
|
|
1242
1258
|
initialKey?: string;
|
|
1243
1259
|
collapsedKey?: string;
|
|
1244
|
-
breakpoint?: number;
|
|
1260
|
+
breakpoint?: number | SectionFold;
|
|
1245
1261
|
density?: SectionDensity;
|
|
1246
1262
|
stickyIndex?: boolean;
|
|
1247
1263
|
chipOverflow?: ChipOverflow;
|
|
@@ -1261,7 +1277,7 @@ interface SectionIndexProps {
|
|
|
1261
1277
|
testID: string;
|
|
1262
1278
|
width?: number;
|
|
1263
1279
|
activeColor?: string;
|
|
1264
|
-
/** Dense: 11/600 heading, 13 px items
|
|
1280
|
+
/** Dense: 11/600 heading, 13/19 px items with 6x10 px padding, 2 px apart. */
|
|
1265
1281
|
dense?: boolean;
|
|
1266
1282
|
}
|
|
1267
1283
|
declare const SectionIndex: ({ sections, activeKey, heading, itemHint, onSelect, testID, width, activeColor, dense }: SectionIndexProps) => React.ReactElement;
|
|
@@ -1570,4 +1586,4 @@ interface ListDetailVisibility {
|
|
|
1570
1586
|
/** Wide shows both panes; narrow shows one, the detail only when asked for and present. */
|
|
1571
1587
|
declare function resolveListDetailPanes(wide: boolean, narrowPane: ListDetailPane, hasDetail: boolean): ListDetailVisibility;
|
|
1572
1588
|
|
|
1573
|
-
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 };
|
|
1589
|
+
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, type ScaledFrame, ScreenColumn, type ScreenColumnProps, 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, 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
|
@@ -93,6 +93,15 @@ interface ScreenColumnProps {
|
|
|
93
93
|
}
|
|
94
94
|
declare const ScreenColumn: ({ children, narrow }: ScreenColumnProps) => React.ReactElement;
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* StatusBadge box: `Regular` is the default 10x4 px pill with a 12 px radius; `Compact` is the
|
|
98
|
+
* table-cell chip (8x1 px padding, fully round, 17 px line), sized to sit inside a 34 px compact row.
|
|
99
|
+
*/
|
|
100
|
+
declare const enum BadgeSize {
|
|
101
|
+
Regular = "regular",
|
|
102
|
+
Compact = "compact"
|
|
103
|
+
}
|
|
104
|
+
|
|
96
105
|
declare const enum BadgeTone {
|
|
97
106
|
Neutral = "neutral",
|
|
98
107
|
Info = "info",
|
|
@@ -113,11 +122,13 @@ interface StatusBadgeProps {
|
|
|
113
122
|
backgroundColor?: string;
|
|
114
123
|
icon?: React.ReactNode;
|
|
115
124
|
dashed?: boolean;
|
|
125
|
+
/** `BadgeSize.Compact` is the chip for a compact table cell. Default regular. */
|
|
126
|
+
size?: BadgeSize;
|
|
116
127
|
testID?: string;
|
|
117
128
|
accessibilityLabel?: string;
|
|
118
129
|
accessibilityHint?: string;
|
|
119
130
|
}
|
|
120
|
-
declare const StatusBadge: ({ label, tone, color: rawColor, backgroundColor: rawBackground, icon, dashed, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
131
|
+
declare const StatusBadge: ({ label, tone, color: rawColor, backgroundColor: rawBackground, icon, dashed, size, testID, accessibilityLabel, accessibilityHint, }: StatusBadgeProps) => React.ReactElement;
|
|
121
132
|
|
|
122
133
|
interface ToneColors {
|
|
123
134
|
color: string;
|
|
@@ -1234,6 +1245,11 @@ interface SectionIndexEntry {
|
|
|
1234
1245
|
title: string;
|
|
1235
1246
|
content: React.ReactNode;
|
|
1236
1247
|
}
|
|
1248
|
+
/** Fold widths: from `wide` the index rail shows; from `stackFrom` up to `wide` every section shows stacked, below it chips. */
|
|
1249
|
+
interface SectionFold {
|
|
1250
|
+
wide: number;
|
|
1251
|
+
stackFrom: number;
|
|
1252
|
+
}
|
|
1237
1253
|
|
|
1238
1254
|
interface SectionIndexLayoutProps {
|
|
1239
1255
|
sections: ReadonlyArray<SectionIndexEntry>;
|
|
@@ -1241,7 +1257,7 @@ interface SectionIndexLayoutProps {
|
|
|
1241
1257
|
itemHint: string;
|
|
1242
1258
|
initialKey?: string;
|
|
1243
1259
|
collapsedKey?: string;
|
|
1244
|
-
breakpoint?: number;
|
|
1260
|
+
breakpoint?: number | SectionFold;
|
|
1245
1261
|
density?: SectionDensity;
|
|
1246
1262
|
stickyIndex?: boolean;
|
|
1247
1263
|
chipOverflow?: ChipOverflow;
|
|
@@ -1261,7 +1277,7 @@ interface SectionIndexProps {
|
|
|
1261
1277
|
testID: string;
|
|
1262
1278
|
width?: number;
|
|
1263
1279
|
activeColor?: string;
|
|
1264
|
-
/** Dense: 11/600 heading, 13 px items
|
|
1280
|
+
/** Dense: 11/600 heading, 13/19 px items with 6x10 px padding, 2 px apart. */
|
|
1265
1281
|
dense?: boolean;
|
|
1266
1282
|
}
|
|
1267
1283
|
declare const SectionIndex: ({ sections, activeKey, heading, itemHint, onSelect, testID, width, activeColor, dense }: SectionIndexProps) => React.ReactElement;
|
|
@@ -1570,4 +1586,4 @@ interface ListDetailVisibility {
|
|
|
1570
1586
|
/** Wide shows both panes; narrow shows one, the detail only when asked for and present. */
|
|
1571
1587
|
declare function resolveListDetailPanes(wide: boolean, narrowPane: ListDetailPane, hasDetail: boolean): ListDetailVisibility;
|
|
1572
1588
|
|
|
1573
|
-
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 };
|
|
1589
|
+
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, type ScaledFrame, ScreenColumn, type ScreenColumnProps, 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, 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
|
@@ -264,6 +264,13 @@ var ScreenColumn = ({ children, narrow = false }) => {
|
|
|
264
264
|
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles3.outer, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles3.column, isWide ? styles3.desktop : styles3.mobile, narrow ? styles3.narrow : styles3.wide], children }) });
|
|
265
265
|
};
|
|
266
266
|
|
|
267
|
+
// src/StatusBadge/BadgeSize.ts
|
|
268
|
+
var BadgeSize = /* @__PURE__ */ ((BadgeSize2) => {
|
|
269
|
+
BadgeSize2["Regular"] = "regular";
|
|
270
|
+
BadgeSize2["Compact"] = "compact";
|
|
271
|
+
return BadgeSize2;
|
|
272
|
+
})(BadgeSize || {});
|
|
273
|
+
|
|
267
274
|
// src/StatusBadge/BadgeTone.ts
|
|
268
275
|
var BadgeTone = /* @__PURE__ */ ((BadgeTone2) => {
|
|
269
276
|
BadgeTone2["Neutral"] = "neutral";
|
|
@@ -347,6 +354,10 @@ var DEFAULT_PADDING_V = 4;
|
|
|
347
354
|
var DEFAULT_BORDER_RADIUS = 12;
|
|
348
355
|
var DEFAULT_FONT_SIZE = 12;
|
|
349
356
|
var ICON_GAP = 4;
|
|
357
|
+
var COMPACT_PADDING_H = 8;
|
|
358
|
+
var COMPACT_PADDING_V = 1;
|
|
359
|
+
var COMPACT_RADIUS = 999;
|
|
360
|
+
var COMPACT_LINE_HEIGHT = 17;
|
|
350
361
|
var styles4 = reactNative.StyleSheet.create({
|
|
351
362
|
badge: {
|
|
352
363
|
paddingHorizontal: DEFAULT_PADDING_H,
|
|
@@ -365,6 +376,14 @@ var styles4 = reactNative.StyleSheet.create({
|
|
|
365
376
|
borderWidth: 1,
|
|
366
377
|
borderStyle: "dashed"
|
|
367
378
|
},
|
|
379
|
+
badgeCompact: {
|
|
380
|
+
paddingHorizontal: COMPACT_PADDING_H,
|
|
381
|
+
paddingVertical: COMPACT_PADDING_V,
|
|
382
|
+
borderRadius: COMPACT_RADIUS
|
|
383
|
+
},
|
|
384
|
+
textCompact: {
|
|
385
|
+
lineHeight: COMPACT_LINE_HEIGHT
|
|
386
|
+
},
|
|
368
387
|
text: {
|
|
369
388
|
fontSize: DEFAULT_FONT_SIZE,
|
|
370
389
|
fontWeight: "600",
|
|
@@ -378,6 +397,7 @@ var StatusBadge = ({
|
|
|
378
397
|
backgroundColor: rawBackground,
|
|
379
398
|
icon,
|
|
380
399
|
dashed = false,
|
|
400
|
+
size = "regular" /* Regular */,
|
|
381
401
|
testID = LAYOUT_TEST_IDS.statusLabel,
|
|
382
402
|
accessibilityLabel,
|
|
383
403
|
accessibilityHint
|
|
@@ -393,16 +413,17 @@ var StatusBadge = ({
|
|
|
393
413
|
const dashedColor = React16.useMemo(() => ({ borderColor: color }), [color]);
|
|
394
414
|
const dynamicText = React16.useMemo(() => ({ color }), [color]);
|
|
395
415
|
const hasIcon = icon !== void 0 && icon !== null;
|
|
416
|
+
const compact = size === "compact" /* Compact */;
|
|
396
417
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
397
418
|
reactNative.View,
|
|
398
419
|
{
|
|
399
420
|
accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.statusBadgeHint),
|
|
400
421
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
401
|
-
style: [styles4.badge, hasIcon && styles4.badgeWithIcon, dynamicBadge, dashed && styles4.badgeDashed, dashed && dashedColor],
|
|
422
|
+
style: [styles4.badge, compact && styles4.badgeCompact, hasIcon && styles4.badgeWithIcon, dynamicBadge, dashed && styles4.badgeDashed, dashed && dashedColor],
|
|
402
423
|
testID,
|
|
403
424
|
children: [
|
|
404
425
|
hasIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, children: icon }) : null,
|
|
405
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles4.text, dynamicText], children: label })
|
|
426
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles4.text, compact && styles4.textCompact, dynamicText], children: label })
|
|
406
427
|
]
|
|
407
428
|
}
|
|
408
429
|
);
|
|
@@ -3433,16 +3454,17 @@ var SECTION_INDEX_WIDTH = 200;
|
|
|
3433
3454
|
var ACTIVE_BAR = 3;
|
|
3434
3455
|
var TRANSPARENT3 = "transparent";
|
|
3435
3456
|
var DENSE_TARGET_PX = 24;
|
|
3457
|
+
var DENSE_LINE = 19;
|
|
3436
3458
|
var styles30 = reactNative.StyleSheet.create({
|
|
3437
3459
|
root: { flexShrink: 0, gap: 2, alignSelf: "flex-start" },
|
|
3438
3460
|
heading: { fontSize: 12, fontWeight: "700", letterSpacing: 0.6, textTransform: "uppercase", paddingHorizontal: 10, paddingBottom: 6 },
|
|
3439
3461
|
item: { minHeight: MIN_TARGET_PX, justifyContent: "center", paddingHorizontal: 10, borderLeftWidth: ACTIVE_BAR, borderRadius: 6 },
|
|
3440
3462
|
label: { fontSize: 14 },
|
|
3441
3463
|
labelActive: { fontWeight: "700" },
|
|
3442
|
-
denseRoot: { gap:
|
|
3443
|
-
denseHeading: { fontSize: 11, fontWeight: "600", paddingBottom:
|
|
3444
|
-
denseItem: { minHeight: DENSE_TARGET_PX, paddingVertical: 7,
|
|
3445
|
-
denseLabel: { fontSize: 13, lineHeight:
|
|
3464
|
+
denseRoot: { gap: 2 },
|
|
3465
|
+
denseHeading: { fontSize: 11, fontWeight: "600", letterSpacing: 0.66, lineHeight: 16, paddingBottom: 6 },
|
|
3466
|
+
denseItem: { minHeight: DENSE_TARGET_PX, paddingVertical: 6, paddingLeft: 7, paddingRight: 10, borderRadius: 7 },
|
|
3467
|
+
denseLabel: { fontSize: 13, lineHeight: DENSE_LINE },
|
|
3446
3468
|
denseLabelActive: { fontWeight: "600" }
|
|
3447
3469
|
});
|
|
3448
3470
|
function ariaCurrent(active) {
|
|
@@ -3491,12 +3513,17 @@ function scrollToSection(anchorId) {
|
|
|
3491
3513
|
}
|
|
3492
3514
|
var COMFORTABLE_GAP = 12;
|
|
3493
3515
|
var DENSE_GAP = 8;
|
|
3494
|
-
var DENSE_WIDE_GAP =
|
|
3516
|
+
var DENSE_WIDE_GAP = 16;
|
|
3495
3517
|
var WEB_STICKY = { position: "sticky", top: 0 };
|
|
3518
|
+
var NO_STACK = Number.POSITIVE_INFINITY;
|
|
3496
3519
|
var styles31 = reactNative.StyleSheet.create({
|
|
3497
3520
|
wide: { flexDirection: "row", alignItems: "flex-start", gap: 20 },
|
|
3498
3521
|
column: { flex: 1, minWidth: 0 }
|
|
3499
3522
|
});
|
|
3523
|
+
function toFold(breakpoint) {
|
|
3524
|
+
return typeof breakpoint === "number" ? { wide: breakpoint, stackFrom: NO_STACK } : breakpoint;
|
|
3525
|
+
}
|
|
3526
|
+
var SectionColumn = ({ sections, testID, style }) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style, testID: `${testID}-column`, children: sections.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { nativeID: sectionAnchorId(testID, entry.key), testID: sectionAnchorId(testID, entry.key), children: entry.content }, entry.key)) });
|
|
3500
3527
|
var SectionIndexLayout = ({
|
|
3501
3528
|
sections,
|
|
3502
3529
|
indexHeading,
|
|
@@ -3511,12 +3538,15 @@ var SectionIndexLayout = ({
|
|
|
3511
3538
|
activeColor,
|
|
3512
3539
|
testID = "section-index"
|
|
3513
3540
|
}) => {
|
|
3514
|
-
const
|
|
3541
|
+
const fold = toFold(breakpoint);
|
|
3542
|
+
const wide = useIsWideViewport(fold.wide);
|
|
3543
|
+
const stacked = useIsWideViewport(fold.stackFrom);
|
|
3515
3544
|
const [picked, setPicked] = React16.useState(void 0);
|
|
3516
3545
|
const activeKey = resolveActiveKey(sections, picked ?? (wide ? initialKey : collapsedKey ?? initialKey));
|
|
3517
3546
|
const dense = density === "dense" /* Dense */;
|
|
3518
3547
|
const gap = { gap: dense ? DENSE_GAP : COMFORTABLE_GAP };
|
|
3519
3548
|
if (sections.length < 2) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID, children: sections[0]?.content });
|
|
3549
|
+
if (!wide && stacked) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID, children: /* @__PURE__ */ jsxRuntime.jsx(SectionColumn, { sections, style: gap, testID }) });
|
|
3520
3550
|
if (!wide) {
|
|
3521
3551
|
const active = sections.find((entry) => entry.key === activeKey);
|
|
3522
3552
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: gap, testID, children: [
|
|
@@ -3544,7 +3574,7 @@ var SectionIndexLayout = ({
|
|
|
3544
3574
|
const sticky = stickyIndex && reactNative.Platform.OS === "web" ? WEB_STICKY : null;
|
|
3545
3575
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles31.wide, dense && { gap: DENSE_WIDE_GAP }], testID, children: [
|
|
3546
3576
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: sticky, children: /* @__PURE__ */ jsxRuntime.jsx(SectionIndex, { activeColor, activeKey, dense, heading: indexHeading, itemHint, sections, testID, width: indexWidth, onSelect: select }) }),
|
|
3547
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3577
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionColumn, { sections, style: reactNative.StyleSheet.flatten([styles31.column, gap]), testID })
|
|
3548
3578
|
] });
|
|
3549
3579
|
};
|
|
3550
3580
|
|
|
@@ -4167,6 +4197,7 @@ exports.Accordion = Accordion;
|
|
|
4167
4197
|
exports.AccordionItem = AccordionItem;
|
|
4168
4198
|
exports.AppText = AppText;
|
|
4169
4199
|
exports.BUILD_INFO_PREFIX = BUILD_INFO_PREFIX;
|
|
4200
|
+
exports.BadgeSize = BadgeSize;
|
|
4170
4201
|
exports.BadgeTone = BadgeTone;
|
|
4171
4202
|
exports.BottomSheet = BottomSheet;
|
|
4172
4203
|
exports.Breadcrumb = Breadcrumb;
|