@underverse-ui/underverse 1.0.190 → 1.0.192
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 +36 -0
- package/api-reference.json +30 -2
- package/dist/index.cjs +3028 -2933
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -3
- package/dist/index.d.ts +45 -3
- package/dist/index.js +2712 -2619
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -246,6 +246,42 @@ function App() {
|
|
|
246
246
|
}
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
+
### Global UI Configuration (Optional)
|
|
250
|
+
|
|
251
|
+
You can configure global UI behaviors and styles (like default border radius) across all components using `UnderverseConfigProvider`.
|
|
252
|
+
|
|
253
|
+
```tsx
|
|
254
|
+
import { UnderverseConfigProvider, Button, Input } from "@underverse-ui/underverse";
|
|
255
|
+
|
|
256
|
+
function App() {
|
|
257
|
+
return (
|
|
258
|
+
<UnderverseConfigProvider
|
|
259
|
+
config={{
|
|
260
|
+
// Set default border radius for all supported components
|
|
261
|
+
borderMode: "xl",
|
|
262
|
+
// Override specific components
|
|
263
|
+
input: {
|
|
264
|
+
borderMode: "2xl",
|
|
265
|
+
},
|
|
266
|
+
button: {
|
|
267
|
+
borderMode: "lg",
|
|
268
|
+
}
|
|
269
|
+
}}
|
|
270
|
+
>
|
|
271
|
+
<div className="space-y-4">
|
|
272
|
+
{/* These components will inherit the global configuration */}
|
|
273
|
+
<Input placeholder="I have 2xl border radius" />
|
|
274
|
+
<Button>I have lg border radius</Button>
|
|
275
|
+
<Combobox placeholder="I inherit xl border radius" />
|
|
276
|
+
|
|
277
|
+
{/* Direct props override the global config */}
|
|
278
|
+
<Button borderMode="sm">I override to sm</Button>
|
|
279
|
+
</div>
|
|
280
|
+
</UnderverseConfigProvider>
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
249
285
|
## Exported Components
|
|
250
286
|
|
|
251
287
|
### Core Components
|
package/api-reference.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@underverse-ui/underverse",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.192",
|
|
4
4
|
"sourceEntry": "src/index.ts",
|
|
5
|
-
"totalExports":
|
|
5
|
+
"totalExports": 252,
|
|
6
6
|
"exports": [
|
|
7
7
|
{
|
|
8
8
|
"name": "*",
|
|
@@ -1618,6 +1618,20 @@
|
|
|
1618
1618
|
"reexport": true,
|
|
1619
1619
|
"local": false
|
|
1620
1620
|
},
|
|
1621
|
+
{
|
|
1622
|
+
"name": "UnderverseConfigProvider",
|
|
1623
|
+
"kind": "value",
|
|
1624
|
+
"source": "./contexts/UnderverseConfigContext",
|
|
1625
|
+
"reexport": true,
|
|
1626
|
+
"local": false
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
"name": "UnderverseConfigProviderProps",
|
|
1630
|
+
"kind": "type",
|
|
1631
|
+
"source": "./contexts/UnderverseConfigContext",
|
|
1632
|
+
"reexport": true,
|
|
1633
|
+
"local": false
|
|
1634
|
+
},
|
|
1621
1635
|
{
|
|
1622
1636
|
"name": "UnderverseLocale",
|
|
1623
1637
|
"kind": "type",
|
|
@@ -1653,6 +1667,13 @@
|
|
|
1653
1667
|
"reexport": true,
|
|
1654
1668
|
"local": false
|
|
1655
1669
|
},
|
|
1670
|
+
{
|
|
1671
|
+
"name": "UnderverseUIConfig",
|
|
1672
|
+
"kind": "type",
|
|
1673
|
+
"source": "./contexts/UnderverseConfigContext",
|
|
1674
|
+
"reexport": true,
|
|
1675
|
+
"local": false
|
|
1676
|
+
},
|
|
1656
1677
|
{
|
|
1657
1678
|
"name": "UploadedFile",
|
|
1658
1679
|
"kind": "type",
|
|
@@ -1746,6 +1767,13 @@
|
|
|
1746
1767
|
"reexport": true,
|
|
1747
1768
|
"local": false
|
|
1748
1769
|
},
|
|
1770
|
+
{
|
|
1771
|
+
"name": "useUnderverseUIConfig",
|
|
1772
|
+
"kind": "value",
|
|
1773
|
+
"source": "./contexts/UnderverseConfigContext",
|
|
1774
|
+
"reexport": true,
|
|
1775
|
+
"local": false
|
|
1776
|
+
},
|
|
1749
1777
|
{
|
|
1750
1778
|
"name": "VARIANT_STYLES_ALERT",
|
|
1751
1779
|
"kind": "value",
|