@mittwald/flow-react-components 0.1.0-alpha.13 → 0.1.0-alpha.14

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/Badge.d.ts CHANGED
@@ -5,13 +5,13 @@ declare const Badge: FC<BadgeProps>;
5
5
  export { Badge }
6
6
  export default Badge;
7
7
 
8
- export declare interface BadgeProps extends PropsWithChildren, StatusVariantProps {
8
+ export declare interface BadgeProps extends PropsWithChildren, PropsWithVariant {
9
9
  className?: string;
10
10
  }
11
11
 
12
- declare interface StatusVariantProps<TOmit extends Variant = never> {
13
- variant?: Exclude<Variant, TOmit>;
14
- }
12
+ declare type PropsWithVariant<T extends Variant = Variant, P = unknown> = P & {
13
+ variant?: T;
14
+ };
15
15
 
16
16
  declare type Variant = "info" | "success" | "warning" | "danger";
17
17
 
package/dist/Content.d.ts CHANGED
@@ -1,13 +1,17 @@
1
- import { ComponentProps } from 'react';
1
+ import { ComponentPropsWithoutRef } from 'react';
2
2
  import { FC } from 'react';
3
+ import { JSX as JSX_2 } from 'react';
3
4
  import { PropsWithChildren } from 'react';
4
5
 
5
6
  declare const Content: FC<ContentProps>;
6
7
  export { Content }
7
8
  export default Content;
8
9
 
9
- export declare interface ContentProps extends PropsWithChildren<ComponentProps<"div">> {
10
- elementType?: string;
10
+ export declare interface ContentProps extends PropsWithChildren, PropsWithElementType<"div"> {
11
11
  }
12
12
 
13
+ declare type PropsWithElementType<T extends keyof JSX_2.IntrinsicElements, P = unknown> = P & ComponentPropsWithoutRef<T> & {
14
+ elementType?: keyof JSX_2.IntrinsicElements;
15
+ };
16
+
13
17
  export { }
@@ -1,12 +1,21 @@
1
1
  import * as Aria from 'react-aria-components';
2
+ import { ComponentPropsWithoutRef } from 'react';
2
3
  import { FC } from 'react';
4
+ import { JSX as JSX_2 } from 'react';
3
5
  import { PropsWithChildren } from 'react';
4
6
 
5
7
  declare const FieldDescription: FC<FieldDescriptionProps>;
6
8
  export { FieldDescription }
7
9
  export default FieldDescription;
8
10
 
9
- export declare interface FieldDescriptionProps extends PropsWithChildren<Omit<Aria.TextProps, "children" | "slot">> {
11
+ export declare interface FieldDescriptionProps extends TextProps {
12
+ }
13
+
14
+ declare type PropsWithElementType<T extends keyof JSX_2.IntrinsicElements, P = unknown> = P & ComponentPropsWithoutRef<T> & {
15
+ elementType?: keyof JSX_2.IntrinsicElements;
16
+ };
17
+
18
+ declare interface TextProps extends PropsWithChildren, Omit<Aria.TextProps, "children" | "elementType">, PropsWithElementType<"span"> {
10
19
  }
11
20
 
12
21
  export { }
@@ -6,12 +6,12 @@ declare const InlineAlert: FC<InlineAlertProps>;
6
6
  export { InlineAlert }
7
7
  export default InlineAlert;
8
8
 
9
- export declare interface InlineAlertProps extends PropsWithChildren<ComponentProps<"aside">>, StatusVariantProps {
9
+ export declare interface InlineAlertProps extends PropsWithChildren<ComponentProps<"aside">>, PropsWithVariant {
10
10
  }
11
11
 
12
- declare interface StatusVariantProps<TOmit extends Variant = never> {
13
- variant?: Exclude<Variant, TOmit>;
14
- }
12
+ declare type PropsWithVariant<T extends Variant = Variant, P = unknown> = P & {
13
+ variant?: T;
14
+ };
15
15
 
16
16
  declare type Variant = "info" | "success" | "warning" | "danger";
17
17
 
@@ -1,17 +1,17 @@
1
1
  import { FC } from 'react';
2
2
 
3
+ declare type PropsWithVariant<T extends Variant = Variant, P = unknown> = P & {
4
+ variant?: T;
5
+ };
6
+
3
7
  declare const StatusIcon: FC<StatusIconProps>;
4
8
  export { StatusIcon }
5
9
  export default StatusIcon;
6
10
 
7
- export declare interface StatusIconProps extends StatusVariantProps {
11
+ export declare interface StatusIconProps extends PropsWithVariant {
8
12
  className?: string;
9
13
  }
10
14
 
11
- declare interface StatusVariantProps<TOmit extends Variant = never> {
12
- variant?: Exclude<Variant, TOmit>;
13
- }
14
-
15
15
  declare type Variant = "info" | "success" | "warning" | "danger";
16
16
 
17
17
  export { }
package/dist/Text.d.ts CHANGED
@@ -1,12 +1,18 @@
1
1
  import * as Aria from 'react-aria-components';
2
+ import { ComponentPropsWithoutRef } from 'react';
2
3
  import { FC } from 'react';
4
+ import { JSX as JSX_2 } from 'react';
3
5
  import { PropsWithChildren } from 'react';
4
6
 
7
+ declare type PropsWithElementType<T extends keyof JSX_2.IntrinsicElements, P = unknown> = P & ComponentPropsWithoutRef<T> & {
8
+ elementType?: keyof JSX_2.IntrinsicElements;
9
+ };
10
+
5
11
  declare const Text_2: FC<TextProps>;
6
12
  export { Text_2 as Text }
7
13
  export default Text_2;
8
14
 
9
- export declare interface TextProps extends PropsWithChildren<Omit<Aria.TextProps, "children">> {
15
+ export declare interface TextProps extends PropsWithChildren, Omit<Aria.TextProps, "children" | "elementType">, PropsWithElementType<"span"> {
10
16
  }
11
17
 
12
18
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.13",
3
+ "version": "0.1.0-alpha.14",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -108,11 +108,12 @@
108
108
  "typescript-plugin-css-modules": "^5.1.0",
109
109
  "vite": "^5.1.3",
110
110
  "vite-plugin-banner": "^0.7.1",
111
+ "vite-plugin-checker": "^0.6.4",
111
112
  "vite-plugin-dts": "^3.7.2"
112
113
  },
113
114
  "peerDependencies": {
114
115
  "react": "18.2.0",
115
116
  "react-dom": "18.2.0"
116
117
  },
117
- "gitHead": "161b59e44bef1845f054c6cb2dc4cbac9505f5ab"
118
+ "gitHead": "224ebcdc1312cfdd96e40262d2679decee23d334"
118
119
  }