@mittwald/flow-react-components 0.1.0-alpha.59 → 0.1.0-alpha.61

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 (88) hide show
  1. package/dist/{Action-SSV77Gfb.js → Action-DT6jWAqa.js} +3 -3
  2. package/dist/Action.js +1 -1
  3. package/dist/Avatar.js +27 -22
  4. package/dist/Breadcrumb.js +3 -3
  5. package/dist/{Button-DTVMsKTK.js → Button-K1ktUAEv.js} +6 -6
  6. package/dist/Button.js +1 -1
  7. package/dist/ButtonGroup.js +3 -3
  8. package/dist/{Checkbox-gCtHl4pE.js → Checkbox-De7ZNCuQ.js} +4 -4
  9. package/dist/Checkbox.js +1 -1
  10. package/dist/{CheckboxButton-CW6TfZFj.js → CheckboxButton-D8M2QcSR.js} +3 -3
  11. package/dist/CheckboxButton.js +1 -1
  12. package/dist/CheckboxGroup.js +4 -4
  13. package/dist/{ClearPropsContext-CD1-9TZA.js → ClearPropsContext-CeCMjUK9.js} +1 -1
  14. package/dist/Content.js +3 -3
  15. package/dist/ContextMenu.js +2 -2
  16. package/dist/{ContextMenuItem-Cc7czdsZ.js → ContextMenuItem-FeOABGAA.js} +6 -6
  17. package/dist/CopyButton.js +6 -6
  18. package/dist/FieldDescription.js +4 -4
  19. package/dist/{FieldError-BDRDWTgn.js → FieldError-D2Xf1SUy.js} +4 -4
  20. package/dist/FieldError.js +1 -1
  21. package/dist/Header.js +1 -1
  22. package/dist/Heading.js +4 -4
  23. package/dist/{Icon-DK_xMxr-.js → Icon-QRU6ff6c.js} +3 -3
  24. package/dist/Icon.js +1 -1
  25. package/dist/{IconCheck-DmRifITa.js → IconCheck-CDLMv3G3.js} +1 -1
  26. package/dist/{IconCheckboxEmpty-BNFRkCm2.js → IconCheckboxEmpty-K4aq2aRv.js} +1 -1
  27. package/dist/{IconCheckboxIndeterminate-Bsk1h92j.js → IconCheckboxIndeterminate-DyTX9k0O.js} +1 -1
  28. package/dist/{IconChevronDown-C3dBD472.js → IconChevronDown-n2DJdnRB.js} +1 -1
  29. package/dist/{IconChevronRight-T-spe-97.js → IconChevronRight-BOY7IxRM.js} +1 -1
  30. package/dist/{IconClose-DIMx1m3Z.js → IconClose-DYvIbwoN.js} +1 -1
  31. package/dist/{IconContextMenu-BF-N2Mtz.js → IconContextMenu-DFvw_d9h.js} +1 -1
  32. package/dist/{IconCopy-C1rPlvpD.js → IconCopy-CYChwYCx.js} +1 -1
  33. package/dist/{IconDanger-Dz5HIiAc.js → IconDanger-CP4R6i5T.js} +1 -1
  34. package/dist/{IconPlus-DXNLmWa2.js → IconPlus-DazBjEoi.js} +1 -1
  35. package/dist/{IconRadioOn-D9S2_D7W.js → IconRadioOn-BqCA-noy.js} +1 -1
  36. package/dist/{IconSucceeded-IhwCzdOs.js → IconSucceeded-CHBiied9.js} +1 -1
  37. package/dist/{IconWarning-BiArksZS.js → IconWarning-DYI5SVhB.js} +1 -1
  38. package/dist/Icons.js +53 -42
  39. package/dist/Image.js +3 -3
  40. package/dist/Initials.js +3 -3
  41. package/dist/InlineAlert.js +5 -5
  42. package/dist/{InlineCode-DZzyKdCm.js → InlineCode-CI8164C6.js} +2 -2
  43. package/dist/InlineCode.js +1 -1
  44. package/dist/{Label-Bjdbr72t.js → Label-CJOiPsOr.js} +3 -3
  45. package/dist/Label.js +1 -1
  46. package/dist/LabeledValue.js +3 -3
  47. package/dist/LayoutCard.js +1 -1
  48. package/dist/{Link-DtSY1xrt.js → Link-DWMWhCqU.js} +4 -4
  49. package/dist/Link.js +1 -1
  50. package/dist/List.js +10 -10
  51. package/dist/Modal.js +18 -18
  52. package/dist/Navigation.js +2 -2
  53. package/dist/NumberField.js +7 -7
  54. package/dist/{PropsContextProvider-BsrVIv1a.js → PropsContextProvider-BcOGMJkn.js} +1 -1
  55. package/dist/RadioGroup.js +57 -37
  56. package/dist/Section.js +2 -2
  57. package/dist/StatusBadge.js +5 -5
  58. package/dist/{StatusIcon-Cfw9kVxt.js → StatusIcon-DHa4uxfZ.js} +4 -4
  59. package/dist/StatusIcon.js +1 -1
  60. package/dist/Switch.js +6 -6
  61. package/dist/{Text-c5-UeE0Y.js → Text-Dd9tXlc8.js} +4 -4
  62. package/dist/Text.js +1 -1
  63. package/dist/TextArea.js +3 -3
  64. package/dist/TextField.js +3 -3
  65. package/dist/{TextFieldBase-DbGQjntR.js → TextFieldBase-BdkqA5-_.js} +4 -4
  66. package/dist/{flowComponent-Dv5hKZam.js → flowComponent-C3IF_aaP.js} +2 -2
  67. package/dist/propsContext-CauylOgH.js +8 -0
  68. package/dist/styles.css +1 -1
  69. package/dist/types/components/Avatar/Avatar.d.ts +1 -0
  70. package/dist/types/components/Icon/components/icons/IconMittwald.d.ts +5 -0
  71. package/dist/types/components/Icon/components/icons/index.d.ts +1 -0
  72. package/dist/types/components/Modal/Modal.d.ts +1 -1
  73. package/dist/types/components/Modal/stories/Default.stories.d.ts +1 -1
  74. package/dist/types/components/NumberField/stories/Default.stories.d.ts +1 -0
  75. package/dist/types/components/RadioGroup/RadioGroup.d.ts +1 -0
  76. package/dist/types/components/RadioGroup/components/SegmentedGroup/SegmentedGroup.d.ts +6 -0
  77. package/dist/types/components/RadioGroup/components/SegmentedGroup/index.d.ts +4 -0
  78. package/dist/types/components/RadioGroup/stories/Default.stories.d.ts +2 -0
  79. package/dist/types/components/StatusBadge/stories/Default.stories.d.ts +1 -0
  80. package/dist/types/lib/propsContext/propsContext.d.ts +3 -1
  81. package/dist/{useProps-BEU8ldpP.js → useProps-BiJ72z10.js} +22 -22
  82. package/package.json +3 -7
  83. package/dist/SegmentedControlGroup.js +0 -51
  84. package/dist/propsContext-Dx7WKmmM.js +0 -7
  85. package/dist/types/components/SegmentedControlGroup/SegmentedControlGroup.d.ts +0 -7
  86. package/dist/types/components/SegmentedControlGroup/index.d.ts +0 -4
  87. package/dist/types/components/SegmentedControlGroup/stories/Default.stories.d.ts +0 -9
  88. package/dist/types/components/SegmentedControlGroup/stories/EdgeCases.stories.d.ts +0 -8
