@dloizides/ui-layout 1.46.0 → 1.48.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 CHANGED
@@ -316,6 +316,8 @@ interface TabsProps {
316
316
  onChange: (key: string) => void;
317
317
  /** Accessible name for the whole tablist / collapsed menu. */
318
318
  accessibilityLabel: string;
319
+ /** Hint for the tablist / collapsed menu; the menu keeps the kit hint when omitted. */
320
+ accessibilityHint?: string;
319
321
  /** The panel content for the active tab. */
320
322
  children?: React.ReactNode;
321
323
  /** Prefix for the generated tab / panel element ids (must be unique per Tabs on a page). */
@@ -347,7 +349,7 @@ interface TabsProps {
347
349
  * the wide pill strip or — below `collapseBelow` — the mobile menu. Generic-free
348
350
  * by design: tab identity is a plain string `key`.
349
351
  */
350
- declare const Tabs: ({ tabs, activeKey, onChange, accessibilityLabel, children, idPrefix, collapseBelow, collapsedTrigger, style, stripStyle, panelStyle, testID, }: TabsProps) => React.ReactElement;
352
+ declare const Tabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, children, idPrefix, collapseBelow, collapsedTrigger, style, stripStyle, panelStyle, testID, }: TabsProps) => React.ReactElement;
351
353
 
352
354
  /**
353
355
  * UpgradePrompt — shown when a free-tier user hits a feature limit. CTA navigates to the
@@ -1268,4 +1270,22 @@ interface ToggleSectionProps {
1268
1270
  /** A titled card when wide; when narrow the same content sits behind one toggle button, open when forced. */
1269
1271
  declare const ToggleSection: ({ wide, title, toggleLabel, toggleHint, forceOpen, testID, children }: ToggleSectionProps) => React.ReactElement;
1270
1272
 
1271
- export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, type BottomSheetProps, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, 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, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, 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, type RowLook, type RowPalette, RowSelectedStyle, 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, ToggleSection, type ToggleSectionProps, type ToneColors, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, copyText, figureCell, formatBuildInfo, formatCount, formatUrlForDisplay, isKeyboardOpen, isModalFooterStacked, isSplitSideBySide, isWideWebViewport, pageScale, resolveActiveKey, resolveRowLook, resolveToneColors, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
1273
+ interface TimelineEntry {
1274
+ key: string;
1275
+ time: string;
1276
+ title: string;
1277
+ accessibilityLabel: string;
1278
+ accessibilityHint: string;
1279
+ status?: string;
1280
+ tone?: BadgeTone;
1281
+ }
1282
+ interface TimelineProps {
1283
+ entries: ReadonlyArray<TimelineEntry>;
1284
+ accessibilityLabel: string;
1285
+ accessibilityHint: string;
1286
+ testID?: string;
1287
+ }
1288
+ /** A vertical rail of entries: time, title and an optional status badge per entry, in the given order. */
1289
+ declare const Timeline: ({ entries, accessibilityLabel, accessibilityHint, testID }: TimelineProps) => React.ReactElement;
1290
+
1291
+ export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, type BottomSheetProps, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, 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, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, 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, type RowLook, type RowPalette, RowSelectedStyle, 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, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, copyText, figureCell, formatBuildInfo, formatCount, formatUrlForDisplay, isKeyboardOpen, isModalFooterStacked, isSplitSideBySide, isWideWebViewport, pageScale, resolveActiveKey, resolveRowLook, resolveToneColors, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
package/dist/index.d.ts CHANGED
@@ -316,6 +316,8 @@ interface TabsProps {
316
316
  onChange: (key: string) => void;
317
317
  /** Accessible name for the whole tablist / collapsed menu. */
318
318
  accessibilityLabel: string;
319
+ /** Hint for the tablist / collapsed menu; the menu keeps the kit hint when omitted. */
320
+ accessibilityHint?: string;
319
321
  /** The panel content for the active tab. */
320
322
  children?: React.ReactNode;
321
323
  /** Prefix for the generated tab / panel element ids (must be unique per Tabs on a page). */
@@ -347,7 +349,7 @@ interface TabsProps {
347
349
  * the wide pill strip or — below `collapseBelow` — the mobile menu. Generic-free
348
350
  * by design: tab identity is a plain string `key`.
349
351
  */
350
- declare const Tabs: ({ tabs, activeKey, onChange, accessibilityLabel, children, idPrefix, collapseBelow, collapsedTrigger, style, stripStyle, panelStyle, testID, }: TabsProps) => React.ReactElement;
352
+ declare const Tabs: ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, children, idPrefix, collapseBelow, collapsedTrigger, style, stripStyle, panelStyle, testID, }: TabsProps) => React.ReactElement;
351
353
 
