@solexllc/usx-react 0.6.1 → 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 +879 -503
- package/dist/index.js +879 -503
- package/package.json +5 -5
- 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 +403 -193
- 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.html +112 -148
- 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.html +50 -21
- 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.html +86 -51
- 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.html +45 -66
- 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.html +363 -226
- 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 -5
- package/src/components/callout/callout.django-snapshot.html +59 -0
- package/src/components/callout/callout.django.html +3 -3
- package/src/components/callout/callout.html +0 -5
- package/src/components/callout/callout.react-snapshot.html +57 -0
- package/src/components/callout/config.json +6 -7
- package/src/components/card/Card.tsx +8 -5
- package/src/components/card/card.django-snapshot.html +1198 -0
- package/src/components/card/card.django.html +5 -5
- package/src/components/card/card.html +1032 -35
- package/src/components/card/card.react-snapshot.html +1028 -0
- package/src/components/card/config.json +25 -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.html +388 -95
- 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 +45 -71
- package/src/components/carousel/carousel.django-snapshot.html +927 -0
- package/src/components/carousel/carousel.django.html +23 -47
- package/src/components/carousel/carousel.html +715 -32
- package/src/components/carousel/carousel.react-snapshot.html +762 -0
- package/src/components/carousel/config.json +43 -12
- 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.html +231 -26
- 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.html +313 -241
- 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.html +346 -26
- 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.html +168 -83
- package/src/components/clickable/clickable.react-snapshot.html +194 -0
- package/src/components/clickable/config.json +9 -7
- package/src/components/code/Code.tsx +4 -3
- package/src/components/code/code.django-snapshot.html +375 -0
- package/src/components/code/code.django.html +2 -2
- package/src/components/code/code.html +201 -38
- package/src/components/code/code.react-snapshot.html +249 -0
- package/src/components/code/config.json +22 -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.html +203 -379
- 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.html +21 -9
- 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.html +2616 -80
- 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.html +48 -20
- 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 +49 -0
- package/src/components/details/config.json +56 -0
- package/src/components/details/details.django-snapshot.html +238 -0
- package/src/components/details/details.django.html +10 -0
- package/src/components/details/details.html +215 -0
- 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.html +15 -2
- package/src/components/error-message/error-message.react-snapshot.html +12 -0
- package/src/components/error-page/ErrorPage.tsx +169 -0
- package/src/components/error-page/config.json +153 -0
- package/src/components/error-page/error-page.django-snapshot.html +570 -0
- package/src/components/error-page/error-page.django.html +80 -0
- package/src/components/error-page/error-page.html +437 -0
- 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.html +8 -4
- 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.html +33 -7
- 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 +341 -102
- 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.html +191 -7
- 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 +611 -232
- 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 +2553 -611
- 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 +299 -38
- 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.html +7 -2
- 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 +484 -256
- package/src/components/identifier/identifier.react-snapshot.html +959 -0
- package/src/components/image/Image.tsx +2 -2
- 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 +5 -11
- package/src/components/image/image.html +144 -29
- 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.html +25 -23
- 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.html +15 -16
- 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.html +74 -25
- 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.html +991 -21
- 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.html +10 -9
- 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.html +45 -25
- 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 +17 -5
- package/src/components/page/config.json +23 -2
- package/src/components/page/page.django-snapshot.html +44 -0
- package/src/components/page/page.django.html +5 -3
- package/src/components/page/page.html +29 -8
- 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.html +907 -305
- 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.html +244 -85
- package/src/components/prose/prose.react-snapshot.html +250 -0
- package/src/components/quote/Quote.tsx +2 -2
- package/src/components/quote/config.json +6 -4
- package/src/components/quote/quote.django-snapshot.html +348 -0
- package/src/components/quote/quote.django.html +2 -2
- package/src/components/quote/quote.html +2 -7
- 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.html +623 -127
- 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.html +3 -4
- 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.html +336 -54
- 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.html +73 -11
- 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.html +112 -58
- 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.html +40 -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.html +143 -23
- 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.html +26 -68
- 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 +99 -154
- 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.html +2168 -988
- 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.html +73 -17
- 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.html +252 -15
- 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.html +26 -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 +365 -311
- 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 +6 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<h3 class="site-preview-heading">Default</h3>
|
|
2
|
+
<a
|
|
3
|
+
class="usa-button usx-button usa-button--outline"
|
|
4
|
+
href="#react-example-modal-default"
|
|
5
|
+
aria-controls="react-example-modal-default"
|
|
6
|
+
data-open-modal="true"
|
|
7
|
+
>Open modal</a
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="usa-modal usx-modal"
|
|
11
|
+
id="react-example-modal-default"
|
|
12
|
+
aria-labelledby="react-example-modal-default-heading"
|
|
13
|
+
aria-describedby="react-example-modal-default-description"
|
|
14
|
+
>
|
|
15
|
+
<div class="usa-modal__content">
|
|
16
|
+
<div class="usa-modal__main">
|
|
17
|
+
<h2 class="usa-modal__heading" id="react-example-modal-default-heading">
|
|
18
|
+
Are you sure you want to continue?
|
|
19
|
+
</h2>
|
|
20
|
+
<div class="usa-prose usx-prose">
|
|
21
|
+
<p id="react-example-modal-default-description">
|
|
22
|
+
You have unsaved changes that will be lost.
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="usa-modal__footer">
|
|
26
|
+
<ul class="usa-button-group usx-button-group">
|
|
27
|
+
<li class="usa-button-group__item">
|
|
28
|
+
<button
|
|
29
|
+
type="button"
|
|
30
|
+
class="usa-button usx-button usa-button--primary"
|
|
31
|
+
data-close-modal="true"
|
|
32
|
+
>
|
|
33
|
+
Continue without saving
|
|
34
|
+
</button>
|
|
35
|
+
</li>
|
|
36
|
+
<li class="usa-button-group__item">
|
|
37
|
+
<button
|
|
38
|
+
type="button"
|
|
39
|
+
class="usa-button usx-button usa-button--unstyled padding-105 text-center"
|
|
40
|
+
data-close-modal="true"
|
|
41
|
+
>
|
|
42
|
+
Go back
|
|
43
|
+
</button>
|
|
44
|
+
</li>
|
|
45
|
+
</ul>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<button
|
|
49
|
+
type="button"
|
|
50
|
+
class="usa-button usa-modal__close"
|
|
51
|
+
aria-label="Close this window"
|
|
52
|
+
data-close-modal="true"
|
|
53
|
+
>
|
|
54
|
+
<svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
|
|
55
|
+
<use href="/img/sprite.svg#close"></use>
|
|
56
|
+
</svg>
|
|
57
|
+
</button>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<h3 class="site-preview-heading">Large</h3>
|
|
62
|
+
<a
|
|
63
|
+
class="usa-button usx-button usa-button--outline"
|
|
64
|
+
href="#react-example-modal-lg"
|
|
65
|
+
aria-controls="react-example-modal-lg"
|
|
66
|
+
data-open-modal="true"
|
|
67
|
+
>Open large modal</a
|
|
68
|
+
>
|
|
69
|
+
<div
|
|
70
|
+
class="usa-modal usx-modal usa-modal--lg"
|
|
71
|
+
id="react-example-modal-lg"
|
|
72
|
+
aria-labelledby="react-example-modal-lg-heading"
|
|
73
|
+
aria-describedby="react-example-modal-lg-description"
|
|
74
|
+
>
|
|
75
|
+
<div class="usa-modal__content">
|
|
76
|
+
<div class="usa-modal__main">
|
|
77
|
+
<h2 class="usa-modal__heading" id="react-example-modal-lg-heading">
|
|
78
|
+
Are you sure you want to continue?
|
|
79
|
+
</h2>
|
|
80
|
+
<div class="usa-prose usx-prose">
|
|
81
|
+
<p id="react-example-modal-lg-description">You have unsaved changes that will be lost.</p>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="usa-modal__footer">
|
|
84
|
+
<ul class="usa-button-group usx-button-group">
|
|
85
|
+
<li class="usa-button-group__item">
|
|
86
|
+
<button
|
|
87
|
+
type="button"
|
|
88
|
+
class="usa-button usx-button usa-button--primary"
|
|
89
|
+
data-close-modal="true"
|
|
90
|
+
>
|
|
91
|
+
Continue without saving
|
|
92
|
+
</button>
|
|
93
|
+
</li>
|
|
94
|
+
<li class="usa-button-group__item">
|
|
95
|
+
<button
|
|
96
|
+
type="button"
|
|
97
|
+
class="usa-button usx-button usa-button--unstyled padding-105 text-center"
|
|
98
|
+
data-close-modal="true"
|
|
99
|
+
>
|
|
100
|
+
Go back
|
|
101
|
+
</button>
|
|
102
|
+
</li>
|
|
103
|
+
</ul>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<button
|
|
107
|
+
type="button"
|
|
108
|
+
class="usa-button usa-modal__close"
|
|
109
|
+
aria-label="Close this window"
|
|
110
|
+
data-close-modal="true"
|
|
111
|
+
>
|
|
112
|
+
<svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
|
|
113
|
+
<use href="/img/sprite.svg#close"></use>
|
|
114
|
+
</svg>
|
|
115
|
+
</button>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<h3 class="site-preview-heading">Large Collapsed</h3>
|
|
120
|
+
<a
|
|
121
|
+
class="usa-button usx-button usa-button--outline"
|
|
122
|
+
href="#react-example-modal-lg-collapsed"
|
|
123
|
+
aria-controls="react-example-modal-lg-collapsed"
|
|
124
|
+
data-open-modal="true"
|
|
125
|
+
>Open large collapsed modal</a
|
|
126
|
+
>
|
|
127
|
+
<div
|
|
128
|
+
class="usa-modal usx-modal usx-modal--lg-collapsed"
|
|
129
|
+
id="react-example-modal-lg-collapsed"
|
|
130
|
+
aria-labelledby="react-example-modal-lg-collapsed-heading"
|
|
131
|
+
aria-describedby="react-example-modal-lg-collapsed-description"
|
|
132
|
+
>
|
|
133
|
+
<div class="usa-modal__content">
|
|
134
|
+
<div class="usa-modal__main">
|
|
135
|
+
<h2 class="usa-modal__heading" id="react-example-modal-lg-collapsed-heading">
|
|
136
|
+
Are you sure you want to continue?
|
|
137
|
+
</h2>
|
|
138
|
+
<div class="usa-prose usx-prose">
|
|
139
|
+
<p id="react-example-modal-lg-collapsed-description">
|
|
140
|
+
You have unsaved changes that will be lost.
|
|
141
|
+
</p>
|
|
142
|
+
</div>
|
|
143
|
+
<div class="usa-modal__footer">
|
|
144
|
+
<ul class="usa-button-group usx-button-group">
|
|
145
|
+
<li class="usa-button-group__item">
|
|
146
|
+
<button
|
|
147
|
+
type="button"
|
|
148
|
+
class="usa-button usx-button usa-button--primary"
|
|
149
|
+
data-close-modal="true"
|
|
150
|
+
>
|
|
151
|
+
Continue without saving
|
|
152
|
+
</button>
|
|
153
|
+
</li>
|
|
154
|
+
<li class="usa-button-group__item">
|
|
155
|
+
<button
|
|
156
|
+
type="button"
|
|
157
|
+
class="usa-button usx-button usa-button--unstyled padding-105 text-center"
|
|
158
|
+
data-close-modal="true"
|
|
159
|
+
>
|
|
160
|
+
Go back
|
|
161
|
+
</button>
|
|
162
|
+
</li>
|
|
163
|
+
</ul>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
<button
|
|
167
|
+
type="button"
|
|
168
|
+
class="usa-button usa-modal__close"
|
|
169
|
+
aria-label="Close this window"
|
|
170
|
+
data-close-modal="true"
|
|
171
|
+
>
|
|
172
|
+
<svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
|
|
173
|
+
<use href="/img/sprite.svg#close"></use>
|
|
174
|
+
</svg>
|
|
175
|
+
</button>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
<h3 class="site-preview-heading">Force Action</h3>
|
|
180
|
+
<a
|
|
181
|
+
class="usa-button usx-button usa-button--outline"
|
|
182
|
+
href="#react-example-modal-force"
|
|
183
|
+
aria-controls="react-example-modal-force"
|
|
184
|
+
data-open-modal="true"
|
|
185
|
+
>Open modal with forced action</a
|
|
186
|
+
>
|
|
187
|
+
<div
|
|
188
|
+
class="usa-modal usx-modal"
|
|
189
|
+
id="react-example-modal-force"
|
|
190
|
+
aria-labelledby="react-example-modal-force-heading"
|
|
191
|
+
aria-describedby="react-example-modal-force-description"
|
|
192
|
+
data-force-action="true"
|
|
193
|
+
>
|
|
194
|
+
<div class="usa-modal__content">
|
|
195
|
+
<div class="usa-modal__main">
|
|
196
|
+
<h2 class="usa-modal__heading" id="react-example-modal-force-heading">
|
|
197
|
+
Your session will end soon.
|
|
198
|
+
</h2>
|
|
199
|
+
<div class="usa-prose usx-prose">
|
|
200
|
+
<p id="react-example-modal-force-description">
|
|
201
|
+
You've been inactive for too long. Please choose to stay signed in or sign out.
|
|
202
|
+
Otherwise, you'll be signed out automatically in 5 minutes.
|
|
203
|
+
</p>
|
|
204
|
+
</div>
|
|
205
|
+
<div class="usa-modal__footer">
|
|
206
|
+
<ul class="usa-button-group usx-button-group">
|
|
207
|
+
<li class="usa-button-group__item">
|
|
208
|
+
<button
|
|
209
|
+
type="button"
|
|
210
|
+
class="usa-button usx-button usa-button--primary"
|
|
211
|
+
data-close-modal="true"
|
|
212
|
+
>
|
|
213
|
+
Yes, stay signed in
|
|
214
|
+
</button>
|
|
215
|
+
</li>
|
|
216
|
+
<li class="usa-button-group__item">
|
|
217
|
+
<button
|
|
218
|
+
type="button"
|
|
219
|
+
class="usa-button usx-button usa-button--unstyled padding-105 text-center"
|
|
220
|
+
data-close-modal="true"
|
|
221
|
+
>
|
|
222
|
+
Sign out
|
|
223
|
+
</button>
|
|
224
|
+
</li>
|
|
225
|
+
</ul>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
@@ -3,29 +3,41 @@ import ClassNames from 'classnames';
|
|
|
3
3
|
|
|
4
4
|
export interface PageProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title' | 'content'> {
|
|
5
5
|
title?: React.ReactNode;
|
|
6
|
+
titleId?: string;
|
|
6
7
|
eyebrow?: React.ReactNode;
|
|
7
|
-
|
|
8
|
+
as?: 'main' | 'div' | 'section' | 'article';
|
|
8
9
|
content?: React.ReactNode;
|
|
10
|
+
tabIndex?: number;
|
|
11
|
+
ariaLabelledby?: string;
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
export default function Page({
|
|
12
15
|
id = undefined,
|
|
13
16
|
title = 'Page title',
|
|
17
|
+
titleId = undefined,
|
|
14
18
|
eyebrow = null,
|
|
15
|
-
|
|
19
|
+
as: Element = 'main',
|
|
16
20
|
children = null,
|
|
17
21
|
content = null,
|
|
22
|
+
tabIndex = undefined,
|
|
23
|
+
ariaLabelledby = undefined,
|
|
18
24
|
className = '',
|
|
19
25
|
...props
|
|
20
26
|
}: PageProps) {
|
|
21
27
|
const classes = ClassNames('usx-page', className);
|
|
22
28
|
const pageContent = children || content;
|
|
23
29
|
|
|
24
|
-
const
|
|
30
|
+
const labelledBy = ariaLabelledby || titleId || undefined;
|
|
25
31
|
|
|
26
32
|
return (
|
|
27
|
-
<Element
|
|
28
|
-
|
|
33
|
+
<Element
|
|
34
|
+
id={id}
|
|
35
|
+
className={classes}
|
|
36
|
+
tabIndex={tabIndex}
|
|
37
|
+
aria-labelledby={labelledBy}
|
|
38
|
+
{...props}
|
|
39
|
+
>
|
|
40
|
+
<h1 id={titleId} className="usx-page__title">
|
|
29
41
|
{eyebrow ? <span className="usx-eyebrow">{eyebrow}</span> : null}
|
|
30
42
|
{title}
|
|
31
43
|
</h1>
|
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "page",
|
|
3
3
|
"template": "page/page.django.html",
|
|
4
|
-
"version":
|
|
4
|
+
"version": 4,
|
|
5
5
|
"required": [
|
|
6
6
|
"title"
|
|
7
7
|
],
|
|
8
|
+
"default": {
|
|
9
|
+
"children": "<p>This page wrapper provides consistent spacing between a site header and footer.</p><p>Use this region for page-specific content.</p>"
|
|
10
|
+
},
|
|
8
11
|
"props": {
|
|
12
|
+
"as": {
|
|
13
|
+
"type": "select",
|
|
14
|
+
"options": ["main", "div", "section", "article"],
|
|
15
|
+
"default": "main",
|
|
16
|
+
"description": "Root HTML element. Use div, section, or article when the page sits inside another main landmark."
|
|
17
|
+
},
|
|
9
18
|
"id": {
|
|
10
19
|
"type": "string",
|
|
11
|
-
"description": "Optional id attribute applied to the root
|
|
20
|
+
"description": "Optional id attribute applied to the root element."
|
|
21
|
+
},
|
|
22
|
+
"titleId": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Optional id for the h1. Also labels the root element unless ariaLabelledby is provided."
|
|
25
|
+
},
|
|
26
|
+
"tabIndex": {
|
|
27
|
+
"type": "number",
|
|
28
|
+
"description": "Optional tabindex for the root element. Use -1 when the page needs to receive programmatic focus."
|
|
29
|
+
},
|
|
30
|
+
"ariaLabelledby": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Optional id reference that labels the root element. Takes precedence over titleId."
|
|
12
33
|
},
|
|
13
34
|
"title": {
|
|
14
35
|
"type": "slot",
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<h3 class="site-preview-heading">Default</h3>
|
|
2
|
+
<main class="usx-page">
|
|
3
|
+
<h1 class="usx-page__title">Page title</h1>
|
|
4
|
+
<div class="usx-page__content">
|
|
5
|
+
<p>This page wrapper provides consistent spacing between a site header and footer.</p>
|
|
6
|
+
<p>Use this region for page-specific content.</p>
|
|
7
|
+
</div>
|
|
8
|
+
</main>
|
|
9
|
+
|
|
10
|
+
<h3 class="site-preview-heading">With Long Content</h3>
|
|
11
|
+
<main class="usx-page">
|
|
12
|
+
<h1 class="usx-page__title">Program overview</h1>
|
|
13
|
+
<div class="usx-page__content">
|
|
14
|
+
<p>
|
|
15
|
+
This section demonstrates how the page component handles longer content while preserving top
|
|
16
|
+
and bottom spacing.
|
|
17
|
+
</p>
|
|
18
|
+
<p>
|
|
19
|
+
Teams can compose this with Header and Footer components to keep page layout and heading
|
|
20
|
+
semantics consistent.
|
|
21
|
+
</p>
|
|
22
|
+
<p>
|
|
23
|
+
Because the title is always rendered as an h1, each page has a clear top-level heading by
|
|
24
|
+
default.
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
</main>
|
|
28
|
+
|
|
29
|
+
<h3 class="site-preview-heading">With Eyebrow</h3>
|
|
30
|
+
<main class="usx-page">
|
|
31
|
+
<h1 class="usx-page__title"><span class="usx-eyebrow">Eyebrow Title</span>Page Title</h1>
|
|
32
|
+
<div class="usx-page__content">
|
|
33
|
+
<p>This page wrapper provides consistent spacing between a site header and footer.</p>
|
|
34
|
+
<p>Use this region for page-specific content.</p>
|
|
35
|
+
</div>
|
|
36
|
+
</main>
|
|
37
|
+
|
|
38
|
+
<h3 class="site-preview-heading">With Classes</h3>
|
|
39
|
+
<main class="usx-page bg-violet text-white padding-2">
|
|
40
|
+
<h1 class="usx-page__title">Page with extra classes</h1>
|
|
41
|
+
<div class="usx-page__content">
|
|
42
|
+
<p>This page has additional classes applied to the root element for testing purposes.</p>
|
|
43
|
+
</div>
|
|
44
|
+
</main>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{# Django template for Page #}
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
{% with pageTag=as|default:'main' %}
|
|
3
|
+
<{% if pageTag == 'div' or pageTag == 'section' or pageTag == 'article' %}{{ pageTag }}{% else %}main{% endif %}{% if id %} id="{{ id }}"{% endif %} class="usx-page{% if className %} {{ className }}{% endif %}"{% if tabIndex or tabIndex == 0 %} tabindex="{{ tabIndex }}"{% endif %}{% if ariaLabelledby or titleId %} aria-labelledby="{% firstof ariaLabelledby titleId %}"{% endif %}>
|
|
4
|
+
<h1{% if titleId %} id="{{ titleId }}"{% endif %} class="usx-page__title">{% if eyebrow %}<span class="usx-eyebrow">{{ eyebrow }}</span>{% endif %}{{ title|default:'Page title' }}</h1>
|
|
4
5
|
<div class="usx-page__content">{% if children %}{{ children|safe }}{% elif content %}{{ content|safe }}{% endif %}</div>
|
|
5
|
-
</main>
|
|
6
|
+
</{% if pageTag == 'div' or pageTag == 'section' or pageTag == 'article' %}{{ pageTag }}{% else %}main{% endif %}>
|
|
7
|
+
{% endwith %}
|
|
@@ -1,23 +1,44 @@
|
|
|
1
1
|
<h3 class="site-preview-heading">Default</h3>
|
|
2
|
-
<hr>
|
|
3
2
|
<main class="usx-page">
|
|
4
|
-
<h1 class="usx-page__title">Page
|
|
3
|
+
<h1 class="usx-page__title">Page title</h1>
|
|
5
4
|
<div class="usx-page__content">
|
|
6
5
|
<p>This page wrapper provides consistent spacing between a site header and footer.</p>
|
|
7
6
|
<p>Use this region for page-specific content.</p>
|
|
8
7
|
</div>
|
|
9
8
|
</main>
|
|
10
9
|
|
|
10
|
+
<h3 class="site-preview-heading">With Long Content</h3>
|
|
11
|
+
<main class="usx-page">
|
|
12
|
+
<h1 class="usx-page__title">Program overview</h1>
|
|
13
|
+
<div class="usx-page__content">
|
|
14
|
+
<p>
|
|
15
|
+
This section demonstrates how the page component handles longer content while preserving top
|
|
16
|
+
and bottom spacing.
|
|
17
|
+
</p>
|
|
18
|
+
<p>
|
|
19
|
+
Teams can compose this with Header and Footer components to keep page layout and heading
|
|
20
|
+
semantics consistent.
|
|
21
|
+
</p>
|
|
22
|
+
<p>
|
|
23
|
+
Because the title is always rendered as an h1, each page has a clear top-level heading by
|
|
24
|
+
default.
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
</main>
|
|
11
28
|
|
|
12
29
|
<h3 class="site-preview-heading">With Eyebrow</h3>
|
|
13
|
-
<hr>
|
|
14
30
|
<main class="usx-page">
|
|
15
|
-
<h1 class="usx-page__title">
|
|
16
|
-
<span class="usx-eyebrow">Eyebrow Title</span>
|
|
17
|
-
Page Title
|
|
18
|
-
</h1>
|
|
31
|
+
<h1 class="usx-page__title"><span class="usx-eyebrow">Eyebrow Title</span>Page Title</h1>
|
|
19
32
|
<div class="usx-page__content">
|
|
20
33
|
<p>This page wrapper provides consistent spacing between a site header and footer.</p>
|
|
21
34
|
<p>Use this region for page-specific content.</p>
|
|
22
35
|
</div>
|
|
23
|
-
</main>
|
|
36
|
+
</main>
|
|
37
|
+
|
|
38
|
+
<h3 class="site-preview-heading">With Classes</h3>
|
|
39
|
+
<main class="usx-page bg-violet text-white padding-2">
|
|
40
|
+
<h1 class="usx-page__title">Page with extra classes</h1>
|
|
41
|
+
<div class="usx-page__content">
|
|
42
|
+
<p>This page has additional classes applied to the root element for testing purposes.</p>
|
|
43
|
+
</div>
|
|
44
|
+
</main>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<h3 class="site-preview-heading">Default</h3>
|
|
2
|
+
<main class="usx-page">
|
|
3
|
+
<h1 class="usx-page__title">Page title</h1>
|
|
4
|
+
<div class="usx-page__content">
|
|
5
|
+
<p>This page wrapper provides consistent spacing between a site header and footer.</p>
|
|
6
|
+
<p>Use this region for page-specific content.</p>
|
|
7
|
+
</div>
|
|
8
|
+
</main>
|
|
9
|
+
|
|
10
|
+
<h3 class="site-preview-heading">With Long Content</h3>
|
|
11
|
+
<main class="usx-page">
|
|
12
|
+
<h1 class="usx-page__title">Program overview</h1>
|
|
13
|
+
<div class="usx-page__content">
|
|
14
|
+
<p>
|
|
15
|
+
This section demonstrates how the page component handles longer content while preserving top
|
|
16
|
+
and bottom spacing.
|
|
17
|
+
</p>
|
|
18
|
+
<p>
|
|
19
|
+
Teams can compose this with Header and Footer components to keep page layout and heading
|
|
20
|
+
semantics consistent.
|
|
21
|
+
</p>
|
|
22
|
+
<p>
|
|
23
|
+
Because the title is always rendered as an h1, each page has a clear top-level heading by
|
|
24
|
+
default.
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
</main>
|
|
28
|
+
|
|
29
|
+
<h3 class="site-preview-heading">With Eyebrow</h3>
|
|
30
|
+
<main class="usx-page">
|
|
31
|
+
<h1 class="usx-page__title"><span class="usx-eyebrow">Eyebrow Title</span>Page Title</h1>
|
|
32
|
+
<div class="usx-page__content">
|
|
33
|
+
<p>This page wrapper provides consistent spacing between a site header and footer.</p>
|
|
34
|
+
<p>Use this region for page-specific content.</p>
|
|
35
|
+
</div>
|
|
36
|
+
</main>
|
|
37
|
+
|
|
38
|
+
<h3 class="site-preview-heading">With Classes</h3>
|
|
39
|
+
<main class="usx-page bg-violet text-white padding-2">
|
|
40
|
+
<h1 class="usx-page__title">Page with extra classes</h1>
|
|
41
|
+
<div class="usx-page__content">
|
|
42
|
+
<p>This page has additional classes applied to the root element for testing purposes.</p>
|
|
43
|
+
</div>
|
|
44
|
+
</main>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import ClassNames from 'classnames';
|
|
3
3
|
import PaginationNavigation from './navigation/PaginationNavigation';
|
|
4
4
|
import PaginationStepOptions from './step-options/PaginationStepOptions';
|
|
@@ -6,13 +6,15 @@ import PaginationSummary from './summary/PaginationSummary';
|
|
|
6
6
|
import PaginationContainer from './container/PaginationContainer';
|
|
7
7
|
|
|
8
8
|
export interface PaginationProps {
|
|
9
|
+
renderPart?: 'navigation' | 'step-options' | 'summary';
|
|
9
10
|
initialPage?: number;
|
|
10
11
|
initialPageSize?: number;
|
|
12
|
+
currentPage?: number;
|
|
13
|
+
pageSize?: number;
|
|
11
14
|
pageSizeOptions?: number[];
|
|
15
|
+
stepOptionsId?: string;
|
|
12
16
|
totalItems?: number;
|
|
13
17
|
unbounded?: boolean;
|
|
14
|
-
onPageChange?: (page: number, pageSize: number) => void;
|
|
15
|
-
onPageSizeChange?: (pageSize: number, page: number) => void;
|
|
16
18
|
ariaLabel?: string;
|
|
17
19
|
prevLabel?: string;
|
|
18
20
|
nextLabel?: string;
|
|
@@ -21,17 +23,20 @@ export interface PaginationProps {
|
|
|
21
23
|
showSummary?: boolean;
|
|
22
24
|
hideLinkText?: boolean;
|
|
23
25
|
arrowsOnly?: boolean;
|
|
26
|
+
pageUrlPrefix?: string;
|
|
24
27
|
className?: string;
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
export default function Pagination({
|
|
31
|
+
renderPart,
|
|
28
32
|
initialPage = 1,
|
|
29
33
|
initialPageSize = 10,
|
|
34
|
+
currentPage: page,
|
|
35
|
+
pageSize: size,
|
|
30
36
|
pageSizeOptions = [10, 25, 50, 100],
|
|
37
|
+
stepOptionsId,
|
|
31
38
|
totalItems,
|
|
32
39
|
unbounded = false,
|
|
33
|
-
onPageChange,
|
|
34
|
-
onPageSizeChange,
|
|
35
40
|
ariaLabel = 'Pagination',
|
|
36
41
|
prevLabel = 'Previous',
|
|
37
42
|
nextLabel = 'Next',
|
|
@@ -40,10 +45,11 @@ export default function Pagination({
|
|
|
40
45
|
showSummary = true,
|
|
41
46
|
hideLinkText = true,
|
|
42
47
|
arrowsOnly = false,
|
|
48
|
+
pageUrlPrefix,
|
|
43
49
|
className = '',
|
|
44
50
|
}: PaginationProps) {
|
|
45
|
-
const
|
|
46
|
-
const
|
|
51
|
+
const currentPage = page ?? initialPage;
|
|
52
|
+
const pageSize = size ?? initialPageSize;
|
|
47
53
|
|
|
48
54
|
const totalPages =
|
|
49
55
|
totalItems !== undefined && !unbounded
|
|
@@ -53,60 +59,48 @@ export default function Pagination({
|
|
|
53
59
|
// showSummary defaults to true when totalItems is provided
|
|
54
60
|
const displaySummary = showSummary !== undefined ? showSummary : totalItems !== undefined;
|
|
55
61
|
|
|
56
|
-
const
|
|
57
|
-
setCurrentPage((prev) => {
|
|
58
|
-
const next = typeof pageOrFn === 'function' ? pageOrFn(prev) : pageOrFn;
|
|
59
|
-
onPageChange?.(next, pageSize);
|
|
60
|
-
return next;
|
|
61
|
-
});
|
|
62
|
-
};
|
|
62
|
+
const classes = ClassNames('usx-pagination', className);
|
|
63
63
|
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
const navigation = (
|
|
65
|
+
<PaginationNavigation
|
|
66
|
+
currentPage={currentPage}
|
|
67
|
+
totalPages={totalPages}
|
|
68
|
+
pageSize={pageSize}
|
|
69
|
+
totalItems={totalItems}
|
|
70
|
+
ariaLabel={ariaLabel}
|
|
71
|
+
prevLabel={prevLabel}
|
|
72
|
+
nextLabel={nextLabel}
|
|
73
|
+
hideLinkText={hideLinkText}
|
|
74
|
+
arrowsOnly={arrowsOnly}
|
|
75
|
+
pageUrlPrefix={pageUrlPrefix}
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
const stepOptions = (
|
|
79
|
+
<PaginationStepOptions
|
|
80
|
+
pageSize={pageSize}
|
|
81
|
+
pageSizeOptions={pageSizeOptions}
|
|
82
|
+
id={stepOptionsId}
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
const summary = typeof totalItems === 'number' ? (
|
|
86
|
+
<PaginationSummary
|
|
87
|
+
currentPage={currentPage}
|
|
88
|
+
pageSize={pageSize}
|
|
89
|
+
totalItems={totalItems}
|
|
90
|
+
itemLabel={itemLabel}
|
|
91
|
+
/>
|
|
92
|
+
) : null;
|
|
73
93
|
|
|
74
|
-
|
|
94
|
+
if (renderPart === 'navigation') return navigation;
|
|
95
|
+
if (renderPart === 'step-options') return stepOptions;
|
|
96
|
+
if (renderPart === 'summary') return summary;
|
|
75
97
|
|
|
76
98
|
return (
|
|
77
99
|
<div className={classes}>
|
|
78
100
|
<PaginationContainer
|
|
79
|
-
summary={
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
currentPage={currentPage}
|
|
83
|
-
pageSize={pageSize}
|
|
84
|
-
totalItems={totalItems}
|
|
85
|
-
itemLabel={itemLabel}
|
|
86
|
-
/>
|
|
87
|
-
) : null
|
|
88
|
-
}
|
|
89
|
-
navigation={
|
|
90
|
-
<PaginationNavigation
|
|
91
|
-
currentPage={currentPage}
|
|
92
|
-
totalPages={totalPages}
|
|
93
|
-
onPageChange={handlePageChange}
|
|
94
|
-
ariaLabel={ariaLabel}
|
|
95
|
-
prevLabel={prevLabel}
|
|
96
|
-
nextLabel={nextLabel}
|
|
97
|
-
hideLinkText={hideLinkText}
|
|
98
|
-
arrowsOnly={arrowsOnly}
|
|
99
|
-
/>
|
|
100
|
-
}
|
|
101
|
-
stepOptions={
|
|
102
|
-
showStepOptions ? (
|
|
103
|
-
<PaginationStepOptions
|
|
104
|
-
pageSize={pageSize}
|
|
105
|
-
pageSizeOptions={pageSizeOptions}
|
|
106
|
-
onPageSizeChange={handlePageSizeChange}
|
|
107
|
-
/>
|
|
108
|
-
) : null
|
|
109
|
-
}
|
|
101
|
+
summary={displaySummary ? summary : null}
|
|
102
|
+
navigation={navigation}
|
|
103
|
+
stepOptions={showStepOptions ? stepOptions : null}
|
|
110
104
|
/>
|
|
111
105
|
</div>
|
|
112
106
|
);
|