@mittwald/flow-react-components 0.2.0-alpha.674 → 0.2.0-alpha.676
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 +12 -0
- package/dist/assets/doc-properties.json +132 -132
- package/dist/css/all.css +1 -1
- package/dist/js/components/src/components/CartesianChart/CartesianChart.mjs +36 -188
- package/dist/js/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/CartesianChart.module.scss.mjs +4 -2
- package/dist/js/components/src/components/CartesianChart/CartesianChart.module.scss.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/hooks/useChartClipRect.mjs +71 -0
- package/dist/js/components/src/components/CartesianChart/hooks/useChartClipRect.mjs.map +1 -0
- package/dist/js/components/src/components/TextArea/TextArea.mjs +3 -2
- package/dist/js/components/src/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/js/components/src/components/TextField/TextField.mjs +3 -2
- package/dist/js/components/src/components/TextField/TextField.mjs.map +1 -1
- package/dist/js/flr-universal.mjs +2 -0
- package/dist/js/flr-universal.mjs.map +1 -1
- package/dist/types/components/CartesianChart/CartesianChart.d.ts +6 -5
- package/dist/types/components/CartesianChart/CartesianChart.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/hooks/useChartClipRect.d.ts +2 -0
- package/dist/types/components/CartesianChart/hooks/useChartClipRect.d.ts.map +1 -0
- package/dist/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/types/components/TextField/TextField.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,204 +1,52 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import { ResponsiveContainer, ComposedChart } from 'recharts';
|
|
5
|
+
import { useMemo, isValidElement } from 'react';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import styles from './CartesianChart.module.scss.mjs';
|
|
8
|
+
import { useChartClipRect } from './hooks/useChartClipRect.mjs';
|
|
9
|
+
import DivView from '../../views/DivView.mjs';
|
|
8
10
|
import { Wrap } from '../Wrap/Wrap.mjs';
|
|
9
|
-
import '../AccentBox/AccentBox.mjs';
|
|
10
|
-
import '../../lib/propsContext/propsContext.mjs';
|
|
11
|
-
import '../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
12
|
-
import '../Button/Button.mjs';
|
|
13
|
-
import '@tabler/icons-react';
|
|
14
|
-
import '../Icon/Icon.mjs';
|
|
15
|
-
import '../../views/IconView.mjs';
|
|
16
|
-
import '@mittwald/react-tunnel';
|
|
17
|
-
import '../Activity/Activity.mjs';
|
|
18
|
-
import '../Action/Action.mjs';
|
|
19
|
-
import 'react-aria';
|
|
20
|
-
import '@react-aria/live-announcer';
|
|
21
|
-
import '../ActionGroup/ActionGroup.mjs';
|
|
22
|
-
import '../Alert/Alert.mjs';
|
|
23
|
-
import '../AlertBadge/AlertBadge.mjs';
|
|
24
|
-
import '../AlertText/AlertText.mjs';
|
|
25
|
-
import '../Align/Align.mjs';
|
|
26
|
-
import '../Autocomplete/Autocomplete.mjs';
|
|
27
|
-
import '../Avatar/Avatar.mjs';
|
|
28
|
-
import '../Badge/Badge.mjs';
|
|
29
|
-
import 'react-aria-components';
|
|
30
|
-
import 'mobx';
|
|
31
|
-
import '../../lib/controller/overlay/context.mjs';
|
|
32
|
-
import 'remeda';
|
|
33
|
-
import '@react-aria/utils';
|
|
34
|
-
import 'dot-prop';
|
|
35
|
-
import '../../lib/tokens/CategoricalColors.mjs';
|
|
36
|
-
import '../Text/Text.mjs';
|
|
37
|
-
import '@mittwald/react-use-promise';
|
|
38
|
-
import '../Heading/Heading.mjs';
|
|
39
|
-
import '../../views/SkeletonTextView.mjs';
|
|
40
|
-
import '../../views/LoadingSpinnerView.mjs';
|
|
41
|
-
import { CartesianGrid } from './components/CartesianGrid/CartesianGrid.mjs';
|
|
42
|
-
import '../Checkbox/Checkbox.mjs';
|
|
43
|
-
import '../CheckboxButton/CheckboxButton.mjs';
|
|
44
|
-
import '../CheckboxGroup/CheckboxGroup.mjs';
|
|
45
|
-
import 'react-syntax-highlighter';
|
|
46
|
-
import '../CopyButton/CopyButton.mjs';
|
|
47
|
-
import '../ColumnLayout/ColumnLayout.mjs';
|
|
48
|
-
import '../ComboBox/ComboBox.mjs';
|
|
49
|
-
import '../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
50
|
-
import '../Content/Content.mjs';
|
|
51
|
-
import '../ContextMenu/ContextMenu.mjs';
|
|
52
|
-
import '../MenuItem/MenuItem.mjs';
|
|
53
|
-
import '../ContextMenu/components/ContextMenuTrigger/ContextMenuTrigger.mjs';
|
|
54
|
-
import '../ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs';
|
|
55
|
-
import '../ContextualHelp/ContextualHelp.mjs';
|
|
56
|
-
import '../ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs';
|
|
57
|
-
import '../CounterBadge/CounterBadge.mjs';
|
|
58
|
-
import '../CountryOptions/CountryOptions.mjs';
|
|
59
|
-
import '../DatePicker/DatePicker.mjs';
|
|
60
|
-
import '../DateRangePicker/DateRangePicker.mjs';
|
|
61
|
-
import '../FieldDescription/FieldDescription.mjs';
|
|
62
|
-
import '../FieldError/FieldError.mjs';
|
|
63
|
-
import '../FileCard/FileCard.mjs';
|
|
64
|
-
import '../FileCardList/FileCardList.mjs';
|
|
65
|
-
import '../FileDropZone/FileDropZone.mjs';
|
|
66
|
-
import '../FileField/FileField.mjs';
|
|
67
|
-
import '../Header/Header.mjs';
|
|
68
|
-
import '../IllustratedMessage/IllustratedMessage.mjs';
|
|
69
|
-
import '../Image/Image.mjs';
|
|
70
|
-
import '../Initials/Initials.mjs';
|
|
71
|
-
import '../Label/Label.mjs';
|
|
72
|
-
import '../LayoutCard/LayoutCard.mjs';
|
|
73
|
-
import '../OverlayTrigger/components/MenuTrigger/MenuTrigger.mjs';
|
|
74
|
-
import '../../views/DialogTriggerView.mjs';
|
|
75
|
-
import '../LightBox/LightBox.mjs';
|
|
76
|
-
import '../Link/Link.mjs';
|
|
77
|
-
import 'invariant';
|
|
78
|
-
import '../../views/ListItemViewContentView.mjs';
|
|
79
|
-
import '../../views/ButtonView.mjs';
|
|
80
|
-
import '../../views/ContextMenuTriggerView.mjs';
|
|
81
|
-
import '../List/components/ListSummary/ListSummary.mjs';
|
|
82
|
-
import '../List/listContext.mjs';
|
|
83
|
-
import '../List/List.mjs';
|
|
84
|
-
import 'react-markdown';
|
|
85
|
-
import 'remark-gfm';
|
|
86
|
-
import '../MarkdownEditor/MarkdownEditor.mjs';
|
|
87
|
-
import '../Message/Message.mjs';
|
|
88
|
-
import '../MessageThread/MessageThread.mjs';
|
|
89
|
-
import '../Modal/Modal.mjs';
|
|
90
|
-
import '../Navigation/Navigation.mjs';
|
|
91
|
-
import '../Navigation/components/NavigationGroup/NavigationGroup.mjs';
|
|
92
|
-
import '../NotificationProvider/NotificationProvider.mjs';
|
|
93
|
-
import 'luxon';
|
|
94
|
-
import '../NumberField/NumberField.mjs';
|
|
95
|
-
import '../Option/Option.mjs';
|
|
96
|
-
import '../../views/OverlayContentView.mjs';
|
|
97
|
-
import '../PasswordCreationField/PasswordCreationField.mjs';
|
|
98
|
-
import '../Popover/components/PopoverTrigger/PopoverTrigger.mjs';
|
|
99
|
-
import '../Popover/Popover.mjs';
|
|
100
|
-
import '../ProgressBar/ProgressBar.mjs';
|
|
101
|
-
import '../RadioGroup/RadioGroup.mjs';
|
|
102
|
-
import '../RadioGroup/components/Radio/Radio.mjs';
|
|
103
|
-
import '../RadioGroup/components/RadioButton/RadioButton.mjs';
|
|
104
|
-
import '../Rating/Rating.mjs';
|
|
105
|
-
import '../SearchField/SearchField.mjs';
|
|
106
|
-
import '../Section/Section.mjs';
|
|
107
|
-
import '../SegmentedControl/SegmentedControl.mjs';
|
|
108
|
-
import '../SegmentedControl/components/Segment/Segment.mjs';
|
|
109
|
-
import '../Select/Select.mjs';
|
|
110
|
-
import '../SettingsProvider/SettingsProvider.mjs';
|
|
111
|
-
import '../Slider/Slider.mjs';
|
|
112
|
-
import '../SuspenseTrigger/SuspenseTrigger.mjs';
|
|
113
|
-
import '../Switch/Switch.mjs';
|
|
114
|
-
import '../Tabs/Tabs.mjs';
|
|
115
|
-
import '../Tabs/components/Tab/context.mjs';
|
|
116
|
-
import '../TextArea/TextArea.mjs';
|
|
117
|
-
import '../TextField/TextField.mjs';
|
|
118
|
-
import '../TimeField/TimeField.mjs';
|
|
119
|
-
import '../TranslationProvider/TranslationProvider.mjs';
|
|
120
|
-
import 'react-truncate-inside';
|
|
121
11
|
|
|
122
12
|
const CartesianChart = (props) => {
|
|
123
|
-
const {
|
|
124
|
-
|
|
125
|
-
|
|
13
|
+
const { children, data, className, height, flexGrow, emptyView, ...rest } = props;
|
|
14
|
+
const { viewDimensions, ref: containerRef } = useChartClipRect();
|
|
15
|
+
const showEmptyView = !!((!data || data.length === 0) && emptyView);
|
|
16
|
+
const rootClassName = clsx(
|
|
17
|
+
styles.cartesianChart,
|
|
126
18
|
className,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const rootClassName = clsx(styles.cartesianChart, className);
|
|
133
|
-
const otherChildren = [];
|
|
134
|
-
const gridChildren = [];
|
|
135
|
-
Children.forEach(children, (child) => {
|
|
136
|
-
if (!child) return;
|
|
137
|
-
const element = child;
|
|
138
|
-
if (element.type === CartesianGrid) {
|
|
139
|
-
gridChildren.push(element);
|
|
140
|
-
} else {
|
|
141
|
-
otherChildren.push(element);
|
|
19
|
+
showEmptyView && styles.emptyView
|
|
20
|
+
);
|
|
21
|
+
const emptyElement = useMemo(() => {
|
|
22
|
+
if (isValidElement(emptyView)) {
|
|
23
|
+
return emptyView;
|
|
142
24
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const chartContainerRef = useRef(null);
|
|
146
|
-
const [viewDimensions, setViewDimensions] = useState(null);
|
|
147
|
-
useEffect(() => {
|
|
148
|
-
if (showEmptyView) {
|
|
149
|
-
const updateDimensions = () => {
|
|
150
|
-
const svg = chartContainerRef.current?.querySelector(
|
|
151
|
-
"svg"
|
|
152
|
-
);
|
|
153
|
-
if (!svg) return;
|
|
154
|
-
const clip = svg.querySelector("clipPath rect");
|
|
155
|
-
if (clip) {
|
|
156
|
-
const x = parseFloat(clip.getAttribute("x") ?? "0");
|
|
157
|
-
const y = parseFloat(clip.getAttribute("y") ?? "0");
|
|
158
|
-
const width = parseFloat(clip.getAttribute("width") ?? "0");
|
|
159
|
-
const height2 = parseFloat(clip.getAttribute("height") ?? "0");
|
|
160
|
-
setViewDimensions({ x, y, width, height: height2 });
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
updateDimensions();
|
|
164
|
-
const container = chartContainerRef.current;
|
|
165
|
-
const observer = new ResizeObserver(updateDimensions);
|
|
166
|
-
if (container) observer.observe(container);
|
|
167
|
-
return () => {
|
|
168
|
-
observer.disconnect();
|
|
169
|
-
};
|
|
25
|
+
if (!emptyView) {
|
|
26
|
+
return;
|
|
170
27
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
28
|
+
console.warn(
|
|
29
|
+
"CartesianChart: emptyView as a non-element is deprecated and will be removed in a future release. Please provide an element as emptyView."
|
|
30
|
+
);
|
|
31
|
+
return null;
|
|
32
|
+
}, [emptyView]);
|
|
33
|
+
return /* @__PURE__ */ jsx(Wrap, { if: height, children: /* @__PURE__ */ jsx("div", { style: { height, flex: flexGrow ? 1 : void 0 }, children: /* @__PURE__ */ jsx(
|
|
34
|
+
ResponsiveContainer,
|
|
174
35
|
{
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
{
|
|
188
|
-
data,
|
|
189
|
-
className: rootClassName,
|
|
190
|
-
...rest,
|
|
191
|
-
children: [
|
|
192
|
-
!showEmptyView && gridChildren,
|
|
193
|
-
otherChildren,
|
|
194
|
-
showEmptyView && viewDimensions && /* @__PURE__ */ jsx("foreignObject", { ...viewDimensions, children: /* @__PURE__ */ jsx("div", { className: styles.emptyViewContainer, children: /* @__PURE__ */ jsx(EmptyView, { data }) }) })
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
)
|
|
198
|
-
}
|
|
199
|
-
)
|
|
36
|
+
initialDimension: {
|
|
37
|
+
// fix warning on initial render
|
|
38
|
+
width: 1,
|
|
39
|
+
height: 1
|
|
40
|
+
},
|
|
41
|
+
width: height ? void 0 : "100%",
|
|
42
|
+
aspect: height ? void 0 : 3,
|
|
43
|
+
ref: containerRef,
|
|
44
|
+
children: /* @__PURE__ */ jsxs(ComposedChart, { data, className: rootClassName, ...rest, children: [
|
|
45
|
+
children,
|
|
46
|
+
showEmptyView && viewDimensions && /* @__PURE__ */ jsx("foreignObject", { ...viewDimensions, children: /* @__PURE__ */ jsx(DivView, { className: styles.emptyViewContainer, children: emptyElement }) })
|
|
47
|
+
] })
|
|
200
48
|
}
|
|
201
|
-
) });
|
|
49
|
+
) }) });
|
|
202
50
|
};
|
|
203
51
|
|
|
204
52
|
export { CartesianChart };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianChart.mjs","sources":["../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"CartesianChart.mjs","sources":["../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import { ComposedChart, ResponsiveContainer } from \"recharts\";\nimport React, {\n type ComponentProps,\n type FC,\n isValidElement,\n type PropsWithChildren,\n type ReactNode,\n useMemo,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport { useChartClipRect } from \"@/components/CartesianChart/hooks/useChartClipRect\";\nimport DivView from \"@/views/DivView\";\nimport Wrap from \"@/components/Wrap\";\n\n/** @deprecated Use a ReactNode instead */\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps\n extends\n Pick<\n ComponentProps<typeof ComposedChart>,\n \"data\" | \"className\" | \"syncId\" | \"syncMethod\"\n >,\n PropsWithChildren {\n height?: string;\n\n /** View that is provided when data is empty/undefined */\n emptyView?: ReactNode;\n\n /**\n * Allow the height controlling container to set flex-grow: 1. Can only be\n * used in combination with `height`\n */\n flexGrow?: boolean;\n}\n\n/** @flr-generate all */\nexport const CartesianChart: FC<CartesianChartProps> = (props) => {\n const { children, data, className, height, flexGrow, emptyView, ...rest } =\n props;\n\n const { viewDimensions, ref: containerRef } = useChartClipRect();\n\n const showEmptyView = !!((!data || data.length === 0) && emptyView);\n const rootClassName = clsx(\n styles.cartesianChart,\n className,\n showEmptyView && styles.emptyView,\n );\n\n const emptyElement = useMemo(() => {\n if (isValidElement(emptyView)) {\n return emptyView;\n }\n\n if (!emptyView) {\n return;\n }\n\n console.warn(\n \"CartesianChart: emptyView as a non-element is deprecated and will be removed in a future release. Please provide an element as emptyView.\",\n );\n return null;\n }, [emptyView]);\n\n return (\n <Wrap if={height}>\n <div style={{ height, flex: flexGrow ? 1 : undefined }}>\n <ResponsiveContainer\n initialDimension={{\n // fix warning on initial render\n width: 1,\n height: 1,\n }}\n width={height ? undefined : \"100%\"}\n aspect={height ? undefined : 3}\n ref={containerRef}\n >\n <ComposedChart data={data} className={rootClassName} {...rest}>\n {children}\n {showEmptyView && viewDimensions && (\n <foreignObject {...viewDimensions}>\n <DivView className={styles.emptyViewContainer}>\n {emptyElement}\n </DivView>\n </foreignObject>\n )}\n </ComposedChart>\n </ResponsiveContainer>\n </div>\n </Wrap>\n );\n};\n\nexport default CartesianChart;\n"],"names":[],"mappings":";;;;;;;;;AAwCO,MAAM,cAAA,GAA0C,CAAC,K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AAC,aAAA,EAAA,EAAc,IAAA,EAAY,SAAA,EAAW,aAAA,EAAgB,GAAG,IAAA,EACtD,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,QACA,aAAA,IAAiB,cAAA,oBAChB,GAAA,CAAC,eAAA,EAAA,EAAe,GAAG,cAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAW,MAAA,CAAO,kBAAA,EACxB,QAAA,EAAA,YAAA,EACH,CAAA,EACF;AAAA,OAAA,EAEJ;AAAA;AAAA,KAEJ,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
const cartesianChart = "flow--cartesian-chart";
|
|
4
4
|
const emptyViewContainer = "flow--cartesian-chart--empty-view-container";
|
|
5
|
+
const emptyView = "flow--cartesian-chart--empty-view";
|
|
5
6
|
const styles = {
|
|
6
7
|
cartesianChart: cartesianChart,
|
|
7
|
-
emptyViewContainer: emptyViewContainer
|
|
8
|
+
emptyViewContainer: emptyViewContainer,
|
|
9
|
+
emptyView: emptyView
|
|
8
10
|
};
|
|
9
11
|
|
|
10
|
-
export { cartesianChart, styles as default, emptyViewContainer };
|
|
12
|
+
export { cartesianChart, styles as default, emptyView, emptyViewContainer };
|
|
11
13
|
//# sourceMappingURL=CartesianChart.module.scss.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianChart.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartesianChart.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { useRef, useState, useEffect } from 'react';
|
|
4
|
+
import { useCallbackRef } from 'use-callback-ref';
|
|
5
|
+
|
|
6
|
+
const useChartClipRect = () => {
|
|
7
|
+
const observerRef = useRef(null);
|
|
8
|
+
const svgRef = useRef(null);
|
|
9
|
+
const [viewDimensions, setViewDimensions] = useState(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
return () => {
|
|
12
|
+
if (observerRef.current) {
|
|
13
|
+
observerRef.current.disconnect();
|
|
14
|
+
observerRef.current = null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}, []);
|
|
18
|
+
const attachContainerRef = useCallbackRef(
|
|
19
|
+
null,
|
|
20
|
+
(div) => {
|
|
21
|
+
if (observerRef.current) {
|
|
22
|
+
observerRef.current.disconnect();
|
|
23
|
+
observerRef.current = null;
|
|
24
|
+
}
|
|
25
|
+
const svg = div?.querySelector("svg") ?? null;
|
|
26
|
+
svgRef.current = svg;
|
|
27
|
+
if (!svg) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const clipRect = svg.querySelector(
|
|
31
|
+
"clipPath rect"
|
|
32
|
+
);
|
|
33
|
+
if (!clipRect) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const observer = new MutationObserver((mutations) => {
|
|
37
|
+
const newViewDimensions = mutations.reduce(
|
|
38
|
+
(acc, mutation) => {
|
|
39
|
+
if (mutation.type !== "attributes" || !mutation.attributeName) {
|
|
40
|
+
return acc;
|
|
41
|
+
}
|
|
42
|
+
const target = mutation.target;
|
|
43
|
+
const attr = mutation.attributeName;
|
|
44
|
+
const value = target.getAttribute(attr);
|
|
45
|
+
if (value) {
|
|
46
|
+
acc = {
|
|
47
|
+
...acc,
|
|
48
|
+
[attr]: value
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return acc;
|
|
52
|
+
},
|
|
53
|
+
viewDimensions ?? { x: "0", y: "0", width: "0", height: "0" }
|
|
54
|
+
);
|
|
55
|
+
setViewDimensions(newViewDimensions);
|
|
56
|
+
});
|
|
57
|
+
observer.observe(clipRect, {
|
|
58
|
+
attributes: true,
|
|
59
|
+
attributeFilter: ["x", "y", "width", "height"],
|
|
60
|
+
attributeOldValue: false,
|
|
61
|
+
childList: false,
|
|
62
|
+
subtree: false
|
|
63
|
+
});
|
|
64
|
+
observerRef.current = observer;
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
return { viewDimensions, ref: attachContainerRef };
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { useChartClipRect };
|
|
71
|
+
//# sourceMappingURL=useChartClipRect.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChartClipRect.mjs","sources":["../../../../../../../src/components/CartesianChart/hooks/useChartClipRect.ts"],"sourcesContent":["import { type SVGProps, useEffect, useRef, useState } from \"react\";\nimport { useCallbackRef } from \"use-callback-ref\";\n\n/** @internal * */\nexport type ViewDimensions = Pick<\n SVGProps<SVGForeignObjectElement>,\n \"x\" | \"y\" | \"width\" | \"height\"\n> | null;\n\n/** @internal * */\nexport const useChartClipRect = () => {\n const observerRef = useRef<MutationObserver>(null);\n const svgRef = useRef<SVGSVGElement>(null);\n\n const [viewDimensions, setViewDimensions] = useState<ViewDimensions>(null);\n\n useEffect(() => {\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n observerRef.current = null;\n }\n };\n }, []);\n\n const attachContainerRef = useCallbackRef(\n null,\n (div: HTMLDivElement | null) => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n observerRef.current = null;\n }\n\n const svg = div?.querySelector(\"svg\") ?? null;\n svgRef.current = svg;\n\n if (!svg) {\n return;\n }\n\n const clipRect = svg.querySelector(\n \"clipPath rect\",\n ) as SVGRectElement | null;\n if (!clipRect) {\n return;\n }\n\n const observer = new MutationObserver((mutations) => {\n const newViewDimensions: ViewDimensions = mutations.reduce(\n (acc, mutation) => {\n if (mutation.type !== \"attributes\" || !mutation.attributeName) {\n return acc;\n }\n\n const target = mutation.target as SVGRectElement;\n const attr = mutation.attributeName as keyof ViewDimensions;\n const value = target.getAttribute(attr);\n\n if (value) {\n acc = {\n ...acc,\n [attr]: value,\n };\n }\n\n return acc;\n },\n viewDimensions ?? { x: \"0\", y: \"0\", width: \"0\", height: \"0\" },\n );\n\n setViewDimensions(newViewDimensions);\n });\n\n observer.observe(clipRect, {\n attributes: true,\n attributeFilter: [\"x\", \"y\", \"width\", \"height\"],\n attributeOldValue: false,\n childList: false,\n subtree: false,\n });\n\n observerRef.current = observer;\n },\n );\n\n return { viewDimensions, ref: attachContainerRef };\n};\n"],"names":[],"mappings":";;;AAUO,MAAM,mBAAmB,MAAM;AACpC,EAAA,MAAM,WAAA,GAAc,OAAyB,IAAI,CAAA;AACjD,EAAA,MAAM,MAAA,GAAS,OAAsB,IAAI,CAAA;AAEzC,EAAA,MAAM,CAAC,cAAA,EAAgB,iBAAiB,CAAA,GAAI,SAAyB,IAAI,CAAA;AAEzE,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,OAAO,MAAM;AACX,MAAA,IAAI,YAAY,OAAA,EAAS;AACvB,QAAA,WAAA,CAAY,QAAQ,UAAA,EAAW;AAC/B,QAAA,WAAA,CAAY,OAAA,GAAU,IAAA;AAAA,MACxB;AAAA,IACF,CAAA;AAAA,EACF,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,MAAM,kBAAA,GAAqB,cAAA;AAAA,IACzB,IAAA;AAAA,IACA,CAAC,GAAA,KAA+B;AAC9B,MAAA,IAAI,YAAY,OAAA,EAAS;AACvB,QAAA,WAAA,CAAY,QAAQ,UAAA,EAAW;AAC/B,QAAA,WAAA,CAAY,OAAA,GAAU,IAAA;AAAA,MACxB;AAEA,MAAA,MAAM,GAAA,GAAM,GAAA,EAAK,aAAA,CAAc,KAAK,CAAA,IAAK,IAAA;AACzC,MAAA,MAAA,CAAO,OAAA,GAAU,GAAA;AAEjB,MAAA,IAAI,CAAC,GAAA,EAAK;AACR,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,WAAW,GAAA,CAAI,aAAA;AAAA,QACnB;AAAA,OACF;AACA,MAAA,IAAI,CAAC,QAAA,EAAU;AACb,QAAA;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=> {
|
|
|
26
26
|
allowHorizontalResize,
|
|
27
27
|
showCharacterCount,
|
|
28
28
|
className,
|
|
29
|
+
onChange,
|
|
29
30
|
...rest
|
|
30
31
|
} = useControlledHostValueProps(props);
|
|
31
32
|
const [charactersCount, setCharactersCount] = useState(
|
|
@@ -53,8 +54,8 @@ const TextArea = flowComponent("TextArea", (props) => {
|
|
|
53
54
|
if (showCharacterCount) {
|
|
54
55
|
setCharactersCount(v.length);
|
|
55
56
|
}
|
|
56
|
-
if (
|
|
57
|
-
|
|
57
|
+
if (onChange) {
|
|
58
|
+
onChange(v);
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
61
|
const translation = useLocalizedStringFormatter(locales);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.mjs","sources":["../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport { type PropsWithChildren, useEffect, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\n\nexport interface TextAreaProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\" | \"aria-hidden\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowResize?: boolean | \"horizontal\" | \"vertical\";\n /** @deprecated Use `allowResize` instead. */\n allowHorizontalResize?: boolean;\n /** @deprecated Use `allowResize` instead. */\n allowVerticalResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n let { allowResize } = props;\n if (allowVerticalResize) {\n allowResize = \"vertical\";\n } else if (allowHorizontalResize) {\n allowResize = \"horizontal\";\n }\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const inputClassName = clsx(\n styles.input,\n typeof allowResize === \"boolean\" && allowResize ? styles.resize : null,\n allowResize === \"horizontal\"\n ? styles.horizontalResize\n : allowResize === \"vertical\"\n ? styles.verticalResize\n : null,\n );\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (
|
|
1
|
+
{"version":3,"file":"TextArea.mjs","sources":["../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport { type PropsWithChildren, useEffect, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\n\nexport interface TextAreaProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\" | \"aria-hidden\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowResize?: boolean | \"horizontal\" | \"vertical\";\n /** @deprecated Use `allowResize` instead. */\n allowHorizontalResize?: boolean;\n /** @deprecated Use `allowResize` instead. */\n allowVerticalResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\n onChange,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n let { allowResize } = props;\n if (allowVerticalResize) {\n allowResize = \"vertical\";\n } else if (allowHorizontalResize) {\n allowResize = \"horizontal\";\n }\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const inputClassName = clsx(\n styles.input,\n typeof allowResize === \"boolean\" && allowResize ? styles.resize : null,\n allowResize === \"horizontal\"\n ? styles.horizontalResize\n : allowResize === \"vertical\"\n ? styles.verticalResize\n : null,\n );\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales);\n\n const charactersCountDescription = translation.format(\"textArea.characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n const localRef = useObjectRef(ref);\n\n const getHeight = (rows: number) => {\n return `calc(var(--line-height--m) * ${rows} + (var(--form-control--padding-y) * 2))`;\n };\n\n const [resized, setResized] = useState(false);\n\n const autoResizable = rows !== autoResizeMaxRows;\n\n const verticallyResizable =\n allowResize && (!autoResizable || (autoResizable && resized));\n\n useEffect(() => {\n const textarea = localRef.current;\n if (!textarea) return;\n\n const startHeight = textarea.offsetHeight;\n let tracking = false;\n\n const handleMouseDown = () => {\n tracking = true;\n };\n\n const handleMouseMove = () => {\n if (!tracking || resized) return;\n\n const currentHeight = textarea.offsetHeight;\n\n if (currentHeight !== startHeight) {\n setResized(true);\n tracking = false;\n }\n };\n\n const handleMouseUp = () => {\n tracking = false;\n };\n\n window.addEventListener(\"mousedown\", handleMouseDown);\n window.addEventListener(\"mousemove\", handleMouseMove);\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mousedown\", handleMouseDown);\n window.removeEventListener(\"mousemove\", handleMouseMove);\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [resized]);\n\n const updateHeight = () => {\n if (localRef.current && autoResizable && !verticallyResizable) {\n // https://stackoverflow.com/a/60795884\n localRef.current.style.height = \"0px\";\n const scrollHeight = localRef.current.scrollHeight;\n // + 2 to add border height\n localRef.current.style.height = scrollHeight + 2 + \"px\";\n }\n };\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <Aria.TextArea\n rows={rows}\n aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n onChange={updateHeight}\n style={{\n minHeight: getHeight(rows),\n maxHeight: verticallyResizable\n ? undefined\n : getHeight(autoResizeMaxRows),\n }}\n />\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n <FieldEr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,wBAAA,GAAA,CAAC,4BAA0B,QAAA,EAAS,CAAA;AAAA,wBACpC,GAAA;AAAA,UAAC,IAAA,CAAK,QAAA;AAAA,UAAL;AAAA,YACC,IAAA;AAAA,YACA,aAAA,EAAa,MAAM,aAAa,CAAA;AAAA,YAChC,WAAA;AAAA,YACA,SAAA,EAAW,cAAA;AAAA,YACX,GAAA,EAAK,QAAA;AAAA,YACL,QAAA,EAAU,YAAA;AAAA,YACV,KAAA,EAAO;AAAA,cACL,SAAA,EAAW,UAAU,IAAI,CAAA;AAAA,cACzB,SAAA,EAAW,mBAAA,GACP,MAAA,GACA,SAAA,CAAU,iBAAiB;AAAA;AACjC;AAAA,SACF;AAAA,QACC,kBAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,0BAAA,EAA2B,CAAA;AAAA,4BAE/C,cAAA,EAAA,EAAe;AAAA,OAAA,EAClB;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
|
|
@@ -30,6 +30,7 @@ const TextField = flowComponent("TextField", (props) => {
|
|
|
30
30
|
ref,
|
|
31
31
|
type: typeFromProps,
|
|
32
32
|
children,
|
|
33
|
+
onChange,
|
|
33
34
|
...rest
|
|
34
35
|
} = useControlledHostValueProps(props);
|
|
35
36
|
const [charactersCount, setCharactersCount] = useState(
|
|
@@ -56,8 +57,8 @@ const TextField = flowComponent("TextField", (props) => {
|
|
|
56
57
|
if (showCharacterCount) {
|
|
57
58
|
setCharactersCount(v.length);
|
|
58
59
|
}
|
|
59
|
-
if (
|
|
60
|
-
|
|
60
|
+
if (onChange) {
|
|
61
|
+
onChange(v);
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
64
|
const translation = useLocalizedStringFormatter(locales);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.mjs","sources":["../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./TextField.module.scss\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\n\nexport interface TextFieldProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.InputProps, \"placeholder\">,\n FlowComponentProps<HTMLInputElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const {\n className,\n showCharacterCount,\n form,\n placeholder,\n ref,\n type: typeFromProps,\n children,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const [type, setType] = useState(typeFromProps);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const propsContext: PropsContext = {\n Button: {\n className: styles.button,\n variant: \"plain\",\n color: \"secondary\",\n tunnelId: \"button\",\n },\n ...fieldPropsContext,\n };\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (
|
|
1
|
+
{"version":3,"file":"TextField.mjs","sources":["../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./TextField.module.scss\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\n\nexport interface TextFieldProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.InputProps, \"placeholder\">,\n FlowComponentProps<HTMLInputElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const {\n className,\n showCharacterCount,\n form,\n placeholder,\n ref,\n type: typeFromProps,\n children,\n onChange,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const [type, setType] = useState(typeFromProps);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const propsContext: PropsContext = {\n Button: {\n className: styles.button,\n variant: \"plain\",\n color: \"secondary\",\n tunnelId: \"button\",\n },\n ...fieldPropsContext,\n };\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales);\n\n const charactersCountDescription = translation.format(\n \"textField.characters\",\n {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n },\n );\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n type={type}\n >\n <TunnelProvider>\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>\n {children}\n <div className={styles.inputContainer}>\n <Aria.Input\n form={form}\n placeholder={placeholder}\n className={styles.input}\n ref={ref}\n />\n <TunnelExit id=\"button\" />\n {typeFromProps === \"password\" && (\n <Button\n color=\"secondary\"\n variant=\"plain\"\n className={styles.button}\n onPress={() =>\n setType(type === \"password\" ? \"text\" : \"password\")\n }\n aria-label={translation.format(\n `textField.password.${type === \"password\" ? \"show\" : \"hide\"}`,\n )}\n >\n {type === \"password\" ? <IconShow /> : <IconHide />}\n </Button>\n )}\n </div>\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </TunnelProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,SAAA,GAAY,aAAA,CAAc,WAAA,EAAa,CAAC,KAAA,KAAU;AAC7D,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,kBAAA;AAAA,IACA,IAAA;AAAA,IACA,WAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA,EAAM,aAAA;AAAA,IACN,QAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,4BAA4B,KAAK,CAAA;AAErC,EAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GAAI,QAAA;AAAA,IAC5C,KAAA,CAAM,YAAA,EAAc,MAAA,IAAU,KAAA,CAAM,OAAO,MAAA,IAAU;AAAA,GACvD;AAEA,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,aAAa,CAAA;AAE9C,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,G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EACrB,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,IAAA,CAAK,KAAA;AAAA,cAAL;AAAA,gBACC,IAAA;AAAA,gBACA,WAAA;AAAA,gBACA,WAAW,MAAA,CAAO,KAAA;AAAA,gBAClB;AAAA;AAAA,aACF;AAAA,4BACA,GAAA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAG,QAAA,EAAS,CAAA;AAAA,YACvB,kBAAkB,UAAA,oBACjB,GAAA;AAAA,cAAC,MAAA;AAAA,cAAA;AAAA,gBACC,KAAA,EAAM,WAAA;AAAA,gBACN,OAAA,EAAQ,OAAA;AAAA,gBACR,WAAW,MAAA,CAAO,MAAA;AAAA,gBAClB,SAAS,MACP,OAAA,CAAQ,IAAA,KAAS,UAAA,GAAa,SAAS,UAAU,CAAA;AAAA,gBAEnD,cAAY,WAAA,CAAY,MAAA;AAAA,kBACtB,CAAA,mBAAA,EAAsB,IAAA,KAAS,UAAA,GAAa,MAAA,GAAS,MAAM,CAAA;AAAA,iBAC7D;AAAA,gBAEC,mBAAS,UAAA,mBAAa,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,uBAAM,QAAA,EAAA,EAAS;AAAA;AAAA;AAClD,WAAA,EAEJ,CAAA;AAAA,UACC,kBAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,0BAAA,EAA2B;AAAA,SAAA,EAElD,CAAA;AAAA,4BACC,cAAA,EAAA,EAAe;AAAA,OAAA,EAClB,CAAA,EACF;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
|
|
@@ -145,6 +145,8 @@ import './components/src/components/Badge/Badge.mjs';
|
|
|
145
145
|
import 'react-aria-components';
|
|
146
146
|
export { BrowserOnly } from './components/src/components/BrowserOnly/BrowserOnly.mjs';
|
|
147
147
|
import 'recharts';
|
|
148
|
+
import 'use-callback-ref';
|
|
149
|
+
import './components/src/views/DivView.mjs';
|
|
148
150
|
import './components/src/lib/tokens/CategoricalColors.mjs';
|
|
149
151
|
import './components/src/components/Text/Text.mjs';
|
|
150
152
|
import '@mittwald/react-use-promise';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flr-universal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flr-universal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { ComposedChart } from 'recharts';
|
|
2
|
+
import { ComponentProps, FC, PropsWithChildren, ReactNode } from 'react';
|
|
3
|
+
/** @deprecated Use a ReactNode instead */
|
|
3
4
|
export interface CartesianChartEmptyViewProps {
|
|
4
|
-
data?: ComponentProps<typeof
|
|
5
|
+
data?: ComponentProps<typeof ComposedChart>["data"];
|
|
5
6
|
}
|
|
6
|
-
export interface CartesianChartProps extends Pick<ComponentProps<typeof
|
|
7
|
+
export interface CartesianChartProps extends Pick<ComponentProps<typeof ComposedChart>, "data" | "className" | "syncId" | "syncMethod">, PropsWithChildren {
|
|
7
8
|
height?: string;
|
|
8
9
|
/** View that is provided when data is empty/undefined */
|
|
9
|
-
emptyView?:
|
|
10
|
+
emptyView?: ReactNode;
|
|
10
11
|
/**
|
|
11
12
|
* Allow the height controlling container to set flex-grow: 1. Can only be
|
|
12
13
|
* used in combination with `height`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../../../src/components/CartesianChart/CartesianChart.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../../../src/components/CartesianChart/CartesianChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuB,MAAM,UAAU,CAAC;AAC9D,OAAc,EACZ,KAAK,cAAc,EACnB,KAAK,EAAE,EAEP,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAOf,0CAA0C;AAC1C,MAAM,WAAW,4BAA4B;IAC3C,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,mBACf,SACE,IAAI,CACF,cAAc,CAAC,OAAO,aAAa,CAAC,EACpC,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,YAAY,CAC/C,EACD,iBAAiB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,yDAAyD;IACzD,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAwB;AACxB,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAuDlD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChartClipRect.d.ts","sourceRoot":"","sources":["../../../../../src/components/CartesianChart/hooks/useChartClipRect.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAM/E,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAMpE,M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AO,CAAC;IAChC,6CAA6C;IAC7C,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAwB;AACxB,eAAO,MAAM,QAAQ,uGAuJnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAazD,MAAM,WAAW,cACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,EACxD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,EACpC,kBAAkB,CAAC,gBAAgB,CAAC;IACtC,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAazD,MAAM,WAAW,cACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,EACxD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,EACpC,kBAAkB,CAAC,gBAAgB,CAAC;IACtC,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,qGAsGpB,CAAC;AAEH,eAAe,SAAS,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.676",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@internationalized/string-compiler": "^3.2.6",
|
|
60
60
|
"@mittwald/password-tools-js": "3.0.0-alpha.18",
|
|
61
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
61
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.676",
|
|
62
62
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
63
63
|
"@react-aria/form": "^3.1.3",
|
|
64
64
|
"@react-aria/live-announcer": "^3.4.4",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"@faker-js/faker": "^10.2.0",
|
|
105
105
|
"@internationalized/date": "^3.10.1",
|
|
106
106
|
"@mittwald/flow-core": "",
|
|
107
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
107
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.676",
|
|
108
108
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
109
109
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
110
110
|
"@mittwald/typescript-config": "",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"optional": true
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "ddd02d9fa245a42b905defb07511d91d8e516afa"
|
|
176
176
|
}
|