@mittwald/flow-react-components 0.1.0-alpha.223 → 0.1.0-alpha.224

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,7 +1,7 @@
1
1
  "use client"
2
2
  /* */
3
- import { C as t } from "./ContextMenuTrigger-P2HbNtUH.js";
4
- import { a } from "./ContextMenuTrigger-P2HbNtUH.js";
3
+ import { C as t } from "./ContextMenuTrigger-CYlZTk_W.js";
4
+ import { a } from "./ContextMenuTrigger-CYlZTk_W.js";
5
5
  import { M as n } from "./MenuItem-Dr-3EfkY.js";
6
6
  export {
7
7
  t as ContextMenu,
@@ -4,7 +4,7 @@ import e from "react";
4
4
  import * as i from "react-aria-components";
5
5
  import { s } from "./ContextMenu.module-BZingr2B.js";
6
6
  import { f as c } from "./flowComponent-DT1Ap-ot.js";
7
- import { P } from "./PopoverTrigger-3Tw9ST0P.js";
7
+ import { P } from "./PopoverTrigger-BpW0w6yf.js";
8
8
  import { C as E } from "./ClearPropsContext-CUvsbMn8.js";
9
9
  import { P as O } from "./PropsContextProvider-C6Z4XGp6.js";
10
10
  import "@react-aria/utils";
@@ -12,7 +12,7 @@ import "./propsContext-DzAKlmhS.js";
12
12
  import "remeda";
13
13
  import "mobx";
14
14
  import { u as T } from "./useOverlayController-D8pgx8nV.js";
15
- import { O as S, a as A } from "./OverlayTrigger-BPwYjPfK.js";
15
+ import { O as S, a as A } from "./OverlayTrigger-bD8_mPel.js";
16
16
  import { A as h } from "./Action-B6lMX6do.js";
17
17
  const B = c("ContextMenu", (t) => {
18
18
  const {
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  /* */
3
3
  import t from "react";
4
- import { P as s } from "./PopoverTrigger-3Tw9ST0P.js";
4
+ import { P as s } from "./PopoverTrigger-BpW0w6yf.js";
5
5
  import "./propsContext-DzAKlmhS.js";
6
6
  import { P as l } from "./PropsContextProvider-C6Z4XGp6.js";
7
7
  import "@react-aria/utils";
@@ -10,7 +10,7 @@ import { f as c } from "./flowComponent-DT1Ap-ot.js";
10
10
  import "mobx";
11
11
  import { u } from "./useOverlayController-D8pgx8nV.js";
12
12
  import * as f from "react-aria-components";
13
- import { a as x } from "./OverlayTrigger-BPwYjPfK.js";
13
+ import { a as x } from "./OverlayTrigger-bD8_mPel.js";
14
14
  import { useLocalizedStringFormatter as g } from "react-aria";
15
15
  import "@tabler/icons-react";
16
16
  import "./Icon-0QYDidQk.js";
@@ -14,7 +14,7 @@ import "./Icon-0QYDidQk.js";
14
14
  import { a as D } from "./IconCalendar-BGo-M1_G.js";
15
15
  import { F as N } from "./FieldError-CEquAsls.js";
16
16
  import { s as a } from "./FormField.module-DHK6nIcD.js";
17
- import { P } from "./PopoverTrigger-3Tw9ST0P.js";
17
+ import { P } from "./PopoverTrigger-BpW0w6yf.js";
18
18
  import "mobx";
19
19
  import { u as b } from "./useOverlayController-D8pgx8nV.js";
20
20
  import { f as v } from "./flowComponent-DT1Ap-ot.js";
@@ -8,7 +8,7 @@ import { P as u } from "./PropsContextProvider-C6Z4XGp6.js";
8
8
  import "@react-aria/utils";
9
9
  import "remeda";
10
10
  import * as t from "react-aria-components";
11
- import { P as E } from "./PopoverTrigger-3Tw9ST0P.js";
11
+ import { P as E } from "./PopoverTrigger-BpW0w6yf.js";
12
12
  import { s as f, C as g } from "./CalendarHeader-DffUkgNw.js";
13
13
  import { B as C } from "./Button-DPF2xiJl.js";
14
14
  import "@tabler/icons-react";
package/dist/List.js CHANGED
@@ -13,7 +13,7 @@ import { B as w } from "./Button-DPF2xiJl.js";
13
13
  import "@tabler/icons-react";
14
14
  import "./Icon-0QYDidQk.js";
15
15
  import { I as Xe } from "./IconContextMenu-DQey4U_b.js";
16
- import { a as B, C as H } from "./ContextMenuTrigger-P2HbNtUH.js";
16
+ import { a as B, C as H } from "./ContextMenuTrigger-CYlZTk_W.js";
17
17
  import { M as q } from "./MenuItem-Dr-3EfkY.js";
18
18
  import { useLocalizedStringFormatter as y } from "react-aria";
19
19
  import { TunnelProvider as Ze, TunnelExit as ie } from "@mittwald/react-tunnel";
package/dist/Modal.js CHANGED
@@ -11,7 +11,7 @@ import { f as C } from "./flowComponent-DT1Ap-ot.js";
11
11
  import * as n from "react-aria-components";
12
12
  import "mobx";
13
13
  import { u as g } from "./useOverlayController-D8pgx8nV.js";
14
- import { O as w, a as E } from "./OverlayTrigger-BPwYjPfK.js";
14
+ import { O as w, a as E } from "./OverlayTrigger-bD8_mPel.js";
15
15
  import { H as O } from "./Header-BC3V_ugP.js";
16
16
  import { A as h } from "./Action-B6lMX6do.js";
17
17
  import { B as M } from "./Button-DPF2xiJl.js";
@@ -0,0 +1,38 @@
1
+ "use client"
2
+ /* */
3
+ import e from "react";
4
+ import { u as m, o as v, O as y } from "./context-Cf7tqFtF.js";
5
+ import "./propsContext-DzAKlmhS.js";
6
+ import { P as O } from "./PropsContextProvider-C6Z4XGp6.js";
7
+ import "@react-aria/utils";
8
+ import "remeda";
9
+ const u = (r) => {
10
+ const { type: o, controller: t, children: n } = r, l = m();
11
+ return /* @__PURE__ */ e.createElement(
12
+ v.Provider,
13
+ {
14
+ value: {
15
+ ...l,
16
+ [o]: t
17
+ }
18
+ },
19
+ n
20
+ );
21
+ }, E = (r) => {
22
+ const {
23
+ overlayType: o,
24
+ isDefaultOpen: t = !1,
25
+ component: n,
26
+ children: l,
27
+ controller: a
28
+ } = r, p = y.useNew({ isDefaultOpen: t }), s = a ?? p, c = s.useIsOpen(), i = {
29
+ Button: {
30
+ onPress: s.open
31
+ }
32
+ };
33
+ return /* @__PURE__ */ e.createElement(u, { type: o, controller: s }, /* @__PURE__ */ e.createElement(O, { props: i, mergeInParentContext: !0 }, /* @__PURE__ */ e.createElement(n, { isOpen: c }, l)));
34
+ };
35
+ export {
36
+ u as O,
37
+ E as a
38
+ };
package/dist/Popover.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  /* */
3
- import { P as r } from "./PopoverTrigger-3Tw9ST0P.js";
4
- import { a as p } from "./PopoverTrigger-3Tw9ST0P.js";
3
+ import { P as r } from "./PopoverTrigger-BpW0w6yf.js";
4
+ import { a as p } from "./PopoverTrigger-BpW0w6yf.js";
5
5
  export {
6
6
  r as Popover,
7
7
  p as PopoverTrigger,
@@ -6,7 +6,7 @@ import l from "clsx";
6
6
  import "mobx";
7
7
  import { u as h } from "./useOverlayController-D8pgx8nV.js";
8
8
  import { f as a } from "./flowComponent-DT1Ap-ot.js";
9
- import { O as y, a as E } from "./OverlayTrigger-BPwYjPfK.js";
9
+ import { O as y, a as E } from "./OverlayTrigger-bD8_mPel.js";
10
10
  const x = "flow--popover", N = "flow--popover--content", T = "flow--popover--tip", s = {
11
11
  popover: x,
12
12
  content: N,
package/dist/Select.js CHANGED
@@ -13,11 +13,11 @@ import "@tabler/icons-react";
13
13
  import "./Icon-0QYDidQk.js";
14
14
  import { I as P } from "./IconChevronDown-BSK1qOl0.js";
15
15
  import { f as E } from "./flowComponent-DT1Ap-ot.js";
16
- import { P as F } from "./PopoverTrigger-3Tw9ST0P.js";
16
+ import { P as F } from "./PopoverTrigger-BpW0w6yf.js";
17
17
  import "mobx";
18
18
  import { u as C } from "./useOverlayController-D8pgx8nV.js";
19
19
  import { TunnelProvider as y, TunnelExit as I } from "@mittwald/react-tunnel";
20
- import { O as B } from "./OverlayTrigger-BPwYjPfK.js";
20
+ import { O as B } from "./OverlayTrigger-bD8_mPel.js";
21
21
  const D = "flow--select", L = "flow--select--toggle", u = {
22
22
  select: D,
23
23
  toggle: L
package/dist/Tabs.js CHANGED
@@ -6,7 +6,7 @@ import u from "clsx";
6
6
  import { TunnelExit as C, TunnelProvider as P, TunnelEntry as f } from "@mittwald/react-tunnel";
7
7
  import { f as y } from "./flowComponent-DT1Ap-ot.js";
8
8
  import { useCallbackRef as O } from "use-callback-ref";
9
- import { a as S, C as A } from "./ContextMenuTrigger-P2HbNtUH.js";
9
+ import { a as S, C as A } from "./ContextMenuTrigger-CYlZTk_W.js";
10
10
  import { M as B } from "./MenuItem-Dr-3EfkY.js";
11
11
  import { B as K } from "./Button-DPF2xiJl.js";
12
12
  import "@tabler/icons-react";
@@ -1,4 +1,5 @@
1
1
  import { ComponentType, FC, ReactNode } from 'react';
2
+ import { OverlayController } from '../../lib/controller';
2
3
  import { FlowComponentName } from '../propTypes';
3
4
  import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
4
5
  type AriaComponentType = ComponentType<{
@@ -8,6 +9,7 @@ type AriaComponentType = ComponentType<{
8
9
  export interface OverlayTriggerProps extends FlowComponentProps {
9
10
  isDefaultOpen?: boolean;
10
11
  children: ReactNode;
12
+ controller?: OverlayController;
11
13
  }
12
14
  interface Props extends OverlayTriggerProps {
13
15
  overlayType: FlowComponentName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.223",
3
+ "version": "0.1.0-alpha.224",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -301,7 +301,7 @@
301
301
  "@chakra-ui/live-region": "^2.1.0",
302
302
  "@internationalized/date": "^3.5.5",
303
303
  "@internationalized/string-compiler": "^3.2.4",
304
- "@mittwald/react-tunnel": "^0.1.0-alpha.223",
304
+ "@mittwald/react-tunnel": "^0.1.0-alpha.224",
305
305
  "@mittwald/react-use-promise": "^2.4.0",
306
306
  "@react-aria/utils": "^3.25.2",
307
307
  "@react-types/shared": "^3.24.1",
@@ -327,7 +327,7 @@
327
327
  },
328
328
  "devDependencies": {
329
329
  "@faker-js/faker": "^8.4.1",
330
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.223",
330
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.224",
331
331
  "@mittwald/react-use-promise": "^2.4.0",
332
332
  "@nx/storybook": "^19.6.4",
333
333
  "@storybook/addon-a11y": "^8.2.9",
@@ -405,5 +405,5 @@
405
405
  "optional": true
406
406
  }
407
407
  },
408
- "gitHead": "57cd85a82b8e89e3600b92cb8f2f363f618a3475"
408
+ "gitHead": "93bcb5e4927432c1e9cac5bc7333a04d764a8dd6"
409
409
  }
@@ -1,37 +0,0 @@
1
- "use client"
2
- /* */
3
- import e from "react";
4
- import { u as c, o as i, O as m } from "./context-Cf7tqFtF.js";
5
- import "./propsContext-DzAKlmhS.js";
6
- import { P as v } from "./PropsContextProvider-C6Z4XGp6.js";
7
- import "@react-aria/utils";
8
- import "remeda";
9
- const y = (r) => {
10
- const { type: t, controller: o, children: n } = r, a = c();
11
- return /* @__PURE__ */ e.createElement(
12
- i.Provider,
13
- {
14
- value: {
15
- ...a,
16
- [t]: o
17
- }
18
- },
19
- n
20
- );
21
- }, f = (r) => {
22
- const {
23
- overlayType: t,
24
- isDefaultOpen: o = !1,
25
- component: n,
26
- children: a
27
- } = r, s = m.useNew({ isDefaultOpen: o }), l = s.useIsOpen(), p = {
28
- Button: {
29
- onPress: s.open
30
- }
31
- };
32
- return /* @__PURE__ */ e.createElement(y, { type: t, controller: s }, /* @__PURE__ */ e.createElement(v, { props: p, mergeInParentContext: !0 }, /* @__PURE__ */ e.createElement(n, { isOpen: l }, a)));
33
- };
34
- export {
35
- y as O,
36
- f as a
37
- };