@gridui/preferences 1.0.8 → 1.0.10
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 +2 -0
- package/docs/catalog.json +6 -2
- package/docs/reference/README.md +4 -0
- package/docs/reference/preferences-controls.md +45 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -33,3 +33,5 @@ Local [FieldGrid and SearchForm arrangements](https://github.com/sudo-ui/GridUI-
|
|
|
33
33
|
belong to `@gridui/form`. Layout uses those public APIs when a larger composition
|
|
34
34
|
coordinates form state with data or page regions.
|
|
35
35
|
|
|
36
|
+
|
|
37
|
+
[Component reference](docs/reference/README.md) contains focused API pages for each public component.
|
package/docs/catalog.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/preferences",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.10",
|
|
5
5
|
"category": "core",
|
|
6
6
|
"description": "GridUI React preferences",
|
|
7
7
|
"usage": "Overlay supplies the selection indicator used by both presentations. The dropdown presentation also composes DropdownMenu and Tooltip. Applications own routes, labels, state persistence, and branding.",
|
|
8
8
|
"documentation": [
|
|
9
|
-
"README.md"
|
|
9
|
+
"README.md",
|
|
10
|
+
"docs/reference/README.md",
|
|
11
|
+
"docs/reference/preferences-controls.md"
|
|
10
12
|
],
|
|
11
13
|
"exports": [
|
|
12
14
|
{
|
|
@@ -39,6 +41,8 @@
|
|
|
39
41
|
"@gridui/preferences/styles.css"
|
|
40
42
|
],
|
|
41
43
|
"examples": [
|
|
44
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/preferences/stories/getting-started.mdx",
|
|
45
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/preferences/stories/preferences.mdx",
|
|
42
46
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/preferences/stories/preferences.stories.tsx"
|
|
43
47
|
]
|
|
44
48
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# PreferencesControls
|
|
3
|
+
|
|
4
|
+
Presents choices for language, appearance, and other host-defined preferences. Applications own persistence and apply the selected values.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/preferences`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { PreferencesControls } from "@gridui/preferences";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/preferences/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/preferences/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/preferences/stories/preferences.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
|
|
21
|
+
|
|
22
|
+
### labels
|
|
23
|
+
|
|
24
|
+
``PreferenceLabels`` · Required
|
|
25
|
+
|
|
26
|
+
### theme
|
|
27
|
+
|
|
28
|
+
``THEME`` · Required
|
|
29
|
+
|
|
30
|
+
### onThemeChange
|
|
31
|
+
|
|
32
|
+
``(value: THEME): void`` · Required
|
|
33
|
+
|
|
34
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
35
|
+
|
|
36
|
+
### presentation
|
|
37
|
+
|
|
38
|
+
``"inline" | "dropdown" | undefined`` · Optional
|
|
39
|
+
|
|
40
|
+
Default: ``"dropdown"``
|
|
41
|
+
|
|
42
|
+
### languages
|
|
43
|
+
|
|
44
|
+
``readonly PreferenceLanguage[]`` · Required
|
|
45
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/preferences",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "GridUI React preferences",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"react-dom": "^19.2.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@gridui/button": "^
|
|
31
|
-
"@gridui/dropdown-menu": "^2.0.
|
|
32
|
-
"@gridui/overlay": "^2.
|
|
33
|
-
"@gridui/style-utils": "^
|
|
34
|
-
"@gridui/theme": "^2.5.
|
|
35
|
-
"@gridui/tooltip": "^1.0.
|
|
30
|
+
"@gridui/button": "^5.0.0",
|
|
31
|
+
"@gridui/dropdown-menu": "^2.0.1",
|
|
32
|
+
"@gridui/overlay": "^2.1.0",
|
|
33
|
+
"@gridui/style-utils": "^4.0.0",
|
|
34
|
+
"@gridui/theme": "^2.5.4",
|
|
35
|
+
"@gridui/tooltip": "^1.0.7",
|
|
36
36
|
"class-variance-authority": "0.7.1",
|
|
37
37
|
"lucide-react": "1.70.0"
|
|
38
38
|
},
|