@mittwald/flow-react-components 0.1.0-alpha.53 → 0.1.0-alpha.55

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.
@@ -0,0 +1,7 @@
1
+ import { FC, PropsWithChildren } from "react";
2
+ import * as Aria from "react-aria-components";
3
+ import { ContextMenuItemProps } from './components/ContextMenuItem';
4
+ export interface ContextMenuProps extends Omit<Aria.PopoverProps, "children">, Pick<Aria.MenuProps<ContextMenuItemProps>, "onAction">, PropsWithChildren {
5
+ }
6
+ export declare const ContextMenu: FC<ContextMenuProps>;
7
+ export default ContextMenu;
@@ -0,0 +1,6 @@
1
+ import { FC } from "react";
2
+ import * as Aria from "react-aria-components";
3
+ export interface ContextMenuItemProps extends Aria.MenuItemProps {
4
+ }
5
+ export declare const ContextMenuItem: FC<ContextMenuItemProps>;
6
+ export default ContextMenuItem;
@@ -0,0 +1,3 @@
1
+ import { ContextMenuItem } from "./ContextMenuItem";
2
+ export { ContextMenuItem, type ContextMenuItemProps } from "./ContextMenuItem";
3
+ export default ContextMenuItem;
@@ -0,0 +1,5 @@
1
+ import { ContextMenu } from "./ContextMenu";
2
+ export { type ContextMenuProps, ContextMenu } from "./ContextMenu";
3
+ export * from "./components/ContextMenuItem";
4
+ export { MenuTrigger as ContextMenuTrigger } from "react-aria-components";
5
+ export default ContextMenu;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import ContextMenu from '..';
3
+ declare const meta: Meta<typeof ContextMenu>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ContextMenu>;
6
+ export declare const Default: Story;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import ContextMenu from '..';
3
+ declare const meta: Meta<typeof ContextMenu>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ContextMenu>;
6
+ export declare const LongTexts: Story;
7
+ export declare const LongList: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.53",
3
+ "version": "0.1.0-alpha.55",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -30,6 +30,10 @@
30
30
  "types": "./dist/types/components/Content/index.d.ts",
31
31
  "import": "./dist/Content.js"
32
32
  },
33
+ "./ContextMenu": {
34
+ "types": "./dist/types/components/ContextMenu/index.d.ts",
35
+ "import": "./dist/ContextMenu.js"
36
+ },
33
37
  "./CopyButton": {
34
38
  "types": "./dist/types/components/CopyButton/index.d.ts",
35
39
  "import": "./dist/CopyButton.js"
@@ -191,7 +195,7 @@
191
195
  },
192
196
  "devDependencies": {
193
197
  "@faker-js/faker": "^8.4.1",
194
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.53",
198
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.55",
195
199
  "@mittwald/react-use-promise": "^2.3.13",
196
200
  "@nx/storybook": "^18.1.2",
197
201
  "@storybook/addon-a11y": "^7.6.17",
@@ -262,5 +266,5 @@
262
266
  "optional": true
263
267
  }
264
268
  },
265
- "gitHead": "ef8dc4182179aadf3a2462bc80164ab5be59b4bc"
269
+ "gitHead": "726fa40be566f15692b13a0f5ad323858ed9452a"
266
270
  }
@@ -1,80 +0,0 @@
1
- "use client"
2
- /* */
3
- import o from "react";
4
- import * as y from "react-aria-components";
5
- import I from "clsx";
6
- import { C as P } from "./ClearPropsContext-CD1-9TZA.js";
7
- import { P as C } from "./PropsContextProvider-B6QiUIPM.js";
8
- import "@react-aria/utils";
9
- import "./propsContext-Dx7WKmmM.js";
10
- import "remeda";
11
- import "@tabler/icons-react";
12
- import "html-react-parser";
13
- import { f as E } from "./flowComponent-92d7kP4i.js";
14
- import { b as N, I as S, a as F } from "./IconSucceeded-C_S9H4Jp.js";
15
- import { T as h } from "./Text-Dts2bzGQ.js";
16
- const z = "flow--button", B = "flow--button--icon", v = "flow--button--text", T = "flow--button--content", D = "flow--button--state-icon", A = "flow--button--is-succeeded", R = "flow--button--is-failed", W = "flow--button--is-pending", _ = "flow--button--plain", $ = "flow--button--primary", j = "flow--button--solid", k = "flow--button--accent", q = "flow--button--danger", G = "flow--button--secondary", H = "flow--button--soft", t = {
17
- button: z,
18
- icon: B,
19
- text: v,
20
- content: T,
21
- stateIcon: D,
22
- "size-s": "flow--button--size-s",
23
- isSucceeded: A,
24
- isFailed: R,
25
- isPending: W,
26
- plain: _,
27
- primary: $,
28
- solid: j,
29
- accent: k,
30
- danger: q,
31
- secondary: G,
32
- soft: H
33
- }, f = (e) => {
34
- const { if: s, children: n } = e;
35
- return s ? n : n.props.children;
36
- }, ot = E("Button", (e) => {
37
- const {
38
- variant: s = "primary",
39
- style: n = "solid",
40
- children: l,
41
- className: p,
42
- size: c = "m",
43
- isPending: i,
44
- isDisabled: u,
45
- isSucceeded: a,
46
- isFailed: r,
47
- ...b
48
- } = e, w = I(
49
- t.button,
50
- i && t.isPending,
51
- a && t.isSucceeded,
52
- r && t.isFailed,
53
- t[`size-${c}`],
54
- t[s],
55
- t[n],
56
- p
57
- ), g = {
58
- Icon: {
59
- className: t.icon,
60
- "aria-hidden": !0,
61
- size: c
62
- },
63
- Text: {
64
- className: t.text
65
- }
66
- }, d = a ? N : r ? S : i ? F : void 0, m = d && /* @__PURE__ */ o.createElement(d, { size: c, className: t.stateIcon }), x = typeof l == "string";
67
- return /* @__PURE__ */ o.createElement(P, null, /* @__PURE__ */ o.createElement(
68
- y.Button,
69
- {
70
- className: w,
71
- isDisabled: u || i || a || r,
72
- ...b
73
- },
74
- /* @__PURE__ */ o.createElement(f, { if: m }, /* @__PURE__ */ o.createElement("span", { className: t.content }, /* @__PURE__ */ o.createElement(f, { if: x }, /* @__PURE__ */ o.createElement(h, null, /* @__PURE__ */ o.createElement(C, { props: g }, l))))),
75
- m
76
- ));
77
- });
78
- export {
79
- ot as B
80
- };