@hulla/style 0.0.1 → 0.0.2
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/cjs/index.d.ts +5 -3
- package/dist/es/index.d.mts +5 -3
- package/package.json +2 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'astro/types';
|
|
2
|
+
|
|
1
3
|
type Variants = Record<string, string>;
|
|
2
4
|
type Compose = <const CS extends any[] = ClassName[]>(...classes: CS) => string;
|
|
3
5
|
type Fn = (...args: any[]) => any;
|
|
@@ -11,9 +13,9 @@ type Config<V extends Variants, DV extends keyof V, B extends string, C extends
|
|
|
11
13
|
};
|
|
12
14
|
type Props<V extends Variants> = {
|
|
13
15
|
variant?: keyof V;
|
|
14
|
-
class?: string;
|
|
15
|
-
className?: string;
|
|
16
|
-
"class:list"?:
|
|
16
|
+
class?: string | null;
|
|
17
|
+
className?: string | null;
|
|
18
|
+
"class:list"?: HTMLAttributes<"div">["class:list"];
|
|
17
19
|
};
|
|
18
20
|
type Incorrect<S extends string = "[@hulla/style]: Invalid style configuration passed. Refer to https://hulla.dev/docs/style for help"> = S;
|
|
19
21
|
type VariantProps<S> = S extends Fn ? Parameters<S>[0] extends Props<infer V> ? {
|
package/dist/es/index.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'astro/types';
|
|
2
|
+
|
|
1
3
|
type Variants = Record<string, string>;
|
|
2
4
|
type Compose = <const CS extends any[] = ClassName[]>(...classes: CS) => string;
|
|
3
5
|
type Fn = (...args: any[]) => any;
|
|
@@ -11,9 +13,9 @@ type Config<V extends Variants, DV extends keyof V, B extends string, C extends
|
|
|
11
13
|
};
|
|
12
14
|
type Props<V extends Variants> = {
|
|
13
15
|
variant?: keyof V;
|
|
14
|
-
class?: string;
|
|
15
|
-
className?: string;
|
|
16
|
-
"class:list"?:
|
|
16
|
+
class?: string | null;
|
|
17
|
+
className?: string | null;
|
|
18
|
+
"class:list"?: HTMLAttributes<"div">["class:list"];
|
|
17
19
|
};
|
|
18
20
|
type Incorrect<S extends string = "[@hulla/style]: Invalid style configuration passed. Refer to https://hulla.dev/docs/style for help"> = S;
|
|
19
21
|
type VariantProps<S> = S extends Fn ? Parameters<S>[0] extends Props<infer V> ? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hulla/style",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Styling made easy 🎨",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Samuel Hulla",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
+
"astro": "^4.10.3",
|
|
33
34
|
"bunchee": "^5.2.1",
|
|
34
35
|
"clsx": "^2.1.1",
|
|
35
36
|
"tailwind-merge": "^2.3.0",
|