@dloizides/ui-layout 1.61.0 → 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.mjs CHANGED
@@ -258,6 +258,13 @@ var ScreenColumn = ({ children, narrow = false }) => {
258
258
  return /* @__PURE__ */ jsx(View, { style: styles3.outer, children: /* @__PURE__ */ jsx(View, { style: [styles3.column, isWide ? styles3.desktop : styles3.mobile, narrow ? styles3.narrow : styles3.wide], children }) });
259
259
  };
260
260
 
261
+ // src/StatusBadge/BadgeSize.ts
262
+ var BadgeSize = /* @__PURE__ */ ((BadgeSize2) => {
263
+ BadgeSize2["Regular"] = "regular";
264
+ BadgeSize2["Compact"] = "compact";
265
+ return BadgeSize2;
266
+ })(BadgeSize || {});
267
+
261
268
  // src/StatusBadge/BadgeTone.ts
262
269
  var BadgeTone = /* @__PURE__ */ ((BadgeTone2) => {
263
270
  BadgeTone2["Neutral"] = "neutral";
@@ -341,6 +348,10 @@ var DEFAULT_PADDING_V = 4;
341
348
  var DEFAULT_BORDER_RADIUS = 12;
342
349
  var DEFAULT_FONT_SIZE = 12;
343
350
  var ICON_GAP = 4;
351
+ var COMPACT_PADDING_H = 8;
352
+ var COMPACT_PADDING_V = 1;
353
+ var COMPACT_RADIUS = 999;
354
+ var COMPACT_LINE_HEIGHT = 17;
344
355
  var styles4 = StyleSheet.create({
345
356
  badge: {
346
357
  paddingHorizontal: DEFAULT_PADDING_H,
@@ -359,6 +370,14 @@ var styles4 = StyleSheet.create({
359
370
  borderWidth: 1,
360
371
  borderStyle: "dashed"
361
372
  },
373
+ badgeCompact: {
374
+ paddingHorizontal: COMPACT_PADDING_H,
375
+ paddingVertical: COMPACT_PADDING_V,
376
+ borderRadius: COMPACT_RADIUS
377
+ },
378
+ textCompact: {
379
+ lineHeight: COMPACT_LINE_HEIGHT
380
+ },
362
381
  text: {
363
382
  fontSize: DEFAULT_FONT_SIZE,
364
383
  fontWeight: "600",
@@ -372,6 +391,7 @@ var StatusBadge = ({
372
391
  backgroundColor: rawBackground,
373
392
  icon,
374
393
  dashed = false,
394
+ size = "regular" /* Regular */,
375
395
  testID = LAYOUT_TEST_IDS.statusLabel,
376
396
  accessibilityLabel,
377
397
  accessibilityHint
@@ -387,16 +407,17 @@ var StatusBadge = ({
387
407
  const dashedColor = useMemo(() => ({ borderColor: color }), [color]);
388
408
  const dynamicText = useMemo(() => ({ color }), [color]);
389
409
  const hasIcon = icon !== void 0 && icon !== null;
410
+ const compact = size === "compact" /* Compact */;
390
411
  return /* @__PURE__ */ jsxs(
391
412
  View,
392
413
  {
393
414
  accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.statusBadgeHint),
394
415
  accessibilityLabel: accessibilityLabel ?? label,
395
- style: [styles4.badge, hasIcon && styles4.badgeWithIcon, dynamicBadge, dashed && styles4.badgeDashed, dashed && dashedColor],
416
+ style: [styles4.badge, compact && styles4.badgeCompact, hasIcon && styles4.badgeWithIcon, dynamicBadge, dashed && styles4.badgeDashed, dashed && dashedColor],
396
417
  testID,
397
418
  children: [
398
419
  hasIcon ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, children: icon }) : null,
399
- /* @__PURE__ */ jsx(Text, { style: [styles4.text, dynamicText], children: label })
420
+ /* @__PURE__ */ jsx(Text, { style: [styles4.text, compact && styles4.textCompact, dynamicText], children: label })
400
421
  ]
401
422
  }
402
423
  );
@@ -4164,6 +4185,6 @@ var ListDetailLayout = ({
4164
4185
  return /* @__PURE__ */ jsx(SplitPanes, { end: null, layout: "stack" /* Stack */, start: panes.detail ? detail : list, testID });
4165
4186
  };
4166
4187
 
4167
- export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, AppText, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, Breadcrumb, BuildInfoFooter, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, CopyControl, CopyRowEmphasis, CopyStatus, CopyValueRow, CopyableId, CountBadge, DEFAULT_BILLING_ROUTE, DayBadgeFill, DayCard, DayCardLayout, DropdownVariant, ELLIPSIS, FigureStrip, FormDialog, HEADER_STACK_BREAKPOINT, Heading, IdChip, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListDetailLayout, ListDetailPane, ListRow, MIN_TARGET_PX, MODAL_FOOTER_STACK_BELOW, Modal, ModalDropdown, ModalShell, PageFrame, PageHead, RecordActionButton, RecordHeader, RowSelectedStyle, SECTION_INDEX_BREAKPOINT, SECTION_INDEX_WIDTH, ScreenColumn, Section, SectionChips, SectionDensity, SectionIndex, SectionIndexLayout, SectionVariant, SegmentedControl, SegmentedVariant, SelectedMarker, SideSheet, SplitLayout, SplitPanes, StatusBadge, StickyActionBar, StickyPreview, TYPE_SCALE_BREAKPOINT, Tabs, TabsCollapsedTrigger, TabsVariant, TextKind, Timeline, ToggleSection, TotalsStrip, TotalsTone, TransferSlip, TruncatedText, UnderlineTabs, UpgradePrompt, WidgetCard, 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 };
4188
+ export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, AppText, BUILD_INFO_PREFIX, BadgeSize, BadgeTone, BottomSheet, Breadcrumb, BuildInfoFooter, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, CopyControl, CopyRowEmphasis, CopyStatus, CopyValueRow, CopyableId, CountBadge, DEFAULT_BILLING_ROUTE, DayBadgeFill, DayCard, DayCardLayout, DropdownVariant, ELLIPSIS, FigureStrip, FormDialog, HEADER_STACK_BREAKPOINT, Heading, IdChip, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListDetailLayout, ListDetailPane, ListRow, MIN_TARGET_PX, MODAL_FOOTER_STACK_BELOW, Modal, ModalDropdown, ModalShell, PageFrame, PageHead, RecordActionButton, RecordHeader, RowSelectedStyle, SECTION_INDEX_BREAKPOINT, SECTION_INDEX_WIDTH, ScreenColumn, Section, SectionChips, SectionDensity, SectionIndex, SectionIndexLayout, SectionVariant, SegmentedControl, SegmentedVariant, SelectedMarker, SideSheet, SplitLayout, SplitPanes, StatusBadge, StickyActionBar, StickyPreview, TYPE_SCALE_BREAKPOINT, Tabs, TabsCollapsedTrigger, TabsVariant, TextKind, Timeline, ToggleSection, TotalsStrip, TotalsTone, TransferSlip, TruncatedText, UnderlineTabs, UpgradePrompt, WidgetCard, 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 };
4168
4189
  //# sourceMappingURL=index.mjs.map
4169
4190
  //# sourceMappingURL=index.mjs.map