@mittwald/flow-react-components 0.2.0-alpha.145 → 0.2.0-alpha.147
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/CHANGELOG.md +11 -0
- package/dist/js/_virtual/_.locale.json@162914df08c90e5e10d2f78b03d9d768.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@24b745a6ce9353be513d1f98e927d8d3.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@3b9d9e153ad753f427f375d1275fbcad.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@3ed2dc50f997451bdd85a713c54e1025.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@444629885187f8ca5450a1c8b14fb45c.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@51592c7dce2c58889664b6822f25f6d1.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@51dcf4944c990e2cbe26472300dae78d.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@656bcfe2b7d48c4324cbdf14a4866b19.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@8b26c19d587a90f821a2307c8122f6d1.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@8d5024994f97657f895a4e2a188d2d8a.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@a75d4fdc8302dc8cc25be6a7eff37c38.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@c33938a00f4bfb40e033ada6b54e38f9.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@d7a4ca29c343fa700bb5aa84d322958b.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@df0c8534e2e4f7c6c3d4365218df7347.mjs +1 -1
- package/dist/js/_virtual/_.locale.json@e940efc6da10fdf09417eb079b65a343.mjs +1 -1
- package/dist/js/components/src/components/Notification/Notification.mjs +21 -12
- package/dist/js/components/src/components/Notification/Notification.mjs.map +1 -1
- package/dist/types/components/Notification/Notification.d.ts +1 -1
- package/dist/types/components/Notification/Notification.d.ts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.2.0-alpha.147](https://github.com/mittwald/flow/compare/0.2.0-alpha.146...0.2.0-alpha.147) (2025-04-14)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @mittwald/flow-react-components
|
|
9
|
+
|
|
10
|
+
# [0.2.0-alpha.146](https://github.com/mittwald/flow/compare/0.2.0-alpha.145...0.2.0-alpha.146) (2025-04-14)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **Components:** fix crash instead of using fallback language ([#1381](https://github.com/mittwald/flow/issues/1381)) ([81be139](https://github.com/mittwald/flow/commit/81be139fb0bef414175a4557217262b24499e6e3))
|
|
15
|
+
* **Notification:** Notification interaction should not close Overlay ([#1375](https://github.com/mittwald/flow/issues/1375)) ([7240c70](https://github.com/mittwald/flow/commit/7240c70f8b1a78e84dc2f243bd062ab12115fbd0))
|
|
16
|
+
|
|
6
17
|
# [0.2.0-alpha.145](https://github.com/mittwald/flow/compare/0.2.0-alpha.144...0.2.0-alpha.145) (2025-04-11)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @mittwald/flow-react-components
|
|
@@ -4,7 +4,7 @@ const locales = {"de-DE": { "alertIcon.danger": `Status Fehler`,
|
|
|
4
4
|
"alertIcon.info": `Status Information`,
|
|
5
5
|
"alertIcon.success": `Status Erfolg`,
|
|
6
6
|
"alertIcon.warning": `Status Warnung`,
|
|
7
|
-
},"en-
|
|
7
|
+
},"en-US": { "alertIcon.danger": `Status error`,
|
|
8
8
|
"alertIcon.info": `Status information`,
|
|
9
9
|
"alertIcon.success": `Status success`,
|
|
10
10
|
"alertIcon.warning": `Status warning`,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
const locales = {"de-DE": { "slider.decrement": `Wert verkleinern`,
|
|
4
4
|
"slider.increment": `Wert erhöhen`,
|
|
5
|
-
},"en-
|
|
5
|
+
},"en-US": { "slider.decrement": `Decrement value`,
|
|
6
6
|
"slider.increment": `Increment value`,
|
|
7
7
|
}};
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
const locales = {"de-DE": { "textFieldBase.characters": (args, formatter) => `${formatter.select({0: () => `${args.count}`, other: () => `${args.count}/${args.maxCount}`}, args.maxCount)} Zeichen`,
|
|
4
|
-
},"en-
|
|
4
|
+
},"en-US": { "textFieldBase.characters": (args, formatter) => `${formatter.select({0: () => `${args.count}`, other: () => `${args.count}/${args.maxCount}`}, args.maxCount)} characters`,
|
|
5
5
|
}};
|
|
6
6
|
|
|
7
7
|
export { locales as default };
|
|
@@ -6,7 +6,7 @@ const locales = {"de-DE": { "rating.0": `Bewertung: 0 von 5`,
|
|
|
6
6
|
"rating.3": `Bewertung: 3 von 5`,
|
|
7
7
|
"rating.4": `Bewertung: 4 von 5`,
|
|
8
8
|
"rating.5": `Bewertung: 5 von 5`,
|
|
9
|
-
},"en-
|
|
9
|
+
},"en-US": { "rating.0": `Rating: 0 of 5`,
|
|
10
10
|
"rating.1": `Rating: 1 of 5`,
|
|
11
11
|
"rating.2": `Rating: 2 of 5`,
|
|
12
12
|
"rating.3": `Rating: 3 of 5`,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const locales = {"de-DE": { "action.isFailed": `Fehlgeschlagen`,
|
|
4
4
|
"action.isPending": `Ausstehend...`,
|
|
5
5
|
"action.isSucceeded": `Erfolgreich`,
|
|
6
|
-
},"en-
|
|
6
|
+
},"en-US": { "action.isFailed": `Failed`,
|
|
7
7
|
"action.isPending": `Pending...`,
|
|
8
8
|
"action.isSucceeded": `Succeeded`,
|
|
9
9
|
}};
|
|
@@ -16,7 +16,7 @@ const locales = {"de-DE": { "list.filters.clear": `Filter entfernen`,
|
|
|
16
16
|
"list.sorting": `Sortierung`,
|
|
17
17
|
"list.toggleExpandButton.collapse": `Weniger anzeigen`,
|
|
18
18
|
"list.toggleExpandButton.expand": `Mehr anzeigen`,
|
|
19
|
-
},"en-
|
|
19
|
+
},"en-US": { "list.filters.clear": `Clear filters`,
|
|
20
20
|
"list.filters.reset": `Reset filters`,
|
|
21
21
|
"list.filters.store": `Store filters`,
|
|
22
22
|
"list.noResult.heading": `No search results found`,
|
|
@@ -250,7 +250,7 @@ const locales = {"de-DE": { "countries.AD": `Andorra`,
|
|
|
250
250
|
"countries.ZA": `Südafrika`,
|
|
251
251
|
"countries.ZM": `Sambia`,
|
|
252
252
|
"countries.ZW": `Simbabwe`,
|
|
253
|
-
},"en-
|
|
253
|
+
},"en-US": { "countries.AD": `Andorra`,
|
|
254
254
|
"countries.AE": `United Arab Emirates`,
|
|
255
255
|
"countries.AF": `Afghanistan`,
|
|
256
256
|
"countries.AG": `Antigua and Barbuda`,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
const locales = {"de-DE": { "contextualHelpButton.moreInformation": `Weitere Informationen`,
|
|
4
|
-
},"en-
|
|
4
|
+
},"en-US": { "contextualHelpButton.moreInformation": `More information`,
|
|
5
5
|
}};
|
|
6
6
|
|
|
7
7
|
export { locales as default };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import 'react';
|
|
5
|
-
import styles from './Notification.module.scss.mjs';
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
import '../../lib/propsContext/propsContext.mjs';
|
|
8
|
-
import '../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
9
|
-
import { dynamic } from '../../lib/propsContext/dynamicProps/dynamic.mjs';
|
|
10
|
-
import { PropsContextProvider } from '../../lib/propsContext/PropsContextProvider.mjs';
|
|
11
4
|
import { AlertIcon } from '../AlertIcon/AlertIcon.mjs';
|
|
12
|
-
import { Link } from '../Link/Link.mjs';
|
|
13
5
|
import { Button } from '../Button/Button.mjs';
|
|
6
|
+
import 'react';
|
|
14
7
|
import '@tabler/icons-react';
|
|
8
|
+
import clsx from 'clsx';
|
|
15
9
|
import '@mittwald/react-tunnel';
|
|
16
10
|
import '../../lib/slotContext/slotContext.mjs';
|
|
17
11
|
import '@react-aria/utils';
|
|
12
|
+
import '../../lib/propsContext/propsContext.mjs';
|
|
18
13
|
import 'remeda';
|
|
14
|
+
import { PropsContextProvider } from '../../lib/propsContext/PropsContextProvider.mjs';
|
|
15
|
+
import '../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
19
16
|
import { IconClose } from '../Icon/components/icons/IconClose.mjs';
|
|
17
|
+
import { Link } from '../Link/Link.mjs';
|
|
18
|
+
import { dynamic } from '../../lib/propsContext/dynamicProps/dynamic.mjs';
|
|
19
|
+
import styles from './Notification.module.scss.mjs';
|
|
20
20
|
|
|
21
21
|
const Notification = (props) => {
|
|
22
22
|
const {
|
|
@@ -60,10 +60,19 @@ const Notification = (props) => {
|
|
|
60
60
|
children: /* @__PURE__ */ jsx(IconClose, {})
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
|
-
return /* @__PURE__ */ jsxs(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
return /* @__PURE__ */ jsxs(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
...rest,
|
|
67
|
+
className: rootClassName,
|
|
68
|
+
role,
|
|
69
|
+
"data-react-aria-top-layer": true,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx(Link, { unstyled: true, href, className: styles.link, onPress: onClick, children: /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children }) }),
|
|
72
|
+
closeButton
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
);
|
|
67
76
|
};
|
|
68
77
|
|
|
69
78
|
export { Notification, Notification as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.mjs","sources":["../../../../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Notification.mjs","sources":["../../../../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import { AlertIcon } from \"@/components/AlertIcon\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport { Link } from \"@/components/Link\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport styles from \"./Notification.module.scss\";\n\nexport interface NotificationProps\n extends PropsWithChildren<ComponentProps<\"div\">>,\n PropsWithStatus {\n /** A link that is triggered when clicking the notification. */\n href?: string;\n /** Whether the notification should disappear automatically after some time. */\n autoClose?: boolean;\n /** Handler that is called when the notification is clicked. */\n onClick?: () => void;\n /**\n * Handler that is called when the close button of the notification is\n * clicked.\n */\n onClose?: () => void;\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const Notification: FC<NotificationProps> = (props) => {\n const {\n children,\n className,\n status = \"info\",\n role = \"alert\",\n href,\n onClick,\n onClose,\n autoClose: ignoredAutoClose,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.notification,\n styles[status],\n (onClick || onClose || href) && styles.hasLink,\n className,\n );\n\n const propsContext: PropsContext = {\n Heading: {\n className: styles.heading,\n level: 4,\n children: dynamic((props) => (\n <>\n <AlertIcon status={status} className={styles.icon} />\n {props.children}\n </>\n )),\n },\n Text: {\n className: styles.text,\n },\n };\n\n const closeButton = onClose && (\n <Button\n size=\"s\"\n className={styles.close}\n variant=\"plain\"\n color=\"secondary\"\n onPress={onClose}\n >\n <IconClose />\n </Button>\n );\n\n return (\n <div\n {...rest}\n className={rootClassName}\n role={role}\n // See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/interactions/src/useInteractOutside.ts#L126C31-L126C58\n data-react-aria-top-layer\n >\n <Link unstyled href={href} className={styles.link} onPress={onClick}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Link>\n {closeButton}\n </div>\n );\n};\n\nexport default Notification;\n"],"names":["props"],"mappings":";;;;;;;;;;;;;;;;;;AA+Ba,MAAA,YAAA,GAAsC,CAAC,KAAU,KAAA;AAC5D,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAS,GAAA,MAAA;AAAA,IACT,IAAO,GAAA,OAAA;AAAA,IACP,IAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAW,EAAA,gBAAA;AAAA,IACX,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAA,MAAM,aAAgB,GAAA,IAAA;AAAA,IACpB,MAAO,CAAA,YAAA;AAAA,IACP,OAAO,MAAM,CAAA;AAAA,IACZ,CAAA,OAAA,IAAW,OAAW,IAAA,IAAA,KAAS,MAAO,CAAA,OAAA;AAAA,IACvC;AAAA,GACF;AAEA,EAAA,MAAM,YAA6B,GAAA;AAAA,IACjC,OAAS,EAAA;AAAA,MACP,WAAW,MAAO,CAAA,OAAA;AAAA,MAClB,KAAO,EAAA,CAAA;AAAA,MACP,QAAU,EAAA,OAAA,CAAQ,CAACA,MAAAA,qBAEf,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,SAAU,EAAA,EAAA,MAAA,EAAgB,SAAW,EAAA,MAAA,CAAO,IAAM,EAAA,CAAA;AAAA,QAClDA,MAAM,CAAA;AAAA,OAAA,EACT,CACD;AAAA,KACH;AAAA,IACA,IAAM,EAAA;AAAA,MACJ,WAAW,MAAO,CAAA;AAAA;AACpB,GACF;AAEA,EAAA,MAAM,cAAc,OAClB,oBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,IAAK,EAAA,GAAA;AAAA,MACL,WAAW,MAAO,CAAA,KAAA;AAAA,MAClB,OAAQ,EAAA,OAAA;AAAA,MACR,KAAM,EAAA,WAAA;AAAA,MACN,OAAS,EAAA,OAAA;AAAA,MAET,8BAAC,SAAU,EAAA,EAAA;AAAA;AAAA,GACb;AAGF,EACE,uBAAA,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,SAAW,EAAA,aAAA;AAAA,MACX,IAAA;AAAA,MAEA,2BAAyB,EAAA,IAAA;AAAA,MAEzB,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,IAAK,EAAA,EAAA,QAAA,EAAQ,IAAC,EAAA,IAAA,EAAY,WAAW,MAAO,CAAA,IAAA,EAAM,OAAS,EAAA,OAAA,EAC1D,QAAC,kBAAA,GAAA,CAAA,oBAAA,EAAA,EAAqB,KAAO,EAAA,YAAA,EAC1B,UACH,CACF,EAAA,CAAA;AAAA,QACC;AAAA;AAAA;AAAA,GACH;AAEJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentProps, FC, PropsWithChildren } from 'react';
|
|
2
1
|
import { PropsWithStatus } from '../../lib/types/props';
|
|
2
|
+
import { ComponentProps, FC, PropsWithChildren } from 'react';
|
|
3
3
|
export interface NotificationProps extends PropsWithChildren<ComponentProps<"div">>, PropsWithStatus {
|
|
4
4
|
/** A link that is triggered when clicking the notification. */
|
|
5
5
|
href?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/Notification.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/Notification.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGnE,MAAM,WAAW,iBACf,SAAQ,iBAAiB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAC9C,eAAe;IACjB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAgE9C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.147",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@chakra-ui/live-region": "^2.1.0",
|
|
55
55
|
"@internationalized/string-compiler": "^3.2.6",
|
|
56
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
56
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.147",
|
|
57
57
|
"@mittwald/react-use-promise": "^3.0.4",
|
|
58
58
|
"@react-aria/form": "^3.0.14",
|
|
59
59
|
"@react-aria/utils": "^3.28.1",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@faker-js/faker": "^9.6.0",
|
|
94
94
|
"@internationalized/date": "^3.7.0",
|
|
95
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
95
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.147",
|
|
96
96
|
"@mittwald/react-use-promise": "^2.6.0",
|
|
97
97
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.3",
|
|
98
98
|
"@mittwald/typescript-config": "",
|
|
@@ -173,5 +173,5 @@
|
|
|
173
173
|
"optional": true
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
|
-
"gitHead": "
|
|
176
|
+
"gitHead": "0e48e8f8b5dd7dfab8dda0c8ac768fecf7317fc4"
|
|
177
177
|
}
|