@solexllc/usx-react 0.6.1 → 0.7.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.
Files changed (84) hide show
  1. package/dist/index.cjs +231 -98
  2. package/dist/index.js +231 -98
  3. package/package.json +5 -5
  4. package/src/components/accordion/accordion.html +596 -291
  5. package/src/components/alert/alert.html +112 -148
  6. package/src/components/attribution/attribution.html +50 -21
  7. package/src/components/avatar/avatar.html +86 -51
  8. package/src/components/breadcrumb/breadcrumb.html +45 -66
  9. package/src/components/button/button.html +363 -226
  10. package/src/components/callout/Callout.tsx +1 -2
  11. package/src/components/callout/callout.django.html +2 -2
  12. package/src/components/callout/callout.html +0 -5
  13. package/src/components/callout/config.json +1 -5
  14. package/src/components/card/Card.tsx +6 -3
  15. package/src/components/card/card.django.html +2 -2
  16. package/src/components/card/card.html +1032 -35
  17. package/src/components/card/config.json +6 -2
  18. package/src/components/card-group/card-group.html +388 -95
  19. package/src/components/carousel/Carousel.tsx +42 -71
  20. package/src/components/carousel/carousel.django.html +22 -46
  21. package/src/components/carousel/carousel.html +715 -32
  22. package/src/components/carousel/config.json +25 -12
  23. package/src/components/character-count/character-count.html +231 -26
  24. package/src/components/checkbox/checkbox.html +313 -241
  25. package/src/components/checkbox-group/checkbox-group.html +346 -26
  26. package/src/components/clickable/clickable.html +168 -83
  27. package/src/components/code/Code.tsx +4 -3
  28. package/src/components/code/code.django.html +1 -1
  29. package/src/components/code/config.json +4 -0
  30. package/src/components/collection/collection.html +203 -379
  31. package/src/components/combobox/combobox.html +21 -9
  32. package/src/components/container/container.html +2616 -80
  33. package/src/components/copy-to-clipboard/copy-to-clipboard.html +48 -20
  34. package/src/components/details/Details.tsx +69 -0
  35. package/src/components/details/config.json +73 -0
  36. package/src/components/details/details.django.html +7 -0
  37. package/src/components/details/details.html +186 -0
  38. package/src/components/error-message/error-message.html +15 -2
  39. package/src/components/error-page/ErrorPage.tsx +169 -0
  40. package/src/components/error-page/config.json +152 -0
  41. package/src/components/error-page/error-page.django.html +80 -0
  42. package/src/components/error-page/error-page.html +437 -0
  43. package/src/components/eyebrow/eyebrow.html +8 -4
  44. package/src/components/fieldset/fieldset.html +33 -7
  45. package/src/components/file-input/file-input.html +310 -31
  46. package/src/components/file-list/file-list.html +191 -7
  47. package/src/components/footer/footer.html +611 -232
  48. package/src/components/header/header.html +2553 -611
  49. package/src/components/hero/hero.html +300 -38
  50. package/src/components/hint/hint.html +7 -2
  51. package/src/components/identifier/identifier.html +483 -255
  52. package/src/components/image/Image.tsx +2 -2
  53. package/src/components/image/image.django.html +4 -10
  54. package/src/components/image/image.html +144 -29
  55. package/src/components/indicator/indicator.html +25 -23
  56. package/src/components/label/label.html +15 -16
  57. package/src/components/language-selector/language-selector.html +74 -25
  58. package/src/components/layout/layout.html +991 -21
  59. package/src/components/legend/legend.html +10 -9
  60. package/src/components/list/list.html +45 -25
  61. package/src/components/page/Page.tsx +15 -2
  62. package/src/components/page/config.json +13 -1
  63. package/src/components/page/page.django.html +2 -2
  64. package/src/components/page/page.html +29 -8
  65. package/src/components/pagination/pagination.html +907 -305
  66. package/src/components/prose/prose.html +244 -85
  67. package/src/components/quote/Quote.tsx +1 -1
  68. package/src/components/quote/config.json +1 -2
  69. package/src/components/quote/quote.html +2 -7
  70. package/src/components/radio-buttons/radio-buttons.html +623 -127
  71. package/src/components/required/required.html +3 -4
  72. package/src/components/search/search.html +336 -54
  73. package/src/components/section/section.html +73 -11
  74. package/src/components/select/select.html +112 -58
  75. package/src/components/skipnav/skipnav.html +40 -1
  76. package/src/components/spinner/spinner.html +143 -23
  77. package/src/components/step-indicator/step-indicator.html +26 -68
  78. package/src/components/swap/swap.html +99 -154
  79. package/src/components/table/table.html +2168 -988
  80. package/src/components/tag/tag.html +73 -17
  81. package/src/components/task-list/task-list.html +252 -15
  82. package/src/components/theme-picker/theme-picker.html +26 -8
  83. package/src/components/toggle/toggle.html +64 -5
  84. package/src/index.js +2 -0
