@mittwald/flow-react-components 0.1.0-alpha.161 → 0.1.0-alpha.162

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 (74) hide show
  1. package/dist/{Accordion-CYhhaTPz.js → Accordion-CPVq0faI.js} +3 -3
  2. package/dist/Accordion.js +1 -1
  3. package/dist/Breadcrumb.js +2 -2
  4. package/dist/{Button-Cwmw6ZOq.js → Button-Dz22EEEz.js} +4 -4
  5. package/dist/Button.js +1 -1
  6. package/dist/{Checkbox-DyIk5gNQ.js → Checkbox-DlctxdXS.js} +3 -3
  7. package/dist/Checkbox.js +1 -1
  8. package/dist/{CheckboxButton-BtW15qLh.js → CheckboxButton-BSy4Rd1a.js} +1 -1
  9. package/dist/CheckboxButton.js +1 -1
  10. package/dist/CheckboxGroup.js +2 -2
  11. package/dist/ContextMenu.js +1 -1
  12. package/dist/ContextualHelp.js +2 -2
  13. package/dist/CopyButton.js +3 -3
  14. package/dist/{FieldDescription-OElYhleN.js → FieldDescription-Ca5OTPGv.js} +1 -1
  15. package/dist/FieldDescription.js +1 -1
  16. package/dist/{FieldError-BqzJ-th_.js → FieldError-C3KKqMzM.js} +2 -2
  17. package/dist/FieldError.js +1 -1
  18. package/dist/Icon-BTTw8v9z.js +61 -0
  19. package/dist/Icon.js +1 -1
  20. package/dist/{IconCheck-Cm1gvSQ8.js → IconCheck-ZTVWbFCo.js} +1 -1
  21. package/dist/{IconCheckboxEmpty-ccUrf06Z.js → IconCheckboxEmpty-C_IETucN.js} +1 -1
  22. package/dist/{IconCheckboxIndeterminate-SLhx-v9a.js → IconCheckboxIndeterminate-DY2Gz2df.js} +1 -1
  23. package/dist/{IconChevronDown-CGnrjHX3.js → IconChevronDown-CPh2XLia.js} +1 -1
  24. package/dist/{IconChevronRight-Dixpcc04.js → IconChevronRight-NKe0T7-H.js} +1 -1
  25. package/dist/{IconChevronUp-BnxkbKEB.js → IconChevronUp-ClAQYdXn.js} +1 -1
  26. package/dist/{IconClose-DT3oFw36.js → IconClose-D3xiRQc_.js} +1 -1
  27. package/dist/{IconContextMenu-DdPbJs2w.js → IconContextMenu-BeUYeVED.js} +1 -1
  28. package/dist/{IconCopy-C2go6pyT.js → IconCopy-BXBdiyLX.js} +1 -1
  29. package/dist/{IconDanger-B21HKj1x.js → IconDanger-CLKa18Ox.js} +1 -1
  30. package/dist/{IconInfo-Dent1rgM.js → IconInfo-B5-94yWE.js} +1 -1
  31. package/dist/{IconPending-DPp9dgT8.js → IconPending-Di6JG-4u.js} +1 -1
  32. package/dist/{IconPlus-D_m-diZi.js → IconPlus-DHuWcs1-.js} +1 -1
  33. package/dist/{IconRadioOn-DAWP-hCl.js → IconRadioOn-CF8jhsxN.js} +1 -1
  34. package/dist/{IconSearch-BtJxLn18.js → IconSearch-CzWSJj1g.js} +1 -1
  35. package/dist/{IconSucceeded-C1muSWMu.js → IconSucceeded-B5M2AsMJ.js} +1 -1
  36. package/dist/{IconWarning-CEw4kwPi.js → IconWarning-B7kuINe1.js} +1 -1
  37. package/dist/Icons.js +18 -18
  38. package/dist/IllustratedMessage-B3MHD01M.js +39 -0
  39. package/dist/IllustratedMessage.js +1 -1
  40. package/dist/InlineAlert.js +1 -1
  41. package/dist/List.js +9 -9
  42. package/dist/{LoadingSpinner-CmcuqQza.js → LoadingSpinner-DYYmNgEd.js} +2 -2
  43. package/dist/LoadingSpinner.js +1 -1
  44. package/dist/{MenuItem-C-wnf-qA.js → MenuItem-u7V4XOL3.js} +4 -4
  45. package/dist/MenuItem.js +1 -1
  46. package/dist/Modal.js +3 -3
  47. package/dist/Navigation.js +1 -1
  48. package/dist/Notification.js +4 -4
  49. package/dist/NumberField.js +6 -6
  50. package/dist/RadioGroup.js +4 -4
  51. package/dist/Select.js +3 -3
  52. package/dist/Slider.js +3 -3
  53. package/dist/StatusBadge.js +2 -2
  54. package/dist/{StatusIcon-Dh4v-yid.js → StatusIcon-BnyGZH4s.js} +4 -4
  55. package/dist/StatusIcon.js +1 -1
  56. package/dist/Switch.js +3 -3
  57. package/dist/Tabs.js +5 -5
  58. package/dist/Text-Bl9Rk0W3.js +43 -0
  59. package/dist/Text.js +1 -1
  60. package/dist/TextArea.js +1 -1
  61. package/dist/TextField.js +1 -1
  62. package/dist/{TextFieldBase-BKF0nW47.js → TextFieldBase-C5ev2SC1.js} +2 -2
  63. package/dist/react-hook-form.js +1 -1
  64. package/dist/styles.css +1 -1
  65. package/dist/types/components/Icon/Icon.d.ts +1 -0
  66. package/dist/types/components/Icon/stories/Default.stories.d.ts +2 -0
  67. package/dist/types/components/IllustratedMessage/IllustratedMessage.d.ts +2 -1
  68. package/dist/types/components/IllustratedMessage/stories/Default.stories.d.ts +2 -0
  69. package/dist/types/components/Text/Text.d.ts +1 -0
  70. package/dist/types/components/Text/stories/Default.stories.d.ts +2 -0
  71. package/package.json +4 -4
  72. package/dist/Icon-DZtYAxOE.js +0 -53
  73. package/dist/IllustratedMessage-DadLfPs9.js +0 -38
  74. package/dist/Text-C_luMjbn.js +0 -38
