@solexllc/usx-react 0.1.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 +45 -0
- package/dist/index.cjs +6017 -0
- package/dist/index.js +6015 -0
- package/package.json +48 -0
- package/src/components/accordion/Accordion.jsx +170 -0
- package/src/components/accordion/accordion.django.html +47 -0
- package/src/components/accordion/accordion.html +304 -0
- package/src/components/accordion/config.json +31 -0
- package/src/components/alert/Alert.tsx +88 -0
- package/src/components/alert/alert.django.html +45 -0
- package/src/components/alert/alert.html +192 -0
- package/src/components/alert/config.json +70 -0
- package/src/components/attribution/Attribution.tsx +40 -0
- package/src/components/attribution/attribution.django.html +21 -0
- package/src/components/attribution/attribution.html +26 -0
- package/src/components/attribution/config.json +32 -0
- package/src/components/avatar/Avatar.tsx +85 -0
- package/src/components/avatar/avatar.django.html +27 -0
- package/src/components/avatar/avatar.html +101 -0
- package/src/components/avatar/config.json +59 -0
- package/src/components/avatar-group/AvatarGroup.tsx +43 -0
- package/src/components/avatar-group/avatar-group.django.html +8 -0
- package/src/components/avatar-group/avatar-group.html +208 -0
- package/src/components/avatar-group/config.json +60 -0
- package/src/components/back-to-top/BackToTop.tsx +60 -0
- package/src/components/back-to-top/back-to-top.django.html +38 -0
- package/src/components/back-to-top/back-to-top.html +107 -0
- package/src/components/back-to-top/config.json +44 -0
- package/src/components/banner/Banner.tsx +111 -0
- package/src/components/banner/banner.django.html +80 -0
- package/src/components/banner/banner.html +411 -0
- package/src/components/banner/config.json +47 -0
- package/src/components/block/Block.tsx +78 -0
- package/src/components/block/block.django.html +26 -0
- package/src/components/block/block.html +162 -0
- package/src/components/block/config.json +88 -0
- package/src/components/breadcrumb/Breadcrumb.tsx +83 -0
- package/src/components/breadcrumb/breadcrumb.django.html +24 -0
- package/src/components/breadcrumb/breadcrumb.html +108 -0
- package/src/components/breadcrumb/config.json +74 -0
- package/src/components/button/Button.tsx +121 -0
- package/src/components/button/button.django.html +58 -0
- package/src/components/button/button.html +363 -0
- package/src/components/button/config.json +103 -0
- package/src/components/button-group/ButtonGroup.tsx +33 -0
- package/src/components/button-group/button-group.django.html +9 -0
- package/src/components/button-group/button-group.html +159 -0
- package/src/components/button-group/config.json +25 -0
- package/src/components/calendar-date/CalendarDate.tsx +40 -0
- package/src/components/calendar-date/calendar-date.django.html +8 -0
- package/src/components/calendar-date/calendar-date.html +17 -0
- package/src/components/calendar-date/config.json +17 -0
- package/src/components/card/Card.tsx +137 -0
- package/src/components/card/card.django.html +40 -0
- package/src/components/card/card.html +67 -0
- package/src/components/card/config.json +115 -0
- package/src/components/card-group/CardGroup.tsx +23 -0
- package/src/components/card-group/card-group.django.html +6 -0
- package/src/components/card-group/card-group.html +164 -0
- package/src/components/card-group/config.json +21 -0
- package/src/components/carousel/Carousel.tsx +101 -0
- package/src/components/carousel/carousel.django.html +41 -0
- package/src/components/carousel/carousel.html +64 -0
- package/src/components/carousel/config.json +38 -0
- package/src/components/character-count/CharacterCount.tsx +77 -0
- package/src/components/character-count/character-count.django.html +19 -0
- package/src/components/character-count/character-count.html +110 -0
- package/src/components/character-count/config.json +78 -0
- package/src/components/checkbox/Checkbox.tsx +90 -0
- package/src/components/checkbox/checkbox.django.html +16 -0
- package/src/components/checkbox/checkbox.html +266 -0
- package/src/components/checkbox/config.json +71 -0
- package/src/components/checkbox-group/CheckboxGroup.tsx +67 -0
- package/src/components/checkbox-group/checkbox-group.django.html +12 -0
- package/src/components/checkbox-group/checkbox-group.html +36 -0
- package/src/components/checkbox-group/config.json +50 -0
- package/src/components/clickable/Clickable.tsx +78 -0
- package/src/components/clickable/clickable.django.html +5 -0
- package/src/components/clickable/clickable.html +133 -0
- package/src/components/clickable/config.json +26 -0
- package/src/components/code/Code.tsx +60 -0
- package/src/components/code/code.django.html +21 -0
- package/src/components/code/code.html +71 -0
- package/src/components/code/config.json +40 -0
- package/src/components/collection/Collection.tsx +99 -0
- package/src/components/collection/collection.django.html +48 -0
- package/src/components/collection/collection.html +384 -0
- package/src/components/collection/config.json +60 -0
- package/src/components/combobox/Combobox.tsx +114 -0
- package/src/components/combobox/combobox.django.html +61 -0
- package/src/components/combobox/combobox.html +509 -0
- package/src/components/combobox/config.json +80 -0
- package/src/components/copy-to-clipboard/CopyToClipboard.tsx +48 -0
- package/src/components/copy-to-clipboard/config.json +30 -0
- package/src/components/copy-to-clipboard/copy-to-clipboard.django.html +16 -0
- package/src/components/copy-to-clipboard/copy-to-clipboard.html +68 -0
- package/src/components/date-picker/DatePicker.jsx +83 -0
- package/src/components/date-picker/config.json +71 -0
- package/src/components/date-picker/date-picker.django.html +67 -0
- package/src/components/date-picker/date-picker.html +104 -0
- package/src/components/date-range-picker/DateRangePicker.jsx +113 -0
- package/src/components/date-range-picker/config.json +92 -0
- package/src/components/date-range-picker/date-range-picker.django.html +66 -0
- package/src/components/date-range-picker/date-range-picker.html +190 -0
- package/src/components/error-message/ErrorMessage.tsx +23 -0
- package/src/components/error-message/config.json +19 -0
- package/src/components/error-message/error-message.django.html +2 -0
- package/src/components/error-message/error-message.html +2 -0
- package/src/components/eyebrow/Eyebrow.tsx +15 -0
- package/src/components/eyebrow/config.json +15 -0
- package/src/components/eyebrow/eyebrow.django.html +4 -0
- package/src/components/eyebrow/eyebrow.html +4 -0
- package/src/components/fieldset/Fieldset.tsx +54 -0
- package/src/components/fieldset/config.json +47 -0
- package/src/components/fieldset/fieldset.django.html +22 -0
- package/src/components/fieldset/fieldset.html +17 -0
- package/src/components/file-input/FileInput.jsx +174 -0
- package/src/components/file-input/config.json +80 -0
- package/src/components/file-input/file-input.django.html +57 -0
- package/src/components/file-input/file-input.html +258 -0
- package/src/components/file-list/FileList.jsx +105 -0
- package/src/components/file-list/config.json +43 -0
- package/src/components/file-list/file-list.django.html +30 -0
- package/src/components/file-list/file-list.html +61 -0
- package/src/components/footer/Footer.tsx +365 -0
- package/src/components/footer/config.json +83 -0
- package/src/components/footer/footer.django.html +260 -0
- package/src/components/footer/footer.html +392 -0
- package/src/components/form-group/FormGroup.tsx +26 -0
- package/src/components/form-group/config.json +22 -0
- package/src/components/form-group/form-group.django.html +4 -0
- package/src/components/form-group/form-group.html +17 -0
- package/src/components/header/Branding.tsx +101 -0
- package/src/components/header/Header.tsx +229 -0
- package/src/components/header/HeaderBranding.jsx +4 -0
- package/src/components/header/config.json +58 -0
- package/src/components/header/header.django.html +194 -0
- package/src/components/header/header.html +823 -0
- package/src/components/hero/Hero.tsx +64 -0
- package/src/components/hero/config.json +70 -0
- package/src/components/hero/hero.django.html +22 -0
- package/src/components/hero/hero.html +75 -0
- package/src/components/hint/Hint.tsx +23 -0
- package/src/components/hint/config.json +19 -0
- package/src/components/hint/hint.django.html +2 -0
- package/src/components/hint/hint.html +2 -0
- package/src/components/icon/Icon.tsx +46 -0
- package/src/components/icon/config.json +60 -0
- package/src/components/icon/icon.django.html +26 -0
- package/src/components/icon/icon.html +289 -0
- package/src/components/icon/icons_list.json +247 -0
- package/src/components/icon-list/IconList.tsx +59 -0
- package/src/components/icon-list/config.json +86 -0
- package/src/components/icon-list/icon-list.django.html +17 -0
- package/src/components/icon-list/icon-list.html +227 -0
- package/src/components/identifier/Identifier.tsx +193 -0
- package/src/components/identifier/config.json +133 -0
- package/src/components/identifier/identifier.django.html +99 -0
- package/src/components/identifier/identifier.html +737 -0
- package/src/components/image/Image.tsx +106 -0
- package/src/components/image/config.json +64 -0
- package/src/components/image/image.django.html +62 -0
- package/src/components/image/image.html +53 -0
- package/src/components/in-page-nav/InPageNav.jsx +76 -0
- package/src/components/in-page-nav/config.json +69 -0
- package/src/components/in-page-nav/in-page-nav.django.html +28 -0
- package/src/components/in-page-nav/in-page-nav.html +183 -0
- package/src/components/indicator/Indicator.tsx +32 -0
- package/src/components/indicator/README.md +1 -0
- package/src/components/indicator/config.json +19 -0
- package/src/components/indicator/indicator.django.html +10 -0
- package/src/components/indicator/indicator.html +42 -0
- package/src/components/input/Input.tsx +85 -0
- package/src/components/input/config.json +73 -0
- package/src/components/input/input.django.html +55 -0
- package/src/components/input/input.html +59 -0
- package/src/components/label/Label.tsx +42 -0
- package/src/components/label/config.json +39 -0
- package/src/components/label/label.django.html +23 -0
- package/src/components/label/label.html +23 -0
- package/src/components/language-selector/LanguageSelector.jsx +224 -0
- package/src/components/language-selector/config.json +107 -0
- package/src/components/language-selector/language-selector.django.html +40 -0
- package/src/components/language-selector/language-selector.html +85 -0
- package/src/components/layout/Layout.tsx +131 -0
- package/src/components/layout/config.json +36 -0
- package/src/components/layout/layout.django.html +28 -0
- package/src/components/layout/layout.html +29 -0
- package/src/components/legend/Legend.tsx +34 -0
- package/src/components/legend/config.json +27 -0
- package/src/components/legend/legend.django.html +11 -0
- package/src/components/legend/legend.html +12 -0
- package/src/components/link/Link.tsx +45 -0
- package/src/components/link/config.json +39 -0
- package/src/components/link/link.django.html +8 -0
- package/src/components/link/link.html +47 -0
- package/src/components/list/List.tsx +82 -0
- package/src/components/list/_list-items.django.html +17 -0
- package/src/components/list/config.json +25 -0
- package/src/components/list/list.django.html +11 -0
- package/src/components/list/list.html +26 -0
- package/src/components/memorable-date/MemorableDate.jsx +167 -0
- package/src/components/memorable-date/config.json +104 -0
- package/src/components/memorable-date/memorable-date.django.html +86 -0
- package/src/components/memorable-date/memorable-date.html +275 -0
- package/src/components/misc-banner/MiscBanner.tsx +112 -0
- package/src/components/misc-banner/config.json +57 -0
- package/src/components/misc-banner/misc-banner.django.html +63 -0
- package/src/components/misc-banner/misc-banner.html +191 -0
- package/src/components/modal/Modal.tsx +71 -0
- package/src/components/modal/config.json +57 -0
- package/src/components/modal/modal.django.html +43 -0
- package/src/components/modal/modal.html +222 -0
- package/src/components/page/Page.jsx +34 -0
- package/src/components/page/config.json +34 -0
- package/src/components/page/page.django.html +5 -0
- package/src/components/page/page.html +23 -0
- package/src/components/pagination/Pagination.tsx +112 -0
- package/src/components/pagination/config.json +135 -0
- package/src/components/pagination/container/PaginationContainer.tsx +38 -0
- package/src/components/pagination/navigation/PaginationNavigation.tsx +219 -0
- package/src/components/pagination/navigation/pagination-navigation.django.html +64 -0
- package/src/components/pagination/pagination.django.html +48 -0
- package/src/components/pagination/pagination.html +613 -0
- package/src/components/pagination/step-options/PaginationStepOptions.tsx +43 -0
- package/src/components/pagination/step-options/pagination-step-options.django.html +7 -0
- package/src/components/pagination/summary/PaginationSummary.tsx +33 -0
- package/src/components/pagination/summary/pagination-summary.django.html +12 -0
- package/src/components/process-list/ProcessList.tsx +52 -0
- package/src/components/process-list/config.json +15 -0
- package/src/components/process-list/process-list.django.html +15 -0
- package/src/components/process-list/process-list.html +90 -0
- package/src/components/prose/Prose.tsx +32 -0
- package/src/components/prose/config.json +28 -0
- package/src/components/prose/prose.django.html +35 -0
- package/src/components/prose/prose.html +91 -0
- package/src/components/radio-buttons/RadioButtons.tsx +82 -0
- package/src/components/radio-buttons/config.json +57 -0
- package/src/components/radio-buttons/radio-buttons.django.html +28 -0
- package/src/components/radio-buttons/radio-buttons.html +189 -0
- package/src/components/range-slider/RangeSlider.jsx +84 -0
- package/src/components/range-slider/config.json +89 -0
- package/src/components/range-slider/range-slider.django.html +65 -0
- package/src/components/range-slider/range-slider.html +106 -0
- package/src/components/required/Required.tsx +25 -0
- package/src/components/required/config.json +20 -0
- package/src/components/required/required.django.html +2 -0
- package/src/components/required/required.html +6 -0
- package/src/components/search/Search.tsx +92 -0
- package/src/components/search/config.json +69 -0
- package/src/components/search/search.django.html +59 -0
- package/src/components/search/search.html +76 -0
- package/src/components/section/Section.tsx +28 -0
- package/src/components/section/config.json +27 -0
- package/src/components/section/section.django.html +5 -0
- package/src/components/section/section.html +16 -0
- package/src/components/select/Select.tsx +107 -0
- package/src/components/select/config.json +80 -0
- package/src/components/select/select.django.html +64 -0
- package/src/components/select/select.html +62 -0
- package/src/components/sidenav/SideNav.tsx +74 -0
- package/src/components/sidenav/config.json +45 -0
- package/src/components/sidenav/sidenav.django.html +29 -0
- package/src/components/sidenav/sidenav.html +84 -0
- package/src/components/site-alert/SiteAlert.tsx +101 -0
- package/src/components/site-alert/config.json +62 -0
- package/src/components/site-alert/site-alert.django.html +34 -0
- package/src/components/site-alert/site-alert.html +312 -0
- package/src/components/skipnav/Skipnav.tsx +41 -0
- package/src/components/skipnav/config.json +29 -0
- package/src/components/skipnav/skipnav.django.html +11 -0
- package/src/components/skipnav/skipnav.html +1 -0
- package/src/components/spinner/Spinner.tsx +46 -0
- package/src/components/spinner/config.json +44 -0
- package/src/components/spinner/spinner.django.html +8 -0
- package/src/components/spinner/spinner.html +219 -0
- package/src/components/status/Status.tsx +28 -0
- package/src/components/status/config.json +47 -0
- package/src/components/status/status.django.html +2 -0
- package/src/components/status/status.html +31 -0
- package/src/components/step-indicator/StepIndicator.tsx +80 -0
- package/src/components/step-indicator/config.json +54 -0
- package/src/components/step-indicator/step-indicator.django.html +29 -0
- package/src/components/step-indicator/step-indicator.html +243 -0
- package/src/components/summary-box/SummaryBox.tsx +41 -0
- package/src/components/summary-box/config.json +30 -0
- package/src/components/summary-box/summary-box.django.html +19 -0
- package/src/components/summary-box/summary-box.html +210 -0
- package/src/components/swap/Swap.tsx +47 -0
- package/src/components/swap/config.json +61 -0
- package/src/components/swap/swap.django.html +14 -0
- package/src/components/swap/swap.html +163 -0
- package/src/components/switch/Switch.tsx +73 -0
- package/src/components/switch/config.json +55 -0
- package/src/components/switch/switch.django.html +28 -0
- package/src/components/switch/switch.html +56 -0
- package/src/components/table/Table.tsx +334 -0
- package/src/components/table/TableBody.tsx +253 -0
- package/src/components/table/TableCell.tsx +37 -0
- package/src/components/table/TableContext.tsx +87 -0
- package/src/components/table/TableFoot.tsx +68 -0
- package/src/components/table/TableGroup.tsx +69 -0
- package/src/components/table/TableHead.tsx +139 -0
- package/src/components/table/TableRow.tsx +56 -0
- package/src/components/table/__pycache__/table_helper.cpython-312.pyc +0 -0
- package/src/components/table/config.json +297 -0
- package/src/components/table/hooks/useRowDetails.ts +34 -0
- package/src/components/table/hooks/useTableGroups.ts +61 -0
- package/src/components/table/hooks/useTableSelect.ts +82 -0
- package/src/components/table/hooks/useTableSort.ts +60 -0
- package/src/components/table/table-body.django.html +68 -0
- package/src/components/table/table-detail-row.django.html +14 -0
- package/src/components/table/table-foot.django.html +31 -0
- package/src/components/table/table-group.django.html +40 -0
- package/src/components/table/table-head.django.html +85 -0
- package/src/components/table/table-row.django.html +98 -0
- package/src/components/table/table.django.html +60 -0
- package/src/components/table/table.html +1186 -0
- package/src/components/table/table_helper.py +298 -0
- package/src/components/table/types.ts +68 -0
- package/src/components/tag/Tag.tsx +75 -0
- package/src/components/tag/config.json +54 -0
- package/src/components/tag/tag.django.html +39 -0
- package/src/components/tag/tag.html +45 -0
- package/src/components/tag-group/TagGroup.tsx +35 -0
- package/src/components/tag-group/config.json +24 -0
- package/src/components/tag-group/tag-group.django.html +11 -0
- package/src/components/tag-group/tag-group.html +36 -0
- package/src/components/task-list/TaskList.tsx +40 -0
- package/src/components/task-list/config.json +41 -0
- package/src/components/task-list/task-list.django.html +21 -0
- package/src/components/task-list/task-list.html +24 -0
- package/src/components/text-area/TextArea.tsx +78 -0
- package/src/components/text-area/config.json +78 -0
- package/src/components/text-area/text-area.django.html +53 -0
- package/src/components/text-area/text-area.html +59 -0
- package/src/components/theme-picker/ThemePicker.tsx +106 -0
- package/src/components/theme-picker/config.json +39 -0
- package/src/components/theme-picker/theme-picker.django.html +32 -0
- package/src/components/theme-picker/theme-picker.html +67 -0
- package/src/components/time-picker/TimePicker.jsx +87 -0
- package/src/components/time-picker/config.json +76 -0
- package/src/components/time-picker/time-picker.django.html +67 -0
- package/src/components/time-picker/time-picker.html +123 -0
- package/src/components/toggle/Toggle.tsx +80 -0
- package/src/components/toggle/config.json +69 -0
- package/src/components/toggle/toggle.django.html +19 -0
- package/src/components/toggle/toggle.html +85 -0
- package/src/components/tooltip/Tooltip.tsx +33 -0
- package/src/components/tooltip/config.json +33 -0
- package/src/components/tooltip/tooltip.django.html +5 -0
- package/src/components/tooltip/tooltip.html +57 -0
- package/src/components/villain/Villain.tsx +47 -0
- package/src/components/villain/config.json +44 -0
- package/src/components/villain/villain.django.html +19 -0
- package/src/components/villain/villain.html +39 -0
- package/src/declarations.d.ts +1 -0
- package/src/index.js +82 -0
- package/src/styles/core.scss +12 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
<div class="grid-row grid-gap">
|
|
2
|
+
<div class="tablet:grid-col-6">
|
|
3
|
+
<h3 class="site-preview-heading margin-top-0">Default</h3>
|
|
4
|
+
<ul class="usa-collection usx-collection">
|
|
5
|
+
<li class="usa-collection__item">
|
|
6
|
+
<div class="usa-collection__body">
|
|
7
|
+
<h4 class="usa-collection__heading">
|
|
8
|
+
<a
|
|
9
|
+
class="usa-link usx-link"
|
|
10
|
+
href="https://trumpadministration.archives.performance.gov/presidents-winners-press-release/"
|
|
11
|
+
>Gears of Government President’s Award winners</a
|
|
12
|
+
>
|
|
13
|
+
</h4>
|
|
14
|
+
<p class="usa-collection__description">
|
|
15
|
+
Today, the Administration announces the winners of the Gears of
|
|
16
|
+
Government President’s Award. This program recognizes the contributions
|
|
17
|
+
of individuals and teams across the federal workforce who make a
|
|
18
|
+
profound difference in the lives of the American people.
|
|
19
|
+
</p>
|
|
20
|
+
<ul class="usa-collection__meta" aria-label="More information">
|
|
21
|
+
<li class="usa-collection__meta-item">
|
|
22
|
+
By Sondra Ainsworth and Constance Lu
|
|
23
|
+
</li>
|
|
24
|
+
<li class="usa-collection__meta-item">
|
|
25
|
+
<time datetime="2020-09-30T12:00:00+01:00">September 30, 2020</time>
|
|
26
|
+
</li>
|
|
27
|
+
</ul>
|
|
28
|
+
<ul class="usa-collection__meta" aria-label="Topics">
|
|
29
|
+
<li class="usa-collection__meta-item usa-tag usx-tag usa-tag--new">New</li>
|
|
30
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">PMA</li>
|
|
31
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">OMB</li>
|
|
32
|
+
</ul>
|
|
33
|
+
</div>
|
|
34
|
+
</li>
|
|
35
|
+
<li class="usa-collection__item">
|
|
36
|
+
<div class="usa-collection__body">
|
|
37
|
+
<h4 class="usa-collection__heading">
|
|
38
|
+
<a
|
|
39
|
+
class="usa-link usx-link"
|
|
40
|
+
href="https://trumpadministration.archives.performance.gov/sba-wosb-dashboard/"
|
|
41
|
+
>Women-owned small business dashboard</a
|
|
42
|
+
>
|
|
43
|
+
</h4>
|
|
44
|
+
<p class="usa-collection__description">
|
|
45
|
+
In honor of National Women’s Small Business Month, we’ve partnered with
|
|
46
|
+
SBA’s Office of Government Contracting and Business Development and
|
|
47
|
+
Office of Program Performance, Analysis, and Evaluation to highlight the
|
|
48
|
+
Women-Owned Small Businesses (WOSBs) data dashboard!
|
|
49
|
+
</p>
|
|
50
|
+
<ul class="usa-collection__meta" aria-label="More information">
|
|
51
|
+
<li class="usa-collection__meta-item">By Constance Lu</li>
|
|
52
|
+
<li class="usa-collection__meta-item">
|
|
53
|
+
<time datetime="2020-09-30T12:00:00+01:00">September 30, 2020</time>
|
|
54
|
+
</li>
|
|
55
|
+
</ul>
|
|
56
|
+
<ul class="usa-collection__meta" aria-label="Topics">
|
|
57
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">SBA</li>
|
|
58
|
+
</ul>
|
|
59
|
+
</div>
|
|
60
|
+
</li>
|
|
61
|
+
<li class="usa-collection__item">
|
|
62
|
+
<div class="usa-collection__body">
|
|
63
|
+
<h4 class="usa-collection__heading">
|
|
64
|
+
<a
|
|
65
|
+
class="usa-link usx-link"
|
|
66
|
+
href="https://trumpadministration.archives.performance.gov/September-2020-Updates-Show-Progress/"
|
|
67
|
+
>September 2020 updates show progress on cross-agency and agency
|
|
68
|
+
priority goals</a
|
|
69
|
+
>
|
|
70
|
+
</h4>
|
|
71
|
+
<p class="usa-collection__description">
|
|
72
|
+
Today, we published progress updates for both Cross-Agency Priority
|
|
73
|
+
(CAP) Goals and Agency Priority Goals (APGs) for the third quarter of
|
|
74
|
+
FY2020. These updates highlight recent milestones and accomplishments as
|
|
75
|
+
well as related initiatives that support progress towards a more modern
|
|
76
|
+
and effective government.
|
|
77
|
+
</p>
|
|
78
|
+
<ul class="usa-collection__meta" aria-label="More information">
|
|
79
|
+
<li class="usa-collection__meta-item">By Eric L. Miller</li>
|
|
80
|
+
<li class="usa-collection__meta-item">
|
|
81
|
+
<time datetime="2020-09-17T12:00:00+01:00">September 17, 2020</time>
|
|
82
|
+
</li>
|
|
83
|
+
</ul>
|
|
84
|
+
<ul class="usa-collection__meta" aria-label="Topics">
|
|
85
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">Quarterly update</li>
|
|
86
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">CAP goal</li>
|
|
87
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">APG</li>
|
|
88
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">PMA</li>
|
|
89
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">Success story</li>
|
|
90
|
+
</ul>
|
|
91
|
+
</div>
|
|
92
|
+
</li>
|
|
93
|
+
</ul>
|
|
94
|
+
</div>
|
|
95
|
+
<div class="tablet:grid-col-6">
|
|
96
|
+
<h3 class="site-preview-heading tablet:margin-top-0">Media thumbnail</h3>
|
|
97
|
+
<ul class="usa-collection usx-collection">
|
|
98
|
+
<li class="usa-collection__item">
|
|
99
|
+
<img
|
|
100
|
+
class="usa-collection__img"
|
|
101
|
+
src="https://trumpadministration.archives.performance.gov/img/GoG/GoG-logo.png"
|
|
102
|
+
alt="Gears of Government Awards - President's Award"
|
|
103
|
+
/>
|
|
104
|
+
<div class="usa-collection__body">
|
|
105
|
+
<h4 class="usa-collection__heading">
|
|
106
|
+
<a
|
|
107
|
+
class="usa-link usx-link"
|
|
108
|
+
href="https://trumpadministration.archives.performance.gov/presidents-winners-press-release/"
|
|
109
|
+
>Gears of Government President’s Award winners</a
|
|
110
|
+
>
|
|
111
|
+
</h4>
|
|
112
|
+
<p class="usa-collection__description">
|
|
113
|
+
Today, the Administration announces the winners of the Gears of
|
|
114
|
+
Government President’s Award. This program recognizes the contributions
|
|
115
|
+
of individuals and teams across the federal workforce who make a
|
|
116
|
+
profound difference in the lives of the American people.
|
|
117
|
+
</p>
|
|
118
|
+
<ul class="usa-collection__meta" aria-label="More information">
|
|
119
|
+
<li class="usa-collection__meta-item">
|
|
120
|
+
By Sondra Ainsworth and Constance Lu
|
|
121
|
+
</li>
|
|
122
|
+
<li class="usa-collection__meta-item">
|
|
123
|
+
<time datetime="2020-09-30T12:00:00+01:00">September 30, 2020</time>
|
|
124
|
+
</li>
|
|
125
|
+
</ul>
|
|
126
|
+
<ul class="usa-collection__meta" aria-label="Topics">
|
|
127
|
+
<li class="usa-collection__meta-item usa-tag usx-tag usa-tag--new">New</li>
|
|
128
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">PMA</li>
|
|
129
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">OMB</li>
|
|
130
|
+
</ul>
|
|
131
|
+
</div>
|
|
132
|
+
</li>
|
|
133
|
+
<li class="usa-collection__item">
|
|
134
|
+
<img
|
|
135
|
+
class="usa-collection__img"
|
|
136
|
+
src="https://www.performance.gov/img/blog/wosb1.jpg"
|
|
137
|
+
alt="Woman Owned Small Business Federal Contracts"
|
|
138
|
+
/>
|
|
139
|
+
<div class="usa-collection__body">
|
|
140
|
+
<h4 class="usa-collection__heading">
|
|
141
|
+
<a
|
|
142
|
+
class="usa-link usx-link"
|
|
143
|
+
href="https://trumpadministration.archives.performance.gov/sba-wosb-dashboard/"
|
|
144
|
+
>Women-owned small business dashboard</a
|
|
145
|
+
>
|
|
146
|
+
</h4>
|
|
147
|
+
<p class="usa-collection__description">
|
|
148
|
+
In honor of National Women’s Small Business Month, we’ve partnered with
|
|
149
|
+
SBA’s Office of Government Contracting and Business Development and
|
|
150
|
+
Office of Program Performance, Analysis, and Evaluation to highlight the
|
|
151
|
+
Women-Owned Small Businesses (WOSBs) data dashboard!
|
|
152
|
+
</p>
|
|
153
|
+
<ul class="usa-collection__meta" aria-label="More information">
|
|
154
|
+
<li class="usa-collection__meta-item">By Constance Lu</li>
|
|
155
|
+
<li class="usa-collection__meta-item">
|
|
156
|
+
<time datetime="2020-09-30T12:00:00+01:00">September 30, 2020</time>
|
|
157
|
+
</li>
|
|
158
|
+
</ul>
|
|
159
|
+
<ul class="usa-collection__meta" aria-label="Topics">
|
|
160
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">SBA</li>
|
|
161
|
+
</ul>
|
|
162
|
+
</div>
|
|
163
|
+
</li>
|
|
164
|
+
<li class="usa-collection__item">
|
|
165
|
+
<img
|
|
166
|
+
class="usa-collection__img"
|
|
167
|
+
src="https://www.performance.gov/img/blog/sept-2020.png"
|
|
168
|
+
alt="September 2020 Updates"
|
|
169
|
+
/>
|
|
170
|
+
<div class="usa-collection__body">
|
|
171
|
+
<h4 class="usa-collection__heading">
|
|
172
|
+
<a
|
|
173
|
+
class="usa-link usx-link"
|
|
174
|
+
href="https://trumpadministration.archives.performance.gov/September-2020-Updates-Show-Progress/"
|
|
175
|
+
>September 2020 updates show progress on cross-agency and agency
|
|
176
|
+
priority goals</a
|
|
177
|
+
>
|
|
178
|
+
</h4>
|
|
179
|
+
<p class="usa-collection__description">
|
|
180
|
+
Today, we published progress updates for both Cross-Agency Priority
|
|
181
|
+
(CAP) Goals and Agency Priority Goals (APGs) for the third quarter of
|
|
182
|
+
FY2020. These updates highlight recent milestones and accomplishments as
|
|
183
|
+
well as related initiatives that support progress towards a more modern
|
|
184
|
+
and effective government.
|
|
185
|
+
</p>
|
|
186
|
+
<ul class="usa-collection__meta" aria-label="More information">
|
|
187
|
+
<li class="usa-collection__meta-item">By Eric L. Miller</li>
|
|
188
|
+
<li class="usa-collection__meta-item">
|
|
189
|
+
<time datetime="2020-09-17T12:00:00+01:00">September 17, 2020</time>
|
|
190
|
+
</li>
|
|
191
|
+
</ul>
|
|
192
|
+
<ul class="usa-collection__meta" aria-label="Topics">
|
|
193
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">Quarterly update</li>
|
|
194
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">CAP goal</li>
|
|
195
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">APG</li>
|
|
196
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">PMA</li>
|
|
197
|
+
<li class="usa-collection__meta-item usa-tag usx-tag">Success story</li>
|
|
198
|
+
</ul>
|
|
199
|
+
</div>
|
|
200
|
+
</li>
|
|
201
|
+
</ul>
|
|
202
|
+
</div>
|
|
203
|
+
<div class="tablet:grid-col-6">
|
|
204
|
+
<h3 class="site-preview-heading">Calendar display</h3>
|
|
205
|
+
<ul class="usa-collection usx-collection">
|
|
206
|
+
<li class="usa-collection__item">
|
|
207
|
+
<div class="usa-collection__calendar-date usx-calendar-date">
|
|
208
|
+
<time datetime="2020-09-30T12:00:00+01:00"
|
|
209
|
+
><span class="usa-collection__calendar-date-month usx-calendar-date-month">SEP</span>
|
|
210
|
+
<span class="usa-collection__calendar-date-day usx-calendar-date-day">30</span></time
|
|
211
|
+
>
|
|
212
|
+
</div>
|
|
213
|
+
<div class="usa-collection__body">
|
|
214
|
+
<h4 class="usa-collection__heading">
|
|
215
|
+
<a
|
|
216
|
+
class="usa-link usx-link"
|
|
217
|
+
href="https://trumpadministration.archives.performance.gov/presidents-winners-press-release/"
|
|
218
|
+
>Gears of Government President’s Award winners</a
|
|
219
|
+
>
|
|
220
|
+
</h4>
|
|
221
|
+
<p class="usa-collection__description">
|
|
222
|
+
Today, the Administration announces the winners of the Gears of
|
|
223
|
+
Government President’s Award. This program recognizes the contributions
|
|
224
|
+
of individuals and teams across the federal workforce who make a
|
|
225
|
+
profound difference in the lives of the American people.
|
|
226
|
+
</p>
|
|
227
|
+
</div>
|
|
228
|
+
</li>
|
|
229
|
+
<li class="usa-collection__item">
|
|
230
|
+
<div class="usa-collection__calendar-date usx-calendar-date">
|
|
231
|
+
<time datetime="2020-09-30T12:00:00+01:00"
|
|
232
|
+
><span class="usa-collection__calendar-date-month usx-calendar-date-month">SEP</span>
|
|
233
|
+
<span class="usa-collection__calendar-date-day usx-calendar-date-day">30</span></time
|
|
234
|
+
>
|
|
235
|
+
</div>
|
|
236
|
+
<div class="usa-collection__body">
|
|
237
|
+
<h4 class="usa-collection__heading">
|
|
238
|
+
<a
|
|
239
|
+
class="usa-link usx-link"
|
|
240
|
+
href="https://trumpadministration.archives.performance.gov/sba-wosb-dashboard/"
|
|
241
|
+
>Women-owned small business dashboard</a
|
|
242
|
+
>
|
|
243
|
+
</h4>
|
|
244
|
+
<p class="usa-collection__description">
|
|
245
|
+
In honor of National Women’s Small Business Month, we’ve partnered with
|
|
246
|
+
SBA’s Office of Government Contracting and Business Development and
|
|
247
|
+
Office of Program Performance, Analysis, and Evaluation to highlight the
|
|
248
|
+
Women-Owned Small Businesses (WOSBs) data dashboard!
|
|
249
|
+
</p>
|
|
250
|
+
</div>
|
|
251
|
+
</li>
|
|
252
|
+
<li class="usa-collection__item">
|
|
253
|
+
<div class="usa-collection__calendar-date usx-calendar-date">
|
|
254
|
+
<time datetime="2020-09-17T12:00:00+01:00"
|
|
255
|
+
><span class="usa-collection__calendar-date-month usx-calendar-date-month">SEP</span>
|
|
256
|
+
<span class="usa-collection__calendar-date-day usx-calendar-date-day">17</span></time
|
|
257
|
+
>
|
|
258
|
+
</div>
|
|
259
|
+
<div class="usa-collection__body">
|
|
260
|
+
<h4 class="usa-collection__heading">
|
|
261
|
+
<a
|
|
262
|
+
class="usa-link usx-link"
|
|
263
|
+
href="https://trumpadministration.archives.performance.gov/September-2020-Updates-Show-Progress/"
|
|
264
|
+
>September 2020 updates show progress on cross-agency and agency
|
|
265
|
+
priority goals</a
|
|
266
|
+
>
|
|
267
|
+
</h4>
|
|
268
|
+
<p class="usa-collection__description">
|
|
269
|
+
Today, we published progress updates for both Cross-Agency Priority
|
|
270
|
+
(CAP) Goals and Agency Priority Goals (APGs) for the third quarter of
|
|
271
|
+
FY2020. These updates highlight recent milestones and accomplishments as
|
|
272
|
+
well as related initiatives that support progress towards a more modern
|
|
273
|
+
and effective government.
|
|
274
|
+
</p>
|
|
275
|
+
</div>
|
|
276
|
+
</li>
|
|
277
|
+
</ul>
|
|
278
|
+
</div>
|
|
279
|
+
<div class="tablet:grid-col-6">
|
|
280
|
+
<h3 class="site-preview-heading">Headings only</h3>
|
|
281
|
+
<ul class="usa-collection usa-collection--condensed">
|
|
282
|
+
<li class="usa-collection__item">
|
|
283
|
+
<div class="usa-collection__body">
|
|
284
|
+
<h4 class="usa-collection__heading">
|
|
285
|
+
<a
|
|
286
|
+
class="usa-link usx-link"
|
|
287
|
+
href="https://digital.gov/guides/mobile-principles/?dg"
|
|
288
|
+
>The eight principles of mobile-friendliness</a
|
|
289
|
+
>
|
|
290
|
+
</h4>
|
|
291
|
+
<ul class="usa-collection__meta" aria-label="More information">
|
|
292
|
+
<li class="usa-collection__meta-item position-relative">
|
|
293
|
+
<svg
|
|
294
|
+
class="usa-icon position-relative bottom-neg-2px"
|
|
295
|
+
aria-hidden="true"
|
|
296
|
+
role="img"
|
|
297
|
+
>
|
|
298
|
+
<use href="/assets/img/sprite.svg#public"></use>
|
|
299
|
+
</svg>
|
|
300
|
+
Digital.gov
|
|
301
|
+
</li>
|
|
302
|
+
</ul>
|
|
303
|
+
</div>
|
|
304
|
+
</li>
|
|
305
|
+
<li class="usa-collection__item">
|
|
306
|
+
<div class="usa-collection__body">
|
|
307
|
+
<h4 class="usa-collection__heading">
|
|
308
|
+
<a
|
|
309
|
+
class="usa-link usx-link"
|
|
310
|
+
href="https://designsystem.digital.gov/maturity-model/"
|
|
311
|
+
>The USWDS maturity model</a
|
|
312
|
+
>
|
|
313
|
+
</h4>
|
|
314
|
+
<ul class="usa-collection__meta" aria-label="More information">
|
|
315
|
+
<li class="usa-collection__meta-item position-relative">
|
|
316
|
+
<svg
|
|
317
|
+
class="usa-icon position-relative bottom-neg-2px"
|
|
318
|
+
aria-hidden="true"
|
|
319
|
+
role="img"
|
|
320
|
+
>
|
|
321
|
+
<use href="/assets/img/sprite.svg#public"></use>
|
|
322
|
+
</svg>
|
|
323
|
+
U.S. Web Design System
|
|
324
|
+
</li>
|
|
325
|
+
</ul>
|
|
326
|
+
</div>
|
|
327
|
+
</li>
|
|
328
|
+
<li class="usa-collection__item">
|
|
329
|
+
<div class="usa-collection__body">
|
|
330
|
+
<h4 class="usa-collection__heading">
|
|
331
|
+
<a class="usa-link usx-link" href="#">A news item that’s on our own site</a>
|
|
332
|
+
</h4>
|
|
333
|
+
</div>
|
|
334
|
+
</li>
|
|
335
|
+
<li class="usa-collection__item">
|
|
336
|
+
<div class="usa-collection__body">
|
|
337
|
+
<h4 class="usa-collection__heading">
|
|
338
|
+
<a
|
|
339
|
+
class="usa-link usx-link"
|
|
340
|
+
href="https://18f.gsa.gov/2020/11/24/the-key-role-of-product-owners-in-federated-data-projects/"
|
|
341
|
+
>The key role of product owners in federated data projects</a
|
|
342
|
+
>
|
|
343
|
+
</h4>
|
|
344
|
+
<ul class="usa-collection__meta" aria-label="More information">
|
|
345
|
+
<li class="usa-collection__meta-item position-relative">
|
|
346
|
+
<svg
|
|
347
|
+
class="usa-icon position-relative bottom-neg-2px"
|
|
348
|
+
aria-hidden="true"
|
|
349
|
+
role="img"
|
|
350
|
+
>
|
|
351
|
+
<use href="/assets/img/sprite.svg#public"></use>
|
|
352
|
+
</svg>
|
|
353
|
+
18F
|
|
354
|
+
</li>
|
|
355
|
+
</ul>
|
|
356
|
+
</div>
|
|
357
|
+
</li>
|
|
358
|
+
<li class="usa-collection__item">
|
|
359
|
+
<div class="usa-collection__body">
|
|
360
|
+
<h4 class="usa-collection__heading">
|
|
361
|
+
<a
|
|
362
|
+
class="usa-link usx-link"
|
|
363
|
+
href="https://trumpadministration.archives.performance.gov/September-2020-Updates-Show-Progress/"
|
|
364
|
+
>Progress on Cross-Agency Priority (CAP) goals and Agency Priority
|
|
365
|
+
Goals (APGs)</a
|
|
366
|
+
>
|
|
367
|
+
</h4>
|
|
368
|
+
<ul class="usa-collection__meta" aria-label="More information">
|
|
369
|
+
<li class="usa-collection__meta-item position-relative">
|
|
370
|
+
<svg
|
|
371
|
+
class="usa-icon position-relative bottom-neg-2px"
|
|
372
|
+
aria-hidden="true"
|
|
373
|
+
role="img"
|
|
374
|
+
>
|
|
375
|
+
<use href="/assets/img/sprite.svg#public"></use>
|
|
376
|
+
</svg>
|
|
377
|
+
Performance.gov
|
|
378
|
+
</li>
|
|
379
|
+
</ul>
|
|
380
|
+
</div>
|
|
381
|
+
</li>
|
|
382
|
+
</ul>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "collection",
|
|
3
|
+
"template": "collection/collection.django.html",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"props": {
|
|
6
|
+
"items": {
|
|
7
|
+
"type": "array",
|
|
8
|
+
"default": [],
|
|
9
|
+
"description": "Array of collection item objects. Each item: { href, heading, description?, imgSrc?, imgAlt?, calendarDate?: { datetime, month, day }, meta?: [{ text, datetime? }], tags?: [{ label, isNew? }] }",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "Collection item.",
|
|
13
|
+
"properties": {
|
|
14
|
+
"href": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Item link URL."
|
|
17
|
+
},
|
|
18
|
+
"heading": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Item heading text."
|
|
21
|
+
},
|
|
22
|
+
"description": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Item description text."
|
|
25
|
+
},
|
|
26
|
+
"imgSrc": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Optional thumbnail image URL."
|
|
29
|
+
},
|
|
30
|
+
"imgAlt": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Alt text for the thumbnail image."
|
|
33
|
+
},
|
|
34
|
+
"calendarDate": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"description": "Optional { datetime, month, day } calendar date badge."
|
|
37
|
+
},
|
|
38
|
+
"meta": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"description": "Optional meta list: [{ text, datetime? }]."
|
|
41
|
+
},
|
|
42
|
+
"tags": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"description": "Optional tag list: [{ label, isNew? }]."
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"condensed": {
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"default": false,
|
|
52
|
+
"description": "Applies usa-collection--condensed for a compact headings-only layout."
|
|
53
|
+
},
|
|
54
|
+
"className": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"default": "",
|
|
57
|
+
"description": "Additional CSS classes for the collection wrapper."
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import Label from '../label/Label';
|
|
4
|
+
import Hint from '../hint/Hint';
|
|
5
|
+
import ErrorMessage from '../error-message/ErrorMessage';
|
|
6
|
+
import FormGroup from '../form-group/FormGroup';
|
|
7
|
+
|
|
8
|
+
export interface ComboboxOption {
|
|
9
|
+
value: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ComboboxProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'onSelect' | 'defaultValue'> {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
label: React.ReactNode;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
hint?: React.ReactNode;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
defaultValue?: string | null;
|
|
22
|
+
error?: React.ReactNode;
|
|
23
|
+
options?: ComboboxOption[];
|
|
24
|
+
onSearch?: (value: string) => void;
|
|
25
|
+
onSelect?: (value: string, option: ComboboxOption | null) => void;
|
|
26
|
+
formGroup?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// React only renders the standard USWDS combo box markup here. All interactive
|
|
31
|
+
// behavior (filtering, keyboard navigation, opening/closing the list, etc.) is
|
|
32
|
+
// owned by USWDS's own usa-combo-box JS. Call ONLY `comboBox.init()` once the
|
|
33
|
+
// markup mounts — never `.on()`/`.off()` — since most apps (and this repo's
|
|
34
|
+
// Storybook preview) already load a global USWDS bundle that calls `.on()`
|
|
35
|
+
// once for the whole page; calling it again attaches a second, independent
|
|
36
|
+
// set of delegated listeners and causes clicks to double-toggle and cancel
|
|
37
|
+
// out. See DatePicker/Modal for the same pattern.
|
|
38
|
+
export default function Combobox({
|
|
39
|
+
id,
|
|
40
|
+
name,
|
|
41
|
+
label,
|
|
42
|
+
disabled = false,
|
|
43
|
+
required = false,
|
|
44
|
+
hint = null,
|
|
45
|
+
placeholder,
|
|
46
|
+
defaultValue = null,
|
|
47
|
+
error = null,
|
|
48
|
+
options = [],
|
|
49
|
+
onSearch,
|
|
50
|
+
onSelect,
|
|
51
|
+
formGroup = true,
|
|
52
|
+
className = '',
|
|
53
|
+
...props
|
|
54
|
+
}: ComboboxProps) {
|
|
55
|
+
const labelId = `${id}-label`;
|
|
56
|
+
const hintId = hint ? `${id}-hint` : undefined;
|
|
57
|
+
const errorId = error ? `${id}-error` : undefined;
|
|
58
|
+
|
|
59
|
+
const handleChange = onSelect
|
|
60
|
+
? (e: React.ChangeEvent<HTMLSelectElement>) => {
|
|
61
|
+
const val = e.target.value;
|
|
62
|
+
const option = options.find(o => o.value === val) ?? null;
|
|
63
|
+
onSelect(val, option);
|
|
64
|
+
}
|
|
65
|
+
: undefined;
|
|
66
|
+
|
|
67
|
+
const handleInput = onSearch
|
|
68
|
+
? (e: React.FormEvent<HTMLDivElement>) => {
|
|
69
|
+
const target = e.target as HTMLElement;
|
|
70
|
+
if (target instanceof HTMLInputElement) onSearch(target.value);
|
|
71
|
+
}
|
|
72
|
+
: undefined;
|
|
73
|
+
|
|
74
|
+
const content = (
|
|
75
|
+
<>
|
|
76
|
+
<Label id={labelId} htmlFor={id} required={required} error={!!error}>
|
|
77
|
+
{label}
|
|
78
|
+
</Label>
|
|
79
|
+
|
|
80
|
+
{hint && <Hint id={hintId}>{hint}</Hint>}
|
|
81
|
+
{error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}
|
|
82
|
+
|
|
83
|
+
<div
|
|
84
|
+
className={
|
|
85
|
+
classNames(
|
|
86
|
+
'usa-combo-box',
|
|
87
|
+
'usx-combo-box',
|
|
88
|
+
{'usx-combo-box--error': !!error},
|
|
89
|
+
className
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
{...(placeholder ? { 'data-placeholder': placeholder } : {})}
|
|
93
|
+
{...(defaultValue ? { 'data-default-value': defaultValue } : {})}
|
|
94
|
+
{...(onSearch ? { onInput: handleInput } : {})}
|
|
95
|
+
>
|
|
96
|
+
<select
|
|
97
|
+
className={classNames('usa-select', 'usx-select')}
|
|
98
|
+
id={id}
|
|
99
|
+
name={name}
|
|
100
|
+
disabled={disabled}
|
|
101
|
+
required={required}
|
|
102
|
+
onChange={handleChange}
|
|
103
|
+
{...props}
|
|
104
|
+
>
|
|
105
|
+
{options.map(opt => (
|
|
106
|
+
<option key={opt.value} value={opt.value}>{opt.label}</option>
|
|
107
|
+
))}
|
|
108
|
+
</select>
|
|
109
|
+
</div>
|
|
110
|
+
</>
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
return formGroup ? <FormGroup error={!!error}>{content}</FormGroup> : content;
|
|
114
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{# Django template for Combobox #}
|
|
2
|
+
{% load components %}
|
|
3
|
+
{% with formGroup|default_if_none:True as wrap_group %}
|
|
4
|
+
{% if wrap_group %}
|
|
5
|
+
{% form_group error=error %}
|
|
6
|
+
{% label htmlFor=id required=required error=error %}{{ label }}{% endlabel %}
|
|
7
|
+
|
|
8
|
+
{% if hint %}
|
|
9
|
+
{% hint id=id|add:"-hint" %}{{ hint }}{% endhint %}
|
|
10
|
+
{% endif %}
|
|
11
|
+
|
|
12
|
+
{% if error %}
|
|
13
|
+
{% error_message id=id|add:"-error" %}{{ error }}{% enderror_message %}
|
|
14
|
+
{% endif %}
|
|
15
|
+
|
|
16
|
+
<div class="usa-combo-box usx-combo-box{% if error %} usx-combo-box--error{% endif %}{% if className %} {{ className }}{% endif %}"{% if placeholder %} data-placeholder="{{ placeholder }}"{% endif %}{% if defaultValue %} data-default-value="{{ defaultValue }}"{% endif %}>
|
|
17
|
+
<select
|
|
18
|
+
id="{{ id }}"
|
|
19
|
+
class="usa-select usx-select"
|
|
20
|
+
name="{{ name }}"
|
|
21
|
+
{% if disabled %} disabled{% endif %}
|
|
22
|
+
{% if required %} required{% endif %}
|
|
23
|
+
{% if hint or error %} aria-describedby="{% if hint %}{{ id }}-hint{% endif %}{% if hint and error %} {% endif %}
|
|
24
|
+
{% if error %}{{ id }}-error{% endif %}"{% endif %}
|
|
25
|
+
{% if onSelect %} onchange="{{ onSelect }}"{% endif %}
|
|
26
|
+
>
|
|
27
|
+
{% for option in options %}
|
|
28
|
+
<option value="{{ option.value }}">{{ option.label }}</option>
|
|
29
|
+
{% endfor %}
|
|
30
|
+
</select>
|
|
31
|
+
</div>
|
|
32
|
+
{% endform_group %}
|
|
33
|
+
{% else %}
|
|
34
|
+
{% label htmlFor=id required=required error=error %}{{ label }}{% endlabel %}
|
|
35
|
+
|
|
36
|
+
{% if hint %}
|
|
37
|
+
{% hint id=id|add:"-hint" %}{{ hint }}{% endhint %}
|
|
38
|
+
{% endif %}
|
|
39
|
+
|
|
40
|
+
{% if error %}
|
|
41
|
+
{% error_message id=id|add:"-error" %}{{ error }}{% enderror_message %}
|
|
42
|
+
{% endif %}
|
|
43
|
+
|
|
44
|
+
<div class="usa-combo-box usx-combo-box{% if error %} usx-combo-box--error{% endif %}{% if className %} {{ className }}{% endif %}"{% if placeholder %} data-placeholder="{{ placeholder }}"{% endif %}{% if defaultValue %} data-default-value="{{ defaultValue }}"{% endif %}>
|
|
45
|
+
<select
|
|
46
|
+
id="{{ id }}"
|
|
47
|
+
class="usa-select usx-select"
|
|
48
|
+
name="{{ name }}"
|
|
49
|
+
{% if disabled %} disabled{% endif %}
|
|
50
|
+
{% if required %} required{% endif %}
|
|
51
|
+
{% if hint or error %} aria-describedby="{% if hint %}{{ id }}-hint{% endif %}{% if hint and error %} {% endif %}
|
|
52
|
+
{% if error %}{{ id }}-error{% endif %}"{% endif %}
|
|
53
|
+
{% if onSelect %} onchange="{{ onSelect }}"{% endif %}
|
|
54
|
+
>
|
|
55
|
+
{% for option in options %}
|
|
56
|
+
<option value="{{ option.value }}">{{ option.label }}</option>
|
|
57
|
+
{% endfor %}
|
|
58
|
+
</select>
|
|
59
|
+
</div>
|
|
60
|
+
{% endif %}
|
|
61
|
+
{% endwith %}
|