@@ -4,6 +4,7 @@ export interface AvatarProps extends PropsWithChildren {
4
4
  className?: string;
5
5
  /** @default "m" */
6
6
  size?: "xs" | "s" | "m" | "l";
7
+ variant?: 1 | 2 | 3 | 4;
7
8
  }
8
9
  export declare const Avatar: FC<AvatarProps>;
9
10
  export default Avatar;
@@ -0,0 +1,5 @@
1
+ import { Icon } from '../..';
2
+ import { ComponentProps, FC } from 'react';
3
+
4
+ export declare const IconMittwald: FC<Omit<ComponentProps<typeof Icon>, "children">>;
5
+ export default IconMittwald;
@@ -53,3 +53,4 @@ export { IconTerminate } from './IconTerminate';
53
53
  export { IconTileView } from './IconTileView';
54
54
  export { IconTime } from './IconTime';
55
55
  export { IconWarning } from './IconWarning';
56
+ export { IconMittwald } from './IconMittwald';
@@ -3,7 +3,7 @@ import { FC, PropsWithChildren } from 'react';
3
3
 
4
4
  export interface ModalProps extends PropsWithChildren {
5
5
  size?: "s" | "m" | "l";
6
- panel?: boolean;
6
+ offCanvas?: boolean;
7
7
  state?: OverlayState;
8
8
  defaultOpen?: boolean;
9
9
  }