@@ -5,6 +5,7 @@ type SvgAttributeProps = SVGAttributes<SVGSVGElement>;
5
5
  export interface IconProps extends PropsWithChildren<Omit<SvgAttributeProps, "name">>, FlowComponentProps {
6
6
  /** @default "m" */
7
7
  size?: "s" | "m" | "l";
8
+ color?: "light" | "dark";
8
9
  }
9
10
  export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<never>>;
10
11
  export default Icon;
@@ -8,3 +8,5 @@ export declare const Alias: Story;
8
8
  export declare const TablerIcon: Story;
9
9
  export declare const CustomSvgString: Story;
10
10
  export declare const CustomSvg: Story;
11
+ export declare const Dark: Story;
12
+ export declare const Light: Story;
@@ -1,7 +1,8 @@
1
1
  import { ComponentProps, FC, PropsWithChildren } from 'react';
2
2
 
3
3
  export interface IllustratedMessageProps extends PropsWithChildren<ComponentProps<"div">> {
4
- variant?: "info" | "negative";
4
+ /** @default "info" */
5
+ color?: "info" | "negative" | "light" | "dark";
5
6
  }
6
7
  export declare const IllustratedMessage: FC<IllustratedMessageProps>;
7
8
  export default IllustratedMessage;
@@ -6,3 +6,5 @@ export default meta;
6
6
  type Story = StoryObj<typeof IllustratedMessage>;
7
7
  export declare const Default: Story;
8
8
  export declare const Negative: Story;
9
+ export declare const Dark: Story;
10
+ export declare const Light: Story;
@@ -5,6 +5,7 @@ import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
5
5
  import * as Aria from "react-aria-components";
6
6
  export interface TextProps extends PropsWithChildren, Omit<Aria.TextProps, "children" | "elementType">, PropsWithElementType<"span" | "div" | "p">, FlowComponentProps {
7
7
  emulateBoldWidth?: boolean;
8
+ color?: "light" | "dark";
8
9
  }
9
10
  export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<never>>;
10
11
  export default Text;
@@ -5,3 +5,5 @@ declare const meta: Meta<typeof Text>;
5
5
  export default meta;
6
6
  type Story = StoryObj<typeof Text>;
7
7
  export declare const Default: Story;
8
+ export declare const Dark: Story;
9
+ export declare const Light: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.161",
3
+ "version": "0.1.0-alpha.162",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -276,7 +276,7 @@
276
276
  "dependencies": {
277
277
  "@chakra-ui/live-region": "^2.1.0",
278
278
  "@internationalized/string-compiler": "^3.2.4",
279
- "@mittwald/react-tunnel": "^0.1.0-alpha.161",
279
+ "@mittwald/react-tunnel": "^0.1.0-alpha.162",
280
280
  "@mittwald/react-use-promise": "^2.3.13",
281
281
  "@react-aria/utils": "^3.24.1",
282
282
  "@react-types/shared": "^3.23.1",
@@ -303,7 +303,7 @@
303
303
  },
304
304
  "devDependencies": {
305
305
  "@faker-js/faker": "^8.4.1",
306
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.161",
306
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.162",
307
307
  "@mittwald/react-use-promise": "^2.3.13",
308
308
  "@nx/storybook": "^19.3.0",
309
309
  "@storybook/addon-a11y": "^8.1.10",
@@ -379,5 +379,5 @@
379
379
  "optional": true
380
380
  }
381
381
  },
382
- "gitHead": "8e20511c574ad6d2af80285ab6f9519e9eea4583"
382
+ "gitHead": "1c39ac6cf85882729c969b11c315de4de027a279"
383
383
  }
