@mittwald/flow-react-components 0.1.0-alpha.335 → 0.1.0-alpha.337

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.
@@ -1,10 +1,12 @@
1
1
  import { default as React } from 'react';
2
2
  import { PropsWithClassName, PropsWithElementType } from '../../lib/types/props';
3
- export interface FileCardProps extends PropsWithClassName, PropsWithElementType<"div" | "li"> {
3
+ import { LinkProps } from '../Link';
4
+ export interface FileCardProps extends PropsWithClassName, PropsWithElementType<"div" | "li">, Pick<LinkProps, "onPress" | "href" | "target" | "download"> {
4
5
  name: string;
5
6
  type?: string;
6
7
  onDelete?: () => void;
7
8
  sizeInBytes?: number;
9
+ imageSrc?: string;
8
10
  }
9
11
  export declare const FileCard: React.ForwardRefExoticComponent<FileCardProps & React.RefAttributes<never>>;
10
12
  export default FileCard;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ interface Props {
3
+ type?: string;
4
+ imageSrc?: string;
5
+ }
6
+ export declare const Avatar: FC<Props>;
7
+ export default Avatar;
@@ -0,0 +1 @@
1
+ export * from './Avatar';
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ interface Props {
3
+ onDelete: () => void;
4
+ }
5
+ export declare const DeleteButton: FC<Props>;
6
+ export default DeleteButton;
@@ -0,0 +1 @@
1
+ export * from './DeleteButton';
@@ -7,3 +7,6 @@ export declare const Default: Story;
7
7
  export declare const WithType: Story;
8
8
  export declare const WithSize: Story;
9
9
  export declare const WithOnDelete: Story;
10
+ export declare const WithLink: Story;
11
+ export declare const WithLinkAndOnDelete: Story;
12
+ export declare const WithImage: Story;
@@ -4,3 +4,4 @@ declare const meta: Meta<typeof FileCard>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof FileCard>;
6
6
  export declare const LongName: Story;
7
+ export declare const LongNameAndLink: Story;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { LinkProps } from '../..';
3
+ export declare const LinkIcon: FC<LinkProps>;
4
+ export default LinkIcon;
@@ -0,0 +1 @@
1
+ export * from './LinkIcon';
@@ -10,3 +10,4 @@ export declare const WithIcon: Story;
10
10
  export declare const Dark: Story;
11
11
  export declare const Light: Story;
12
12
  export declare const ExternalLink: Story;
13
+ export declare const Download: Story;
@@ -42,8 +42,8 @@ export declare const typedList: <T>() => {
42
42
  onHoverStart?: ((e: import('react-aria').HoverEvent) => void) | undefined;
43
43
  onHoverEnd?: ((e: import('react-aria').HoverEvent) => void) | undefined;
44
44
  onHoverChange?: ((isHovering: boolean) => void) | undefined;
45
- hrefLang?: string | undefined;
46
45
  download?: (boolean | string) | undefined;
46
+ hrefLang?: string | undefined;
47
47
  ping?: string | undefined;
48
48
  referrerPolicy?: import('react').HTMLAttributeReferrerPolicy | undefined;
49
49
  routerOptions?: import('@react-types/shared').RouterOptions | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.335",
3
+ "version": "0.1.0-alpha.337",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -405,7 +405,7 @@
405
405
  "@chakra-ui/live-region": "^2.1.0",
406
406
  "@internationalized/date": "^3.5.6",
407
407
  "@internationalized/string-compiler": "^3.2.5",
408
- "@mittwald/react-tunnel": "^0.1.0-alpha.335",
408
+ "@mittwald/react-tunnel": "^0.1.0-alpha.337",
409
409
  "@mittwald/react-use-promise": "^2.5.0",
410
410
  "@react-aria/form": "^3.0.10",
411
411
  "@react-aria/utils": "^3.25.3",
@@ -435,7 +435,7 @@
435
435
  },
436
436
  "devDependencies": {
437
437
  "@faker-js/faker": "^9.0.3",
438
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.335",
438
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.337",
439
439
  "@mittwald/react-use-promise": "^2.5.0",
440
440
  "@nx/storybook": "^20.0.0",
441
441
  "@storybook/addon-a11y": "^8.3.5",
@@ -530,5 +530,5 @@
530
530
  }
531
531
  }
532
532
  },
533
- "gitHead": "dc1a90c6889e2f5dd06fefb11d9e416e4d25607e"
533
+ "gitHead": "993e4460c66b448b88c5eba2ebd11614c6b68659"
534
534
  }
@@ -1,9 +0,0 @@
1
- "use client"
2
- /* */
3
- import n from "react";
4
- import { IconExternalLink as t } from "@tabler/icons-react";
5
- import { I as o } from "./Icon-DGqvukLZ.js";
6
- const m = (e) => /* @__PURE__ */ n.createElement(o, { ...e }, /* @__PURE__ */ n.createElement(t, null));
7
- export {
8
- m as I
9
- };
@@ -1,64 +0,0 @@
1
- "use client"
2
- /* */
3
- import n, { useContext as E } from "react";
4
- import * as L from "react-aria-components";
5
- import { C as g } from "./ClearPropsContext-CUvsbMn8.js";
6
- import { PropsContextProvider as w } from "./PropsContextProvider.js";
7
- import "@react-aria/utils";
8
- import "./propsContext-DzAKlmhS.js";
9
- import "remeda";
10
- import P from "clsx";
11
- import { f as h } from "./flowComponent-1wOIvUIq.js";
12
- import { l as N } from "./context-BlNV7smK.js";
13
- import "@tabler/icons-react";
14
- import "./Icon-DGqvukLZ.js";
15
- import { I as y } from "./IconExternalLink-D_EgCFyx.js";
16
- import { useLocalizedStringFormatter as F } from "react-aria";
17
- const I = "flow--link", b = "flow--link--inline", z = "flow--link--icon", v = "flow--link--dark", A = "flow--link--light", o = {
18
- link: I,
19
- inline: b,
20
- icon: z,
21
- dark: v,
22
- light: A
23
- }, D = { "de-DE": {
24
- "link.external": "Externer Link"
25
- }, "en-EN": {
26
- "link.external": "External link"
27
- } }, Q = h("Link", (t) => {
28
- const {
29
- children: l,
30
- className: r,
31
- inline: a,
32
- linkComponent: e,
33
- color: s = "primary",
34
- unstyled: m = !1,
35
- "aria-current": c,
36
- refProp: p,
37
- ...k
38
- } = t, { linkComponent: i } = E(N), f = e || (t.href && i ? i : L.Link), C = m ? r : P(o.link, a && o.inline, o[s], r), x = {
39
- Icon: {
40
- className: o.icon,
41
- size: "s"
42
- }
43
- }, u = {
44
- "aria-current": c
45
- }, d = F(D);
46
- return /* @__PURE__ */ n.createElement(g, null, /* @__PURE__ */ n.createElement(
47
- f,
48
- {
49
- ...k,
50
- ...u,
51
- className: C,
52
- ref: p
53
- },
54
- /* @__PURE__ */ n.createElement(w, { props: x }, l, t.target === "_blank" && /* @__PURE__ */ n.createElement(
55
- y,
56
- {
57
- "aria-label": d.format("link.external")
58
- }
59
- ))
60
- ));
61
- });
62
- export {
63
- Q as L
64
- };