package/dist/index.cjs CHANGED
@@ -852,8 +852,8 @@
852
852
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("img", { src: getAssetUrl(src, staticBaseUrl), srcSet: srcSet ? getAssetSrcSet(srcSet, staticBaseUrl) : void 0, alt, style, ...props2 });
853
853
  if (caption) {
854
854
  return /* @__PURE__ */ jsxRuntime.jsxs("figure", { className: classes, style, children: [
855
- imgElement,
856
- /* @__PURE__ */ jsxRuntime.jsx("figcaption", { className: captionClasses, "aria-hidden": hideCaption, children: caption })
855
+ href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href, children: imgElement }) : imgElement,
856
+ /* @__PURE__ */ jsxRuntime.jsx("figcaption", { className: captionClasses, children: caption })
857
857
  ] });
858
858
  }
859
859
  const Element = href ? "a" : "div";
@@ -867,61 +867,48 @@
867
867
  }
868
868
  );
869
869
  }
870
- function Slide({
871
- id,
872
- className = "",
873
- role = "group",
874
- ariaRoledescription = "slide",
875
- ariaLabel,
876
- tabIndex = 0,
877
- children = null,
878
- ...rest
879
- }) {
880
- const cls = ClassNames("usx-carousel__slide", className);
881
- return /* @__PURE__ */ jsxRuntime.jsx(
882
- "section",
883
- {
884
- id,
885
- className: cls,
886
- role,
887
- "aria-roledescription": ariaRoledescription,
888
- "aria-label": ariaLabel,
889
- tabIndex,
890
- ...rest,
891
- children
892
- }
870
+ function flattenChildren(children) {
871
+ return React.Children.toArray(children).flatMap(
872
+ (child) => React.isValidElement(child) && child.type === React.Fragment ? flattenChildren(child.props.children) : [child]
893
873
  );
894
874
  }
895
875
  function Carousel({
896
- id = "carousel-1",
897
876
  slides = [],
898
877
  ariaLabel = "Featured content",
899
- className = "",
900
878
  showDots = true,
901
- children = null,
902
- slideIds = [],
879
+ statusClassName,
880
+ children,
881
+ className,
882
+ role = "region",
903
883
  ...props2
904
884
  }) {
905
- var _a;
906
- const classes = ClassNames("usx-carousel", className);
907
- const childArray = React.Children.toArray(children).filter(Boolean);
908
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, ...props2, role: "region", "aria-roledescription": "carousel", "aria-label": ariaLabel, children: [
909
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-carousel__viewport", tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-carousel__track", children: childArray.length > 0 ? childArray : slides.length > 0 ? slides.map((slide, i) => /* @__PURE__ */ jsxRuntime.jsx(
910
- Slide,
911
- {
912
- id: `${id}-slide-${i + 1}`,
913
- className: "",
914
- ariaLabel: `${i + 1} of ${slides.length}`,
915
- tabIndex: 0,
916
- children: (slide == null ? void 0 : slide.content) || slide
917
- },
918
- i
919
- )) : /* @__PURE__ */ jsxRuntime.jsx("p", { children: /* @__PURE__ */ jsxRuntime.jsx("em", { children: "No slides available." }) }) }) }),
920
- showDots && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usx-carousel__dots", "aria-label": "Slide navigation", children: [
921
- (_a = childArray.length > 0 ? childArray : slides) == null ? void 0 : _a.map((_, i) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: `#${id}-slide-${i + 1}`, "aria-label": `Go to slide ${i + 1}`, tabIndex: -1 }, i)),
922
- childArray.length > 0 && slideIds.length === childArray.length && slideIds.map((slideId, i) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: slideId, "aria-label": `Go to slide ${i + 1}`, tabIndex: -1 }, i))
923
- ] })
924
- ] });
885
+ const childSlides = flattenChildren(children);
886
+ const items = childSlides.length ? childSlides.map((content) => ({ content })) : slides;
887
+ const count = items.length;
888
+ return /* @__PURE__ */ jsxRuntime.jsx(
889
+ "div",
890
+ {
891
+ ...props2,
892
+ className: ClassNames("usx-carousel", className),
893
+ role,
894
+ "aria-roledescription": "carousel",
895
+ "aria-label": ariaLabel,
896
+ "data-show-dots": showDots ? void 0 : "false",
897
+ "data-status-class-name": statusClassName,
898
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-carousel__viewport", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-carousel__track", "aria-live": "polite", tabIndex: count > 1 ? 0 : void 0, children: count ? items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
899
+ "div",
900
+ {
901
+ className: "usx-carousel__slide",
902
+ role: "group",
903
+ "aria-roledescription": "slide",
904
+ "aria-label": item.label || `${index + 1} of ${count}`,
905
+ children: item.content
906
+ },
907
+ index
908
+ )) : /* @__PURE__ */ jsxRuntime.jsx("p", { children: "No slides available." }) }) })
909
+ },
910
+ `${count}-${showDots}-${statusClassName ?? ""}`
911
+ );
925
912
  }