@@ -8,4 +8,4 @@ export declare const Default: Story;
8
8
  export declare const WithController: Story;
9
9
  export declare const WithDialogTrigger: Story;
10
10
  export declare const Mobile: Story;
11
- export declare const Panel: Story;
11
+ export declare const OffCanvas: Story;
@@ -10,3 +10,4 @@ export declare const Required: Story;
10
10
  export declare const WithFieldDescription: Story;
11
11
  export declare const WithDefaultValue: Story;
12
12
  export declare const WithFieldError: Story;
13
+ export declare const WithUnit: Story;
@@ -3,6 +3,7 @@ import { FC, PropsWithChildren } from 'react';
3
3
 
4
4
  import * as Aria from "react-aria-components";
5
5
  export interface RadioGroupProps extends PropsWithChildren<Omit<Aria.RadioGroupProps, "children">>, Pick<ColumnLayoutProps, "s" | "m" | "l"> {
6
+ variant?: "segmented" | "default";
6
7
  }
7
8
  export declare const RadioGroup: FC<RadioGroupProps>;
8
9
  export default RadioGroup;
@@ -0,0 +1,6 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+
3
+ interface Props extends PropsWithChildren {
4
+ }
5
+ export declare const SegmentedGroup: FC<Props>;
6
+ export default SegmentedGroup;
@@ -0,0 +1,4 @@
1
+ import { SegmentedGroup } from './SegmentedGroup';
2
+
3
+ export { SegmentedGroup } from './SegmentedGroup';
4
+ export default SegmentedGroup;
@@ -11,3 +11,5 @@ export declare const RadioButtons: Story;
11
11
  export declare const RadioButtonDisabled: Story;
12
12
  export declare const RadioButtonsWithContent: Story;
13
13
  export declare const WithFieldError: Story;
14
+ export declare const SegmentedVariant: Story;
15
+ export declare const SegmentedVariantWithFieldError: Story;
@@ -5,3 +5,4 @@ declare const meta: Meta<typeof StatusBadge>;
5
5
  export default meta;
6
6
  type Story = StoryObj<typeof StatusBadge>;
7
7
  export declare const Default: Story;
