@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.
Files changed (58) hide show
  1. package/README.md +15 -0
  2. package/dist/index.cjs +3173 -3238
  3. package/dist/index.js +3174 -3239
  4. package/package.json +4 -4
  5. package/src/components/checkbox/Checkbox.tsx +9 -4
  6. package/src/components/checkbox/checkbox.django.html +2 -2
  7. package/src/components/checkbox/config.json +9 -0
  8. package/src/components/data-table/DataTable.tsx +177 -0
  9. package/src/components/data-table/README.md +42 -0
  10. package/src/components/data-table/TableBody.tsx +123 -0
  11. package/src/components/{table → data-table}/TableCell.tsx +6 -3
  12. package/src/components/data-table/TableContext.tsx +49 -0
  13. package/src/components/{table → data-table}/TableFoot.tsx +8 -7
  14. package/src/components/data-table/TableGroup.tsx +62 -0
  15. package/src/components/data-table/TableHead.tsx +126 -0
  16. package/src/components/data-table/TableRow.tsx +24 -0
  17. package/src/components/data-table/cells.ts +49 -0
  18. package/src/components/data-table/columns.ts +15 -0
  19. package/src/components/data-table/config.json +375 -0
  20. package/src/components/data-table/data-table.django-snapshot.html +13560 -0
  21. package/src/components/data-table/data-table.django.html +13 -0
  22. package/src/components/data-table/data-table.html +34 -0
  23. package/src/components/data-table/data-table.react-snapshot.html +12033 -0
  24. package/src/components/{table → data-table}/table-body.django.html +12 -12
  25. package/src/components/{table → data-table}/table-foot.django.html +6 -6
  26. package/src/components/data-table/table-group.django.html +24 -0
  27. package/src/components/data-table/table-head.django.html +21 -0
  28. package/src/components/data-table/table-row.django.html +57 -0
  29. package/src/components/{table → data-table}/types.ts +48 -5
  30. package/src/components/pagination/Pagination.tsx +7 -1
  31. package/src/components/pagination/config.json +8 -0
  32. package/src/components/pagination/navigation/PaginationNavigation.tsx +10 -0
  33. package/src/components/pagination/step-options/PaginationStepOptions.tsx +3 -0
  34. package/src/components/radio-buttons/RadioButtons.tsx +37 -27
  35. package/src/components/radio-buttons/config.json +19 -1
  36. package/src/components/radio-buttons/radio-buttons.django-snapshot.html +28 -60
  37. package/src/components/radio-buttons/radio-buttons.django.html +16 -28
  38. package/src/components/table/Table.tsx +64 -334
  39. package/src/components/table/config.json +21 -339
  40. package/src/components/table/table.django-snapshot.html +712 -1482
  41. package/src/components/table/table.django.html +14 -59
  42. package/src/components/table/table.html +7 -2364
  43. package/src/components/table/table.react-snapshot.html +711 -2085
  44. package/src/index.js +1 -0
  45. package/src/components/table/TableBody.tsx +0 -256
  46. package/src/components/table/TableContext.tsx +0 -87
  47. package/src/components/table/TableGroup.tsx +0 -69
  48. package/src/components/table/TableHead.tsx +0 -139
  49. package/src/components/table/TableRow.tsx +0 -56
  50. package/src/components/table/hooks/useRowDetails.ts +0 -34
  51. package/src/components/table/hooks/useTableGroups.ts +0 -61
  52. package/src/components/table/hooks/useTableSelect.ts +0 -82
  53. package/src/components/table/hooks/useTableSort.ts +0 -60
  54. package/src/components/table/table-group.django.html +0 -40
  55. package/src/components/table/table-head.django.html +0 -85
  56. package/src/components/table/table-row.django.html +0 -98
  57. package/src/components/table/table_helper.py +0 -298
  58. /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