@gridui/inline-notice 1.0.1 → 1.0.3
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 +1 -1
- package/dist/styles.css +2 -2
- package/docs/inline-notice.md +26 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Core family. Public API: `InlineNotice`, `InlineNoticeProps`.
|
|
|
5
5
|
Import components from `@gridui/inline-notice` and load `@gridui/inline-notice/styles.css` after Theme.
|
|
6
6
|
Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
|
|
7
7
|
|
|
8
|
-
See [component ownership](
|
|
8
|
+
See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/inline-notice/.changeset/history).
|
|
9
9
|
|
|
10
10
|
## Inline feedback
|
|
11
11
|
|
package/dist/styles.css
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: flex-start;
|
|
8
8
|
flex-wrap: wrap;
|
|
9
|
-
gap:
|
|
9
|
+
gap: var(--gridui-space-12);
|
|
10
10
|
padding: var(--gridui-space-16);
|
|
11
11
|
border: 1px solid var(--gridui-border);
|
|
12
|
-
border-radius:
|
|
12
|
+
border-radius: var(--gridui-control-radius);
|
|
13
13
|
background: var(--gridui-background);
|
|
14
14
|
color: var(--gridui-foreground);
|
|
15
15
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# InlineNotice
|
|
2
|
+
|
|
3
|
+
Import `InlineNotice` and `InlineNoticeProps` from `@gridui/inline-notice`. Load Theme and this family's styles. It composes an optional title, decorative icon,
|
|
4
|
+
content and an independent actions slot. Native div props, styles and refs are
|
|
5
|
+
forwarded to the outer container. Supply meaningful text as well as color/icons.
|
|
6
|
+
|
|
7
|
+
`tone` is `neutral` (default), `success`, `warning`, or `danger`. It controls only
|
|
8
|
+
appearance. `announcement` is independently `off` (default), `polite` (`status`),
|
|
9
|
+
or `assertive` (`alert`). The atomic live region contains title and content, not
|
|
10
|
+
the action controls; ordinary rerenders of a button do not change the announced
|
|
11
|
+
message. For dependable update announcements, mount an empty notice first and
|
|
12
|
+
then update its content. Initial live-region announcements vary by assistive
|
|
13
|
+
technology.
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Button } from "@gridui/button";
|
|
17
|
+
import { InlineNotice } from "@gridui/inline-notice";
|
|
18
|
+
|
|
19
|
+
<InlineNotice title="Save failed" tone="danger" announcement="assertive"
|
|
20
|
+
actions={<Button onClick={retry}>Retry</Button>}>
|
|
21
|
+
Your changes remain available.
|
|
22
|
+
</InlineNotice>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Applications own safe error messages, localization, retry behavior and dismissal.
|
|
26
|
+
The component neither translates exceptions nor manages notifications globally.
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/inline-notice",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "GridUI React inline notice",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
|
+
"docs",
|
|
9
10
|
"README.md"
|
|
10
11
|
],
|
|
11
12
|
"sideEffects": [
|
|
@@ -26,8 +27,8 @@
|
|
|
26
27
|
"react-dom": "^19.2.0"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@gridui/style-utils": "^2.
|
|
30
|
-
"@gridui/theme": "^2.
|
|
30
|
+
"@gridui/style-utils": "^2.2.0",
|
|
31
|
+
"@gridui/theme": "^2.5.0"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@gridui-internal/configuration": "0.0.0-internal",
|