@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.
- package/dist/{Accordion-CYhhaTPz.js → Accordion-CPVq0faI.js} +3 -3
- package/dist/Accordion.js +1 -1
- package/dist/Breadcrumb.js +2 -2
- package/dist/{Button-Cwmw6ZOq.js → Button-Dz22EEEz.js} +4 -4
- package/dist/Button.js +1 -1
- package/dist/{Checkbox-DyIk5gNQ.js → Checkbox-DlctxdXS.js} +3 -3
- package/dist/Checkbox.js +1 -1
- package/dist/{CheckboxButton-BtW15qLh.js → CheckboxButton-BSy4Rd1a.js} +1 -1
- package/dist/CheckboxButton.js +1 -1
- package/dist/CheckboxGroup.js +2 -2
- package/dist/ContextMenu.js +1 -1
- package/dist/ContextualHelp.js +2 -2
- package/dist/CopyButton.js +3 -3
- package/dist/{FieldDescription-OElYhleN.js → FieldDescription-Ca5OTPGv.js} +1 -1
- package/dist/FieldDescription.js +1 -1
- package/dist/{FieldError-BqzJ-th_.js → FieldError-C3KKqMzM.js} +2 -2
- package/dist/FieldError.js +1 -1
- package/dist/Icon-BTTw8v9z.js +61 -0
- package/dist/Icon.js +1 -1
- package/dist/{IconCheck-Cm1gvSQ8.js → IconCheck-ZTVWbFCo.js} +1 -1
- package/dist/{IconCheckboxEmpty-ccUrf06Z.js → IconCheckboxEmpty-C_IETucN.js} +1 -1
- package/dist/{IconCheckboxIndeterminate-SLhx-v9a.js → IconCheckboxIndeterminate-DY2Gz2df.js} +1 -1
- package/dist/{IconChevronDown-CGnrjHX3.js → IconChevronDown-CPh2XLia.js} +1 -1
- package/dist/{IconChevronRight-Dixpcc04.js → IconChevronRight-NKe0T7-H.js} +1 -1
- package/dist/{IconChevronUp-BnxkbKEB.js → IconChevronUp-ClAQYdXn.js} +1 -1
- package/dist/{IconClose-DT3oFw36.js → IconClose-D3xiRQc_.js} +1 -1
- package/dist/{IconContextMenu-DdPbJs2w.js → IconContextMenu-BeUYeVED.js} +1 -1
- package/dist/{IconCopy-C2go6pyT.js → IconCopy-BXBdiyLX.js} +1 -1
- package/dist/{IconDanger-B21HKj1x.js → IconDanger-CLKa18Ox.js} +1 -1
- package/dist/{IconInfo-Dent1rgM.js → IconInfo-B5-94yWE.js} +1 -1
- package/dist/{IconPending-DPp9dgT8.js → IconPending-Di6JG-4u.js} +1 -1
- package/dist/{IconPlus-D_m-diZi.js → IconPlus-DHuWcs1-.js} +1 -1
- package/dist/{IconRadioOn-DAWP-hCl.js → IconRadioOn-CF8jhsxN.js} +1 -1
- package/dist/{IconSearch-BtJxLn18.js → IconSearch-CzWSJj1g.js} +1 -1
- package/dist/{IconSucceeded-C1muSWMu.js → IconSucceeded-B5M2AsMJ.js} +1 -1
- package/dist/{IconWarning-CEw4kwPi.js → IconWarning-B7kuINe1.js} +1 -1
- package/dist/Icons.js +18 -18
- package/dist/IllustratedMessage-B3MHD01M.js +39 -0
- package/dist/IllustratedMessage.js +1 -1
- package/dist/InlineAlert.js +1 -1
- package/dist/List.js +9 -9
- package/dist/{LoadingSpinner-CmcuqQza.js → LoadingSpinner-DYYmNgEd.js} +2 -2
- package/dist/LoadingSpinner.js +1 -1
- package/dist/{MenuItem-C-wnf-qA.js → MenuItem-u7V4XOL3.js} +4 -4
- package/dist/MenuItem.js +1 -1
- package/dist/Modal.js +3 -3
- package/dist/Navigation.js +1 -1
- package/dist/Notification.js +4 -4
- package/dist/NumberField.js +6 -6
- package/dist/RadioGroup.js +4 -4
- package/dist/Select.js +3 -3
- package/dist/Slider.js +3 -3
- package/dist/StatusBadge.js +2 -2
- package/dist/{StatusIcon-Dh4v-yid.js → StatusIcon-BnyGZH4s.js} +4 -4
- package/dist/StatusIcon.js +1 -1
- package/dist/Switch.js +3 -3
- package/dist/Tabs.js +5 -5
- package/dist/Text-Bl9Rk0W3.js +43 -0
- package/dist/Text.js +1 -1
- package/dist/TextArea.js +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{TextFieldBase-BKF0nW47.js → TextFieldBase-C5ev2SC1.js} +2 -2
- package/dist/react-hook-form.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/Icon/Icon.d.ts +1 -0
- package/dist/types/components/Icon/stories/Default.stories.d.ts +2 -0
- package/dist/types/components/IllustratedMessage/IllustratedMessage.d.ts +2 -1
- package/dist/types/components/IllustratedMessage/stories/Default.stories.d.ts +2 -0
- package/dist/types/components/Text/Text.d.ts +1 -0
- package/dist/types/components/Text/stories/Default.stories.d.ts +2 -0
- package/package.json +4 -4
- package/dist/Icon-DZtYAxOE.js +0 -53
- package/dist/IllustratedMessage-DadLfPs9.js +0 -38
- 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;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentProps, FC, PropsWithChildren } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface IllustratedMessageProps extends PropsWithChildren<ComponentProps<"div">> {
|
|
4
|
-
|
|
4
|
+
/** @default "info" */
|
|
5
|
+
color?: "info" | "negative" | "light" | "dark";
|
|
5
6
|
}
|
|
6
7
|
export declare const IllustratedMessage: FC<IllustratedMessageProps>;
|
|
7
8
|
export default IllustratedMessage;
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
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.
|
|
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.
|
|
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": "
|
|
382
|
+
"gitHead": "1c39ac6cf85882729c969b11c315de4de027a279"
|
|
383
383
|
}
|
package/dist/Icon-DZtYAxOE.js
DELETED
|
@@ -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
|
-
};
|
package/dist/Text-C_luMjbn.js
DELETED
|
@@ -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
|
-
};
|