926
913
  function Card({
927
914
  title,
@@ -937,6 +924,7 @@
937
924
  showCarouselDots = true,
938
925
  children,
939
926
  className = "",
927
+ containerClassName = "",
940
928
  tag: RootTag = "div",
941
929
  ...props2
942
930
  }) {
@@ -957,14 +945,15 @@
957
945
  "usa-card__media--exdent": mediaExdent
958
946
  }
959
947
  );
960
- const hasStructuredContent = title || description || tagProps || buttonProps || imageProps;
948
+ const hasStructuredContent = title || description || (tagProps == null ? void 0 : tagProps.length) || (buttonProps == null ? void 0 : buttonProps.length) || (imageProps == null ? void 0 : imageProps.length);
961
949
  const shouldRenderStructured = hasStructuredContent && !children;
962
950
  const hasImages = imageProps && imageProps.length > 0;
963
951
  const useCarousel = imageProps && imageProps.length > 1;
964
952
  const media = useCarousel ? /* @__PURE__ */ jsxRuntime.jsx(
965
953
  Carousel,
966
954
  {
967
- id: `${props2.id || "card"}-carousel`,
955
+ ariaLabel: `${title || props2.id || "Card"} images`,
956
+ role: "group",
968
957
  showDots: showCarouselDots,
969
958
  className: "usx-card__carousel",
970
959
  slides: imageProps == null ? void 0 : imageProps.map((img, index) => ({
@@ -972,7 +961,7 @@
972
961
  }))
973
962
  }
974
963
  ) : hasImages ? /* @__PURE__ */ jsxRuntime.jsx(Image, { hideCaption: true, ...imageProps[0], className: ClassNames("usa-card__img", imageProps[0].className) }) : null;
