@kbach/react 0.2.9 → 0.3.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/dist/index.d.mts +11 -6
- package/dist/index.d.ts +11 -6
- package/package.json +4 -2
package/dist/index.d.mts
CHANGED
|
@@ -148,13 +148,18 @@ interface ColorScale {
|
|
|
148
148
|
readonly [key: string]: string;
|
|
149
149
|
}
|
|
150
150
|
interface ColorsAPI {
|
|
151
|
-
/**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
* `colors.alpha('rgb(0,0,0)', 10)` → `'rgba(0,0,0,0.1)'` */
|
|
151
|
+
/**
|
|
152
|
+
* Apply opacity to any CSS color string (hex, rgb, rgba).
|
|
153
|
+
* `colors.alpha('#3b82f6', 50)` → `'rgba(59,130,246,0.5)'`
|
|
154
|
+
* `colors.alpha('rgb(0,0,0)', 10)` → `'rgba(0,0,0,0.1)'`
|
|
155
|
+
*/
|
|
157
156
|
alpha(color: string, opacity: number): string;
|
|
157
|
+
/**
|
|
158
|
+
* Index access returns a ColorScale for palette families or a string for flat colors.
|
|
159
|
+
* Supports shade numbers (`colors.blue[6]`), slash opacity (`colors.blue['6/50']`),
|
|
160
|
+
* and flat colors with opacity (`colors['white/20']`).
|
|
161
|
+
*/
|
|
162
|
+
[color: string]: any;
|
|
158
163
|
}
|
|
159
164
|
declare function wrapColors(rawColors: ThemeColors): ColorsAPI;
|
|
160
165
|
declare function useColors(): ColorsAPI;
|
package/dist/index.d.ts
CHANGED
|
@@ -148,13 +148,18 @@ interface ColorScale {
|
|
|
148
148
|
readonly [key: string]: string;
|
|
149
149
|
}
|
|
150
150
|
interface ColorsAPI {
|
|
151
|
-
/**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
* `colors.alpha('rgb(0,0,0)', 10)` → `'rgba(0,0,0,0.1)'` */
|
|
151
|
+
/**
|
|
152
|
+
* Apply opacity to any CSS color string (hex, rgb, rgba).
|
|
153
|
+
* `colors.alpha('#3b82f6', 50)` → `'rgba(59,130,246,0.5)'`
|
|
154
|
+
* `colors.alpha('rgb(0,0,0)', 10)` → `'rgba(0,0,0,0.1)'`
|
|
155
|
+
*/
|
|
157
156
|
alpha(color: string, opacity: number): string;
|
|
157
|
+
/**
|
|
158
|
+
* Index access returns a ColorScale for palette families or a string for flat colors.
|
|
159
|
+
* Supports shade numbers (`colors.blue[6]`), slash opacity (`colors.blue['6/50']`),
|
|
160
|
+
* and flat colors with opacity (`colors['white/20']`).
|
|
161
|
+
*/
|
|
162
|
+
[color: string]: any;
|
|
158
163
|
}
|
|
159
164
|
declare function wrapColors(rawColors: ThemeColors): ColorsAPI;
|
|
160
165
|
declare function useColors(): ColorsAPI;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kbach/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "React / React Native components and hooks for the Kbach framework",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -52,5 +52,7 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"files": [
|
|
55
|
+
"files": [
|
|
56
|
+
"dist"
|
|
57
|
+
]
|
|
56
58
|
}
|