@solexllc/usx-react 0.7.0 → 0.8.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/README.md +5 -8
- package/dist/index.cjs +671 -428
- package/dist/index.js +671 -428
- package/package.json +2 -2
- package/src/components/accordion/Accordion.tsx +7 -9
- package/src/components/accordion/accordion.django-snapshot.html +515 -0
- package/src/components/accordion/accordion.django.html +9 -25
- package/src/components/accordion/accordion.html +471 -566
- package/src/components/accordion/accordion.react-snapshot.html +475 -0
- package/src/components/accordion/config.json +29 -3
- package/src/components/alert/Alert.tsx +4 -3
- package/src/components/alert/alert.django-snapshot.html +175 -0
- package/src/components/alert/alert.django.html +14 -12
- package/src/components/alert/alert.react-snapshot.html +152 -0
- package/src/components/alert/config.json +5 -8
- package/src/components/attribution/attribution.django-snapshot.html +57 -0
- package/src/components/attribution/attribution.django.html +2 -2
- package/src/components/attribution/attribution.react-snapshot.html +49 -0
- package/src/components/attribution/config.json +4 -0
- package/src/components/avatar/Avatar.tsx +6 -15
- package/src/components/avatar/avatar.django-snapshot.html +131 -0
- package/src/components/avatar/avatar.django.html +9 -10
- package/src/components/avatar/avatar.react-snapshot.html +121 -0
- package/src/components/avatar/config.json +10 -3
- package/src/components/avatar-group/AvatarGroup.tsx +3 -3
- package/src/components/avatar-group/avatar-group.django-snapshot.html +278 -0
- package/src/components/avatar-group/avatar-group.django.html +3 -3
- package/src/components/avatar-group/avatar-group.html +5 -5
- package/src/components/avatar-group/avatar-group.react-snapshot.html +226 -0
- package/src/components/back-to-top/BackToTop.tsx +7 -2
- package/src/components/back-to-top/back-to-top.django-snapshot.html +339 -0
- package/src/components/back-to-top/back-to-top.django.html +6 -4
- package/src/components/back-to-top/back-to-top.react-snapshot.html +264 -0
- package/src/components/back-to-top/config.json +9 -0
- package/src/components/banner/banner.django-snapshot.html +329 -0
- package/src/components/banner/banner.django.html +2 -2
- package/src/components/banner/banner.html +87 -185
- package/src/components/banner/banner.react-snapshot.html +317 -0
- package/src/components/banner/config.json +3 -0
- package/src/components/breadcrumb/Breadcrumb.tsx +1 -1
- package/src/components/breadcrumb/breadcrumb.django-snapshot.html +103 -0
- package/src/components/breadcrumb/breadcrumb.django.html +5 -6
- package/src/components/breadcrumb/breadcrumb.react-snapshot.html +87 -0
- package/src/components/breadcrumb/config.json +2 -8
- package/src/components/button/Button.tsx +1 -0
- package/src/components/button/button.django-snapshot.html +558 -0
- package/src/components/button/button.django.html +4 -4
- package/src/components/button/button.react-snapshot.html +574 -0
- package/src/components/button/config.json +4 -0
- package/src/components/button-group/button-group.django-snapshot.html +129 -0
- package/src/components/button-group/button-group.django.html +1 -1
- package/src/components/button-group/button-group.react-snapshot.html +115 -0
- package/src/components/button-group/config.json +16 -0
- package/src/components/calendar-date/calendar-date.django-snapshot.html +7 -0
- package/src/components/calendar-date/calendar-date.django.html +1 -1
- package/src/components/calendar-date/calendar-date.react-snapshot.html +7 -0
- package/src/components/calendar-date/config.json +3 -0
- package/src/components/callout/Callout.tsx +2 -4
- package/src/components/callout/callout.django-snapshot.html +59 -0
- package/src/components/callout/callout.django.html +1 -1
- package/src/components/callout/callout.react-snapshot.html +57 -0
- package/src/components/callout/config.json +5 -2
- package/src/components/card/Card.tsx +2 -2
- package/src/components/card/card.django-snapshot.html +1198 -0
- package/src/components/card/card.django.html +3 -3
- package/src/components/card/card.react-snapshot.html +1028 -0
- package/src/components/card/config.json +21 -4
- package/src/components/card-group/CardGroup.tsx +1 -1
- package/src/components/card-group/card-group.django-snapshot.html +514 -0
- package/src/components/card-group/card-group.django.html +2 -2
- package/src/components/card-group/card-group.react-snapshot.html +445 -0
- package/src/components/card-group/config.json +80 -2
- package/src/components/carousel/Carousel.tsx +3 -0
- package/src/components/carousel/carousel.django-snapshot.html +927 -0
- package/src/components/carousel/carousel.django.html +2 -2
- package/src/components/carousel/carousel.react-snapshot.html +762 -0
- package/src/components/carousel/config.json +18 -0
- package/src/components/character-count/CharacterCount.tsx +1 -3
- package/src/components/character-count/character-count.django-snapshot.html +402 -0
- package/src/components/character-count/character-count.django.html +1 -1
- package/src/components/character-count/character-count.react-snapshot.html +346 -0
- package/src/components/character-count/config.json +5 -0
- package/src/components/checkbox/Checkbox.tsx +7 -2
- package/src/components/checkbox/checkbox.django-snapshot.html +373 -0
- package/src/components/checkbox/checkbox.django.html +22 -3
- package/src/components/checkbox/checkbox.react-snapshot.html +313 -0
- package/src/components/checkbox/config.json +12 -1
- package/src/components/checkbox-group/CheckboxGroup.tsx +1 -0
- package/src/components/checkbox-group/checkbox-group.django-snapshot.html +372 -0
- package/src/components/checkbox-group/checkbox-group.django.html +2 -2
- package/src/components/checkbox-group/checkbox-group.react-snapshot.html +300 -0
- package/src/components/checkbox-group/config.json +24 -0
- package/src/components/clickable/clickable-bg-color-change.django.html +1 -0
- package/src/components/clickable/clickable-color-change.django.html +1 -0
- package/src/components/clickable/clickable-link.django.html +1 -0
- package/src/components/clickable/clickable.django-snapshot.html +221 -0
- package/src/components/clickable/clickable.django.html +6 -2
- package/src/components/clickable/clickable.react-snapshot.html +194 -0
- package/src/components/clickable/config.json +9 -7
- package/src/components/code/code.django-snapshot.html +375 -0
- package/src/components/code/code.django.html +1 -1
- package/src/components/code/code.html +201 -38
- package/src/components/code/code.react-snapshot.html +249 -0
- package/src/components/code/config.json +18 -0
- package/src/components/collection/collection.django-snapshot.html +238 -0
- package/src/components/collection/collection.django.html +1 -1
- package/src/components/collection/collection.react-snapshot.html +200 -0
- package/src/components/collection/config.json +49 -0
- package/src/components/combobox/Combobox.tsx +1 -0
- package/src/components/combobox/combobox.django-snapshot.html +1302 -0
- package/src/components/combobox/combobox.django.html +3 -5
- package/src/components/combobox/combobox.react-snapshot.html +714 -0
- package/src/components/combobox/config.json +269 -2
- package/src/components/container/Container.tsx +3 -3
- package/src/components/container/config.json +9 -5
- package/src/components/container/container.django-snapshot.html +2820 -0
- package/src/components/container/container.django.html +2 -2
- package/src/components/container/container.react-snapshot.html +2400 -0
- package/src/components/copy-to-clipboard/CopyToClipboard.tsx +2 -2
- package/src/components/copy-to-clipboard/config.json +8 -0
- package/src/components/copy-to-clipboard/copy-to-clipboard.django-snapshot.html +84 -0
- package/src/components/copy-to-clipboard/copy-to-clipboard.django.html +1 -1
- package/src/components/copy-to-clipboard/copy-to-clipboard.react-snapshot.html +60 -0
- package/src/components/date-picker/date-picker.django-snapshot.html +150 -0
- package/src/components/date-picker/date-picker.django.html +1 -1
- package/src/components/date-picker/date-picker.react-snapshot.html +122 -0
- package/src/components/date-range-picker/date-range-picker.django-snapshot.html +301 -0
- package/src/components/date-range-picker/date-range-picker.django.html +1 -1
- package/src/components/date-range-picker/date-range-picker.react-snapshot.html +246 -0
- package/src/components/details/Details.tsx +8 -28
- package/src/components/details/config.json +11 -28
- package/src/components/details/details.django-snapshot.html +238 -0
- package/src/components/details/details.django.html +7 -4
- package/src/components/details/details.html +72 -43
- package/src/components/details/details.react-snapshot.html +215 -0
- package/src/components/drawer/Drawer.tsx +125 -0
- package/src/components/drawer/config.json +97 -0
- package/src/components/drawer/drawer.django-snapshot.html +1711 -0
- package/src/components/drawer/drawer.django.html +34 -0
- package/src/components/drawer/drawer.html +1031 -0
- package/src/components/drawer/drawer.react-snapshot.html +1027 -0
- package/src/components/error-message/config.json +4 -0
- package/src/components/error-message/error-message.django-snapshot.html +12 -0
- package/src/components/error-message/error-message.react-snapshot.html +12 -0
- package/src/components/error-page/config.json +3 -2
- package/src/components/error-page/error-page.django-snapshot.html +570 -0
- package/src/components/error-page/error-page.django.html +2 -2
- package/src/components/error-page/error-page.html +2 -2
- package/src/components/error-page/error-page.react-snapshot.html +467 -0
- package/src/components/eyebrow/config.json +3 -0
- package/src/components/eyebrow/eyebrow.django-snapshot.html +8 -0
- package/src/components/eyebrow/eyebrow.react-snapshot.html +8 -0
- package/src/components/fieldset/config.json +4 -0
- package/src/components/fieldset/fieldset.django-snapshot.html +50 -0
- package/src/components/fieldset/fieldset.django.html +2 -1
- package/src/components/fieldset/fieldset.react-snapshot.html +39 -0
- package/src/components/file-input/FileInput.tsx +2 -1
- package/src/components/file-input/_contents.django.html +29 -0
- package/src/components/file-input/config.json +7 -3
- package/src/components/file-input/file-input.django-snapshot.html +534 -0
- package/src/components/file-input/file-input.django.html +3 -50
- package/src/components/file-input/file-input.html +246 -286
- package/src/components/file-input/file-input.react-snapshot.html +440 -0
- package/src/components/file-list/config.json +2 -2
- package/src/components/file-list/file-list.django-snapshot.html +328 -0
- package/src/components/file-list/file-list.django.html +9 -6
- package/src/components/file-list/file-list.react-snapshot.html +276 -0
- package/src/components/footer/config.json +162 -1
- package/src/components/footer/footer.django-snapshot.html +1009 -0
- package/src/components/footer/footer.django.html +10 -7
- package/src/components/footer/footer.html +21 -21
- package/src/components/footer/footer.react-snapshot.html +796 -0
- package/src/components/form-group/config.json +3 -0
- package/src/components/form-group/form-group.django-snapshot.html +50 -0
- package/src/components/form-group/form-group.django.html +1 -1
- package/src/components/form-group/form-group.react-snapshot.html +43 -0
- package/src/components/header/Header.tsx +3 -3
- package/src/components/header/branding.django.html +14 -0
- package/src/components/header/config.json +73 -0
- package/src/components/header/header.django-snapshot.html +3395 -0
- package/src/components/header/header.django.html +9 -5
- package/src/components/header/header.html +54 -54
- package/src/components/header/header.react-snapshot.html +2675 -0
- package/src/components/hero/Hero.tsx +4 -4
- package/src/components/hero/config.json +7 -6
- package/src/components/hero/hero.django-snapshot.html +409 -0
- package/src/components/hero/hero.django.html +5 -5
- package/src/components/hero/hero.html +13 -14
- package/src/components/hero/hero.react-snapshot.html +353 -0
- package/src/components/hint/config.json +4 -0
- package/src/components/hint/hint.django-snapshot.html +7 -0
- package/src/components/hint/hint.react-snapshot.html +7 -0
- package/src/components/icon/Icon.tsx +14 -12
- package/src/components/icon/config.json +7 -15
- package/src/components/icon/icon.django-snapshot.html +69 -0
- package/src/components/icon/icon.django.html +4 -10
- package/src/components/icon/icon.html +90 -90
- package/src/components/icon/icon.react-snapshot.html +69 -0
- package/src/components/icon-list/icon-list.django-snapshot.html +244 -0
- package/src/components/icon-list/icon-list.django.html +2 -2
- package/src/components/icon-list/icon-list.react-snapshot.html +215 -0
- package/src/components/identifier/Identifier.tsx +1 -1
- package/src/components/identifier/config.json +1 -1
- package/src/components/identifier/identifier.django-snapshot.html +1129 -0
- package/src/components/identifier/identifier.django.html +3 -3
- package/src/components/identifier/identifier.html +2 -2
- package/src/components/identifier/identifier.react-snapshot.html +959 -0
- package/src/components/image/config.json +4 -0
- package/src/components/image/image.django-snapshot.html +166 -0
- package/src/components/image/image.django.html +1 -1
- package/src/components/image/image.html +4 -4
- package/src/components/image/image.react-snapshot.html +150 -0
- package/src/components/in-page-nav/InPageNav.tsx +4 -3
- package/src/components/in-page-nav/config.json +5 -11
- package/src/components/in-page-nav/in-page-nav.django-snapshot.html +228 -0
- package/src/components/in-page-nav/in-page-nav.django.html +4 -4
- package/src/components/in-page-nav/in-page-nav.react-snapshot.html +228 -0
- package/src/components/indicator/config.json +8 -0
- package/src/components/indicator/indicator.django-snapshot.html +57 -0
- package/src/components/indicator/indicator.react-snapshot.html +44 -0
- package/src/components/input/config.json +18 -1
- package/src/components/input/input.django-snapshot.html +121 -0
- package/src/components/input/input.django.html +16 -8
- package/src/components/input/input.react-snapshot.html +94 -0
- package/src/components/label/Label.tsx +4 -1
- package/src/components/label/config.json +7 -0
- package/src/components/label/label.django-snapshot.html +22 -0
- package/src/components/label/label.django.html +4 -1
- package/src/components/label/label.react-snapshot.html +22 -0
- package/src/components/language-selector/config.json +9 -13
- package/src/components/language-selector/language-selector.django-snapshot.html +183 -0
- package/src/components/language-selector/language-selector.django.html +3 -3
- package/src/components/language-selector/language-selector.react-snapshot.html +169 -0
- package/src/components/layout/Layout.tsx +12 -1
- package/src/components/layout/config.json +8 -0
- package/src/components/layout/layout.django-snapshot.html +987 -0
- package/src/components/layout/layout.django.html +2 -2
- package/src/components/layout/layout.react-snapshot.html +876 -0
- package/src/components/legend/config.json +3 -0
- package/src/components/legend/legend.django-snapshot.html +13 -0
- package/src/components/legend/legend.django.html +1 -1
- package/src/components/legend/legend.react-snapshot.html +13 -0
- package/src/components/link/Link.tsx +3 -1
- package/src/components/link/config.json +9 -1
- package/src/components/link/link.django-snapshot.html +45 -0
- package/src/components/link/link.django.html +2 -2
- package/src/components/link/link.react-snapshot.html +45 -0
- package/src/components/list/config.json +7 -0
- package/src/components/list/list.django-snapshot.html +61 -0
- package/src/components/list/list.django.html +1 -1
- package/src/components/list/list.react-snapshot.html +46 -0
- package/src/components/memorable-date/config.json +1 -2
- package/src/components/memorable-date/memorable-date.django-snapshot.html +536 -0
- package/src/components/memorable-date/memorable-date.django.html +3 -1
- package/src/components/memorable-date/memorable-date.react-snapshot.html +437 -0
- package/src/components/misc-banner/MiscBanner.tsx +16 -10
- package/src/components/misc-banner/config.json +22 -4
- package/src/components/misc-banner/misc-banner.django-snapshot.html +370 -0
- package/src/components/misc-banner/misc-banner.django.html +15 -15
- package/src/components/misc-banner/misc-banner.react-snapshot.html +332 -0
- package/src/components/modal/config.json +22 -0
- package/src/components/modal/modal.django-snapshot.html +252 -0
- package/src/components/modal/modal.django.html +5 -9
- package/src/components/modal/modal.react-snapshot.html +229 -0
- package/src/components/page/Page.tsx +2 -3
- package/src/components/page/config.json +11 -2
- package/src/components/page/page.django-snapshot.html +44 -0
- package/src/components/page/page.django.html +4 -2
- package/src/components/page/page.react-snapshot.html +44 -0
- package/src/components/pagination/Pagination.tsx +49 -55
- package/src/components/pagination/config.json +58 -9
- package/src/components/pagination/navigation/PaginationNavigation.tsx +24 -34
- package/src/components/pagination/navigation/pagination-navigation.django.html +16 -23
- package/src/components/pagination/pagination.django-snapshot.html +2078 -0
- package/src/components/pagination/pagination.django.html +14 -4
- package/src/components/pagination/pagination.react-snapshot.html +1738 -0
- package/src/components/pagination/step-options/PaginationStepOptions.tsx +2 -8
- package/src/components/pagination/step-options/pagination-step-options.django.html +1 -1
- package/src/components/popover/Popover.tsx +114 -0
- package/src/components/popover/PopoverMenu.tsx +80 -0
- package/src/components/popover/config.json +130 -0
- package/src/components/popover/popover-menu.django.html +35 -0
- package/src/components/popover/popover.django-snapshot.html +1201 -0
- package/src/components/popover/popover.django.html +11 -0
- package/src/components/popover/popover.html +1081 -0
- package/src/components/popover/popover.react-snapshot.html +1101 -0
- package/src/components/process-list/ProcessList.tsx +6 -21
- package/src/components/process-list/config.json +18 -2
- package/src/components/process-list/process-list.django-snapshot.html +90 -0
- package/src/components/process-list/process-list.django.html +2 -2
- package/src/components/process-list/process-list.react-snapshot.html +78 -0
- package/src/components/prose/Prose.tsx +3 -3
- package/src/components/prose/config.json +6 -2
- package/src/components/prose/prose.django-snapshot.html +250 -0
- package/src/components/prose/prose.django.html +3 -3
- package/src/components/prose/prose.react-snapshot.html +250 -0
- package/src/components/quote/Quote.tsx +2 -2
- package/src/components/quote/config.json +5 -2
- package/src/components/quote/quote.django-snapshot.html +348 -0
- package/src/components/quote/quote.django.html +2 -2
- package/src/components/quote/quote.react-snapshot.html +322 -0
- package/src/components/radio-buttons/RadioButtons.tsx +15 -13
- package/src/components/radio-buttons/config.json +23 -0
- package/src/components/radio-buttons/radio-buttons.django-snapshot.html +760 -0
- package/src/components/radio-buttons/radio-buttons.django.html +12 -4
- package/src/components/radio-buttons/radio-buttons.react-snapshot.html +592 -0
- package/src/components/range-slider/RangeSlider.tsx +1 -1
- package/src/components/range-slider/range-slider.django-snapshot.html +157 -0
- package/src/components/range-slider/range-slider.django.html +1 -1
- package/src/components/range-slider/range-slider.react-snapshot.html +134 -0
- package/src/components/required/config.json +6 -3
- package/src/components/required/required.django-snapshot.html +5 -0
- package/src/components/required/required.react-snapshot.html +5 -0
- package/src/components/search/Search.tsx +6 -9
- package/src/components/search/config.json +5 -3
- package/src/components/search/search.django-snapshot.html +1795 -0
- package/src/components/search/search.django.html +7 -6
- package/src/components/search/search.react-snapshot.html +393 -0
- package/src/components/section/Section.tsx +3 -3
- package/src/components/section/config.json +12 -4
- package/src/components/section/section.django-snapshot.html +87 -0
- package/src/components/section/section.django.html +6 -6
- package/src/components/section/section.react-snapshot.html +78 -0
- package/src/components/select/Select.tsx +1 -0
- package/src/components/select/config.json +18 -0
- package/src/components/select/select.django-snapshot.html +146 -0
- package/src/components/select/select.django.html +1 -1
- package/src/components/select/select.react-snapshot.html +104 -0
- package/src/components/sidenav/config.json +17 -0
- package/src/components/sidenav/sidenav.django-snapshot.html +94 -0
- package/src/components/sidenav/sidenav.django.html +2 -2
- package/src/components/sidenav/sidenav.react-snapshot.html +55 -0
- package/src/components/site-alert/SiteAlert.tsx +10 -38
- package/src/components/site-alert/config.json +10 -3
- package/src/components/site-alert/site-alert.django-snapshot.html +400 -0
- package/src/components/site-alert/site-alert.django.html +1 -1
- package/src/components/site-alert/site-alert.react-snapshot.html +332 -0
- package/src/components/skipnav/config.json +3 -0
- package/src/components/skipnav/skipnav.django-snapshot.html +40 -0
- package/src/components/skipnav/skipnav.django.html +1 -1
- package/src/components/skipnav/skipnav.react-snapshot.html +33 -0
- package/src/components/spinner/Spinner.tsx +1 -0
- package/src/components/spinner/config.json +7 -0
- package/src/components/spinner/spinner.django-snapshot.html +299 -0
- package/src/components/spinner/spinner.django.html +1 -1
- package/src/components/spinner/spinner.react-snapshot.html +302 -0
- package/src/components/status/config.json +1 -0
- package/src/components/status/status.django-snapshot.html +71 -0
- package/src/components/status/status.react-snapshot.html +71 -0
- package/src/components/step-indicator/StepIndicator.tsx +4 -4
- package/src/components/step-indicator/config.json +22 -2
- package/src/components/step-indicator/step-indicator.django-snapshot.html +224 -0
- package/src/components/step-indicator/step-indicator.django.html +3 -3
- package/src/components/step-indicator/step-indicator.react-snapshot.html +204 -0
- package/src/components/summary/Summary.tsx +54 -0
- package/src/components/summary/config.json +56 -0
- package/src/components/summary/summary.django-snapshot.html +36 -0
- package/src/components/summary/summary.django.html +11 -0
- package/src/components/summary/summary.html +17 -0
- package/src/components/summary/summary.react-snapshot.html +36 -0
- package/src/components/summary-box/config.json +5 -0
- package/src/components/summary-box/summary-box.django-snapshot.html +188 -0
- package/src/components/summary-box/summary-box.react-snapshot.html +177 -0
- package/src/components/swap/config.json +3 -3
- package/src/components/swap/swap.django-snapshot.html +110 -0
- package/src/components/swap/swap.html +1 -1
- package/src/components/swap/swap.react-snapshot.html +100 -0
- package/src/components/switch/config.json +3 -0
- package/src/components/switch/switch.django-snapshot.html +73 -0
- package/src/components/switch/switch.django.html +6 -8
- package/src/components/switch/switch.react-snapshot.html +73 -0
- package/src/components/table/Table.tsx +27 -11
- package/src/components/table/TableBody.tsx +12 -9
- package/src/components/table/config.json +46 -1
- package/src/components/table/table-detail-row.django.html +1 -1
- package/src/components/table/table-foot.django.html +1 -1
- package/src/components/table/table-head.django.html +1 -1
- package/src/components/table/table.django-snapshot.html +1970 -0
- package/src/components/table/table.react-snapshot.html +2166 -0
- package/src/components/tag/config.json +3 -0
- package/src/components/tag/tag.django-snapshot.html +109 -0
- package/src/components/tag/tag.django.html +4 -4
- package/src/components/tag/tag.react-snapshot.html +99 -0
- package/src/components/tag-group/config.json +24 -0
- package/src/components/tag-group/tag-group.django-snapshot.html +25 -0
- package/src/components/tag-group/tag-group.django.html +1 -1
- package/src/components/tag-group/tag-group.react-snapshot.html +17 -0
- package/src/components/task-list/config.json +33 -0
- package/src/components/task-list/task-list.django-snapshot.html +273 -0
- package/src/components/task-list/task-list.django.html +1 -1
- package/src/components/task-list/task-list.react-snapshot.html +252 -0
- package/src/components/text-area/TextArea.tsx +1 -1
- package/src/components/text-area/config.json +5 -0
- package/src/components/text-area/text-area.django-snapshot.html +127 -0
- package/src/components/text-area/text-area.django.html +3 -3
- package/src/components/text-area/text-area.react-snapshot.html +108 -0
- package/src/components/theme-picker/ThemePicker.tsx +45 -60
- package/src/components/theme-picker/config.json +54 -2
- package/src/components/theme-picker/theme-picker.django-snapshot.html +109 -0
- package/src/components/theme-picker/theme-picker.django.html +8 -8
- package/src/components/theme-picker/theme-picker.react-snapshot.html +94 -0
- package/src/components/time-picker/TimePicker.tsx +15 -9
- package/src/components/time-picker/config.json +2 -2
- package/src/components/time-picker/time-picker.django-snapshot.html +190 -0
- package/src/components/time-picker/time-picker.django.html +2 -2
- package/src/components/time-picker/time-picker.html +7 -7
- package/src/components/time-picker/time-picker.react-snapshot.html +157 -0
- package/src/components/toggle/_option.django.html +21 -0
- package/src/components/toggle/config.json +23 -2
- package/src/components/toggle/toggle.django-snapshot.html +419 -0
- package/src/components/toggle/toggle.django.html +10 -21
- package/src/components/toggle/toggle.html +318 -323
- package/src/components/toggle/toggle.react-snapshot.html +419 -0
- package/src/components/tooltip/Tooltip.tsx +2 -2
- package/src/components/tooltip/config.json +6 -1
- package/src/components/tooltip/tooltip.django-snapshot.html +57 -0
- package/src/components/tooltip/tooltip.django.html +1 -1
- package/src/components/tooltip/tooltip.react-snapshot.html +62 -0
- package/src/components/tree/Tree.tsx +91 -0
- package/src/components/tree/_tree-items.django.html +15 -0
- package/src/components/tree/config.json +105 -0
- package/src/components/tree/tree.django-snapshot.html +525 -0
- package/src/components/tree/tree.django.html +5 -0
- package/src/components/tree/tree.html +432 -0
- package/src/components/tree/tree.react-snapshot.html +432 -0
- package/src/components/villain/config.json +9 -0
- package/src/components/villain/villain.django-snapshot.html +44 -0
- package/src/components/villain/villain.react-snapshot.html +35 -0
- package/src/index.js +4 -0
package/dist/index.cjs
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
expanded = false,
|
|
78
78
|
headingClassName,
|
|
79
79
|
contentClassName,
|
|
80
|
-
|
|
80
|
+
headingAs = "h3",
|
|
81
81
|
handleToggle
|
|
82
82
|
}) {
|
|
83
83
|
const headingClasses = ClassNames("usa-accordion__heading", headingClassName);
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"usa-prose",
|
|
87
87
|
contentClassName
|
|
88
88
|
);
|
|
89
|
-
const Heading =
|
|
89
|
+
const Heading = headingAs;
|
|
90
90
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
91
91
|
/* @__PURE__ */ jsxRuntime.jsx(Heading, { id: `${id}-heading`, className: headingClasses, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
92
92
|
"button",
|
|
@@ -95,7 +95,6 @@
|
|
|
95
95
|
className: "usa-accordion__button",
|
|
96
96
|
"aria-expanded": expanded,
|
|
97
97
|
"aria-controls": `${id}-content`,
|
|
98
|
-
"data-testid": `accordionButton_${id}`,
|
|
99
98
|
onClick: handleToggle,
|
|
100
99
|
children: title
|
|
101
100
|
}
|
|
@@ -105,7 +104,6 @@
|
|
|
105
104
|
{
|
|
106
105
|
id: `${id}-content`,
|
|
107
106
|
"aria-labelledby": `${id}-heading`,
|
|
108
|
-
"data-testid": `accordionItem_${id}`,
|
|
109
107
|
className: contentClasses,
|
|
110
108
|
hidden: !expanded,
|
|
111
109
|
children: content
|
|
@@ -118,7 +116,7 @@
|
|
|
118
116
|
bordered = false,
|
|
119
117
|
items = [],
|
|
120
118
|
multiselectable = false,
|
|
121
|
-
|
|
119
|
+
headingAs = "h3",
|
|
122
120
|
iconPosition,
|
|
123
121
|
className = "",
|
|
124
122
|
headingClassName = "",
|
|
@@ -143,7 +141,7 @@
|
|
|
143
141
|
AccordionItem,
|
|
144
142
|
{
|
|
145
143
|
...item,
|
|
146
|
-
|
|
144
|
+
headingAs,
|
|
147
145
|
headingClassName,
|
|
148
146
|
contentClassName
|
|
149
147
|
},
|
|
@@ -163,21 +161,28 @@
|
|
|
163
161
|
function Icon({
|
|
164
162
|
name,
|
|
165
163
|
source = "uswds",
|
|
166
|
-
size
|
|
164
|
+
size,
|
|
167
165
|
color,
|
|
168
|
-
alt
|
|
166
|
+
alt,
|
|
169
167
|
staticBaseUrl,
|
|
170
168
|
staticUrlPrefix,
|
|
171
169
|
className = "",
|
|
172
170
|
...props2
|
|
173
171
|
}) {
|
|
174
172
|
const spritePrefix = staticUrlPrefix ?? getAssetUrl(`img/${source === "usx" ? "usx-sprite.svg" : "sprite.svg"}#`, staticBaseUrl);
|
|
173
|
+
const classes = ClassNames(
|
|
174
|
+
"usa-icon",
|
|
175
|
+
"usx-icon",
|
|
176
|
+
size ? size === 1 ? "usx-icon--size-1" : "usa-icon--size-" + size : "",
|
|
177
|
+
color ? "text-" + color : "",
|
|
178
|
+
className
|
|
179
|
+
);
|
|
175
180
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
176
181
|
"svg",
|
|
177
182
|
{
|
|
178
|
-
className:
|
|
179
|
-
"aria-hidden": "true",
|
|
180
|
-
"aria-label": alt,
|
|
183
|
+
className: classes,
|
|
184
|
+
"aria-hidden": alt ? void 0 : "true",
|
|
185
|
+
"aria-label": alt || void 0,
|
|
181
186
|
focusable: "false",
|
|
182
187
|
role: "img",
|
|
183
188
|
...props2,
|
|
@@ -218,14 +223,37 @@
|
|
|
218
223
|
} else if (ariaLabel) {
|
|
219
224
|
accessibilityProps["aria-label"] = ariaLabel;
|
|
220
225
|
} else if (resolvedRole === "region") {
|
|
221
|
-
|
|
226
|
+
const label = heading || (normalizedVariant ? `${normalizedVariant} alert` : void 0);
|
|
227
|
+
if (label) accessibilityProps["aria-label"] = label;
|
|
222
228
|
}
|
|
223
229
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...accessibilityProps, ...props2, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-alert__body", children: [
|
|
224
230
|
!slim && heading ? /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "usa-alert__heading", children: heading }) : null,
|
|
225
|
-
children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-alert__text", children }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "usa-alert__text", children: text }),
|
|
231
|
+
children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-alert__text", children }) : text ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "usa-alert__text", children: text }) : null,
|
|
226
232
|
onDismiss && /* @__PURE__ */ jsxRuntime.jsx("button", { className: "usx-alert__dismiss", "aria-label": "Dismiss alert", onClick: onDismiss, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", size: 3, staticBaseUrl }) })
|
|
227
233
|
] }) });
|
|
228
234
|
}
|
|
235
|
+
const Tooltip = ({
|
|
236
|
+
label,
|
|
237
|
+
position = "right",
|
|
238
|
+
children,
|
|
239
|
+
className = "",
|
|
240
|
+
bodyClassName = "",
|
|
241
|
+
...props2
|
|
242
|
+
}) => {
|
|
243
|
+
const validPositions = ["top", "bottom", "left", "right"];
|
|
244
|
+
const normalizedPosition = validPositions.includes(position) ? position : "right";
|
|
245
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: ClassNames("usx-tooltip", className), ...props2, children: [
|
|
246
|
+
children,
|
|
247
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
248
|
+
"span",
|
|
249
|
+
{
|
|
250
|
+
className: ClassNames("usa-tooltip__body", `usa-tooltip__body--${normalizedPosition}`, bodyClassName),
|
|
251
|
+
role: "tooltip",
|
|
252
|
+
children: label
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
] });
|
|
256
|
+
};
|
|
229
257
|
const shapeClassMap = {
|
|
230
258
|
circle: "usx-circle",
|
|
231
259
|
"rounded-sm": "usx-rounded-sm",
|
|
@@ -240,7 +268,7 @@
|
|
|
240
268
|
variant = "image",
|
|
241
269
|
value = null,
|
|
242
270
|
shape = null,
|
|
243
|
-
|
|
271
|
+
tooltipProps = null,
|
|
244
272
|
className = "",
|
|
245
273
|
imageClassName = "",
|
|
246
274
|
contentClassName = "",
|
|
@@ -262,15 +290,9 @@
|
|
|
262
290
|
shape ? shapeClassMap[shape] : "usx-circle",
|
|
263
291
|
contentClassName
|
|
264
292
|
);
|
|
265
|
-
const avatarContent = isInitialsVariant ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: contentClasses, children: value }) : isIconVariant ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: contentClasses, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: value, alt: alt
|
|
293
|
+
const avatarContent = isInitialsVariant ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: contentClasses, children: value }) : isIconVariant ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: contentClasses, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: value, alt: alt ? void 0 : `${value} icon` }) }) : /* @__PURE__ */ jsxRuntime.jsx("img", { className: imgClasses, src: src || void 0, alt: alt || void 0, role: "img", ...props2 });
|
|
266
294
|
const avatar = /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: wrapperClasses, "aria-label": isInitialsVariant || isIconVariant ? alt || void 0 : void 0, children: avatarContent });
|
|
267
|
-
|
|
268
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "usx-tooltip", children: [
|
|
269
|
-
avatar,
|
|
270
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-tooltip__body usa-tooltip__body--right", role: "tooltip", children: tooltip })
|
|
271
|
-
] });
|
|
272
|
-
}
|
|
273
|
-
return avatar;
|
|
295
|
+
return tooltipProps ? /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { ...tooltipProps, children: avatar }) : avatar;
|
|
274
296
|
}
|
|
275
297
|
function Attribution({
|
|
276
298
|
avatarProps = null,
|
|
@@ -295,8 +317,8 @@
|
|
|
295
317
|
function AvatarGroup({ avatarProps = [], overlap = false, stacked = false, className = "", ...props2 }) {
|
|
296
318
|
const classes = ClassNames(
|
|
297
319
|
"usx-avatar-group",
|
|
298
|
-
overlap && "
|
|
299
|
-
stacked && "
|
|
320
|
+
overlap && "usx-avatar-group--overlap",
|
|
321
|
+
stacked && "usx-avatar-group--stacked",
|
|
300
322
|
className
|
|
301
323
|
);
|
|
302
324
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...props2, children: avatarProps.map((avatar, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -307,7 +329,7 @@
|
|
|
307
329
|
alt: avatar.alt,
|
|
308
330
|
value: avatar.initials,
|
|
309
331
|
shape: avatar.shape,
|
|
310
|
-
|
|
332
|
+
tooltipProps: avatar.tooltipProps,
|
|
311
333
|
className: avatar.className,
|
|
312
334
|
imageClassName: avatar.imageClassName,
|
|
313
335
|
contentClassName: avatar.initialsClassName
|
|
@@ -317,6 +339,7 @@
|
|
|
317
339
|
}
|
|
318
340
|
function BackToTop({
|
|
319
341
|
label = "Back to top",
|
|
342
|
+
ariaLabel = "Back to top",
|
|
320
343
|
href = void 0,
|
|
321
344
|
variant = null,
|
|
322
345
|
iconPosition = "right",
|
|
@@ -325,6 +348,7 @@
|
|
|
325
348
|
onClick = void 0,
|
|
326
349
|
...props2
|
|
327
350
|
}) {
|
|
351
|
+
const accessibleName = label ? void 0 : ariaLabel;
|
|
328
352
|
const icon = /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "arrow_upward", size: iconSize, className: ClassNames(
|
|
329
353
|
iconPosition === "left" ? "margin-right-05" : "margin-left-05"
|
|
330
354
|
) });
|
|
@@ -335,7 +359,7 @@
|
|
|
335
359
|
"flex-align-center",
|
|
336
360
|
className
|
|
337
361
|
);
|
|
338
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("a", { className: linkClasses, href, ...props2, children: [
|
|
362
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("a", { className: linkClasses, href, "aria-label": accessibleName, ...props2, children: [
|
|
339
363
|
iconPosition === "left" && icon,
|
|
340
364
|
label,
|
|
341
365
|
iconPosition === "right" && icon
|
|
@@ -353,6 +377,7 @@
|
|
|
353
377
|
{
|
|
354
378
|
type: "button",
|
|
355
379
|
className: buttonClasses,
|
|
380
|
+
"aria-label": accessibleName,
|
|
356
381
|
onClick: onClick || (() => window.scrollTo({ top: 0, behavior: "smooth" })),
|
|
357
382
|
...props2,
|
|
358
383
|
children: [
|
|
@@ -484,7 +509,7 @@
|
|
|
484
509
|
}) {
|
|
485
510
|
if (!items || items.length === 0) {
|
|
486
511
|
const classes = ClassNames("usx-breadcrumb", className);
|
|
487
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...props2, children
|
|
512
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...props2, children });
|
|
488
513
|
}
|
|
489
514
|
const navClasses = ClassNames(
|
|
490
515
|
"usa-breadcrumb",
|
|
@@ -540,6 +565,7 @@
|
|
|
540
565
|
] });
|
|
541
566
|
};
|
|
542
567
|
function Label({
|
|
568
|
+
id,
|
|
543
569
|
htmlFor,
|
|
544
570
|
required = false,
|
|
545
571
|
error = false,
|
|
@@ -558,8 +584,9 @@
|
|
|
558
584
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
559
585
|
"label",
|
|
560
586
|
{
|
|
587
|
+
id: id || void 0,
|
|
561
588
|
className: classOverride ? className : classes,
|
|
562
|
-
|
|
589
|
+
htmlFor: htmlFor || void 0,
|
|
563
590
|
...props2,
|
|
564
591
|
children: [
|
|
565
592
|
required && /* @__PURE__ */ jsxRuntime.jsx(Required, {}),
|
|
@@ -586,7 +613,8 @@
|
|
|
586
613
|
source: "usx",
|
|
587
614
|
size,
|
|
588
615
|
color,
|
|
589
|
-
staticBaseUrl
|
|
616
|
+
staticBaseUrl,
|
|
617
|
+
staticUrlPrefix
|
|
590
618
|
}
|
|
591
619
|
),
|
|
592
620
|
screenReaderLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { screenReaderOnly: true, children: screenReaderLabel }),
|
|
@@ -668,6 +696,7 @@
|
|
|
668
696
|
type,
|
|
669
697
|
className: classes,
|
|
670
698
|
disabled,
|
|
699
|
+
"aria-disabled": disabled ? "true" : void 0,
|
|
671
700
|
...onClick ? { onClick } : {},
|
|
672
701
|
...buttonProps,
|
|
673
702
|
...extraAttributes,
|
|
@@ -728,10 +757,9 @@
|
|
|
728
757
|
content,
|
|
729
758
|
backgroundColor,
|
|
730
759
|
textColor,
|
|
731
|
-
|
|
760
|
+
as: Element = "div",
|
|
732
761
|
...props2
|
|
733
762
|
}) {
|
|
734
|
-
const Element = element;
|
|
735
763
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
736
764
|
Element,
|
|
737
765
|
{
|
|
@@ -879,6 +907,7 @@
|
|
|
879
907
|
statusClassName,
|
|
880
908
|
children,
|
|
881
909
|
className,
|
|
910
|
+
extraAttributes,
|
|
882
911
|
role = "region",
|
|
883
912
|
...props2
|
|
884
913
|
}) {
|
|
@@ -895,6 +924,7 @@
|
|
|
895
924
|
"aria-label": ariaLabel,
|
|
896
925
|
"data-show-dots": showDots ? void 0 : "false",
|
|
897
926
|
"data-status-class-name": statusClassName,
|
|
927
|
+
...extraAttributes,
|
|
898
928
|
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
929
|
"div",
|
|
900
930
|
{
|
|
@@ -925,7 +955,7 @@
|
|
|
925
955
|
children,
|
|
926
956
|
className = "",
|
|
927
957
|
containerClassName = "",
|
|
928
|
-
|
|
958
|
+
as: RootTag = "div",
|
|
929
959
|
...props2
|
|
930
960
|
}) {
|
|
931
961
|
const cardClasses = ClassNames(
|
|
@@ -977,7 +1007,7 @@
|
|
|
977
1007
|
"usx-card-group",
|
|
978
1008
|
className
|
|
979
1009
|
);
|
|
980
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: classes, ...props2, children: cardProps.map((card, index) => /* @__PURE__ */ jsxRuntime.jsx(Card, { ...card,
|
|
1010
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: classes, ...props2, children: cardProps.map((card, index) => /* @__PURE__ */ jsxRuntime.jsx(Card, { ...card, as: "li" }, index)) });
|
|
981
1011
|
}
|
|
982
1012
|
function Hint({
|
|
983
1013
|
id,
|
|
@@ -1094,7 +1124,7 @@
|
|
|
1094
1124
|
className: classes,
|
|
1095
1125
|
placeholder,
|
|
1096
1126
|
disabled,
|
|
1097
|
-
defaultValue,
|
|
1127
|
+
defaultValue: props2.value === void 0 ? defaultValue : void 0,
|
|
1098
1128
|
...required ? { required: true } : {},
|
|
1099
1129
|
"aria-describedby": describedByParts.length ? describedByParts.join(" ") : void 0,
|
|
1100
1130
|
"aria-invalid": hasError ? "true" : void 0,
|
|
@@ -1123,7 +1153,6 @@
|
|
|
1123
1153
|
const infoId = `${fieldId}-info`;
|
|
1124
1154
|
const hintId = hint ? `${fieldId}-hint` : void 0;
|
|
1125
1155
|
const errorId = error ? `${fieldId}-error` : void 0;
|
|
1126
|
-
const successId = !error && success ? `${fieldId}-success` : void 0;
|
|
1127
1156
|
const outerClasses = ClassNames("usa-character-count", "usx-character-count", className);
|
|
1128
1157
|
const fieldProps = {
|
|
1129
1158
|
id: fieldId,
|
|
@@ -1138,7 +1167,7 @@
|
|
|
1138
1167
|
maxLength: max,
|
|
1139
1168
|
formGroup: true,
|
|
1140
1169
|
className: "usa-character-count__field",
|
|
1141
|
-
"aria-describedby": [infoId, hintId, errorId
|
|
1170
|
+
"aria-describedby": [infoId, hintId, errorId].filter(Boolean).join(" "),
|
|
1142
1171
|
...props2
|
|
1143
1172
|
};
|
|
1144
1173
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: outerClasses, children: [
|
|
@@ -1166,6 +1195,7 @@
|
|
|
1166
1195
|
className = "",
|
|
1167
1196
|
onChange,
|
|
1168
1197
|
required = false,
|
|
1198
|
+
formGroup = true,
|
|
1169
1199
|
...props2
|
|
1170
1200
|
}) {
|
|
1171
1201
|
const hasError = !!error;
|
|
@@ -1180,7 +1210,7 @@
|
|
|
1180
1210
|
"usa-checkbox__input",
|
|
1181
1211
|
{ "usa-checkbox__input--tile": tile }
|
|
1182
1212
|
);
|
|
1183
|
-
|
|
1213
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1184
1214
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: divClasses, ...props2, children: [
|
|
1185
1215
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1186
1216
|
"input",
|
|
@@ -1190,7 +1220,7 @@
|
|
|
1190
1220
|
type: "checkbox",
|
|
1191
1221
|
name,
|
|
1192
1222
|
value,
|
|
1193
|
-
"aria-label": ariaLabel,
|
|
1223
|
+
"aria-label": ariaLabel || void 0,
|
|
1194
1224
|
defaultChecked: checked,
|
|
1195
1225
|
disabled,
|
|
1196
1226
|
required,
|
|
@@ -1204,6 +1234,7 @@
|
|
|
1204
1234
|
] }),
|
|
1205
1235
|
hasError ? /* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { children: error }) : hasSuccess ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-success-message text-success", role: "status", children: success }) : null
|
|
1206
1236
|
] });
|
|
1237
|
+
return formGroup ? /* @__PURE__ */ jsxRuntime.jsx(FormGroup, { error: hasError, children: content }) : content;
|
|
1207
1238
|
}
|
|
1208
1239
|
function Legend({
|
|
1209
1240
|
text,
|
|
@@ -1280,7 +1311,8 @@
|
|
|
1280
1311
|
tile,
|
|
1281
1312
|
small,
|
|
1282
1313
|
...opt,
|
|
1283
|
-
id
|
|
1314
|
+
id,
|
|
1315
|
+
formGroup: false
|
|
1284
1316
|
},
|
|
1285
1317
|
id
|
|
1286
1318
|
);
|
|
@@ -1318,28 +1350,6 @@
|
|
|
1318
1350
|
Clickable.Link = ClickableLink;
|
|
1319
1351
|
Clickable.ColorChange = ClickableColorChange;
|
|
1320
1352
|
Clickable.BgColorChange = ClickableBgColorChange;
|
|
1321
|
-
const Tooltip = ({
|
|
1322
|
-
label,
|
|
1323
|
-
position = "top",
|
|
1324
|
-
children,
|
|
1325
|
-
className = "",
|
|
1326
|
-
bodyClassName = "",
|
|
1327
|
-
...props2
|
|
1328
|
-
}) => {
|
|
1329
|
-
const validPositions = ["top", "bottom", "left", "right"];
|
|
1330
|
-
const normalizedPosition = validPositions.includes(position) ? position : "top";
|
|
1331
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: ClassNames("usx-tooltip", className), ...props2, children: [
|
|
1332
|
-
children,
|
|
1333
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1334
|
-
"span",
|
|
1335
|
-
{
|
|
1336
|
-
className: ClassNames("usa-tooltip__body", `usa-tooltip__body--${normalizedPosition}`, bodyClassName),
|
|
1337
|
-
role: "tooltip",
|
|
1338
|
-
children: label
|
|
1339
|
-
}
|
|
1340
|
-
)
|
|
1341
|
-
] });
|
|
1342
|
-
};
|
|
1343
1353
|
function copyTextToClipboard(text) {
|
|
1344
1354
|
if (window.navigator.clipboard) {
|
|
1345
1355
|
return window.navigator.clipboard.writeText(text);
|
|
@@ -1360,8 +1370,8 @@
|
|
|
1360
1370
|
onClick: () => copyTextToClipboard(copyText),
|
|
1361
1371
|
type: "button",
|
|
1362
1372
|
children: [
|
|
1363
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "content_copy",
|
|
1364
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check",
|
|
1373
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "content_copy", className: "usx-copy__copy", staticBaseUrl }),
|
|
1374
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", className: "usx-copy__check", staticBaseUrl }),
|
|
1365
1375
|
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "margin-left-1", children: label })
|
|
1366
1376
|
]
|
|
1367
1377
|
}
|
|
@@ -1481,6 +1491,7 @@
|
|
|
1481
1491
|
name,
|
|
1482
1492
|
disabled,
|
|
1483
1493
|
required,
|
|
1494
|
+
"aria-describedby": [hintId, errorId].filter(Boolean).join(" ") || void 0,
|
|
1484
1495
|
onChange: handleChange,
|
|
1485
1496
|
...props2,
|
|
1486
1497
|
children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value))
|
|
@@ -1491,7 +1502,7 @@
|
|
|
1491
1502
|
] });
|
|
1492
1503
|
return formGroup ? /* @__PURE__ */ jsxRuntime.jsx(FormGroup, { error: !!error, children: content }) : content;
|
|
1493
1504
|
}
|
|
1494
|
-
const props = { "
|
|
1505
|
+
const props = { "as": { "type": "select", "description": "Root HTML element. Use a heading or accessible label for named sections and navigation; list roots require list-item children.", "options": ["div", "section", "article", "aside", "nav", "ul", "ol", "li"], "default": "div" }, "gridContainer": { "type": "select", "description": "Opt-in centered USWDS page-width container with side padding. Default uses the USX themed grid-container; named sizes use USWDS widths. Usually wrap a gridRow inside this container rather than combining them.", "options": ["default", "card", "card-lg", "mobile", "mobile-lg", "tablet", "tablet-lg", "desktop", "desktop-lg", "widescreen"] }, "gridRow": { "type": "boolean", "description": "Use a wrapping USWDS grid row. Nest Containers with column settings as direct children. Omitted leaves the container unstyled.", "default": false }, "display": { "type": "select", "description": "Display mode. Choose flex or inline-flex to enable direction, wrap, alignment, and gap. Flow-root contains floated children; none hides the container and its descendants.", "options": ["block", "flex", "inline", "inline-block", "inline-flex", "none", "flow-root"] }, "direction": { "type": "select", "description": "Direction of flex children. Requires display flex or inline-flex (or gridRow). Reverse directions change visual order only, not reading or keyboard order.", "options": ["row", "column", "row-reverse", "column-reverse"] }, "wrap": { "type": "select", "description": "Whether flex children wrap onto new lines. Set wrap for a flexible toolbar; omitted uses normal CSS behavior.", "options": ["wrap", "nowrap", "wrap-reverse"] }, "justify": { "type": "select", "description": "Distribute children along the main flex axis.", "options": ["start", "end", "center", "space-between", "space-around", "space-evenly"] }, "align": { "type": "select", "description": "Align children across the flex axis.", "options": ["start", "end", "center", "stretch", "baseline"] }, "alignSelf": { "type": "select", "description": "Override this container’s alignment as a child of a flex parent. Auto restores parent alignment.", "options": ["auto", "start", "end", "center", "stretch", "baseline"] }, "flex": { "type": "select", "description": "Size this container as a flex child: auto uses its content size, fill shares available space, none keeps its size. Use column instead when this is a USWDS grid column.", "options": ["auto", "fill", "none"] }, "gap": { "type": "select", "description": "Space between flex children using USWDS spacing tokens (1 = 8px, 05 = 4px). Use gutters instead on gridRow: CSS gap adds to percentage column widths.", "options": ["0", "2px", "05", "1", "2", "3", "4", "5", "6"] }, "column": { "type": "select", "description": "Width of this container inside a gridRow: 1–12 columns, auto for content width, or fill for equal shares. Set 12 at the base to stack on small screens, then override at larger breakpoints.", "options": ["auto", "fill", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"] }, "offset": { "type": "select", "description": "Offset this grid column by 1–12 columns. Use none to reset an earlier offset.", "options": ["none", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"] }, "gutters": { "type": "select", "description": "Horizontal USWDS grid gutters; requires gridRow. Use 2 with a desktop override of 4 for standard responsive spacing; 0 removes gutters. Rows use negative margins, so nest them in a gridContainer or another padded parent.", "options": ["sm", "md", "lg", "0", "2px", "05", "1", "2", "3", "4", "5", "6"] }, "float": { "type": "select", "description": "Float this container so surrounding content wraps around it. Float has no effect on flex children; use a flow-root parent to contain floats.", "options": ["none", "left", "right"] }, "responsive": { "type": "object", "description": "Mobile-first overrides keyed by mobileLg, tablet, and desktop. Omitted fields keep the smaller-screen setting; use explicit values (none, 0, row, etc.) to reset. Breakpoints match precompiled USWDS and do not follow USX page-layout theme breakpoints.", "properties": { "mobileLg": { "type": "object", "description": "Layout overrides at 30em / 480px and wider (pixel equivalent assumes 16px browser default).", "component": "container", "omit": ["as", "gridContainer", "gridRow", "responsive", "children", "content", "className", "id", "role", "ariaLabel", "ariaLabelledby"] }, "tablet": { "type": "object", "description": "Layout overrides at 40em / 640px and wider (pixel equivalent assumes 16px browser default).", "component": "container", "omit": ["as", "gridContainer", "gridRow", "responsive", "children", "content", "className", "id", "role", "ariaLabel", "ariaLabelledby"] }, "desktop": { "type": "object", "description": "Layout overrides at 64em / 1024px and wider (pixel equivalent assumes 16px browser default).", "component": "container", "omit": ["as", "gridContainer", "gridRow", "responsive", "children", "content", "className", "id", "role", "ariaLabel", "ariaLabelledby"] } } }, "children": { "type": "slot", "description": "Grouped content rendered directly, with no child wrappers or reordering. Takes precedence over content unless null or undefined." }, "content": { "type": "slot", "description": "Fallback grouped content when children is null or undefined." }, "className": { "type": "string", "description": "Additional CSS classes for spacing, decoration, or layouts beyond these controls." }, "id": { "type": "string", "description": "HTML identifier for links and accessible references." }, "role": { "type": "string", "description": "Optional ARIA role; prefer an appropriate semantic element." }, "ariaLabel": { "type": "string", "description": "Accessible name when a visible label is not available." }, "ariaLabelledby": { "type": "string", "description": "ID of the visible heading or label that names this container." } };
|
|
1495
1506
|
const config = {
|
|
1496
1507
|
props
|
|
1497
1508
|
};
|
|
@@ -1524,7 +1535,7 @@
|
|
|
1524
1535
|
});
|
|
1525
1536
|
}
|
|
1526
1537
|
function Container({
|
|
1527
|
-
|
|
1538
|
+
as = "div",
|
|
1528
1539
|
gridContainer,
|
|
1529
1540
|
gridRow = false,
|
|
1530
1541
|
display,
|
|
@@ -1548,7 +1559,7 @@
|
|
|
1548
1559
|
ariaLabel,
|
|
1549
1560
|
ariaLabelledby
|
|
1550
1561
|
}) {
|
|
1551
|
-
const Element = config.props.
|
|
1562
|
+
const Element = config.props.as.options.includes(as) ? as : "div";
|
|
1552
1563
|
const classes = ClassNames(
|
|
1553
1564
|
"usx-container",
|
|
1554
1565
|
gridContainer && config.props.gridContainer.options.includes(gridContainer) ? gridContainer === "default" ? "grid-container" : `grid-container-${gridContainer}` : null,
|
|
@@ -1709,49 +1720,140 @@
|
|
|
1709
1720
|
}
|
|
1710
1721
|
);
|
|
1711
1722
|
}
|
|
1723
|
+
function Summary({
|
|
1724
|
+
label = "Details",
|
|
1725
|
+
children,
|
|
1726
|
+
ariaLabel,
|
|
1727
|
+
className = "",
|
|
1728
|
+
textClassName = "",
|
|
1729
|
+
markerColor = void 0,
|
|
1730
|
+
underlineColor = void 0,
|
|
1731
|
+
noUnderline = false,
|
|
1732
|
+
noMarker = false,
|
|
1733
|
+
unstyled = false
|
|
1734
|
+
}) {
|
|
1735
|
+
if (unstyled) {
|
|
1736
|
+
return /* @__PURE__ */ jsxRuntime.jsx("summary", { className: className || void 0, "aria-label": ariaLabel, children: children ?? label });
|
|
1737
|
+
}
|
|
1738
|
+
const summaryClassNames = ClassNames(
|
|
1739
|
+
"usx-summary",
|
|
1740
|
+
{ [`marker-${markerColor}`]: markerColor && !noMarker },
|
|
1741
|
+
{ "usx-summary--no-marker": noMarker },
|
|
1742
|
+
{ "usx-summary--no-underline": noUnderline },
|
|
1743
|
+
className
|
|
1744
|
+
);
|
|
1745
|
+
const summaryTextClassNames = ClassNames(
|
|
1746
|
+
"usx-summary-text",
|
|
1747
|
+
{ [`underline-${underlineColor}`]: !noUnderline && underlineColor },
|
|
1748
|
+
textClassName
|
|
1749
|
+
);
|
|
1750
|
+
return /* @__PURE__ */ jsxRuntime.jsx("summary", { className: summaryClassNames, "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: summaryTextClassNames, children: children ?? (label || "Details") }) });
|
|
1751
|
+
}
|
|
1712
1752
|
function Details({
|
|
1713
|
-
|
|
1753
|
+
summaryProps = {},
|
|
1714
1754
|
text = "",
|
|
1715
1755
|
children = null,
|
|
1716
1756
|
open = false,
|
|
1717
|
-
|
|
1718
|
-
underlineColor = void 0,
|
|
1757
|
+
name,
|
|
1719
1758
|
contentBorderColor = void 0,
|
|
1720
1759
|
noContentBorder = false,
|
|
1721
|
-
noSummaryUnderline = false,
|
|
1722
1760
|
className = "",
|
|
1723
|
-
summaryClassName = "",
|
|
1724
|
-
summaryTextClassName = "",
|
|
1725
1761
|
contentClassName = ""
|
|
1726
1762
|
}) {
|
|
1727
1763
|
const detailsClassName = ClassNames(
|
|
1728
1764
|
"usx-details",
|
|
1729
1765
|
{ "usx-details--borderless": noContentBorder },
|
|
1730
|
-
{ "usx-details--no-underline": noSummaryUnderline },
|
|
1731
1766
|
className
|
|
1732
1767
|
);
|
|
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
1768
|
const compositeContentClassName = ClassNames(
|
|
1744
1769
|
"usx-details__content",
|
|
1745
1770
|
{ [`border-${contentBorderColor}`]: !noContentBorder && contentBorderColor },
|
|
1746
1771
|
contentClassName
|
|
1747
1772
|
);
|
|
1748
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("details", { className: detailsClassName, open: open || void 0, children: [
|
|
1749
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1773
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("details", { className: detailsClassName, open: open || void 0, name, children: [
|
|
1774
|
+
/* @__PURE__ */ jsxRuntime.jsx(Summary, { ...summaryProps }),
|
|
1750
1775
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: compositeContentClassName, children: children ?? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "usx-details__text", children: text }) })
|
|
1751
1776
|
] });
|
|
1752
1777
|
}
|
|
1778
|
+
function Drawer({
|
|
1779
|
+
id,
|
|
1780
|
+
label,
|
|
1781
|
+
heading,
|
|
1782
|
+
children,
|
|
1783
|
+
trigger,
|
|
1784
|
+
triggerAriaLabel,
|
|
1785
|
+
side = "inline-end",
|
|
1786
|
+
size = "default",
|
|
1787
|
+
description,
|
|
1788
|
+
footer,
|
|
1789
|
+
rounded = false,
|
|
1790
|
+
actionRequired = false,
|
|
1791
|
+
closeLabel = "Close",
|
|
1792
|
+
focusHeading = true,
|
|
1793
|
+
disabled = false,
|
|
1794
|
+
className,
|
|
1795
|
+
triggerClassName,
|
|
1796
|
+
panelClassName,
|
|
1797
|
+
...props2
|
|
1798
|
+
}) {
|
|
1799
|
+
const opener = { commandfor: id, command: "show-modal" };
|
|
1800
|
+
const closer = { commandfor: id, command: "close" };
|
|
1801
|
+
const dismissal = {
|
|
1802
|
+
closedby: actionRequired ? "none" : void 0
|
|
1803
|
+
};
|
|
1804
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props2, className: ClassNames("usx-drawer", className), children: [
|
|
1805
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1806
|
+
"button",
|
|
1807
|
+
{
|
|
1808
|
+
type: "button",
|
|
1809
|
+
className: triggerClassName || void 0,
|
|
1810
|
+
"aria-haspopup": "dialog",
|
|
1811
|
+
"aria-controls": id,
|
|
1812
|
+
"aria-label": triggerAriaLabel,
|
|
1813
|
+
disabled,
|
|
1814
|
+
...opener,
|
|
1815
|
+
children: trigger ?? label
|
|
1816
|
+
}
|
|
1817
|
+
),
|
|
1818
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1819
|
+
"dialog",
|
|
1820
|
+
{
|
|
1821
|
+
id,
|
|
1822
|
+
className: ClassNames(
|
|
1823
|
+
"usx-drawer__panel",
|
|
1824
|
+
{ "usx-drawer__panel--rounded": rounded },
|
|
1825
|
+
panelClassName
|
|
1826
|
+
),
|
|
1827
|
+
"data-side": side,
|
|
1828
|
+
"data-size": size,
|
|
1829
|
+
...dismissal,
|
|
1830
|
+
"aria-labelledby": `${id}-heading`,
|
|
1831
|
+
"aria-describedby": description ? `${id}-description` : void 0,
|
|
1832
|
+
children: [
|
|
1833
|
+
!actionRequired && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "usx-drawer__close", ...closer, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", size: 3, alt: closeLabel }) }),
|
|
1834
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "usx-drawer__header", children: [
|
|
1835
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1836
|
+
"h2",
|
|
1837
|
+
{
|
|
1838
|
+
id: `${id}-heading`,
|
|
1839
|
+
className: "usx-drawer__heading",
|
|
1840
|
+
tabIndex: focusHeading ? -1 : void 0,
|
|
1841
|
+
autoFocus: focusHeading,
|
|
1842
|
+
children: heading
|
|
1843
|
+
}
|
|
1844
|
+
),
|
|
1845
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${id}-description`, className: "usx-drawer__description", children: description })
|
|
1846
|
+
] }),
|
|
1847
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-drawer__body", children }),
|
|
1848
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "usx-drawer__footer", children: footer })
|
|
1849
|
+
]
|
|
1850
|
+
}
|
|
1851
|
+
)
|
|
1852
|
+
] });
|
|
1853
|
+
}
|
|
1753
1854
|
function Link({
|
|
1754
1855
|
href = "javascript:void(0);",
|
|
1856
|
+
text,
|
|
1755
1857
|
children,
|
|
1756
1858
|
visited = false,
|
|
1757
1859
|
external = false,
|
|
@@ -1776,7 +1878,7 @@
|
|
|
1776
1878
|
target: newTab || external ? "_blank" : void 0,
|
|
1777
1879
|
rel: newTab || external ? "noreferrer noopener" : void 0,
|
|
1778
1880
|
...props2,
|
|
1779
|
-
children
|
|
1881
|
+
children: children ?? text
|
|
1780
1882
|
}
|
|
1781
1883
|
);
|
|
1782
1884
|
}
|
|
@@ -1785,7 +1887,7 @@
|
|
|
1785
1887
|
title = "Page title",
|
|
1786
1888
|
titleId = void 0,
|
|
1787
1889
|
eyebrow = null,
|
|
1788
|
-
|
|
1890
|
+
as: Element = "main",
|
|
1789
1891
|
children = null,
|
|
1790
1892
|
content = null,
|
|
1791
1893
|
tabIndex = void 0,
|
|
@@ -1795,7 +1897,6 @@
|
|
|
1795
1897
|
}) {
|
|
1796
1898
|
const classes = ClassNames("usx-page", className);
|
|
1797
1899
|
const pageContent = children || content;
|
|
1798
|
-
const Element = element;
|
|
1799
1900
|
const labelledBy = ariaLabelledby || titleId || void 0;
|
|
1800
1901
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1801
1902
|
Element,
|
|
@@ -1817,13 +1918,13 @@
|
|
|
1817
1918
|
}
|
|
1818
1919
|
const validElements = ["div", "article", "section", "main"];
|
|
1819
1920
|
const Prose = ({
|
|
1820
|
-
|
|
1921
|
+
as = "div",
|
|
1821
1922
|
content,
|
|
1822
1923
|
children,
|
|
1823
1924
|
className = "",
|
|
1824
1925
|
...props2
|
|
1825
1926
|
}) => {
|
|
1826
|
-
const Element = validElements.includes(
|
|
1927
|
+
const Element = validElements.includes(as) ? as : "div";
|
|
1827
1928
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1828
1929
|
Element,
|
|
1829
1930
|
{
|
|
@@ -2055,9 +2156,12 @@
|
|
|
2055
2156
|
commonLabel,
|
|
2056
2157
|
commonHint,
|
|
2057
2158
|
commonError,
|
|
2058
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-file-input__add-only", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2159
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-file-input__add-only", "data-usx-file-list-hint": typeof fileListHint === "string" && fileListHint ? fileListHint : "Selected files", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2059
2160
|
"input",
|
|
2060
2161
|
{
|
|
2162
|
+
ref: (node) => {
|
|
2163
|
+
if (node) node.usxReactManaged = true;
|
|
2164
|
+
},
|
|
2061
2165
|
className: ClassNames("usa-file-input", "usx-file-input", className),
|
|
2062
2166
|
id,
|
|
2063
2167
|
type: "file",
|
|
@@ -2305,12 +2409,9 @@
|
|
|
2305
2409
|
onSubmit(query);
|
|
2306
2410
|
}
|
|
2307
2411
|
};
|
|
2308
|
-
const iconClasses = ClassNames(
|
|
2309
|
-
"
|
|
2310
|
-
|
|
2311
|
-
"display-inline-block": iconOnly
|
|
2312
|
-
}
|
|
2313
|
-
);
|
|
2412
|
+
const iconClasses = ClassNames("usa-search__submit-icon", {
|
|
2413
|
+
"display-inline-block": iconOnly
|
|
2414
|
+
});
|
|
2314
2415
|
const formClasses = ClassNames(
|
|
2315
2416
|
"usa-search",
|
|
2316
2417
|
{
|
|
@@ -2335,7 +2436,7 @@
|
|
|
2335
2436
|
id,
|
|
2336
2437
|
label,
|
|
2337
2438
|
screenReaderOnlyLabel: true,
|
|
2338
|
-
placeholder,
|
|
2439
|
+
placeholder: placeholder ?? "",
|
|
2339
2440
|
defaultValue,
|
|
2340
2441
|
type: "search",
|
|
2341
2442
|
name: searchKey,
|
|
@@ -2344,7 +2445,7 @@
|
|
|
2344
2445
|
),
|
|
2345
2446
|
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: buttonVariant, type: "submit", children: [
|
|
2346
2447
|
!iconOnly && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-search__submit-text", children: label }),
|
|
2347
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: icon, className: iconClasses,
|
|
2448
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: icon, className: iconClasses, alt: iconOnly ? label : void 0 })
|
|
2348
2449
|
] })
|
|
2349
2450
|
]
|
|
2350
2451
|
}
|
|
@@ -2366,7 +2467,7 @@
|
|
|
2366
2467
|
}) {
|
|
2367
2468
|
const navClasses = ClassNames("usa-nav__primary", "usa-accordion");
|
|
2368
2469
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2369
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "usa-nav__close", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close" }) }),
|
|
2470
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "usa-nav__close", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", size: 3 }) }),
|
|
2370
2471
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: navClasses, children: navSections.map((section, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "usa-nav__primary-item", children: section.href ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2371
2472
|
"a",
|
|
2372
2473
|
{
|
|
@@ -2474,7 +2575,7 @@
|
|
|
2474
2575
|
] });
|
|
2475
2576
|
if (extended) {
|
|
2476
2577
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2477
|
-
/* @__PURE__ */ jsxRuntime.jsx("header", { className: headerClasses, ...props2, children: navbar }),
|
|
2578
|
+
/* @__PURE__ */ jsxRuntime.jsx("header", { id, className: headerClasses, ...props2, children: navbar }),
|
|
2478
2579
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Primary navigation", className: navClasses, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-nav__inner", children: [
|
|
2479
2580
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2480
2581
|
PrimaryNav,
|
|
@@ -2506,7 +2607,7 @@
|
|
|
2506
2607
|
] }) })
|
|
2507
2608
|
] });
|
|
2508
2609
|
}
|
|
2509
|
-
return /* @__PURE__ */ jsxRuntime.jsx("header", { className: headerClasses, ...props2, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-nav-container", children: [
|
|
2610
|
+
return /* @__PURE__ */ jsxRuntime.jsx("header", { id, className: headerClasses, ...props2, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-nav-container", children: [
|
|
2510
2611
|
navbar,
|
|
2511
2612
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Primary navigation", className: navClasses, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2512
2613
|
PrimaryNav,
|
|
@@ -2534,7 +2635,7 @@
|
|
|
2534
2635
|
contentPosition = "left",
|
|
2535
2636
|
boxed = true,
|
|
2536
2637
|
calloutMaxWidth,
|
|
2537
|
-
|
|
2638
|
+
headingAs = "h1",
|
|
2538
2639
|
secondaryContent = null,
|
|
2539
2640
|
overlay = true,
|
|
2540
2641
|
overlayOpacity,
|
|
@@ -2543,9 +2644,9 @@
|
|
|
2543
2644
|
style,
|
|
2544
2645
|
...props2
|
|
2545
2646
|
}) {
|
|
2546
|
-
const Heading =
|
|
2647
|
+
const Heading = headingAs;
|
|
2547
2648
|
const secondaryHeadings = { h1: "h2", h2: "h3", h3: "h4", h4: "h5", h5: "h6" };
|
|
2548
|
-
const SecondaryHeading = secondaryHeadings[
|
|
2649
|
+
const SecondaryHeading = secondaryHeadings[headingAs];
|
|
2549
2650
|
const classes = ClassNames(
|
|
2550
2651
|
"usx-hero",
|
|
2551
2652
|
overlay && "usx-hero--has-overlay",
|
|
@@ -2578,7 +2679,7 @@
|
|
|
2578
2679
|
] })
|
|
2579
2680
|
] }) });
|
|
2580
2681
|
}
|
|
2581
|
-
function renderContent
|
|
2682
|
+
function renderContent(content) {
|
|
2582
2683
|
if (typeof content === "string") {
|
|
2583
2684
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: content } });
|
|
2584
2685
|
}
|
|
@@ -2604,7 +2705,7 @@
|
|
|
2604
2705
|
) }),
|
|
2605
2706
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: ClassNames("usa-icon-list__content", item.contentClassName), children: [
|
|
2606
2707
|
item.title ? /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "usa-icon-list__title", children: item.title }) : null,
|
|
2607
|
-
renderContent
|
|
2708
|
+
renderContent(item.content)
|
|
2608
2709
|
] })
|
|
2609
2710
|
] }, index)) });
|
|
2610
2711
|
}
|
|
@@ -2700,7 +2801,7 @@
|
|
|
2700
2801
|
className: ClassNames(
|
|
2701
2802
|
"usa-identifier__logos",
|
|
2702
2803
|
"usx-avatar-group",
|
|
2703
|
-
overlapAvatars && "
|
|
2804
|
+
overlapAvatars && "usx-avatar-group--overlap"
|
|
2704
2805
|
),
|
|
2705
2806
|
children: avatarProps.map((avatar, index) => /* @__PURE__ */ React.createElement(
|
|
2706
2807
|
Avatar,
|
|
@@ -2731,7 +2832,7 @@
|
|
|
2731
2832
|
id = "in-page-nav",
|
|
2732
2833
|
headingElements = "h2 h3",
|
|
2733
2834
|
mainContentSelector = null,
|
|
2734
|
-
|
|
2835
|
+
titleAs = "h4",
|
|
2735
2836
|
titleText = "On this page",
|
|
2736
2837
|
scrollOffset = 0,
|
|
2737
2838
|
rootMargin = "0px 0px 0px 0px",
|
|
@@ -2753,7 +2854,7 @@
|
|
|
2753
2854
|
className: ClassNames("usa-in-page-nav", "usx-in-page-nav", className),
|
|
2754
2855
|
"data-heading-elements": headingElements,
|
|
2755
2856
|
"data-main-content-selector": resolvedSelector,
|
|
2756
|
-
"data-title-heading-level":
|
|
2857
|
+
"data-title-heading-level": titleAs,
|
|
2757
2858
|
"data-title-text": titleText,
|
|
2758
2859
|
"data-scroll-offset": scrollOffset,
|
|
2759
2860
|
"data-root-margin": rootMargin,
|
|
@@ -2955,6 +3056,7 @@
|
|
|
2955
3056
|
expandLeftSidebar,
|
|
2956
3057
|
expandRightSidebar,
|
|
2957
3058
|
expandable = false,
|
|
3059
|
+
onToggleExpanded,
|
|
2958
3060
|
className = "",
|
|
2959
3061
|
...props2
|
|
2960
3062
|
}) {
|
|
@@ -2964,6 +3066,11 @@
|
|
|
2964
3066
|
{ "usx-expanded": expandable && expanded },
|
|
2965
3067
|
className
|
|
2966
3068
|
);
|
|
3069
|
+
const toggleExpanded = (event) => {
|
|
3070
|
+
event.preventDefault();
|
|
3071
|
+
setExpanded(!expanded);
|
|
3072
|
+
onToggleExpanded == null ? void 0 : onToggleExpanded(!expanded);
|
|
3073
|
+
};
|
|
2967
3074
|
const expandButton = expandable ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2968
3075
|
Button,
|
|
2969
3076
|
{
|
|
@@ -2972,8 +3079,9 @@
|
|
|
2972
3079
|
type: "button",
|
|
2973
3080
|
"aria-label": expanded ? "Contract" : "Expand",
|
|
2974
3081
|
"aria-expanded": expanded,
|
|
3082
|
+
"data-usx-layout-toggle": true,
|
|
2975
3083
|
className: "usx-layout__expand-button",
|
|
2976
|
-
onClick:
|
|
3084
|
+
onClick: toggleExpanded,
|
|
2977
3085
|
children: [
|
|
2978
3086
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { source: "usx", name: "expand", size: 3, className: "usx-layout__expand-icon usx-layout__expand-icon--expand" }),
|
|
2979
3087
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { source: "usx", name: "contract", size: 3, className: "usx-layout__expand-icon usx-layout__expand-icon--contract" })
|
|
@@ -3067,6 +3175,7 @@
|
|
|
3067
3175
|
name,
|
|
3068
3176
|
className: combinedSelectClasses,
|
|
3069
3177
|
disabled,
|
|
3178
|
+
required: required || void 0,
|
|
3070
3179
|
defaultValue,
|
|
3071
3180
|
"aria-describedby": describedByParts.length ? describedByParts.join(" ") : void 0,
|
|
3072
3181
|
"aria-invalid": hasError ? true : void 0,
|
|
@@ -3203,8 +3312,8 @@
|
|
|
3203
3312
|
function MiscBanner({
|
|
3204
3313
|
children = null,
|
|
3205
3314
|
className = "",
|
|
3206
|
-
|
|
3207
|
-
badgeText
|
|
3315
|
+
color = "beta",
|
|
3316
|
+
badgeText,
|
|
3208
3317
|
message = "Welcome to the beta website!",
|
|
3209
3318
|
casualLinkText,
|
|
3210
3319
|
casualLinkHref,
|
|
@@ -3213,11 +3322,15 @@
|
|
|
3213
3322
|
importantLinkHref,
|
|
3214
3323
|
importantLinkIcon = "undo",
|
|
3215
3324
|
showReturnLink = true,
|
|
3325
|
+
id,
|
|
3216
3326
|
...props2
|
|
3217
3327
|
}) {
|
|
3218
|
-
const
|
|
3219
|
-
const
|
|
3220
|
-
const
|
|
3328
|
+
const instanceId = React.useId();
|
|
3329
|
+
const baseId = id || instanceId;
|
|
3330
|
+
const bannerColor = color || "beta";
|
|
3331
|
+
const toggleId = `${baseId}-dropdown-toggle`;
|
|
3332
|
+
const menuId = `${baseId}-dropdown`;
|
|
3333
|
+
const classes = ClassNames("usx-misc-banner", `bg-${bannerColor}`, className);
|
|
3221
3334
|
const mobileLinks = [];
|
|
3222
3335
|
const hasLearnMoreLink = showLearnMore && Boolean(casualLinkText);
|
|
3223
3336
|
const hasReturnLink = showReturnLink && Boolean(importantLinkText);
|
|
@@ -3234,7 +3347,7 @@
|
|
|
3234
3347
|
});
|
|
3235
3348
|
}
|
|
3236
3349
|
const content = children || /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3237
|
-
/* @__PURE__ */ jsxRuntime.jsx("strong", { className: `usx-misc-banner__badge text-${
|
|
3350
|
+
badgeText ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: `usx-misc-banner__badge text-${bannerColor}`, children: badgeText }) : null,
|
|
3238
3351
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "usx-misc-banner__text", children: [
|
|
3239
3352
|
message,
|
|
3240
3353
|
hasLearnMoreLink ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -3243,7 +3356,7 @@
|
|
|
3243
3356
|
] }) : null
|
|
3244
3357
|
] }),
|
|
3245
3358
|
hasReturnLink ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-misc-banner__return-text", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { className: "usa-link usx-misc-banner__link", href: importantLinkHref, children: [
|
|
3246
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: importantLinkIcon, size: 1
|
|
3359
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: importantLinkIcon, size: 1 }),
|
|
3247
3360
|
" ",
|
|
3248
3361
|
importantLinkText
|
|
3249
3362
|
] }) }) : null,
|
|
@@ -3263,13 +3376,13 @@
|
|
|
3263
3376
|
htmlFor: toggleId,
|
|
3264
3377
|
"aria-controls": menuId,
|
|
3265
3378
|
"aria-label": "Toggle banner links",
|
|
3266
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "expand_more", size: 4
|
|
3379
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "expand_more", size: 4 })
|
|
3267
3380
|
}
|
|
3268
3381
|
),
|
|
3269
3382
|
/* @__PURE__ */ jsxRuntime.jsx("div", { id: menuId, className: "usx-misc-banner__dropdown-content", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "usa-list", children: mobileLinks.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "usa-list__item", children: /* @__PURE__ */ jsxRuntime.jsx("a", { className: "usa-link usx-misc-banner__link", href: link.href, children: link.text }) }, `${link.href}-${link.text}`)) }) })
|
|
3270
3383
|
] }) : null
|
|
3271
3384
|
] });
|
|
3272
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-misc-banner__content grid-container", children: content }) });
|
|
3385
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { id, className: classes, ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-misc-banner__content grid-container", children: content }) });
|
|
3273
3386
|
}
|
|
3274
3387
|
function Modal({
|
|
3275
3388
|
id = "usx-modal",
|
|
@@ -3366,153 +3479,147 @@
|
|
|
3366
3479
|
function PaginationNavigation({
|
|
3367
3480
|
currentPage,
|
|
3368
3481
|
totalPages,
|
|
3369
|
-
|
|
3482
|
+
pageSize = 10,
|
|
3483
|
+
totalItems,
|
|
3370
3484
|
ariaLabel = "Pagination",
|
|
3371
3485
|
prevLabel = "Previous",
|
|
3372
3486
|
nextLabel = "Next",
|
|
3373
3487
|
hideLinkText = false,
|
|
3374
3488
|
arrowsOnly = false,
|
|
3489
|
+
pageUrlPrefix,
|
|
3375
3490
|
className = ""
|
|
3376
3491
|
}) {
|
|
3377
3492
|
const unbounded = totalPages === void 0 || totalPages === null;
|
|
3378
3493
|
const items = unbounded ? getUnboundedPageItems(currentPage) : getPageItems(currentPage, totalPages);
|
|
3379
3494
|
const isFirstPage = currentPage === 1;
|
|
3380
3495
|
const isLastPage = !unbounded && currentPage === totalPages;
|
|
3381
|
-
const
|
|
3382
|
-
const handlePage = (page) => (e) => {
|
|
3383
|
-
e.preventDefault();
|
|
3384
|
-
if (e.detail > 1) return;
|
|
3385
|
-
if (page !== currentPage) onPageChange(page);
|
|
3386
|
-
};
|
|
3387
|
-
const handlePrev = (e) => {
|
|
3388
|
-
e.preventDefault();
|
|
3389
|
-
if (e.timeStamp - lastClickTime.current < 50) return;
|
|
3390
|
-
lastClickTime.current = e.timeStamp;
|
|
3391
|
-
if (!isFirstPage) onPageChange((prev) => Math.max(prev - 1, 1));
|
|
3392
|
-
};
|
|
3393
|
-
const handleNext = (e) => {
|
|
3394
|
-
e.preventDefault();
|
|
3395
|
-
if (e.timeStamp - lastClickTime.current < 50) return;
|
|
3396
|
-
lastClickTime.current = e.timeStamp;
|
|
3397
|
-
if (!isLastPage) onPageChange((prev) => unbounded ? prev + 1 : Math.min(prev + 1, totalPages));
|
|
3398
|
-
};
|
|
3496
|
+
const hrefFor = (page) => pageUrlPrefix ? `${pageUrlPrefix}${page}` : "#";
|
|
3399
3497
|
const navClasses = ClassNames(
|
|
3400
3498
|
"usa-pagination",
|
|
3401
3499
|
"usx-pagination__nav",
|
|
3402
3500
|
{ "usx-pagination__arrows-only": arrowsOnly },
|
|
3403
3501
|
className
|
|
3404
3502
|
);
|
|
3405
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3503
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3504
|
+
"nav",
|
|
3505
|
+
{
|
|
3506
|
+
"aria-label": ariaLabel,
|
|
3507
|
+
className: navClasses,
|
|
3508
|
+
"data-usx-pagination-current-page": currentPage,
|
|
3509
|
+
"data-usx-pagination-page-size": pageSize,
|
|
3510
|
+
"data-usx-pagination-total-items": totalItems ?? "",
|
|
3511
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "usa-pagination__list", children: [
|
|
3512
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3513
|
+
"li",
|
|
3415
3514
|
{
|
|
3416
|
-
href: "#",
|
|
3417
3515
|
className: ClassNames(
|
|
3418
|
-
"usa-
|
|
3419
|
-
"usa-
|
|
3420
|
-
isFirstPage && "display-none",
|
|
3421
|
-
hideLinkText && "padding-1 margin-0"
|
|
3516
|
+
"usa-pagination__item",
|
|
3517
|
+
"usa-pagination__arrow"
|
|
3422
3518
|
),
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3519
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3520
|
+
"a",
|
|
3521
|
+
{
|
|
3522
|
+
href: isFirstPage ? "#" : hrefFor(currentPage - 1),
|
|
3523
|
+
"data-usx-pagination-page": currentPage - 1,
|
|
3524
|
+
className: ClassNames(
|
|
3525
|
+
"usa-pagination__link",
|
|
3526
|
+
"usa-pagination__previous-page",
|
|
3527
|
+
isFirstPage && "display-none",
|
|
3528
|
+
hideLinkText && "padding-1 margin-0"
|
|
3529
|
+
),
|
|
3530
|
+
"aria-label": `${prevLabel} page`,
|
|
3531
|
+
"aria-disabled": isFirstPage ? "true" : void 0,
|
|
3532
|
+
tabIndex: isFirstPage ? -1 : void 0,
|
|
3533
|
+
children: [
|
|
3534
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "navigate_before" }),
|
|
3535
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3536
|
+
"span",
|
|
3537
|
+
{
|
|
3538
|
+
className: ClassNames(
|
|
3539
|
+
"usa-pagination__link-text",
|
|
3540
|
+
hideLinkText && "usa-sr-only"
|
|
3541
|
+
),
|
|
3542
|
+
children: prevLabel
|
|
3543
|
+
}
|
|
3544
|
+
)
|
|
3545
|
+
]
|
|
3546
|
+
}
|
|
3547
|
+
)
|
|
3440
3548
|
}
|
|
3441
|
-
)
|
|
3442
|
-
}
|
|
3443
|
-
),
|
|
3444
|
-
!arrowsOnly && items.map((item, index) => {
|
|
3445
|
-
if (item.type === "ellipsis") {
|
|
3446
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3447
|
-
"li",
|
|
3448
|
-
{
|
|
3449
|
-
className: "usa-pagination__item usa-pagination__overflow",
|
|
3450
|
-
"aria-hidden": "true",
|
|
3451
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: "…" })
|
|
3452
|
-
},
|
|
3453
|
-
item.key || `ellipsis-${index}`
|
|
3454
|
-
);
|
|
3455
|
-
}
|
|
3456
|
-
const isCurrent = item.page === currentPage;
|
|
3457
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", { className: "usa-pagination__item usa-pagination__page-no", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3458
|
-
"a",
|
|
3459
|
-
{
|
|
3460
|
-
href: "#",
|
|
3461
|
-
className: ClassNames(
|
|
3462
|
-
"usa-pagination__button",
|
|
3463
|
-
isCurrent && "usa-current"
|
|
3464
|
-
),
|
|
3465
|
-
"aria-label": `Page ${item.page}`,
|
|
3466
|
-
"aria-current": isCurrent ? "page" : void 0,
|
|
3467
|
-
onClick: handlePage(item.page),
|
|
3468
|
-
children: item.page
|
|
3469
|
-
}
|
|
3470
|
-
) }, item.page);
|
|
3471
|
-
}),
|
|
3472
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3473
|
-
"li",
|
|
3474
|
-
{
|
|
3475
|
-
className: ClassNames(
|
|
3476
|
-
"usa-pagination__item",
|
|
3477
|
-
"usa-pagination__arrow"
|
|
3478
3549
|
),
|
|
3479
|
-
|
|
3480
|
-
"
|
|
3550
|
+
!arrowsOnly && items.map((item, index) => {
|
|
3551
|
+
if (item.type === "ellipsis") {
|
|
3552
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3553
|
+
"li",
|
|
3554
|
+
{
|
|
3555
|
+
className: "usa-pagination__item usa-pagination__overflow",
|
|
3556
|
+
"aria-hidden": "true",
|
|
3557
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: "…" })
|
|
3558
|
+
},
|
|
3559
|
+
item.key || `ellipsis-${index}`
|
|
3560
|
+
);
|
|
3561
|
+
}
|
|
3562
|
+
const isCurrent = item.page === currentPage;
|
|
3563
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { className: "usa-pagination__item usa-pagination__page-no", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3564
|
+
"a",
|
|
3565
|
+
{
|
|
3566
|
+
href: hrefFor(item.page),
|
|
3567
|
+
"data-usx-pagination-page": item.page,
|
|
3568
|
+
className: ClassNames(
|
|
3569
|
+
"usa-pagination__button",
|
|
3570
|
+
isCurrent && "usa-current"
|
|
3571
|
+
),
|
|
3572
|
+
"aria-label": `Page ${item.page}`,
|
|
3573
|
+
"aria-current": isCurrent ? "page" : void 0,
|
|
3574
|
+
children: item.page
|
|
3575
|
+
}
|
|
3576
|
+
) }, item.page);
|
|
3577
|
+
}),
|
|
3578
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3579
|
+
"li",
|
|
3481
3580
|
{
|
|
3482
|
-
href: "#",
|
|
3483
3581
|
className: ClassNames(
|
|
3484
|
-
"usa-
|
|
3485
|
-
"usa-
|
|
3486
|
-
isLastPage && "display-none",
|
|
3487
|
-
hideLinkText && "padding-1 margin-0"
|
|
3582
|
+
"usa-pagination__item",
|
|
3583
|
+
"usa-pagination__arrow"
|
|
3488
3584
|
),
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3585
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3586
|
+
"a",
|
|
3587
|
+
{
|
|
3588
|
+
href: isLastPage ? "#" : hrefFor(currentPage + 1),
|
|
3589
|
+
"data-usx-pagination-page": currentPage + 1,
|
|
3590
|
+
className: ClassNames(
|
|
3591
|
+
"usa-pagination__link",
|
|
3592
|
+
"usa-pagination__next-page",
|
|
3593
|
+
isLastPage && "display-none",
|
|
3594
|
+
hideLinkText && "padding-1 margin-0"
|
|
3595
|
+
),
|
|
3596
|
+
"aria-label": `${nextLabel} page`,
|
|
3597
|
+
"aria-disabled": isLastPage ? "true" : void 0,
|
|
3598
|
+
tabIndex: isLastPage ? -1 : void 0,
|
|
3599
|
+
children: [
|
|
3600
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3601
|
+
"span",
|
|
3602
|
+
{
|
|
3603
|
+
className: ClassNames(
|
|
3604
|
+
"usa-pagination__link-text",
|
|
3605
|
+
hideLinkText && "usa-sr-only"
|
|
3606
|
+
),
|
|
3607
|
+
children: nextLabel
|
|
3608
|
+
}
|
|
3500
3609
|
),
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
]
|
|
3610
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "navigate_next" })
|
|
3611
|
+
]
|
|
3612
|
+
}
|
|
3613
|
+
)
|
|
3506
3614
|
}
|
|
3507
3615
|
)
|
|
3508
|
-
}
|
|
3509
|
-
|
|
3510
|
-
|
|
3616
|
+
] })
|
|
3617
|
+
}
|
|
3618
|
+
);
|
|
3511
3619
|
}
|
|
3512
3620
|
function PaginationStepOptions({
|
|
3513
3621
|
pageSize,
|
|
3514
3622
|
pageSizeOptions = [10, 25, 50, 100],
|
|
3515
|
-
onPageSizeChange,
|
|
3516
3623
|
label = "Items per page",
|
|
3517
3624
|
id = "pagination-step-options",
|
|
3518
3625
|
className = ""
|
|
@@ -3521,19 +3628,16 @@
|
|
|
3521
3628
|
"usx-pagination__step-options",
|
|
3522
3629
|
className
|
|
3523
3630
|
);
|
|
3524
|
-
const handleChange = (e) => {
|
|
3525
|
-
onPageSizeChange(Number(e.target.value));
|
|
3526
|
-
};
|
|
3527
3631
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3528
3632
|
Select,
|
|
3529
3633
|
{
|
|
3530
3634
|
id,
|
|
3531
3635
|
label,
|
|
3532
|
-
|
|
3533
|
-
onChange: handleChange,
|
|
3636
|
+
defaultValue: String(pageSize),
|
|
3534
3637
|
formGroup: false,
|
|
3535
3638
|
options: pageSizeOptions.map((size) => ({ value: String(size), label: String(size) }))
|
|
3536
|
-
}
|
|
3639
|
+
},
|
|
3640
|
+
pageSize
|
|
3537
3641
|
) });
|
|
3538
3642
|
}
|
|
3539
3643
|
function PaginationSummary({
|
|
@@ -3581,13 +3685,15 @@
|
|
|
3581
3685
|
] });
|
|
3582
3686
|
}
|
|
3583
3687
|
function Pagination({
|
|
3688
|
+
renderPart,
|
|
3584
3689
|
initialPage = 1,
|
|
3585
3690
|
initialPageSize = 10,
|
|
3691
|
+
currentPage: page,
|
|
3692
|
+
pageSize: size,
|
|
3586
3693
|
pageSizeOptions = [10, 25, 50, 100],
|
|
3694
|
+
stepOptionsId,
|
|
3587
3695
|
totalItems,
|
|
3588
3696
|
unbounded = false,
|
|
3589
|
-
onPageChange,
|
|
3590
|
-
onPageSizeChange,
|
|
3591
3697
|
ariaLabel = "Pagination",
|
|
3592
3698
|
prevLabel = "Previous",
|
|
3593
3699
|
nextLabel = "Next",
|
|
@@ -3596,77 +3702,166 @@
|
|
|
3596
3702
|
showSummary = true,
|
|
3597
3703
|
hideLinkText = true,
|
|
3598
3704
|
arrowsOnly = false,
|
|
3705
|
+
pageUrlPrefix,
|
|
3599
3706
|
className = ""
|
|
3600
3707
|
}) {
|
|
3601
|
-
const
|
|
3602
|
-
const
|
|
3708
|
+
const currentPage = page ?? initialPage;
|
|
3709
|
+
const pageSize = size ?? initialPageSize;
|
|
3603
3710
|
const totalPages = totalItems !== void 0 && !unbounded ? Math.ceil(totalItems / pageSize) : void 0;
|
|
3604
3711
|
const displaySummary = showSummary !== void 0 ? showSummary : totalItems !== void 0;
|
|
3605
|
-
const handlePageChange = (pageOrFn) => {
|
|
3606
|
-
setCurrentPage((prev) => {
|
|
3607
|
-
const next = typeof pageOrFn === "function" ? pageOrFn(prev) : pageOrFn;
|
|
3608
|
-
onPageChange == null ? void 0 : onPageChange(next, pageSize);
|
|
3609
|
-
return next;
|
|
3610
|
-
});
|
|
3611
|
-
};
|
|
3612
|
-
const handlePageSizeChange = (size) => {
|
|
3613
|
-
const newTotalPages = totalItems ? Math.ceil(totalItems / size) : void 0;
|
|
3614
|
-
const newPage = newTotalPages ? Math.min(currentPage, newTotalPages) : 1;
|
|
3615
|
-
setPageSize(size);
|
|
3616
|
-
setCurrentPage(newPage);
|
|
3617
|
-
onPageSizeChange == null ? void 0 : onPageSizeChange(size, newPage);
|
|
3618
|
-
onPageChange == null ? void 0 : onPageChange(newPage, size);
|
|
3619
|
-
};
|
|
3620
3712
|
const classes = ClassNames("usx-pagination", className);
|
|
3713
|
+
const navigation = /* @__PURE__ */ jsxRuntime.jsx(
|
|
3714
|
+
PaginationNavigation,
|
|
3715
|
+
{
|
|
3716
|
+
currentPage,
|
|
3717
|
+
totalPages,
|
|
3718
|
+
pageSize,
|
|
3719
|
+
totalItems,
|
|
3720
|
+
ariaLabel,
|
|
3721
|
+
prevLabel,
|
|
3722
|
+
nextLabel,
|
|
3723
|
+
hideLinkText,
|
|
3724
|
+
arrowsOnly,
|
|
3725
|
+
pageUrlPrefix
|
|
3726
|
+
}
|
|
3727
|
+
);
|
|
3728
|
+
const stepOptions = /* @__PURE__ */ jsxRuntime.jsx(
|
|
3729
|
+
PaginationStepOptions,
|
|
3730
|
+
{
|
|
3731
|
+
pageSize,
|
|
3732
|
+
pageSizeOptions,
|
|
3733
|
+
id: stepOptionsId
|
|
3734
|
+
}
|
|
3735
|
+
);
|
|
3736
|
+
const summary = typeof totalItems === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3737
|
+
PaginationSummary,
|
|
3738
|
+
{
|
|
3739
|
+
currentPage,
|
|
3740
|
+
pageSize,
|
|
3741
|
+
totalItems,
|
|
3742
|
+
itemLabel
|
|
3743
|
+
}
|
|
3744
|
+
) : null;
|
|
3745
|
+
if (renderPart === "navigation") return navigation;
|
|
3746
|
+
if (renderPart === "step-options") return stepOptions;
|
|
3747
|
+
if (renderPart === "summary") return summary;
|
|
3621
3748
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3622
3749
|
PaginationContainer,
|
|
3623
3750
|
{
|
|
3624
|
-
summary: displaySummary
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3751
|
+
summary: displaySummary ? summary : null,
|
|
3752
|
+
navigation,
|
|
3753
|
+
stepOptions: showStepOptions ? stepOptions : null
|
|
3754
|
+
}
|
|
3755
|
+
) });
|
|
3756
|
+
}
|
|
3757
|
+
function PopoverMenu({ items, prefix, panelShape, className, ...props2 }) {
|
|
3758
|
+
const generatedPrefix = React.useId();
|
|
3759
|
+
const base = prefix ?? generatedPrefix;
|
|
3760
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { ...props2, className: ClassNames("usx-popover__menu", className), children: items.map((item, index) => {
|
|
3761
|
+
const id = item.id ?? `${base}-${index}`;
|
|
3762
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
3763
|
+
item.type === "details" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3764
|
+
Popover,
|
|
3635
3765
|
{
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3766
|
+
id,
|
|
3767
|
+
summaryProps: {
|
|
3768
|
+
...item.summaryProps,
|
|
3769
|
+
className: ClassNames(item.summaryProps.className, "usx-popover__menu-item")
|
|
3770
|
+
},
|
|
3771
|
+
name: base,
|
|
3772
|
+
side: "right",
|
|
3773
|
+
panelShape,
|
|
3774
|
+
menuItems: item.items
|
|
3644
3775
|
}
|
|
3645
3776
|
),
|
|
3646
|
-
|
|
3647
|
-
|
|
3777
|
+
item.type === "link" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3778
|
+
Link,
|
|
3648
3779
|
{
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3780
|
+
href: item.href,
|
|
3781
|
+
text: item.text,
|
|
3782
|
+
className: "usx-no-visited usx-popover__menu-item"
|
|
3652
3783
|
}
|
|
3653
|
-
)
|
|
3654
|
-
|
|
3655
|
-
|
|
3784
|
+
),
|
|
3785
|
+
item.type === "text" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-popover__menu-item", children: item.text })
|
|
3786
|
+
] }, id);
|
|
3787
|
+
}) });
|
|
3656
3788
|
}
|
|
3657
|
-
function
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3789
|
+
function Popover({
|
|
3790
|
+
id,
|
|
3791
|
+
side = "bottom",
|
|
3792
|
+
align = "start",
|
|
3793
|
+
panelShape = "rounded",
|
|
3794
|
+
defaultOpen = false,
|
|
3795
|
+
menuItems,
|
|
3796
|
+
showClose = false,
|
|
3797
|
+
closeLabel = "Close",
|
|
3798
|
+
panelHeading,
|
|
3799
|
+
headingAs = "h2",
|
|
3800
|
+
scrollable = false,
|
|
3801
|
+
className,
|
|
3802
|
+
summaryProps,
|
|
3803
|
+
panelClassName,
|
|
3804
|
+
contentClassName,
|
|
3805
|
+
children,
|
|
3806
|
+
...props2
|
|
3807
|
+
}) {
|
|
3808
|
+
const [initiallyOpen] = React.useState(defaultOpen);
|
|
3809
|
+
const composedSummaryProps = { ...summaryProps, label: (summaryProps == null ? void 0 : summaryProps.label) ?? "Open panel" };
|
|
3810
|
+
const Heading = headingAs;
|
|
3811
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3812
|
+
"details",
|
|
3813
|
+
{
|
|
3814
|
+
...props2,
|
|
3815
|
+
className: ClassNames("usx-popover", className),
|
|
3816
|
+
open: initiallyOpen || void 0,
|
|
3817
|
+
"data-side": side,
|
|
3818
|
+
"data-align": align,
|
|
3819
|
+
children: [
|
|
3820
|
+
/* @__PURE__ */ jsxRuntime.jsx(Summary, { unstyled: true, ...composedSummaryProps }),
|
|
3821
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3822
|
+
"div",
|
|
3823
|
+
{
|
|
3824
|
+
id,
|
|
3825
|
+
className: ClassNames("usx-popover__panel", {
|
|
3826
|
+
"usx-popover__panel--square": panelShape === "square"
|
|
3827
|
+
}, panelClassName),
|
|
3828
|
+
children: [
|
|
3829
|
+
panelHeading && /* @__PURE__ */ jsxRuntime.jsx(Heading, { className: "usx-popover__panel-heading", children: panelHeading }),
|
|
3830
|
+
menuItems && /* @__PURE__ */ jsxRuntime.jsx(PopoverMenu, { items: menuItems, prefix: id, panelShape }),
|
|
3831
|
+
children && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3832
|
+
"div",
|
|
3833
|
+
{
|
|
3834
|
+
className: ClassNames(
|
|
3835
|
+
"usx-popover__panel-content",
|
|
3836
|
+
{ "usx-popover__scroll": scrollable },
|
|
3837
|
+
contentClassName
|
|
3838
|
+
),
|
|
3839
|
+
children
|
|
3840
|
+
}
|
|
3841
|
+
),
|
|
3842
|
+
showClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3843
|
+
Button,
|
|
3844
|
+
{
|
|
3845
|
+
variant: "unstyled",
|
|
3846
|
+
className: "usx-popover__panel-close",
|
|
3847
|
+
"data-usx-popover-close": id,
|
|
3848
|
+
children: closeLabel
|
|
3849
|
+
}
|
|
3850
|
+
)
|
|
3851
|
+
]
|
|
3852
|
+
}
|
|
3853
|
+
)
|
|
3854
|
+
]
|
|
3855
|
+
}
|
|
3856
|
+
);
|
|
3662
3857
|
}
|
|
3663
3858
|
const ProcessList = ({ items = [], className = "", ...props2 }) => {
|
|
3664
3859
|
const classes = ClassNames("usa-process-list", "usx-process-list", className);
|
|
3665
3860
|
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: classes, ...props2, children: items.map((item, index) => {
|
|
3666
|
-
const
|
|
3861
|
+
const Heading = item.headingAs || "h4";
|
|
3667
3862
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: ClassNames("usa-process-list__item", item.className), children: [
|
|
3668
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3669
|
-
item.body && (
|
|
3863
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { className: ClassNames("usa-process-list__heading", item.headingClassName), children: item.heading }),
|
|
3864
|
+
item.body && (item.bodyClassName ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: item.bodyClassName, children: item.body }) : item.body)
|
|
3670
3865
|
] }, index);
|
|
3671
3866
|
}) });
|
|
3672
3867
|
};
|
|
@@ -3684,7 +3879,7 @@
|
|
|
3684
3879
|
const isVertical = (calloutProps == null ? void 0 : calloutProps.orientation) === "vertical";
|
|
3685
3880
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ClassNames("usx-quote", isVertical && "usx-quote--vertical", className), ...props2, children: [
|
|
3686
3881
|
!isVertical && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "format_quote", size: 4, className: "usx-quote__icon" }),
|
|
3687
|
-
/* @__PURE__ */ jsxRuntime.jsx(Callout, { ...calloutProps,
|
|
3882
|
+
/* @__PURE__ */ jsxRuntime.jsx(Callout, { ...calloutProps, as: "div", children: /* @__PURE__ */ jsxRuntime.jsxs("figure", { className: "usx-quote__body", children: [
|
|
3688
3883
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3689
3884
|
"blockquote",
|
|
3690
3885
|
{
|
|
@@ -3712,42 +3907,46 @@
|
|
|
3712
3907
|
hint = null,
|
|
3713
3908
|
error = null,
|
|
3714
3909
|
name = "radio-group",
|
|
3910
|
+
id: groupId,
|
|
3715
3911
|
options = [],
|
|
3716
3912
|
defaultValue = void 0,
|
|
3717
3913
|
className = "",
|
|
3718
3914
|
...props2
|
|
3719
3915
|
}) => {
|
|
3720
|
-
const classes = ClassNames(
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3916
|
+
const classes = ClassNames("usa-radio", "usx-radio", { "usx-radio--small": small }, className);
|
|
3917
|
+
const inputClasses = ClassNames("usa-radio__input", { "usa-radio__input--tile": tile });
|
|
3918
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormGroup, { error: !!error, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3919
|
+
Fieldset,
|
|
3920
|
+
{
|
|
3921
|
+
id: groupId,
|
|
3922
|
+
legend,
|
|
3923
|
+
required,
|
|
3924
|
+
hint,
|
|
3925
|
+
error,
|
|
3926
|
+
...props2,
|
|
3927
|
+
children: options.map((opt, idx) => {
|
|
3928
|
+
const id = opt.id || `${groupId || name}-${idx}`;
|
|
3929
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, children: [
|
|
3930
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3931
|
+
"input",
|
|
3932
|
+
{
|
|
3933
|
+
className: inputClasses,
|
|
3934
|
+
id,
|
|
3935
|
+
type: "radio",
|
|
3936
|
+
name,
|
|
3937
|
+
value: opt.value,
|
|
3938
|
+
defaultChecked: defaultValue === opt.value || !!opt.checked,
|
|
3939
|
+
disabled: !!opt.disabled
|
|
3940
|
+
}
|
|
3941
|
+
),
|
|
3942
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Label, { className: "usa-radio__label", classOverride: true, htmlFor: id, children: [
|
|
3943
|
+
opt.label,
|
|
3944
|
+
opt.description ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-checkbox__label-description", children: opt.description }) : null
|
|
3945
|
+
] })
|
|
3946
|
+
] }, id);
|
|
3947
|
+
})
|
|
3948
|
+
}
|
|
3949
|
+
) });
|
|
3751
3950
|
};
|
|
3752
3951
|
function RangeSlider({
|
|
3753
3952
|
id = "range-slider",
|
|
@@ -3763,7 +3962,7 @@
|
|
|
3763
3962
|
value,
|
|
3764
3963
|
defaultValue,
|
|
3765
3964
|
textUnit = null,
|
|
3766
|
-
textPreposition =
|
|
3965
|
+
textPreposition = "of",
|
|
3767
3966
|
formGroup = true,
|
|
3768
3967
|
className = "",
|
|
3769
3968
|
...props2
|
|
@@ -3800,7 +3999,7 @@
|
|
|
3800
3999
|
}
|
|
3801
4000
|
const Section = ({
|
|
3802
4001
|
title = "",
|
|
3803
|
-
|
|
4002
|
+
headingAs = "h2",
|
|
3804
4003
|
children = null,
|
|
3805
4004
|
content = null,
|
|
3806
4005
|
className = "",
|
|
@@ -3808,7 +4007,7 @@
|
|
|
3808
4007
|
}) => {
|
|
3809
4008
|
const classes = ClassNames("usx-section", className);
|
|
3810
4009
|
const sectionContent = children || content;
|
|
3811
|
-
const Heading = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(
|
|
4010
|
+
const Heading = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(headingAs) ? headingAs : "h2";
|
|
3812
4011
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: classes, ...props2, children: [
|
|
3813
4012
|
title ? /* @__PURE__ */ jsxRuntime.jsx(Heading, { className: "usx-section__title", children: title }) : null,
|
|
3814
4013
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-section__content", children: sectionContent })
|
|
@@ -3873,16 +4072,6 @@
|
|
|
3873
4072
|
onDismiss && "usa-site-alert--dismissible",
|
|
3874
4073
|
className
|
|
3875
4074
|
);
|
|
3876
|
-
const alertClasses = ClassNames(
|
|
3877
|
-
"usa-alert",
|
|
3878
|
-
`usa-alert--${alertVariant}`,
|
|
3879
|
-
"usx-alert",
|
|
3880
|
-
`usx-alert--${alertVariant}`,
|
|
3881
|
-
slim && "usa-alert--slim",
|
|
3882
|
-
slim && "usx-alert--slim",
|
|
3883
|
-
noIcon && "usa-alert--no-icon",
|
|
3884
|
-
noIcon && "usx-alert--no-icon"
|
|
3885
|
-
);
|
|
3886
4075
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3887
4076
|
"section",
|
|
3888
4077
|
{
|
|
@@ -3891,19 +4080,7 @@
|
|
|
3891
4080
|
"aria-label": ariaLabelledby ? void 0 : ariaLabel,
|
|
3892
4081
|
"aria-labelledby": ariaLabelledby,
|
|
3893
4082
|
...props2,
|
|
3894
|
-
children:
|
|
3895
|
-
alertHeading && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "usa-alert__heading usx-alert__heading", children: alertHeading }),
|
|
3896
|
-
alertContent,
|
|
3897
|
-
onDismiss && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3898
|
-
"button",
|
|
3899
|
-
{
|
|
3900
|
-
className: "usx-alert__dismiss",
|
|
3901
|
-
"aria-label": "Close alert",
|
|
3902
|
-
onClick: onDismiss,
|
|
3903
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", size: 3, "aria-hidden": "true", focusable: "false" })
|
|
3904
|
-
}
|
|
3905
|
-
)
|
|
3906
|
-
] }) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
4083
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3907
4084
|
Alert,
|
|
3908
4085
|
{
|
|
3909
4086
|
heading: alertHeading,
|
|
@@ -3911,7 +4088,8 @@
|
|
|
3911
4088
|
variant: alertVariant,
|
|
3912
4089
|
slim,
|
|
3913
4090
|
noIcon,
|
|
3914
|
-
onDismiss
|
|
4091
|
+
onDismiss,
|
|
4092
|
+
children: alertContent
|
|
3915
4093
|
}
|
|
3916
4094
|
)
|
|
3917
4095
|
}
|
|
@@ -3960,7 +4138,7 @@
|
|
|
3960
4138
|
steps = [],
|
|
3961
4139
|
currentStep = 1,
|
|
3962
4140
|
variant = "",
|
|
3963
|
-
|
|
4141
|
+
headingAs: Heading = "h4",
|
|
3964
4142
|
className = "",
|
|
3965
4143
|
...props2
|
|
3966
4144
|
}) => {
|
|
@@ -4000,7 +4178,7 @@
|
|
|
4000
4178
|
index
|
|
4001
4179
|
);
|
|
4002
4180
|
}) }),
|
|
4003
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-step-indicator__header", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4181
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-step-indicator__header", children: /* @__PURE__ */ jsxRuntime.jsxs(Heading, { className: "usa-step-indicator__heading", children: [
|
|
4004
4182
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "usa-step-indicator__heading-counter", children: [
|
|
4005
4183
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-sr-only", children: "Step" }),
|
|
4006
4184
|
" ",
|
|
@@ -4395,18 +4573,22 @@
|
|
|
4395
4573
|
selected ? "checked" : "unchecked"
|
|
4396
4574
|
) }, "__selection__");
|
|
4397
4575
|
const detailToggleCell = hasRowDetails ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: "usx-table__cell usx-table__cell--detail-toggle", onClick: handleToggleDetail, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4398
|
-
|
|
4576
|
+
Button,
|
|
4399
4577
|
{
|
|
4400
|
-
|
|
4578
|
+
variant: "inverse",
|
|
4579
|
+
ghost: true,
|
|
4401
4580
|
className: ClassNames(
|
|
4402
|
-
"
|
|
4403
|
-
"usx-table__detail-toggle",
|
|
4404
|
-
"width-full",
|
|
4405
|
-
isExpanded && "usx-table__detail-toggle--expanded"
|
|
4581
|
+
"usx-table__detail-toggle"
|
|
4406
4582
|
),
|
|
4407
4583
|
"aria-expanded": isExpanded,
|
|
4408
4584
|
"aria-label": expandLabel ? typeof expandLabel === "function" ? expandLabel(row) : expandLabel : `${isExpanded ? "Collapse" : "Expand"} row details`,
|
|
4409
|
-
|
|
4585
|
+
iconProps: [
|
|
4586
|
+
{
|
|
4587
|
+
name: isExpanded ? "expand_less" : "expand_more",
|
|
4588
|
+
"aria-hidden": "true",
|
|
4589
|
+
size: 3
|
|
4590
|
+
}
|
|
4591
|
+
]
|
|
4410
4592
|
}
|
|
4411
4593
|
) }, "__detail-toggle__") : null;
|
|
4412
4594
|
const dataCells = visibleCols.map((col) => {
|
|
@@ -4859,25 +5041,44 @@
|
|
|
4859
5041
|
return /* @__PURE__ */ jsxRuntime.jsxs(TableContext.Provider, { value: contextValue, children: [
|
|
4860
5042
|
wrapped,
|
|
4861
5043
|
isPaginated && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4862
|
-
|
|
5044
|
+
"div",
|
|
4863
5045
|
{
|
|
4864
|
-
|
|
4865
|
-
initialPageSize: pageSize,
|
|
4866
|
-
totalItems,
|
|
4867
|
-
onPageChange: (page) => {
|
|
5046
|
+
onClick: (event) => {
|
|
4868
5047
|
var _a;
|
|
5048
|
+
const link = event.target.closest("[data-usx-pagination-page]");
|
|
5049
|
+
if (!link || link.getAttribute("aria-disabled") === "true") return;
|
|
5050
|
+
event.preventDefault();
|
|
5051
|
+
const page = Number(link.dataset.usxPaginationPage);
|
|
5052
|
+
if (!Number.isInteger(page) || page < 1 || page === currentPage) return;
|
|
4869
5053
|
setCurrentPage(page);
|
|
4870
5054
|
if (isServerSide) (_a = paginateConfig.onPageChange) == null ? void 0 : _a.call(paginateConfig, page, pageSize);
|
|
4871
5055
|
},
|
|
4872
|
-
|
|
5056
|
+
onChange: (event) => {
|
|
5057
|
+
var _a;
|
|
5058
|
+
const target = event.target;
|
|
5059
|
+
if (!(target instanceof HTMLSelectElement)) return;
|
|
5060
|
+
const select = target;
|
|
5061
|
+
if (!select.matches(".usx-pagination__step-options select")) return;
|
|
5062
|
+
const size = Number(select.value);
|
|
5063
|
+
if (!Number.isInteger(size) || size < 1) return;
|
|
5064
|
+
const page = Math.min(currentPage, Math.max(1, Math.ceil(totalItems / size)));
|
|
4873
5065
|
setPageSize(size);
|
|
4874
5066
|
setCurrentPage(page);
|
|
5067
|
+
if (isServerSide) (_a = paginateConfig.onPageChange) == null ? void 0 : _a.call(paginateConfig, page, size);
|
|
4875
5068
|
},
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
5069
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5070
|
+
Pagination,
|
|
5071
|
+
{
|
|
5072
|
+
currentPage,
|
|
5073
|
+
pageSize,
|
|
5074
|
+
totalItems,
|
|
5075
|
+
...paginateConfig.pageSizeOptions ? { pageSizeOptions: paginateConfig.pageSizeOptions } : {},
|
|
5076
|
+
...paginateConfig.showStepOptions !== void 0 ? { showStepOptions: paginateConfig.showStepOptions } : {},
|
|
5077
|
+
...paginateConfig.showSummary !== void 0 ? { showSummary: paginateConfig.showSummary } : {}
|
|
5078
|
+
},
|
|
5079
|
+
`${sortState.key}-${sortState.direction}`
|
|
5080
|
+
)
|
|
5081
|
+
}
|
|
4881
5082
|
)
|
|
4882
5083
|
] });
|
|
4883
5084
|
}
|
|
@@ -4925,60 +5126,62 @@
|
|
|
4925
5126
|
className = ""
|
|
4926
5127
|
}) {
|
|
4927
5128
|
var _a;
|
|
4928
|
-
const
|
|
4929
|
-
const
|
|
4930
|
-
|
|
4931
|
-
const handleChange = (e) => {
|
|
4932
|
-
const next = e.target.value;
|
|
4933
|
-
if (value === void 0) {
|
|
4934
|
-
setActiveTheme(next);
|
|
4935
|
-
}
|
|
4936
|
-
onChange == null ? void 0 : onChange(next);
|
|
4937
|
-
};
|
|
4938
|
-
const selectId = id || `theme-picker-${Math.random().toString(36).substr(2, 9)}`;
|
|
4939
|
-
const classes = ClassNames("usx-theme-picker", { "usx-theme-picker--open": open }, className);
|
|
4940
|
-
const themeOptions = themes.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value));
|
|
4941
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, children: open ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usx-theme-picker__panel", children: [
|
|
4942
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: selectId, screenReaderOnly: true, children: label }),
|
|
4943
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4944
|
-
"select",
|
|
4945
|
-
{
|
|
4946
|
-
id: selectId,
|
|
4947
|
-
name,
|
|
4948
|
-
className: "usa-select usx-select",
|
|
4949
|
-
value: currentValue,
|
|
4950
|
-
onChange: handleChange,
|
|
4951
|
-
children: themeOptions
|
|
4952
|
-
}
|
|
4953
|
-
),
|
|
5129
|
+
const selectId = id || "theme-picker";
|
|
5130
|
+
const selection = value !== void 0 ? { value } : { defaultValue: defaultValue ?? ((_a = themes[0]) == null ? void 0 : _a.value) };
|
|
5131
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ClassNames("usx-theme-picker", className), children: [
|
|
4954
5132
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4955
5133
|
"button",
|
|
4956
5134
|
{
|
|
4957
5135
|
type: "button",
|
|
4958
|
-
className: "usa-button usx-button
|
|
4959
|
-
"aria-label":
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
{
|
|
4964
|
-
name: "close"
|
|
4965
|
-
}
|
|
4966
|
-
)
|
|
5136
|
+
className: "usa-button usx-button usx-button--ghost usx-theme-picker__trigger",
|
|
5137
|
+
"aria-label": label,
|
|
5138
|
+
"aria-expanded": "false",
|
|
5139
|
+
"aria-controls": `${selectId}-panel`,
|
|
5140
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(PaletteIcon, {})
|
|
4967
5141
|
}
|
|
4968
|
-
)
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
5142
|
+
),
|
|
5143
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { id: `${selectId}-panel`, className: "usx-theme-picker__panel", children: [
|
|
5144
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: selectId, screenReaderOnly: true, children: label }),
|
|
5145
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5146
|
+
"select",
|
|
5147
|
+
{
|
|
5148
|
+
id: selectId,
|
|
5149
|
+
name,
|
|
5150
|
+
className: "usa-select usx-select",
|
|
5151
|
+
...selection,
|
|
5152
|
+
onChange: (event) => onChange == null ? void 0 : onChange(event.target.value),
|
|
5153
|
+
children: themes.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value))
|
|
5154
|
+
}
|
|
5155
|
+
),
|
|
5156
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5157
|
+
"button",
|
|
5158
|
+
{
|
|
5159
|
+
type: "button",
|
|
5160
|
+
className: "usa-button usx-button usa-button--primary usx-theme-picker__toggle",
|
|
5161
|
+
"aria-label": "Confirm theme",
|
|
5162
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", className: "usx-theme-picker__icon" })
|
|
5163
|
+
}
|
|
5164
|
+
)
|
|
5165
|
+
] })
|
|
5166
|
+
] });
|
|
4979
5167
|
}
|
|
4980
5168
|
function PaletteIcon() {
|
|
4981
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5169
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5170
|
+
"svg",
|
|
5171
|
+
{
|
|
5172
|
+
className: "usa-icon usx-theme-picker__icon",
|
|
5173
|
+
"aria-hidden": "true",
|
|
5174
|
+
focusable: "false",
|
|
5175
|
+
viewBox: "0 0 24 24",
|
|
5176
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5177
|
+
"path",
|
|
5178
|
+
{
|
|
5179
|
+
fill: "currentColor",
|
|
5180
|
+
d: "M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"
|
|
5181
|
+
}
|
|
5182
|
+
)
|
|
5183
|
+
}
|
|
5184
|
+
);
|
|
4982
5185
|
}
|
|
4983
5186
|
function TimePicker({
|
|
4984
5187
|
id = "appointment-time",
|
|
@@ -5001,6 +5204,17 @@
|
|
|
5001
5204
|
const hintId = hint ? `${id}-hint` : void 0;
|
|
5002
5205
|
const errorId = error ? `${id}-error` : void 0;
|
|
5003
5206
|
const describedBy = [label ? labelId : void 0, hintId, errorId].filter(Boolean).join(" ") || void 0;
|
|
5207
|
+
const containerClasses = ClassNames(
|
|
5208
|
+
"usa-time-picker",
|
|
5209
|
+
"usx-time-picker",
|
|
5210
|
+
{ "usx-combo-box--error": !!error },
|
|
5211
|
+
className
|
|
5212
|
+
);
|
|
5213
|
+
const inputClasses = ClassNames(
|
|
5214
|
+
"usa-input",
|
|
5215
|
+
"usx-input",
|
|
5216
|
+
{ "usa-input--error": !!error }
|
|
5217
|
+
);
|
|
5004
5218
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5005
5219
|
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, htmlFor: id, required, error: !!error, children: label }),
|
|
5006
5220
|
hint && /* @__PURE__ */ jsxRuntime.jsx(Hint, { id: hintId, children: hint }),
|
|
@@ -5008,19 +5222,14 @@
|
|
|
5008
5222
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5009
5223
|
"div",
|
|
5010
5224
|
{
|
|
5011
|
-
className:
|
|
5012
|
-
"usa-time-picker",
|
|
5013
|
-
"usx-time-picker",
|
|
5014
|
-
{ "usx-combo-box--error": !!error },
|
|
5015
|
-
className
|
|
5016
|
-
),
|
|
5225
|
+
className: containerClasses,
|
|
5017
5226
|
...minTime ? { "data-min-time": minTime } : {},
|
|
5018
5227
|
...maxTime ? { "data-max-time": maxTime } : {},
|
|
5019
5228
|
...step ? { "data-step": step } : {},
|
|
5020
5229
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5021
5230
|
"input",
|
|
5022
5231
|
{
|
|
5023
|
-
className:
|
|
5232
|
+
className: inputClasses,
|
|
5024
5233
|
id,
|
|
5025
5234
|
name: name || id,
|
|
5026
5235
|
type: "text",
|
|
@@ -5114,6 +5323,36 @@
|
|
|
5114
5323
|
}
|
|
5115
5324
|
);
|
|
5116
5325
|
}
|
|
5326
|
+
function Tree({ items, variant = "default", className, ...props2 }) {
|
|
5327
|
+
const treeClassNames = ClassNames(
|
|
5328
|
+
"usx-tree",
|
|
5329
|
+
{ [`usx-tree--${variant}`]: variant !== "default" },
|
|
5330
|
+
className
|
|
5331
|
+
);
|
|
5332
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { ...props2, className: treeClassNames, children: items.map((item, index) => {
|
|
5333
|
+
switch (item.type) {
|
|
5334
|
+
case "link": {
|
|
5335
|
+
const { type, ...linkProps } = item;
|
|
5336
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { ...linkProps }) }, index);
|
|
5337
|
+
}
|
|
5338
|
+
case "details": {
|
|
5339
|
+
const { type, items: nestedItems, className: detailsClassName, ...detailsProps } = item;
|
|
5340
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: nestedItems ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5341
|
+
Details,
|
|
5342
|
+
{
|
|
5343
|
+
...detailsProps,
|
|
5344
|
+
className: ClassNames("usx-tree__branch", detailsClassName),
|
|
5345
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Tree, { items: nestedItems, variant })
|
|
5346
|
+
}
|
|
5347
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(Details, { ...detailsProps, className: detailsClassName }) }, index);
|
|
5348
|
+
}
|
|
5349
|
+
case "text":
|
|
5350
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-tree__label", children: item.text }) }, index);
|
|
5351
|
+
default:
|
|
5352
|
+
return null;
|
|
5353
|
+
}
|
|
5354
|
+
}) });
|
|
5355
|
+
}
|
|
5117
5356
|
const Villain = ({
|
|
5118
5357
|
title = "",
|
|
5119
5358
|
callout = "",
|
|
@@ -5160,6 +5399,7 @@
|
|
|
5160
5399
|
exports2.DatePicker = DatePicker;
|
|
5161
5400
|
exports2.DateRangePicker = DateRangePicker;
|
|
5162
5401
|
exports2.Details = Details;
|
|
5402
|
+
exports2.Drawer = Drawer;
|
|
5163
5403
|
exports2.ErrorMessage = ErrorMessage;
|
|
5164
5404
|
exports2.ErrorPage = ErrorPage;
|
|
5165
5405
|
exports2.Eyebrow = Eyebrow;
|
|
@@ -5189,6 +5429,7 @@
|
|
|
5189
5429
|
exports2.Modal = Modal;
|
|
5190
5430
|
exports2.Page = Page;
|
|
5191
5431
|
exports2.Pagination = Pagination;
|
|
5432
|
+
exports2.Popover = Popover;
|
|
5192
5433
|
exports2.ProcessList = ProcessList;
|
|
5193
5434
|
exports2.Prose = Prose;
|
|
5194
5435
|
exports2.Quote = Quote;
|
|
@@ -5204,6 +5445,7 @@
|
|
|
5204
5445
|
exports2.Spinner = Spinner;
|
|
5205
5446
|
exports2.Status = Status;
|
|
5206
5447
|
exports2.StepIndicator = StepIndicator;
|
|
5448
|
+
exports2.Summary = Summary;
|
|
5207
5449
|
exports2.SummaryBox = SummaryBox;
|
|
5208
5450
|
exports2.Swap = Swap;
|
|
5209
5451
|
exports2.Switch = Switch;
|
|
@@ -5216,6 +5458,7 @@
|
|
|
5216
5458
|
exports2.TimePicker = TimePicker;
|
|
5217
5459
|
exports2.Toggle = Toggle;
|
|
5218
5460
|
exports2.Tooltip = Tooltip;
|
|
5461
|
+
exports2.Tree = Tree;
|
|
5219
5462
|
exports2.Villain = Villain;
|
|
5220
5463
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
5221
5464
|
}));
|