975
- return /* @__PURE__ */ jsxRuntime.jsx(RootTag, { className: cardClasses, ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-card__container", children: shouldRenderStructured ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
964
+ return /* @__PURE__ */ jsxRuntime.jsx(RootTag, { className: cardClasses, ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: ClassNames("usa-card__container", containerClassName), children: shouldRenderStructured ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
976
965
  title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-card__header", children: /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "usa-card__heading", children: title }) }),
977
966
  media && /* @__PURE__ */ jsxRuntime.jsx("div", { className: mediaClasses, children: media }),
978
967
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-card__body", children: [
@@ -1391,12 +1380,12 @@
1391
1380
  }
1392
1381
  );
1393
1382
  }
1394
- function Code({ lines = [], allowHtml = false, copyText = null, staticBaseUrl, className = "" }) {
1383
+ function Code({ lines = [], allowHtml = false, copyText = null, staticBaseUrl, className = "", contentClassName = "" }) {
1395
1384
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ClassNames("usx-mockup-code", className), children: [
1396
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-mockup-code__content", children: lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx(
1385
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: ClassNames("usx-mockup-code__content", contentClassName), children: lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx(
1397
1386
  "pre",
1398
1387
  {
1399
- ...line.prefix != null ? { "data-prefix": line.prefix } : {},
1388
+ "data-prefix": line.prefix != null ? line.prefix : void 0,
1400
1389
  className: line.className || void 0,
1401
1390
  children: allowHtml ? /* @__PURE__ */ jsxRuntime.jsx("code", { dangerouslySetInnerHTML: { __html: line.code } }) : /* @__PURE__ */ jsxRuntime.jsx("code", { children: line.code })
1402
1391
  },
@@ -1720,9 +1709,46 @@
1720
1709
  }
1721
1710
  );
1722
1711
  }
1723
- function Eyebrow({ children = null, className = "", ...props2 }) {
1724
- const classes = ClassNames("usx-eyebrow", className);
1725
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: classes, ...props2, children });
1712
+ function Details({
1713
+ summary = "Details",
1714
+ text = "",
1715
+ children = null,
1716
+ open = false,
1717
+ markerColor = void 0,
1718
+ underlineColor = void 0,
1719
+ contentBorderColor = void 0,
1720
+ noContentBorder = false,
1721
+ noSummaryUnderline = false,
1722
+ className = "",
1723
+ summaryClassName = "",
1724
+ summaryTextClassName = "",
1725
+ contentClassName = ""
1726
+ }) {
1727
+ const detailsClassName = ClassNames(
1728
+ "usx-details",
1729
+ { "usx-details--borderless": noContentBorder },
1730
+ { "usx-details--no-underline": noSummaryUnderline },
1731
+ className
1732
+ );
1733
+ const summaryClassNames = ClassNames(
1734
+ "usx-details__summary",
1735
+ { [`marker-${markerColor}`]: markerColor },
1736
+ summaryClassName
1737
+ );
1738
+ const summaryTextClassNames = ClassNames(
1739
+ "usx-details__summary-text",
1740
+ { [`border-${underlineColor}`]: underlineColor },
1741
+ summaryTextClassName
1742
+ );
1743
+ const compositeContentClassName = ClassNames(
1744
+ "usx-details__content",
1745
+ { [`border-${contentBorderColor}`]: !noContentBorder && contentBorderColor },
1746
+ contentClassName
1747
+ );
1748
+ return /* @__PURE__ */ jsxRuntime.jsxs("details", { className: detailsClassName, open: open || void 0, children: [
1749
+ /* @__PURE__ */ jsxRuntime.jsx("summary", { className: summaryClassNames, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: summaryTextClassNames, children: summary || "Details" }) }),
1750
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: compositeContentClassName, children: children ?? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "usx-details__text", children: text }) })
1751
+ ] });
1726
1752
  }
1727
1753
  function Link({
1728
1754
  href = "javascript:void(0);",
@@ -1754,6 +1780,151 @@
1754
1780
  }
1755
1781
  );
1756
1782
  }
