silicaui-react 0.1.0 → 0.2.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.
- package/README.md +3 -0
- package/dist/chunk-LZK2PYJD.js +31 -0
- package/dist/chunk-LZK2PYJD.js.map +1 -0
- package/dist/cx-BhkkXRZt.d.ts +4 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +4 -30
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +18 -0
- package/dist/server.js +3 -0
- package/dist/server.js.map +1 -0
- package/package.json +6 -2
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { c as cx } from './cx-BhkkXRZt.js';
|
|
2
|
+
|
|
3
|
+
type Props = Record<string, unknown>;
|
|
4
|
+
/**
|
|
5
|
+
* Merge Silica's own props (`ours`) with the props of a user-supplied element
|
|
6
|
+
* passed via `render` (`theirs`).
|
|
7
|
+
*
|
|
8
|
+
* Rules:
|
|
9
|
+
* - `className` is concatenated (ours first).
|
|
10
|
+
* - `style` is shallow-merged (theirs wins on conflict).
|
|
11
|
+
* - `on*` event handlers present on both are composed (ours runs, then theirs).
|
|
12
|
+
* - `children` defaults to ours (the button's label) unless we have none.
|
|
13
|
+
* - Everything else: theirs wins, so `<Button render={<a href="…" />}>` keeps
|
|
14
|
+
* its own `href`, `target`, etc.
|
|
15
|
+
*/
|
|
16
|
+
declare function mergeProps(ours: Props, theirs: Props): Props;
|
|
17
|
+
|
|
18
|
+
export { mergeProps };
|
package/dist/server.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"server.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "silicaui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Silica UI's React layer — thin components over the Silica CSS classes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,13 +10,17 @@
|
|
|
10
10
|
"url": "https://github.com/silicaui/silicaui.git",
|
|
11
11
|
"directory": "packages/silicaui-react"
|
|
12
12
|
},
|
|
13
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://silicaui.com",
|
|
14
14
|
"bugs": "https://github.com/silicaui/silicaui/issues",
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
19
|
"import": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./server": {
|
|
22
|
+
"types": "./dist/server.d.ts",
|
|
23
|
+
"import": "./dist/server.js"
|
|
20
24
|
}
|
|
21
25
|
},
|
|
22
26
|
"main": "./dist/index.js",
|