You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/design-system/custom-components/application-container.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,18 @@ sidebar_position: 1
4
4
5
5
# Application Container
6
6
7
-
The `Application` container is designed to handle network status changes and display appropriate toast notifications. It comes with**built-in** functionality that automatically handles these changes.
7
+
The `Application` container handles network status changes and displays appropriate toast notifications. It has**built-in** functionality that automatically handles these changes.
8
8
9
9
## Features
10
10
11
-
-**Built-in Offline/Online Notifications**: The `Application` component monitors the network status and shows toast messages when the app goes offline or comes back online.
11
+
-**Built-in Offline/Online Notifications**: The `Application` component monitors the network status. It shows toast messages when the app goes offline or comes back online.
12
12
-**Custom Hooks**: It leverages the `useToasts` and `useOfflineStatus` hooks from within `@nmfs-radfish/react-radfish` package.
13
13
14
14
## How It Works
15
15
16
16
### Built-in Offline/Online Notifications
17
17
18
-
The `Application` component has **built-in** functionality to check the application's network status and display toast notifications when the state changes:
18
+
The `Application` component has **built-in** functionality to check the application's network status. It displays toast notifications when the state changes:
19
19
20
20
-**When the application goes offline**: A warning toast is displayed with the message `"Application is offline"`.
21
21
-**When the application comes back online**: An info toast is displayed with the message `"Application is online"`.
@@ -24,7 +24,7 @@ This feature is provided **out of the box** and requires no additional setup fro
24
24
25
25
### Example Usage
26
26
27
-
To use the `Application` component, wrap it around your app in the entry file (e.g.,`index.js` or `index.jsx`):
27
+
To use the `Application` component, wrap it around your app in the entry file (e.g. `index.js` or `index.jsx`):
Copy file name to clipboardExpand all lines: docs/design-system/custom-components/date-picker.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@ sidebar_position: 2
4
4
5
5
# DatePicker
6
6
7
-
The `DatePicker` component is a reusable form input designed to capture date-related information from users. It provides a consistent and accessible user interface element for selecting dates, ensuring seamless integration within NOAA web applications.
7
+
The `DatePicker` component is an essential, versitile, reusable form input. It's designed to capture date-related information from users. It is customizable, easy to integrate, and adheres to accessibility standards. It seamlessly integrates with NOAA web applications, so developers can build consistent, accessible, and user-friendly forms and data entry interfaces.
8
+
9
+
By following the best practices and examples below, developers can add the DatePicker to their projects.
8
10
9
11
## **Features**
10
12
@@ -25,7 +27,7 @@ The `DatePicker` component is a reusable form input designed to capture date-rel
25
27
|`hint`|`string`|`undefined`| No | Supplemental text that provides additional guidance or information about the input field. |
26
28
|`label`|`string`|**—**| Yes | The text label associated with the input field. |
27
29
|`className`|`string`|`""`| No | Additional CSS classes to apply to the root element for custom styling. |
28
-
|`...props`|`object`|`-`| No | Any other valid HTML input attributes (e.g.,`onChange`, `disabled`, etc.) |
30
+
|`...props`|`object`|`-`| No | Any other valid HTML input attributes (e.g. `onChange`, `disabled`, etc.).|
29
31
30
32
## **Installation**
31
33
@@ -39,7 +41,7 @@ import { DatePicker } from "@nmfs-radfish/react-radfish";
39
41
40
42
### 1. Basic Usage
41
43
42
-
A simple date picker with essential props
44
+
A simple date picker with essential props:
43
45
44
46
```jsx
45
47
importReactfrom"react";
@@ -64,7 +66,7 @@ export default BasicForm;
64
66
65
67
### 2. With Default Value and Custom Type
66
68
67
-
Using a different input type and setting a default value
69
+
Using a different input type and setting a default value:
The DatePicker component ensures accessibility by using the native HTML input element, which is inherently 508 compliant. It supports keyboard navigation, allowing users to interact with the date picker without a mouse. Additionally, the component is fully compatible with screen readers, providing clear labels and descriptive hints through proper ARIA attributes. This ensures that all users, including those with disabilities, can effectively utilize the DatePicker in forms and data entry interfaces.
161
+
The DatePicker component ensures accessibility by using the native HTML input element, which is inherently 508 compliant. It supports keyboard navigation, allowing users to interact with the date picker without a mouse. Additionally, the component is fully compatible with screen readers, providing clear labels and descriptive hints through proper ARIA attributes. This means that all users, including those with disabilities, can use the DatePicker in forms and data entry interfaces.
160
162
161
163
### RADFish DatePicker vs. Trussworks DatePicker
162
164
163
-
The RADFish DatePicker offers flexibility by supporting both controlled and uncontrolled modes. In controlled mode, developers manage the value via React state, allowing for precise control over the input. In uncontrolled mode, the browser manages the form state, simplifying development for straightforward use cases. On the other hand, the Trussworks date picker only supports uncontrolled behavior, which limits flexibility in scenarios where managing the input programmatically is required. This makes the RADFish DatePicker a more versatile choice for a wider range of applications, offering developers greater control when needed.
164
-
165
-
### Conclusion
165
+
The RADFish DatePicker offers flexibility by supporting both controlled and uncontrolled modes. In controlled mode, developers manage the value via React state, allowing for precise control over the input. In uncontrolled mode, the browser manages the form state, simplifying development for straightforward use cases.
166
166
167
-
The DatePicker component is a versatile and accessible tool for capturing date information within NOAA web applications. Its customizable props, ease of integration, and adherence to accessibility standards make it an essential component for building user-friendly forms and data entry interfaces. By following the best practices and examples provided, developers can efficiently incorporate the DatePicker into their projects, enhancing both functionality and user experience.
167
+
The Trussworks date picker only supports uncontrolled behavior. This limits flexibility in scenarios where managing the input programmatically is required. This makes the RADFish DatePicker a more versatile choice for a wider range of applications, offering developers greater control when needed.
Copy file name to clipboardExpand all lines: docs/design-system/custom-components/index.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@ sidebar_position: 1
4
4
5
5
# RADFish Custom Components
6
6
7
-
{/* Write top text here */}
7
+
Most of RADFish uses standard components from React libraries and the [U.S. Design System](https://designsystem.digital.gov/), as implemented by the [react-uswds open source project](https://github.com/trussworks/react-uswds).
8
+
9
+
Custom components which are not part of these standardized libraries are listed here:
Copy file name to clipboardExpand all lines: docs/design-system/custom-components/table.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,14 @@ sidebar_position: 3
4
4
5
5
# Table
6
6
7
-
The Table component is a flexible and customizable table designed for displaying tabular data.
7
+
The `Table` component is a flexible and customizable table designed for displaying sortable data.
8
8
9
9
## Features
10
10
11
11
-**Sorting**: Click on any column header to sort the table by that column. Sorting toggles between ascending, descending, and unsorted states.
12
12
-**Multi-Column Sorting**: Multi-column sorting allows you to sort data by multiple columns. Click additional column headers in the desired order of sorting priority.
13
-
-**Pagination**: Use the pagination controls below the table to navigate through multiple pages of data. You can move between the first, previous, next, and last page, and see the current page number and total pages.
14
-
-**Custom Rendering**: Certain columns (like the image and price) use custom render functions to display data in a more user-friendly way.
13
+
-**Pagination**: Use the pagination controls below the table to navigate through multiple pages of data. You can move between the first, previous, next, and last page. You can also see the current page number and total pages.
14
+
-**Custom Rendering**: Certain columns (like image and price) use custom render functions to display data in a more user-friendly way.
15
15
16
16
## How to Use the `<Table>` Component
17
17
@@ -32,7 +32,7 @@ For a practical implementation, refer to the [Simple Table Example](https://gith
32
32
|**`defaultSort`**|`Array<Object>`| Sets the default sorting for the table, with each object specifying a key for the column and direction ("asc" or "desc"). |
33
33
|**`className`**|`string`| An optional `className` for custom styling. |
34
34
35
-
####Trussworks Table Props
35
+
### Trussworks Table Props
36
36
37
37
The `<Table>` component is built on top of the Trussworks table component, allowing you to pass Trussworks-specific props like `striped`, `bordered`, and others for additional customization.
38
38
@@ -61,6 +61,7 @@ For more details on available Trussworks props, refer to the [Trussworks Table D
61
61
## Usage Examples
62
62
63
63
### Simple
64
+
This example shows a simple table, with two columns and two rows.
Copy file name to clipboardExpand all lines: docs/design-system/us-web-design-system.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,3 +3,7 @@ sidebar_position: 2
3
3
---
4
4
5
5
# U.S. Web Design System
6
+
7
+
The [U.S. Web Design System (USWDS)](https://designsystem.digital.gov/) is a set of design and development principles and guidelines. It helps deveolpers create standardized, accessible, consistent, and user-friendly websites and applications.
8
+
9
+
In most cases, RADFish uses standard components from React libraries and the U.S. Design System, as implemented by the [react-uswds open source project](https://github.com/trussworks/react-uswds). RADFish also uses some custom components which are not part of these standardized libraries. These custom components are listed [here](https://nmfs-radfish.github.io/radfish/design-system/custom-components).
Copy file name to clipboardExpand all lines: docs/developer-documentation/getting-started.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,6 @@ Please visit [upgrading](./upgrading.md) for more information.
82
82
83
83
This script starts the Vite development server. It runs the app locally with hot module reloading, allowing forfast development and instant updates as you make changes. Open [http://localhost:3000](http://localhost:3000/) to view itin the browser.
84
84
85
-
See [Available Scripts](./building-your-application/available-scripts/available-scripts.md) for full list of commands.
85
+
See [Available Scripts](./building-your-application/available-scripts) for full list of commands.
86
86
87
87
Now that you are up and running, see the [Components & Usage](./building-your-application/patterns/components.md) section to start building out your first pages!
0 commit comments