1783
+ function Page({
1784
+ id = void 0,
1785
+ title = "Page title",
1786
+ titleId = void 0,
1787
+ eyebrow = null,
1788
+ element = "main",
1789
+ children = null,
1790
+ content = null,
1791
+ tabIndex = void 0,
1792
+ ariaLabelledby = void 0,
1793
+ className = "",
1794
+ ...props2
1795
+ }) {
1796
+ const classes = ClassNames("usx-page", className);
1797
+ const pageContent = children || content;
1798
+ const Element = element;
1799
+ const labelledBy = ariaLabelledby || titleId || void 0;
1800
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1801
+ Element,
1802
+ {
1803
+ id,
1804
+ className: classes,
1805
+ tabIndex,
1806
+ "aria-labelledby": labelledBy,
1807
+ ...props2,
1808
+ children: [
1809
+ /* @__PURE__ */ jsxRuntime.jsxs("h1", { id: titleId, className: "usx-page__title", children: [
1810
+ eyebrow ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-eyebrow", children: eyebrow }) : null,
1811
+ title
1812
+ ] }),
1813
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-page__content", children: pageContent })
1814
+ ]
1815
+ }
1816
+ );
1817
+ }
1818
+ const validElements = ["div", "article", "section", "main"];
1819
+ const Prose = ({
1820
+ containerElement = "div",
1821
+ content,
1822
+ children,
1823
+ className = "",
1824
+ ...props2
1825
+ }) => {
1826
+ const Element = validElements.includes(containerElement) ? containerElement : "div";
1827
+ return /* @__PURE__ */ jsxRuntime.jsx(
1828
+ Element,
1829
+ {
1830
+ className: `usa-prose usx-prose ${className}`,
1831
+ ...props2,
1832
+ ...content ? { dangerouslySetInnerHTML: { __html: content } } : {},
1833
+ children: children ? children : null
1834
+ }
1835
+ );
1836
+ };
1837
+ const DEFAULT_TITLE = "We couldn’t complete your request";
1838
+ const DEFAULT_DESCRIPTION = "We’re sorry. Please try again later.";
1839
+ function ErrorPage({
1840
+ id = "main-content",
1841
+ title = DEFAULT_TITLE,
1842
+ description = DEFAULT_DESCRIPTION,
1843
+ guidance = "",
1844
+ actions = [],
1845
+ supportHeading = "",
1846
+ supportText = "",
1847
+ supportLinks = [],
1848
+ cats = false,
1849
+ catAlt = "",
1850
+ errorCode,
1851
+ errorCodeLabel = "Error code",
1852
+ referenceId = "",
1853
+ referenceLabel = "Reference ID",
1854
+ detailsProps = null,
1855
+ children = null,
1856
+ className = ""
1857
+ }) {
1858
+ const pageId = id || "main-content";
1859
+ const pageTitle = title || DEFAULT_TITLE;
1860
+ const pageDescription = description || DEFAULT_DESCRIPTION;
1861
+ const titleId = `${pageId}-title`;
1862
+ const supportHeadingId = `${pageId}-support-heading`;
1863
+ const pageActions = Array.isArray(actions) ? actions : [];
1864
+ const pageSupportLinks = Array.isArray(supportLinks) ? supportLinks : [];
1865
+ const hasSupport = Boolean(supportHeading || supportText || pageSupportLinks.length);
1866
+ const hasErrorCode = errorCode !== void 0 && errorCode !== null && errorCode !== "";
1867
+ const hasMeta = hasErrorCode || Boolean(referenceId);
1868
+ const catImageAlt = catAlt || `Cat illustration for HTTP error ${errorCode}`;
1869
+ const classes = ClassNames("usx-error-page", className);
1870
+ return /* @__PURE__ */ jsxRuntime.jsxs(Page, { id: pageId, title: pageTitle, titleId, className: classes, children: [
1871
+ /* @__PURE__ */ jsxRuntime.jsxs(Prose, { className: "usx-error-page__body", children: [
1872
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "usa-intro usx-error-page__description margin-bottom-4", children: pageDescription }),
1873
+ cats && Boolean(errorCode) && /* @__PURE__ */ jsxRuntime.jsx(Image, { src: `https://http.cat/${errorCode}`, alt: catImageAlt }),
1874
+ (guidance || children) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usx-error-page__content", children: [
1875
+ guidance && /* @__PURE__ */ jsxRuntime.jsx("p", { children: guidance }),
1876
+ children
1877
+ ] })
1878
+ ] }),
1879
+ pageActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ButtonGroup, { buttonProps: pageActions, className: "usx-error-page__actions" }),
1880
+ /* @__PURE__ */ jsxRuntime.jsxs(Prose, { className: "usx-error-page__body", children: [
1881
+ hasSupport && /* @__PURE__ */ jsxRuntime.jsxs(
1882
+ "section",
1883
+ {
1884
+ className: "usx-error-page__support",
1885
+ ...supportHeading ? { "aria-labelledby": supportHeadingId } : {},
1886
+ children: [
1887
+ supportHeading && /* @__PURE__ */ jsxRuntime.jsx("h2", { id: supportHeadingId, className: "usx-error-page__support-heading", children: supportHeading }),
1888
+ supportText && /* @__PURE__ */ jsxRuntime.jsx("p", { children: supportText }),
1889
+ pageSupportLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "usx-error-page__support-links", children: pageSupportLinks.map(({ label, ...linkProps }, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { ...linkProps, children: label }) }, index)) })
1890
+ ]
1891
+ }
1892
+ ),
1893
+ hasMeta && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usx-error-page__meta text-base font-body-2xs", children: [
1894
+ hasErrorCode && /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
1895
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
1896
+ errorCodeLabel || "Error code",
1897
+ ":"
1898
+ ] }),
1899
+ " ",
1900
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-error-page__meta-value", children: errorCode })
1901
+ ] }),
1902
+ referenceId && /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
1903
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
1904
+ referenceLabel || "Reference ID",
1905
+ ":"
1906
+ ] }),
1907
+ " ",
1908
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-error-page__meta-value", children: referenceId })
1909
+ ] })
1910
+ ] }),
1911
+ detailsProps && /* @__PURE__ */ jsxRuntime.jsx(
1912
+ Details,
1913
+ {
1914
+ ...detailsProps,
1915
+ className: ClassNames(
1916
+ "usx-error-page__details font-family-mono font-mono-sm",
1917
+ detailsProps.className
1918
+ )
1919
+ }
1920
+ )
1921
+ ] })
1922
+ ] });
1923
+ }
1924
+ function Eyebrow({ children = null, className = "", ...props2 }) {
1925
+ const classes = ClassNames("usx-eyebrow", className);
1926
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: classes, ...props2, children });
1927
+ }
1757
1928
  function formatFileSize(bytes) {
1758
1929
  if (bytes < 1024) return `${bytes} B`;
1759
1930
  const kb = bytes / 1024;
@@ -3100,25 +3271,6 @@
3100
3271
  ] });