@@ -1,53 +0,0 @@
1
- "use client"
2
- /* */
3
- import i, { Children as f, useMemo as p } from "react";
4
- import g from "clsx";
5
- import d from "html-react-parser";
6
- import { C as w } from "./ClearPropsContext-CUvsbMn8.js";
7
- import "./propsContext-DzAKlmhS.js";
8
- import "@react-aria/utils";
9
- import "remeda";
10
- import "dot-prop";
11
- import { f as z } from "./flowComponent-TgbbWDzO.js";
12
- const b = "flow--icon", c = {
13
- icon: b,
14
- "size-m": "flow--icon--size-m",
15
- "size-s": "flow--icon--size-s",
16
- "size-l": "flow--icon--size-l"
17
- }, u = (e) => {
18
- const t = f.toArray(d(e)).find(
19
- (o) => typeof o == "object" && "type" in o && o.type === "svg"
20
- );
21
- if (!t)
22
- throw new Error(`Invalid SVG string (got ${String(e)})`);
23
- return t;
24
- }, $ = z("Icon", (e) => {
25
- const {
26
- className: t,
27
- "aria-label": o,
28
- children: r,
29
- size: l = "m",
30
- refProp: E,
31
- ...a
32
- } = e, m = {
33
- ...a,
34
- focusable: "false",
35
- role: "img",
36
- "aria-hidden": !o,
37
- "aria-label": o,
38
- className: g(c.icon, t, c[`size-${l}`])
39
- }, s = typeof r == "string", n = p(
40
- () => s ? u(r) : r,
41
- [s, r]
42
- );
43
- if (!i.isValidElement(n))
44
- throw new Error(
45
- `Expected children of Icon component to be a valid React element (got ${String(
46
- n
47
- )})`
48
- );
49
- return /* @__PURE__ */ i.createElement(w, null, i.cloneElement(n, m));
50
- });
51
- export {
52
- $ as I
53
- };
@@ -1,38 +0,0 @@
1
- "use client"
2
- /* */
3
- import t from "react";
4
- import s from "clsx";
5
- import "./propsContext-DzAKlmhS.js";
6
- import { P as m } from "./PropsContextProvider-C6Z4XGp6.js";
7
- import "@react-aria/utils";
8
- import "remeda";
9
- const d = "flow--illustrated-message--illustrated-message-container", g = "flow--illustrated-message", u = "flow--illustrated-message--icon", p = "flow--illustrated-message--heading", f = "flow--illustrated-message--text", x = "flow--illustrated-message--button", N = "flow--illustrated-message--negative", e = {
10
- illustratedMessageContainer: d,
11
- illustratedMessage: g,
12
- icon: u,
13
- heading: p,
14
- text: f,
15
- button: x,
16
- negative: N
17
- }, E = (a) => {
18
- const { className: o, children: l, variant: n = "info", ...r } = a, i = s(e.illustratedMessageContainer, o), c = {
19
- Icon: {
20
- className: e.icon,
21
- size: "l"
22
- },
23
- Heading: {
24
- className: e.heading
25
- },
26
- Text: {
27
- className: e.text
28
- },
29
- Button: {
30
- className: e.button,
31
- color: "accent"
32
- }
33
- };
34
- return /* @__PURE__ */ t.createElement("div", { ...r, className: i }, /* @__PURE__ */ t.createElement("div", { className: s(e.illustratedMessage, e[n]) }, /* @__PURE__ */ t.createElement(m, { props: c }, l)));
35
- };
36
- export {
37
- E as I
38
- };
@@ -1,38 +0,0 @@
1
- "use client"
2
- /* */
3
- import e from "react";
4
- import * as f from "react-aria-components";
5
- import { C as x } from "./ClearPropsContext-CUvsbMn8.js";
6
- import { P as E } from "./PropsContextProvider-C6Z4XGp6.js";
7
- import "@react-aria/utils";
8
- import "./propsContext-DzAKlmhS.js";
9
- import "remeda";
10
- import u from "invariant";
11
- import { f as T } from "./flowComponent-TgbbWDzO.js";
12
- import { E as d } from "./EmulatedBoldText-Dtox8Wd1.js";
13
- import { W as C } from "./Wrap-DGT1h1o3.js";
14
- const A = T("Text", (r) => {
15
- const {
16
- children: i,
17
- className: p,
18
- elementType: t = "span",
19
- emulateBoldWidth: l,
20
- refProp: o,
21
- ...s
22
- } = r, n = { ...s, className: p }, a = {
23
- Link: {
24
- inline: !0
25
- }
26
- }, m = /* @__PURE__ */ e.createElement(E, { props: a }, /* @__PURE__ */ e.createElement(C, { if: l }, /* @__PURE__ */ e.createElement(d, null, i)));
27
- if (!r.slot) {
28
- const c = t;
29
- return /* @__PURE__ */ e.createElement(c, { ...n, ref: o }, m);
30
- }
31
- return u(
32
- typeof t == "string",
33
- "'elementType' in Text component must be of type string"
34
- ), /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement(f.Text, { ...n, elementType: t, ref: o }, m));
35
- });
36
- export {
37
- A as T
38
- };