@solexllc/usx-react 0.8.0 → 0.9.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 +15 -0
- package/dist/index.cjs +3173 -3238
- package/dist/index.js +3174 -3239
- package/package.json +4 -4
- package/src/components/checkbox/Checkbox.tsx +9 -4
- package/src/components/checkbox/checkbox.django.html +2 -2
- package/src/components/checkbox/config.json +9 -0
- package/src/components/data-table/DataTable.tsx +177 -0
- package/src/components/data-table/README.md +42 -0
- package/src/components/data-table/TableBody.tsx +123 -0
- package/src/components/{table → data-table}/TableCell.tsx +6 -3
- package/src/components/data-table/TableContext.tsx +49 -0
- package/src/components/{table → data-table}/TableFoot.tsx +8 -7
- package/src/components/data-table/TableGroup.tsx +62 -0
- package/src/components/data-table/TableHead.tsx +126 -0
- package/src/components/data-table/TableRow.tsx +24 -0
- package/src/components/data-table/cells.ts +49 -0
- package/src/components/data-table/columns.ts +15 -0
- package/src/components/data-table/config.json +375 -0
- package/src/components/data-table/data-table.django-snapshot.html +13560 -0
- package/src/components/data-table/data-table.django.html +13 -0
- package/src/components/data-table/data-table.html +34 -0
- package/src/components/data-table/data-table.react-snapshot.html +12033 -0
- package/src/components/{table → data-table}/table-body.django.html +12 -12
- package/src/components/{table → data-table}/table-foot.django.html +6 -6
- package/src/components/data-table/table-group.django.html +24 -0
- package/src/components/data-table/table-head.django.html +21 -0
- package/src/components/data-table/table-row.django.html +57 -0
- package/src/components/{table → data-table}/types.ts +48 -5
- package/src/components/pagination/Pagination.tsx +7 -1
- package/src/components/pagination/config.json +8 -0
- package/src/components/pagination/navigation/PaginationNavigation.tsx +10 -0
- package/src/components/pagination/step-options/PaginationStepOptions.tsx +3 -0
- package/src/components/radio-buttons/RadioButtons.tsx +37 -27
- package/src/components/radio-buttons/config.json +19 -1
- package/src/components/radio-buttons/radio-buttons.django-snapshot.html +28 -60
- package/src/components/radio-buttons/radio-buttons.django.html +16 -28
- package/src/components/table/Table.tsx +64 -334
- package/src/components/table/config.json +21 -339
- package/src/components/table/table.django-snapshot.html +712 -1482
- package/src/components/table/table.django.html +14 -59
- package/src/components/table/table.html +7 -2364
- package/src/components/table/table.react-snapshot.html +711 -2085
- package/src/index.js +1 -0
- package/src/components/table/TableBody.tsx +0 -256
- package/src/components/table/TableContext.tsx +0 -87
- package/src/components/table/TableGroup.tsx +0 -69
- package/src/components/table/TableHead.tsx +0 -139
- package/src/components/table/TableRow.tsx +0 -56
- package/src/components/table/hooks/useRowDetails.ts +0 -34
- package/src/components/table/hooks/useTableGroups.ts +0 -61
- package/src/components/table/hooks/useTableSelect.ts +0 -82
- package/src/components/table/hooks/useTableSort.ts +0 -60
- package/src/components/table/table-group.django.html +0 -40
- package/src/components/table/table-head.django.html +0 -85
- package/src/components/table/table-row.django.html +0 -98
- package/src/components/table/table_helper.py +0 -298
- /package/src/components/{table → data-table}/table-detail-row.django.html +0 -0
package/README.md
CHANGED
|
@@ -4,6 +4,21 @@ This package uses a self-contained component structure where each component owns
|
|
|
4
4
|
|
|
5
5
|
USWDS is treated as an external foundation. This package does not bundle USWDS assets; consuming applications should load USWDS styles in their own application bundle.
|
|
6
6
|
|
|
7
|
+
## JavaScript Enhancement
|
|
8
|
+
|
|
9
|
+
The host application loads behavior separately from React markup. The
|
|
10
|
+
`uswds.min.js` bundle enhances USWDS components present when it runs. Call
|
|
11
|
+
the relevant USWDS module's `init(root)` after a React component mounts or
|
|
12
|
+
is replaced later. Load the bundle once; do not call `on()` again for
|
|
13
|
+
the same behavior.
|
|
14
|
+
|
|
15
|
+
USX DataTable uses `@solexllc/usx/js/data-table` for interactions in
|
|
16
|
+
React, Django, and HTML. Call `dataTable.init(root)` after a client-side
|
|
17
|
+
mount, or load `@solexllc/usx/js/start` once; its DataTable module observes
|
|
18
|
+
newly inserted tables. Other USX modules may use delegated `on(root)`
|
|
19
|
+
listeners instead of per-component `init()`. See the Storybook
|
|
20
|
+
**Documentation → USX React → JavaScript Enhancement** page for examples.
|
|
21
|
+
|
|
7
22
|
## Asset URLs And Subpath Deployment
|
|
8
23
|
|
|
9
24
|
`usxBaseUrl` means the **static asset root**, not the application's routing
|