@mittwald/flow-react-components 0.1.0-alpha.201 → 0.1.0-alpha.203

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.
Files changed (91) hide show
  1. package/dist/{Accordion-DX40QvjC.js → Accordion-BwP09Mph.js} +3 -3
  2. package/dist/Accordion.js +1 -1
  3. package/dist/{Action-B9iiMUXq.js → Action-DrXR84F6.js} +1 -1
  4. package/dist/Action.js +1 -1
  5. package/dist/ActionGroup.js +1 -1
  6. package/dist/Avatar.js +1 -1
  7. package/dist/Breadcrumb.js +2 -2
  8. package/dist/{Button-CVDWL-od.js → Button-DQtavSbo.js} +5 -5
  9. package/dist/Button.js +1 -1
  10. package/dist/{Checkbox-CuTjbpdr.js → Checkbox-DOCJ2AAS.js} +4 -4
  11. package/dist/Checkbox.js +1 -1
  12. package/dist/{CheckboxButton-gL30h9xG.js → CheckboxButton-CwMRngE4.js} +2 -2
  13. package/dist/CheckboxButton.js +1 -1
  14. package/dist/CheckboxGroup.js +3 -3
  15. package/dist/{Content-DTwZweqp.js → Content-YN32VD1q.js} +1 -1
  16. package/dist/Content.js +1 -1
  17. package/dist/ContextMenu.js +3 -3
  18. package/dist/{ContextMenuTrigger-CvljOFns.js → ContextMenuTrigger-BdJf5T8A.js} +3 -3
  19. package/dist/ContextualHelp.js +4 -4
  20. package/dist/CopyButton.js +5 -5
  21. package/dist/CounterBadge.js +1 -1
  22. package/dist/{FieldDescription-b0dVuLR9.js → FieldDescription-D5ScpnNK.js} +2 -2
  23. package/dist/FieldDescription.js +1 -1
  24. package/dist/{FieldError-Bevl1ofs.js → FieldError-CHN9uCb_.js} +3 -3
  25. package/dist/FieldError.js +1 -1
  26. package/dist/{Header-UWuteUuZ.js → Header-DUWPZjAq.js} +26 -14
  27. package/dist/Header.js +1 -1
  28. package/dist/{Heading-BzwQly28.js → Heading-BEC6iPfF.js} +1 -1
  29. package/dist/Heading.js +1 -1
  30. package/dist/{Icon-CUhvR1IT.js → Icon-DPoIVASu.js} +1 -1
  31. package/dist/Icon.js +1 -1
  32. package/dist/{IconCheck-Baz3lkPw.js → IconCheck-BGtj4cDU.js} +1 -1
  33. package/dist/{IconCheckboxEmpty-CsDSdQbR.js → IconCheckboxEmpty-C5_FpyLH.js} +1 -1
  34. package/dist/{IconCheckboxIndeterminate-CiRBKhOR.js → IconCheckboxIndeterminate-Cq9pCgrw.js} +1 -1
  35. package/dist/{IconChevronDown-0Qm5hGlw.js → IconChevronDown--OxZLX8L.js} +1 -1
  36. package/dist/{IconChevronRight-DV5yxS6Q.js → IconChevronRight-C9GdFYqH.js} +1 -1
  37. package/dist/{IconChevronUp-BMWrCjp3.js → IconChevronUp-CGNLwWiz.js} +1 -1
  38. package/dist/{IconClose-BHf4btna.js → IconClose-BFwPT_IX.js} +1 -1
  39. package/dist/{IconContextMenu-C9_95BDt.js → IconContextMenu-jwoVcLvd.js} +1 -1
  40. package/dist/{IconCopy-CWGdqxzm.js → IconCopy-mEoW_08H.js} +1 -1
  41. package/dist/{IconDanger-DFMRrq2m.js → IconDanger-DSrmGtfE.js} +1 -1
  42. package/dist/{IconInfo-BqmpjObo.js → IconInfo-p6ir3vIp.js} +1 -1
  43. package/dist/{IconPending-MprHiXiv.js → IconPending-DkOzavfh.js} +1 -1
  44. package/dist/{IconPlus-BWI6sp0-.js → IconPlus-DXEOuv0x.js} +1 -1
  45. package/dist/{IconRadioOn-CVwFv8s0.js → IconRadioOn-DPCSoNmA.js} +1 -1
  46. package/dist/{IconSearch-D6QHaNuF.js → IconSearch-C7VQTAqK.js} +1 -1
  47. package/dist/{IconSucceeded-DLE96uUC.js → IconSucceeded-B8qBpHF5.js} +1 -1
  48. package/dist/{IconWarning-DY_gujxC.js → IconWarning-wNdAHlh2.js} +1 -1
  49. package/dist/Icons.js +18 -18
  50. package/dist/Image.js +1 -1
  51. package/dist/Initials.js +1 -1
  52. package/dist/InlineAlert.js +2 -2
  53. package/dist/{Label-BD3Jzaap.js → Label-CguPeZH5.js} +1 -1
  54. package/dist/Label.js +1 -1
  55. package/dist/LayoutCard.js +1 -1
  56. package/dist/{Link-BvK-OJhM.js → Link-hmeJbIYC.js} +1 -1
  57. package/dist/Link.js +1 -1
  58. package/dist/List.js +12 -12
  59. package/dist/{LoadingSpinner-BwRfUBmo.js → LoadingSpinner-BLy_eWhM.js} +2 -2
  60. package/dist/LoadingSpinner.js +1 -1
  61. package/dist/{MenuItem-DaY0bRCQ.js → MenuItem-DcfYvfPJ.js} +5 -5
  62. package/dist/MenuItem.js +1 -1
  63. package/dist/Modal.js +6 -6
  64. package/dist/Navigation.js +2 -2
  65. package/dist/Notification.js +5 -5
  66. package/dist/NumberField.js +7 -7
  67. package/dist/{Popover-DiU0zzqO.js → Popover-D_KuyuoO.js} +1 -1
  68. package/dist/Popover.js +1 -1
  69. package/dist/RadioGroup.js +5 -5
  70. package/dist/{SearchField-Dbr_5Zy4.js → SearchField-DstUFmq4.js} +6 -6
  71. package/dist/SearchField.js +1 -1
  72. package/dist/Section.js +1 -1
  73. package/dist/Select.js +5 -5
  74. package/dist/Slider.js +4 -4
  75. package/dist/StatusBadge.js +3 -3
  76. package/dist/{StatusIcon-DYQ_4f2y.js → StatusIcon-CVl-Qd4U.js} +4 -4
  77. package/dist/StatusIcon.js +1 -1
  78. package/dist/Switch.js +5 -5
  79. package/dist/Tabs.js +7 -7
  80. package/dist/{Text-DQmfbsPC.js → Text-Sd5q3Yme.js} +1 -1
  81. package/dist/Text.js +1 -1
  82. package/dist/TextArea.js +2 -2
  83. package/dist/TextField.js +2 -2
  84. package/dist/{TextFieldBase-BcABoqwx.js → TextFieldBase-DA_aMt2G.js} +2 -2
  85. package/dist/{flowComponent-COVzhVCB.js → flowComponent-DHPUcYyM.js} +18 -16
  86. package/dist/react-hook-form.js +17 -17
  87. package/dist/types/components/propTypes/index.d.ts +2 -0
  88. package/dist/types/lib/controller/overlay/context.d.ts +2 -0
  89. package/dist/types/lib/propsContext/propsContext.d.ts +4 -0
  90. package/dist/types/lib/slotContext/slotContext.d.ts +2 -0
  91. package/package.json +4 -4