352
354
  /**
353
355
  * UpgradePrompt — shown when a free-tier user hits a feature limit. CTA navigates to the
@@ -1268,4 +1270,22 @@ interface ToggleSectionProps {
1268
1270
  /** A titled card when wide; when narrow the same content sits behind one toggle button, open when forced. */
1269
1271
  declare const ToggleSection: ({ wide, title, toggleLabel, toggleHint, forceOpen, testID, children }: ToggleSectionProps) => React.ReactElement;
1270
1272
 
1271
- export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, type BottomSheetProps, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, 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, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, 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, type RowLook, type RowPalette, RowSelectedStyle, 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, ToggleSection, type ToggleSectionProps, type ToneColors, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, copyText, figureCell, formatBuildInfo, formatCount, formatUrlForDisplay, isKeyboardOpen, isModalFooterStacked, isSplitSideBySide, isWideWebViewport, pageScale, resolveActiveKey, resolveRowLook, resolveToneColors, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
1273
+ interface TimelineEntry {
1274
+ key: string;
1275
+ time: string;
1276
+ title: string;
1277
+ accessibilityLabel: string;
1278
+ accessibilityHint: string;
1279
+ status?: string;
1280
+ tone?: BadgeTone;
1281
+ }
1282
+ interface TimelineProps {
1283
+ entries: ReadonlyArray<TimelineEntry>;
1284
+ accessibilityLabel: string;
1285
+ accessibilityHint: string;
1286
+ testID?: string;
1287
+ }
1288
+ /** A vertical rail of entries: time, title and an optional status badge per entry, in the given order. */
1289
+ declare const Timeline: ({ entries, accessibilityLabel, accessibilityHint, testID }: TimelineProps) => React.ReactElement;
1290
+
1291
+ export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionVariant, AppText, type AppTextProps, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, type BottomSheetProps, BuildInfoFooter, type BuildInfoFooterProps, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, 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, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, 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, type RowLook, type RowPalette, RowSelectedStyle, 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, TruncatedText, type TruncatedTextProps, UpgradePrompt, type UpgradePromptProps, type VersionResponse, type VisibleViewport, copyText, figureCell, formatBuildInfo, formatCount, formatUrlForDisplay, isKeyboardOpen, isModalFooterStacked, isSplitSideBySide, isWideWebViewport, pageScale, resolveActiveKey, resolveRowLook, resolveToneColors, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
package/dist/index.js CHANGED
@@ -1717,6 +1717,7 @@ var TabsMenu = ({
1717
1717
  activeKey,
1718
1718
  onChange,
1719
1719
  accessibilityLabel,
1720
+ accessibilityHint,
1720
1721
  idPrefix,
1721
1722
  testID,
1722
1723
  collapsedTrigger = "caret" /* Caret */
@@ -1737,7 +1738,7 @@ var TabsMenu = ({
1737
1738
  return /* @__PURE__ */ jsxRuntime.jsx(
1738
1739
  ModalDropdown,
1739
1740
  {
1740
- accessibilityHint: t(LAYOUT_I18N.tabsMenuHint),
1741
+ accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.tabsMenuHint),
1741
1742
  accessibilityLabel,
1742
1743
  optionTestID,
1743
1744
  options,
@@ -1817,13 +1818,14 @@ var WideTabStrip = ({
1817
1818
  activeKey,
1818
1819
  onChange,
1819
1820
  accessibilityLabel,
1821
+ accessibilityHint,
1820
1822
  idPrefix,
1821
1823
  borderColor,
1822
1824
  primaryColor,
1823
1825
  textSecondary,
1824
1826
  surfaceElevated,
1825
1827
  stripStyle
1826
- }) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles15.stripOuter, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles15.strip, stripStyle], children: tabs.map((tab) => {
1828
+ }) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles15.stripOuter, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityHint, accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles15.strip, stripStyle], children: tabs.map((tab) => {
1827
1829
  const selected = tab.key === activeKey;
1828
1830
  const textColor = selected ? TEXT_ON_PRIMARY : textSecondary;
1829
1831
  const pillColor = selected ? primaryColor : surfaceElevated;
@@ -1850,6 +1852,7 @@ var Tabs = ({
1850
1852
  activeKey,
1851
1853
  onChange,
1852
1854
  accessibilityLabel,
1855
+ accessibilityHint,
1853
1856
  children,
1854
1857
  idPrefix = "tabs",
1855
1858
  collapseBelow = TABS_COLLAPSE_BREAKPOINT,
@@ -1869,6 +1872,7 @@ var Tabs = ({
1869
1872
  collapsed ? /* @__PURE__ */ jsxRuntime.jsx(
1870
1873
  TabsMenu,
1871
1874
  {
1875
+ accessibilityHint,
1872
1876
  accessibilityLabel,
1873
1877
  activeKey,
1874
1878
  collapsedTrigger,
@@ -1880,6 +1884,7 @@ var Tabs = ({
1880
1884
  ) : /* @__PURE__ */ jsxRuntime.jsx(
1881
1885
  WideTabStrip,
1882
1886
  {
1887
+ accessibilityHint,
1883
1888
  accessibilityLabel,
1884
1889
  activeKey,
1885
1890
  borderColor: colors.border,
@@ -3452,6 +3457,34 @@ var ToggleSection = ({ wide, title, toggleLabel, toggleHint, forceOpen = false,
3452
3457
  open || forceOpen ? children : null
3453
3458
  ] });
3454
3459
  };
3460
+ var styles34 = reactNative.StyleSheet.create({
3461
+ entry: { borderLeftWidth: 2, gap: 4, paddingBottom: 12, paddingLeft: 12 },
3462
+ head: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: 8 },
3463
+ time: { fontSize: 13 },
3464
+ title: { flexShrink: 1, fontSize: 15, fontWeight: "600" }
3465
+ });
3466
+ var entryTestId = (testID, key) => testID === void 0 ? void 0 : `${testID}-${key}`;
3467
+ var Timeline = ({ entries, accessibilityLabel, accessibilityHint, testID }) => {
3468
+ const { colors } = uiFeedback.useUi().theme;
3469
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityHint, accessibilityLabel, role: "list", testID, children: entries.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs(
3470
+ reactNative.View,
3471
+ {
3472
+ accessibilityHint: entry.accessibilityHint,
3473
+ accessibilityLabel: entry.accessibilityLabel,
3474
+ role: "listitem",
3475
+ style: [styles34.entry, { borderLeftColor: colors.border }],
3476
+ testID: entryTestId(testID, entry.key),
3477
+ children: [
3478
+ entry.time === "" ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles34.time, { color: colors.textSecondary }], children: entry.time }),
3479
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles34.head, children: [
3480
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles34.title, { color: colors.text }], children: entry.title }),
3481
+ entry.status === void 0 || entry.status === "" ? null : /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { label: entry.status, tone: entry.tone ?? "neutral" /* Neutral */ })
3482
+ ] })
3483
+ ]
3484
+ },
3485
+ entry.key
3486
+ )) });
3487
+ };
3455
3488
 
3456
3489
  exports.A4_PAGE = A4_PAGE;
3457
3490
  exports.API_COMMIT_SEPARATOR = API_COMMIT_SEPARATOR;
@@ -3507,6 +3540,7 @@ exports.TYPE_SCALE_BREAKPOINT = TYPE_SCALE_BREAKPOINT;
3507
3540
  exports.Tabs = Tabs;
3508
3541
  exports.TabsCollapsedTrigger = TabsCollapsedTrigger;
3509
3542
  exports.TextKind = TextKind;
3543
+ exports.Timeline = Timeline;
3510
3544
  exports.ToggleSection = ToggleSection;
3511
3545
  exports.TruncatedText = TruncatedText;
3512
3546
  exports.UpgradePrompt = UpgradePrompt;