8
+ export declare const IconOnly: Story;
@@ -1,4 +1,5 @@
1
- /// <reference types="react" />
1
+ import { PropsContext } from './types';
2
+
2
3
  export declare const propsContext: import('react').Context<Partial<{
3
4
  Action: import("@/lib/propsContext/types").ComponentPropsContext<"Action">;
4
5
  Avatar: import("@/lib/propsContext/types").ComponentPropsContext<"Avatar">;
@@ -24,3 +25,4 @@ export declare const propsContext: import('react').Context<Partial<{
24
25
  Text: import("@/lib/propsContext/types").ComponentPropsContext<"Text">;
25
26
  TestComponent: import("@/lib/propsContext/types").ComponentPropsContext<"TestComponent">;
26
27
  }>>;
28
+ export declare const useContextProps: () => PropsContext;
@@ -1,14 +1,14 @@
1
1
  "use client"
2
2
  /* */
3
3
  import { mergeProps as s } from "@react-aria/utils";
4
- import u, { isValidElement as p, useContext as c } from "react";
5
- import { p as d } from "./propsContext-Dx7WKmmM.js";
6
- import { pickBy as a } from "remeda";
7
- import { P as m } from "./PropsContextProvider-BsrVIv1a.js";
8
- function C(t) {
4
+ import { u } from "./propsContext-CauylOgH.js";
5
+ import p, { isValidElement as c } from "react";
6
+ import { pickBy as d } from "remeda";
7
+ import { P as a } from "./PropsContextProvider-BcOGMJkn.js";
8
+ function m(t) {
9
9
  return !!t && typeof t == "object" && "__dynamicProp" in t;
10
10
  }
11
- const f = {
11
+ const C = {
12
12
  Action: !0,
13
13
  Avatar: !0,
14
14
  Button: !0,
@@ -32,39 +32,39 @@ const f = {
32
32
  Switch: !0,
33
33
  TestComponent: !0,
34
34
  Text: !0
35
- }, l = Object.keys(
36
- f
35
+ }, f = Object.keys(
36
+ C
37
37
  );
38
38
  function i(t) {
39
- return typeof t == "string" && l.includes(t);
39
+ return typeof t == "string" && f.includes(t);
40
40
  }
41
- function y(t) {
41
+ function l(t) {
42
42
  return !i(t);
43
43
  }
44
- const P = (t, r) => {
44
+ const y = (t, r) => {
45
45
  const e = {};
46
46
  for (const n in t)
47
- if (y(n)) {
47
+ if (l(n)) {
48
48
  const o = t[n];
49
- C(o) && (e[n] = o.__dynamicProp(r));
49
+ m(o) && (e[n] = o.__dynamicProp(r));
50
50
  }
51
51
  return e;
52
52
  };
53
- function x(t) {
53
+ function P(t) {
54
54
  return !!t && typeof t == "object" && "children" in t && !!t.children;
55
55
  }
56
- const h = (t) => a(t, (r, e) => i(e)), v = (t, r) => {
57
- if (!x(r))
56
+ const x = (t) => d(t, (r, e) => i(e)), h = (t, r) => {
57
+ if (!P(r))
58
58
  return {};
59
59
  const e = r.children;
60
- if (!Array.isArray(e) && !p(e))
60
+ if (!Array.isArray(e) && !c(e))
61
61
  return {};
62
- const n = h(t);
62
+ const n = x(t);
63
63
  return Object.keys(n).length === 0 ? {} : {
64
- children: /* @__PURE__ */ u.createElement(m, { props: n }, r.children)
64
+ children: /* @__PURE__ */ p.createElement(a, { props: n }, r.children)
65
65
  };
66
- }, B = (t, r) => {
67
- const e = c(d)[t], n = e ? P(e, r) : void 0, o = e ? v(e, r) : void 0;
66
+ }, A = (t, r) => {
67
+ const e = u()[t], n = e ? y(e, r) : void 0, o = e ? h(e, r) : void 0;
68
68
  return s(
69
69
  e,
70
70
  r,
@@ -73,5 +73,5 @@ const h = (t) => a(t, (r, e) => i(e)), v = (t, r) => {
73
73
  );
74
74
  };
75
75
  export {
76
- B as u
76
+ A as u
77
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.59",
3
+ "version": "0.1.0-alpha.61",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -142,10 +142,6 @@
142
142
  "types": "./dist/types/components/Section/index.d.ts",
143
143
  "import": "./dist/Section.js"
144
144
  },
145
- "./SegmentedControlGroup": {
146
- "types": "./dist/types/components/SegmentedControlGroup/index.d.ts",
147
- "import": "./dist/SegmentedControlGroup.js"
148
- },
149
145
  "./StatusBadge": {
150
146
  "types": "./dist/types/components/StatusBadge/index.d.ts",
151
147
  "import": "./dist/StatusBadge.js"
@@ -221,7 +217,7 @@
221
217
  },
222
218
  "devDependencies": {
223
219
  "@faker-js/faker": "^8.4.1",
224
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.59",
220
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.61",
225
221
  "@mittwald/react-use-promise": "^2.3.13",
226
222
  "@nx/storybook": "^18.2.3",
227
223
  "@storybook/addon-a11y": "^8.0.6",
@@ -291,5 +287,5 @@
291
287
  "optional": true
292
288
  }
293
289
  },
294
- "gitHead": "3b85f0b5dd4f06c8ee3a26c23911aea3a5a4cab6"
290
+ "gitHead": "c2365378111372b948af4a421a4fabd2c6d9090b"
295
291
  }
@@ -1,51 +0,0 @@
1
- "use client"
2
- /* */
3
- import e from "react";
4
- import * as d from "react-aria-components";
5
- import p from "clsx";
6
- import "./propsContext-Dx7WKmmM.js";
7
- import { P as f } from "./PropsContextProvider-BsrVIv1a.js";
8
- import "@react-aria/utils";
9
- import "remeda";
10
- import { d as g } from "./dynamic-ClpUSmEt.js";
11
- import { F as u } from "./FieldError-BDRDWTgn.js";
12
- import { TunnelProvider as E, TunnelExit as o } from "@mittwald/react-tunnel";
13
- import { s as r } from "./FormField.module-DHK6nIcD.js";
14
- import "@tabler/icons-react";
15
- import "html-react-parser";
16
- import { I as N } from "./IconCheck-DmRifITa.js";
17
- const k = "flow--segmented-control-group", h = "flow--segmented-control-group--segments", C = "flow--segmented-control-group--segment", F = "flow--segmented-control-group--checkmark", t = {
18
- segmentedControlGroup: k,
19
- segments: h,
20
- segment: C,
21
- checkmark: F
22
- }, S = (s) => {
23
- const { children: n, className: l, ...m } = s, c = p(
24
- t.segmentedControlGroup,
25
- r.formField,
26
- l
27
- ), a = {
28
- Label: {
29
- className: r.label,
30
- tunnelId: "label"
31
- },
32
- FieldDescription: {
33
- className: r.fieldDescription,
34
- tunnelId: "fieldDescription"
35
- },
36
- FieldError: {
37
- className: r.customFieldError,
38
- tunnelId: "fieldError"
39
- },
40
- Radio: {
41
- className: t.segment,
42
- unstyled: !0,
43
- children: g((i) => /* @__PURE__ */ e.createElement(e.Fragment, null, i.children, /* @__PURE__ */ e.createElement(N, { className: t.checkmark })))
44
- }
45
- };
46
- return /* @__PURE__ */ e.createElement(d.RadioGroup, { ...m, className: c }, /* @__PURE__ */ e.createElement(f, { props: a }, /* @__PURE__ */ e.createElement(E, null, /* @__PURE__ */ e.createElement(o, { id: "label" }), /* @__PURE__ */ e.createElement("div", { className: t.segments }, n), /* @__PURE__ */ e.createElement(o, { id: "fieldDescription" }), /* @__PURE__ */ e.createElement(o, { id: "fieldError" }))), /* @__PURE__ */ e.createElement(u, { className: r.fieldError }));
47
- };
48
- export {
49
- S as SegmentedControlGroup,
50
- S as default
51
- };
@@ -1,7 +0,0 @@
1
- "use client"
2
- /* */
3
- import { createContext as t } from "react";
4
- const e = t({});
5
- export {
6
- e as p
7
- };
@@ -1,7 +0,0 @@
1
- import { FC, PropsWithChildren } from 'react';
2
-
3
- import * as Aria from "react-aria-components";
4
- export interface SegmentedControlGroupProps extends PropsWithChildren<Omit<Aria.RadioGroupProps, "children">> {
5
- }
6
- export declare const SegmentedControlGroup: FC<SegmentedControlGroupProps>;
7
- export default SegmentedControlGroup;
@@ -1,4 +0,0 @@
1
- import { SegmentedControlGroup } from './SegmentedControlGroup';
2
-
3
- export { type SegmentedControlGroupProps, SegmentedControlGroup, } from './SegmentedControlGroup';
4
- export default SegmentedControlGroup;
@@ -1,9 +0,0 @@
1
- import { SegmentedControlGroup } from '../index';
2
- import { Meta, StoryObj } from '@storybook/react';
3
-
4
- declare const meta: Meta<typeof SegmentedControlGroup>;
5
- export default meta;
6
- type Story = StoryObj<typeof SegmentedControlGroup>;
7
- export declare const Default: Story;
8
- export declare const SegmentedControlGroupDisabled: Story;
9
- export declare const SegmentDisabled: Story;
@@ -1,8 +0,0 @@
1
- import { SegmentedControlGroup } from '../index';
2
- import { Meta, StoryObj } from '@storybook/react';
3
-
4
- declare const meta: Meta<typeof SegmentedControlGroup>;
5
- export default meta;
6
- type Story = StoryObj<typeof SegmentedControlGroup>;
7
- export declare const LongTexts: Story;
8
- export declare const SmallSpace: Story;