3101
3272
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-misc-banner__content grid-container", children: content }) });
3102
3273
  }
3103
- const validElements = ["div", "article", "section", "main"];
3104
- const Prose = ({
3105
- containerElement = "div",
3106
- content,
3107
- children,
3108
- className = "",
3109
- ...props2
3110
- }) => {
3111
- const Element = validElements.includes(containerElement) ? containerElement : "div";
3112
- return /* @__PURE__ */ jsxRuntime.jsx(
3113
- Element,
3114
- {
3115
- className: `usa-prose usx-prose ${className}`,
3116
- ...props2,
3117
- ...content ? { dangerouslySetInnerHTML: { __html: content } } : {},
3118
- children: children ? children : null
3119
- }
3120
- );
3121
- };
3122
3274
  function Modal({
3123
3275
  id = "usx-modal",
3124
3276
  heading,
@@ -3166,27 +3318,6 @@
3166
3318
  }
3167
3319
  );
3168
3320
  }
3169
- function Page({
3170
- id = void 0,
3171
- title = "Page title",
3172
- eyebrow = null,
3173
- element = "main",
3174
- children = null,
3175
- content = null,
3176
- className = "",
3177
- ...props2
3178
- }) {
3179
- const classes = ClassNames("usx-page", className);
3180
- const pageContent = children || content;
3181
- const Element = element;
3182
- return /* @__PURE__ */ jsxRuntime.jsxs(Element, { id, className: classes, ...props2, children: [
3183
- /* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "usx-page__title", children: [
3184
- eyebrow ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-eyebrow", children: eyebrow }) : null,
3185
- title
3186
- ] }),
3187
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-page__content", children: pageContent })
3188
- ] });
3189
- }
3190
3321
  function getPageItems(currentPage, totalPages) {
3191
3322
  const page = (p) => ({ type: "page", page: p });
3192
3323
  const ellipsis = (key) => ({ type: "ellipsis", key });
@@ -5028,7 +5159,9 @@
5028
5159
  exports2.CopyToClipboard = CopyToClipboard;
5029
5160
  exports2.DatePicker = DatePicker;
5030
5161
  exports2.DateRangePicker = DateRangePicker;
5162
+ exports2.Details = Details;
5031
5163
  exports2.ErrorMessage = ErrorMessage;
5164
+ exports2.ErrorPage = ErrorPage;
5032
5165
  exports2.Eyebrow = Eyebrow;
5033
5166
  exports2.Fieldset = Fieldset;
5034
5167
  exports2.FileInput = FileInput;