@@ -9,8 +9,8 @@ import { P as B } from "./PropsContextProvider-C6Z4XGp6.js";
9
9
  import "@react-aria/utils";
10
10
  import "./propsContext-DzAKlmhS.js";
11
11
  import "remeda";
12
- import { F as P } from "./FieldError-Bevl1ofs.js";
13
- import { F as R } from "./FieldDescription-b0dVuLR9.js";
12
+ import { F as P } from "./FieldError-CHN9uCb_.js";
13
+ import { F as R } from "./FieldDescription-D5ScpnNK.js";
14
14
  import { useLocalizedStringFormatter as g } from "react-aria";
15
15
  const L = { "de-DE": {
16
16
  "textFieldBase.characters": (e, r) => `${r.select({ 0: () => `${e.count}`, other: () => `${e.count}/${e.maxCount}` }, e.maxCount)} Zeichen`
@@ -1,12 +1,12 @@
1
1
  "use client"
2
2
  /* */
3
3
  import s, { isValidElement as x, createContext as f, useContext as P, forwardRef as y, cloneElement as h } from "react";
4
- import { u as v } from "./propsContext-DzAKlmhS.js";
5
- import { mergeProps as E } from "@react-aria/utils";
6
- import { pickBy as S, omitBy as b } from "remeda";
4
+ import { u as g } from "./propsContext-DzAKlmhS.js";
5
+ import { mergeProps as v } from "@react-aria/utils";
6
+ import { pickBy as E, omitBy as S } from "remeda";
7
7
  import "dot-prop";
8
- import { P as g } from "./PropsContextProvider-C6Z4XGp6.js";
9
- import { TunnelEntry as T } from "@mittwald/react-tunnel";
8
+ import { P as T } from "./PropsContextProvider-C6Z4XGp6.js";
9
+ import { TunnelEntry as b } from "@mittwald/react-tunnel";
10
10
  const k = {
11
11
  Action: !0,
12
12
  ActionGroup: !0,
@@ -36,10 +36,12 @@ const k = {
36
36
  List: !0,
37
37
  MenuItem: !0,
38
38
  Modal: !0,
39
+ ModalTrigger: !0,
39
40
  NumberField: !0,
40
41
  Radio: !0,
41
42
  Option: !0,
42
43
  Popover: !0,
44
+ PopoverTrigger: !0,
43
45
  RadioButton: !0,
44
46
  RadioGroup: !0,
45
47
  SearchField: !0,
@@ -77,7 +79,7 @@ const B = (t, o) => {
77
79
  function A(t) {
78
80
  return !!t && typeof t == "object" && "children" in t && !!t.children;
79
81
  }
80
- const F = (t) => S(t, (o, r) => d(r)), I = (t, o) => {
82
+ const F = (t) => E(t, (o, r) => d(r)), I = (t, o) => {
81
83
  if (!A(o))
82
84
  return {};
83
85
  const r = o.children;
@@ -85,16 +87,16 @@ const F = (t) => S(t, (o, r) => d(r)), I = (t, o) => {
85
87
  return {};
86
88
  const e = F(t);
87
89
  return Object.keys(e).length === 0 ? {} : {
88
- children: /* @__PURE__ */ s.createElement(g, { props: e, mergeInParentContext: !0 }, r)
90
+ children: /* @__PURE__ */ s.createElement(T, { props: e, mergeInParentContext: !0 }, r)
89
91
  };
90
92
  }, M = (t, o) => {
91
- const e = v()[t], n = e ? B(e, o) : void 0, i = e ? I(e, o) : void 0;
92
- return E(
93
- e && b(
93
+ const e = g()[t], n = e ? B(e, o) : void 0, i = e ? I(e, o) : void 0;
94
+ return v(
95
+ e && S(
94
96
  e,
95
- (c, p) => l.includes(
96
- p
97
- ) || a(c)
97
+ (p, c) => l.includes(
98
+ c
99
+ ) || a(p)
98
100
  ),
99
101
  o,
100
102
  n,
@@ -109,15 +111,15 @@ const F = (t) => S(t, (o, r) => d(r)), I = (t, o) => {
109
111
  };
110
112
  function O(t, o) {
111
113
  return y((r, e) => {
112
- const { tunnelId: n, wrapWith: i, ...c } = M(
114
+ const { tunnelId: n, wrapWith: i, ...p } = M(
113
115
  t,
114
116
  r
115
117
  ), C = {
116
118
  refProp: e,
117
- ...c
119
+ ...p
118
120
  };
119
121
  let u = /* @__PURE__ */ s.createElement(o, { ...C });
120
- return "slot" in r && r.slot && (u = /* @__PURE__ */ s.createElement(N, { slot: r.slot, component: t }, u)), i && (u = h(i, void 0, u)), n && (u = /* @__PURE__ */ s.createElement(T, { id: n }, u)), u;
122
+ return "slot" in r && r.slot && (u = /* @__PURE__ */ s.createElement(N, { slot: r.slot, component: t }, u)), i && (u = h(i, void 0, u)), n && (u = /* @__PURE__ */ s.createElement(b, { id: n }, u)), u;
121
123
  });
122
124
  }
123
125
  export {
@@ -7,30 +7,30 @@ import { P as b } from "./PropsContextProvider-C6Z4XGp6.js";
7
7
  import "@react-aria/utils";
8
8
  import "remeda";
9
9
  import { d as E } from "./dynamic-ClpUSmEt.js";
10
- import { F as P } from "./FieldError-Bevl1ofs.js";
11
- import { a as g, A as y } from "./Action-B9iiMUXq.js";
10
+ import { F as P } from "./FieldError-CHN9uCb_.js";
11
+ import { a as g, A as y } from "./Action-DrXR84F6.js";
12
12
  const x = v({}), V = x.Provider, f = () => F(x);
13
13
  function I(e) {
14
14
  var i;
15
- const { children: t, control: r, ...s } = e, c = (i = f().form) == null ? void 0 : i.control;
15
+ const { children: t, control: r, ...s } = e, u = (i = f().form) == null ? void 0 : i.control;
16
16
  return /* @__PURE__ */ n.createElement(
17
17
  A,
18
18
  {
19
19
  ...s,
20
- control: r ?? c,
20
+ control: r ?? u,
21
21
  render: (a) => {
22
22
  var p;
23
23
  const {
24
- field: u,
24
+ field: c,
25
25
  fieldState: { error: l, invalid: m }
26
26
  } = a, o = {
27
- ...u,
27
+ ...c,
28
28
  isRequired: !!((p = s.rules) != null && p.required),
29
29
  isInvalid: m,
30
30
  validationBehavior: "aria",
31
31
  children: E((C) => /* @__PURE__ */ n.createElement(n.Fragment, null, C.children, /* @__PURE__ */ n.createElement(P, null, l == null ? void 0 : l.message))),
32
32
  ref: void 0,
33
- refProp: u.ref
33
+ refProp: c.ref
34
34
  }, d = {
35
35
  Checkbox: o,
36
36
  CheckboxGroup: o,
@@ -59,12 +59,12 @@ function I(e) {
59
59
  );
60
60
  }
61
61
  const _ = (e) => I, R = (e) => {
62
- const { isStarted: t, hasFailedWithError: r, hasSucceeded: s, children: c } = e, i = g.useNew({});
62
+ const { isStarted: t, hasFailedWithError: r, hasSucceeded: s, children: u } = e, i = g.useNew({});
63
63
  return S(() => {
64
64
  s ? i.state.onSucceeded() : r ? i.state.onFailed(r) : t && i.state.onAsyncStart();
65
- }, [t, r, s]), /* @__PURE__ */ n.createElement(y, { actionModel: i }, c);
65
+ }, [t, r, s]), /* @__PURE__ */ n.createElement(y, { actionModel: i }, u);
66
66
  }, D = (e) => {
67
- const { children: t, isAsyncSubmit: r } = e, s = f().form, { isSubmitted: c, isSubmitting: i, isSubmitSuccessful: a, errors: u } = h(s), l = c && u && Object.entries(u).length > 0 ? u : void 0, m = c && a;
67
+ const { children: t, isAsyncSubmit: r } = e, s = f().form, { isSubmitted: u, isSubmitting: i, isSubmitSuccessful: a, errors: c } = h(s), l = u && c && Object.entries(c).length > 0 ? c : void 0, m = u && a;
68
68
  return /* @__PURE__ */ n.createElement(
69
69
  R,
70
70
  {
@@ -77,7 +77,7 @@ const _ = (e) => I, R = (e) => {
77
77
  }, B = (e) => {
78
78
  const { children: t, isAsyncSubmit: r } = e, s = {
79
79
  ActionGroup: {
80
- children: E((c) => /* @__PURE__ */ n.createElement(D, { isAsyncSubmit: r }, c.children))
80
+ children: E((u) => /* @__PURE__ */ n.createElement(D, { isAsyncSubmit: r }, u.children))
81
81
  }
82
82
  };
83
83
  return /* @__PURE__ */ n.createElement(b, { props: s, mergeInParentContext: !0 }, t);
@@ -100,18 +100,18 @@ const _ = (e) => I, R = (e) => {
100
100
  }, [r, t, e]), null;
101
101
  };
102
102
  function z(e) {
103
- const { form: t, children: r, onSubmit: s, ...c } = e, i = k(!1), a = (u) => {
103
+ const { form: t, children: r, onSubmit: s, ...u } = e, i = k(!1), a = (c) => {
104
104
  const { isSubmitting: l, isValidating: m } = t.control._formState;
105
- if (l || m) {
106
- u.preventDefault();
105
+ if (c.stopPropagation(), l || m) {
106
+ c.preventDefault();
107
107
  return;
108
108
  }
109
109
  t.handleSubmit((o) => {
110
- const d = s(o, u);
110
+ const d = s(o, c);
111
111
  return i.current = d instanceof Promise, d;
112
- })(u);
112
+ })(c);
113
113
  };
114
- return /* @__PURE__ */ n.createElement(V, { value: { form: t } }, /* @__PURE__ */ n.createElement(B, { isAsyncSubmit: i }, /* @__PURE__ */ n.createElement("form", { ...c, onSubmit: a }, r), /* @__PURE__ */ n.createElement(G, null)));
114
+ return /* @__PURE__ */ n.createElement(V, { value: { form: t } }, /* @__PURE__ */ n.createElement(B, { isAsyncSubmit: i }, /* @__PURE__ */ n.createElement("form", { ...u, onSubmit: a }, r), /* @__PURE__ */ n.createElement(G, null)));
115
115
  }
116
116
  export {
117
117
  I as Field,
@@ -70,9 +70,11 @@ export interface FlowComponentPropsTypes {
70
70
  List: ListProps;
71
71
  MenuItem: MenuItemProps;
72
72
  Modal: ModalProps;
73
+ ModalTrigger: OverlayTriggerProps;
73
74
  NumberField: NumberFieldProps;
74
75
  Option: OptionProps;
75
76
  Popover: PopoverProps;
77
+ PopoverTrigger: OverlayTriggerProps;
76
78
  Radio: RadioProps;
77
79
  RadioButton: RadioButtonProps;
78
80
  RadioGroup: RadioGroupProps;
@@ -33,9 +33,11 @@ export declare const overlayContext: import('react').Context<Partial<{
33
33
  List: OverlayController | undefined;
34
34
  MenuItem: OverlayController | undefined;
35
35
  Modal: OverlayController | undefined;
36
+ ModalTrigger: OverlayController | undefined;
36
37
  NumberField: OverlayController | undefined;
37
38
  Option: OverlayController | undefined;
38
39
  Popover: OverlayController | undefined;
40
+ PopoverTrigger: OverlayController | undefined;
39
41
  Radio: OverlayController | undefined;
40
42
  RadioButton: OverlayController | undefined;
41
43
  RadioGroup: OverlayController | undefined;
@@ -29,9 +29,11 @@ export declare const propsContext: import('react').Context<Partial<{
29
29
  List: import('./types').ComponentPropsContext<"List">;
30
30
  MenuItem: import('./types').ComponentPropsContext<"MenuItem">;
31
31
  Modal: import('./types').ComponentPropsContext<"Modal">;
32
+ ModalTrigger: import('./types').ComponentPropsContext<"ModalTrigger">;
32
33
  NumberField: import('./types').ComponentPropsContext<"NumberField">;
33
34
  Option: import('./types').ComponentPropsContext<"Option">;
34
35
  Popover: import('./types').ComponentPropsContext<"Popover">;
36
+ PopoverTrigger: import('./types').ComponentPropsContext<"PopoverTrigger">;
35
37
  Radio: import('./types').ComponentPropsContext<"Radio">;
36
38
  RadioButton: import('./types').ComponentPropsContext<"RadioButton">;
37
39
  RadioGroup: import('./types').ComponentPropsContext<"RadioGroup">;
@@ -76,9 +78,11 @@ export declare const PropsContextProvider: import('react').Provider<Partial<{
76
78
  List: import('./types').ComponentPropsContext<"List">;
77
79
  MenuItem: import('./types').ComponentPropsContext<"MenuItem">;
78
80
  Modal: import('./types').ComponentPropsContext<"Modal">;
81
+ ModalTrigger: import('./types').ComponentPropsContext<"ModalTrigger">;
79
82
  NumberField: import('./types').ComponentPropsContext<"NumberField">;
80
83
  Option: import('./types').ComponentPropsContext<"Option">;
81
84
  Popover: import('./types').ComponentPropsContext<"Popover">;
85
+ PopoverTrigger: import('./types').ComponentPropsContext<"PopoverTrigger">;
82
86
  Radio: import('./types').ComponentPropsContext<"Radio">;
83
87
  RadioButton: import('./types').ComponentPropsContext<"RadioButton">;
84
88
  RadioGroup: import('./types').ComponentPropsContext<"RadioGroup">;
@@ -29,9 +29,11 @@ export declare const slotContext: import('react').Context<Partial<{
29
29
  List: string;
30
30
  MenuItem: string;
31
31
  Modal: string;
32
+ ModalTrigger: string;
32
33
  NumberField: string;
33
34
  Option: string;
34
35
  Popover: string;
36
+ PopoverTrigger: string;
35
37
  Radio: string;
36
38
  RadioButton: string;
37
39
  RadioGroup: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.201",
3
+ "version": "0.1.0-alpha.203",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -284,7 +284,7 @@
284
284
  "dependencies": {
285
285
  "@chakra-ui/live-region": "^2.1.0",
286
286
  "@internationalized/string-compiler": "^3.2.4",
287
- "@mittwald/react-tunnel": "^0.1.0-alpha.201",
287
+ "@mittwald/react-tunnel": "^0.1.0-alpha.203",
288
288
  "@mittwald/react-use-promise": "^2.3.13",
289
289
  "@react-aria/utils": "^3.25.1",
290
290
  "@react-types/shared": "^3.24.1",
@@ -310,7 +310,7 @@
310
310
  },
311
311
  "devDependencies": {
312
312
  "@faker-js/faker": "^8.4.1",
313
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.201",
313
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.203",
314
314
  "@mittwald/react-use-promise": "^2.3.13",
315
315
  "@nx/storybook": "^19.5.6",
316
316
  "@storybook/addon-a11y": "^8.2.7",
@@ -388,5 +388,5 @@
388
388
  "optional": true
389
389
  }
390
390
  },
391
- "gitHead": "d13be5165ce131077e049cb1c01ea87700ee97ee"
391
+ "gitHead": "1e9ccb798574cbaa70c5716aec78ee4da961b3c2"
392
392
  }