@aivenio/aquarium 1.41.0 → 1.43.0
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/_variables.scss +1 -1
- package/dist/charts.cjs +176 -18
- package/dist/charts.mjs +174 -18
- package/dist/src/charts/AreaChart/AreaChart.d.ts +12 -0
- package/dist/src/charts/AreaChart/AreaChart.js +46 -0
- package/dist/src/charts/BarChart/BarChart.d.ts +2 -0
- package/dist/src/charts/BarChart/BarChart.js +6 -1
- package/dist/src/charts/LineChart/LineChart.d.ts +12 -0
- package/dist/src/charts/LineChart/LineChart.js +39 -0
- package/dist/src/charts/Reference/Reference.d.ts +10 -0
- package/dist/src/charts/Reference/Reference.js +9 -0
- package/dist/src/charts/Tooltip/Tooltip.d.ts +6 -3
- package/dist/src/charts/Tooltip/Tooltip.js +19 -7
- package/dist/src/charts/index.d.ts +3 -0
- package/dist/src/charts/index.js +4 -1
- package/dist/src/charts/lib/utils.d.ts +1 -1
- package/dist/src/charts/lib/utils.js +3 -2
- package/dist/src/molecules/Alert/Alert.js +14 -9
- package/dist/src/molecules/Box/Box.d.ts +6 -6
- package/dist/src/molecules/Popover/PopoverOverlay.d.ts +1 -1
- package/dist/styles.css +47 -14
- package/dist/system.cjs +26 -15
- package/dist/system.mjs +35 -24
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +2 -2
@@ -0,0 +1,39 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Line as _Line, LineChart as _LineChart } from 'recharts';
|
3
|
+
import { Axis, renderXAxis, renderXTimeAxis, renderYAxis } from '../../../src/charts/Axis/Axis';
|
4
|
+
import { ResponsiveContainer } from '../../../src/charts/Container/Container';
|
5
|
+
import { CartesianGrid } from '../../../src/charts/Grid/Grid';
|
6
|
+
import { getDisplayName } from '../../../src/charts/lib/utils';
|
7
|
+
const renderChildren = (props) => {
|
8
|
+
return React.Children.map(props.children, (child) => {
|
9
|
+
switch (getDisplayName(child.type)) {
|
10
|
+
case Axis.XAxis.displayName: {
|
11
|
+
return renderXAxis(child, props);
|
12
|
+
}
|
13
|
+
case Axis.XAxis.Time.displayName: {
|
14
|
+
return renderXTimeAxis(child, props);
|
15
|
+
}
|
16
|
+
case Axis.YAxis.displayName: {
|
17
|
+
return renderYAxis(child, props);
|
18
|
+
}
|
19
|
+
default: {
|
20
|
+
return child;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
});
|
24
|
+
};
|
25
|
+
export const LineChart = (props) => {
|
26
|
+
const { data } = props;
|
27
|
+
return (React.createElement(ResponsiveContainer, null,
|
28
|
+
React.createElement(_LineChart, { width: 500, height: 500, data: data, style: { stroke: '#fff', strokeWidth: 1 }, margin: {
|
29
|
+
top: 20,
|
30
|
+
right: 30,
|
31
|
+
left: 20,
|
32
|
+
bottom: 5,
|
33
|
+
} },
|
34
|
+
React.createElement(CartesianGrid, null),
|
35
|
+
renderChildren(props))));
|
36
|
+
};
|
37
|
+
export const Line = Object.assign((props) => (React.createElement(_Line, Object.assign({ type: "monotone" }, props, { strokeWidth: 2, isAnimationActive: false, dot: false }))), _Line);
|
38
|
+
LineChart.Line = Line;
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTGluZUNoYXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NoYXJ0cy9MaW5lQ2hhcnQvTGluZUNoYXJ0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUM7QUFDMUIsT0FBTyxFQUFFLElBQUksSUFBSSxLQUFLLEVBQUUsU0FBUyxJQUFJLFVBQVUsRUFBa0IsTUFBTSxVQUFVLENBQUM7QUFFbEYsT0FBTyxFQUFFLElBQUksRUFBRSxXQUFXLEVBQUUsZUFBZSxFQUFFLFdBQVc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ElBQUksRUFBRSxHQUFHLEtBQUssQ0FBQztJQUN2QixPQUFPLENBQ0wsb0JBQUMsbUJBQW1CO1FBQ2xCLG9CQUFDLFVBQVUsSUFDVCxLQUFLLEVBQUUsR0FBRyxFQUNWLE1BQU0sRUFBRSxHQUFHLEVBQ1gsSUFBSSxFQUFFLElBQUksRUFDVixLQUFLLEVBQUUsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLFdBQVcsRUFBRSxDQUFDLEVBQUUsRUFDekMsTUFBTSxFQUFFO2dCQUNOLEdBQUcsRUFBRSxFQUFFO2dCQUNQLEtBQUssRUFBRSxFQUFFO2dCQUNULElBQUksRUFBRSxFQUFFO2dCQUNSLE1BQU0sRUFBRSxDQUFDO2FBQ1Y7WUFFRCxvQkFBQyxhQUFhLE9BQUc7WUFDaEIsY0FBYyxDQUFDLEtBQUssQ0FBQyxDQUNYLENBQ08sQ0FDdkIsQ0FBQztBQUNKLENBQUMsQ0FBQztBQUVGLE1BQU0sQ0FBQyxNQUFNLElBQUksR0FBRyxNQUFNLENBQUMsTUFBTSxDQUMvQixDQUFDLEtBQTZCLEVBQUUsRUFBRSxDQUFDLENBQ2pDLG9CQUFDLEtBQUssa0JBQUMsSUFBSSxFQUFDLFVBQVUsSUFBSyxLQUFLLElBQUUsV0FBVyxFQUFFLENBQUMsRUFBRSxpQkFBaUIsRUFBRSxLQUFLLEVBQUUsR0FBRyxFQUFFLEtBQUssSUFBSSxDQUMzRixFQUNELEtBQUssQ0FDTixDQUFDO0FBQ0YsU0FBUyxDQUFDLElBQUksR0FBRyxJQUFJLENBQUMifQ==
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { type ReferenceAreaProps, ReferenceLine as _ReferenceLine, type ReferenceLineProps } from 'recharts';
|
3
|
+
declare type ComposedReference = {
|
4
|
+
Area: typeof ReferenceArea;
|
5
|
+
Line: typeof ReferenceLine;
|
6
|
+
};
|
7
|
+
declare const ReferenceLine: ((props: Omit<ReferenceLineProps, 'ref'>) => React.JSX.Element) & typeof _ReferenceLine;
|
8
|
+
declare const ReferenceArea: ((props: Omit<ReferenceAreaProps, 'ref'>) => React.JSX.Element) & typeof _ReferenceLine;
|
9
|
+
export declare const Reference: ComposedReference;
|
10
|
+
export {};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ReferenceArea as _ReferenceArea, ReferenceLine as _ReferenceLine, } from 'recharts';
|
3
|
+
const ReferenceLine = Object.assign((props) => React.createElement(_ReferenceLine, Object.assign({}, props, { strokeDasharray: "9 3", strokeWidth: 2 })), _ReferenceLine);
|
4
|
+
const ReferenceArea = Object.assign((props) => React.createElement(_ReferenceArea, Object.assign({}, props, { strokeWidth: 0, fillOpacity: 0.1 })), _ReferenceLine);
|
5
|
+
export const Reference = {
|
6
|
+
Line: ReferenceLine,
|
7
|
+
Area: ReferenceArea,
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVmZXJlbmNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NoYXJ0cy9SZWZlcmVuY2UvUmVmZXJlbmNlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUM7QUFDMUIsT0FBTyxFQUNMLGFBQWEsSUFBSSxjQUFjLEVBRS9CLGFBQWEsSUFBSSxjQUFjLEdBRWhDLE1BQU0sVUFBVSxDQUFDO0FBT2xCLE1BQU0sYUFBYSxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQ2pDLENBQUMsS0FBc0MsRUFBRSxFQUFFLENBQUMsb0JBQUMsY0FBYyxvQkFBSyxLQUFLLElBQUUsZUFBZSxFQUFDLEtBQUssRUFBQyxXQUFXLEVBQUUsQ0FBQyxJQUFJLEVBQy9HLGNBQWMsQ0FDZixDQUFDO0FBRUYsTUFBTSxhQUFhLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FDakMsQ0FBQyxLQUFzQyxFQUFFLEVBQUUsQ0FBQyxvQkFBQyxjQUFjLG9CQUFLLEtBQUssSUFBRSxXQUFXLEVBQUUsQ0FBQyxFQUFFLFdBQVcsRUFBRSxHQUFHLElBQUksRUFDM0csY0FBYyxDQUNmLENBQUM7QUFFRixNQUFNLENBQUMsTUFBTSxTQUFTLEdBQXNCO0lBQzFDLElBQUksRUFBRSxhQUFhO0lBQ25CLElBQUksRUFBRSxhQUFhO0NBQ3BCLENBQUMifQ==
|
@@ -1,4 +1,7 @@
|
|
1
|
-
import { Tooltip as _Tooltip } from 'recharts';
|
1
|
+
import { DefaultTooltipContent, Tooltip as _Tooltip } from 'recharts';
|
2
|
+
export type { TooltipProps } from 'recharts';
|
3
|
+
declare type ComposedTooltip = {
|
4
|
+
DefaultContent: typeof DefaultTooltipContent;
|
5
|
+
};
|
2
6
|
declare type TooltipComponent = typeof _Tooltip;
|
3
|
-
export declare const Tooltip: TooltipComponent;
|
4
|
-
export {};
|
7
|
+
export declare const Tooltip: ComposedTooltip & TooltipComponent;
|
@@ -1,9 +1,21 @@
|
|
1
|
-
import { Tooltip as _Tooltip } from 'recharts';
|
2
|
-
|
3
|
-
|
1
|
+
import { DefaultTooltipContent, Tooltip as _Tooltip } from 'recharts';
|
2
|
+
const contentStyle = {
|
3
|
+
boxShadow: 'var(--aquarium-box-shadow-8dp)',
|
4
|
+
background: '#fff',
|
5
|
+
};
|
6
|
+
const itemStyle = {
|
7
|
+
display: 'flex',
|
8
|
+
paddingTop: '2px',
|
9
|
+
paddingBottom: '2px',
|
10
|
+
};
|
11
|
+
export const Tooltip = Object.assign(_Tooltip, {
|
12
|
+
DefaultContent: DefaultTooltipContent,
|
13
|
+
});
|
14
|
+
Tooltip.defaultProps = Object.assign({}, _Tooltip.defaultProps, {
|
15
|
+
separator: '',
|
4
16
|
isAnimationActive: false,
|
5
|
-
contentStyle
|
6
|
-
itemStyle
|
7
|
-
cursor:
|
17
|
+
contentStyle,
|
18
|
+
itemStyle,
|
19
|
+
cursor: { stroke: 'var(--aquarium-colors-grey-70)', strokeDasharray: '5' },
|
8
20
|
});
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVG9vbHRpcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jaGFydHMvVG9vbHRpcC9Ub29sdGlwLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUscUJBQXFCLEVBQUUsT0FBTyxJQUFJLFFBQVEsRUFBRSxNQUFNLFVBQVUsQ0FBQztBQVV0RSxNQUFNLFlBQVksR0FBd0I7SUFDeEMsU0FBUyxFQUFFLGdDQUFnQztJQUMzQyxVQUFVLEVBQUUsTUFBTTtDQUNuQixDQUFDO0FBRUYsTUFBTSxTQUFTLEdBQXdCO0lBQ3JDLE9BQU8sRUFBRSxNQUFNO0lBQ2YsVUFBVSxFQUFFLEtBQUs7SUFDakIsYUFBYSxFQUFFLEtBQUs7Q0FDckIsQ0FBQztBQUVGLE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBdUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxRQUFRLEVBQUU7SUFDakYsY0FBYyxFQUFFLHFCQUFxQjtDQUN0QyxDQUFDLENBQUM7QUFFSCxPQUFPLENBQUMsWUFBWSxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUMsRUFBRSxFQUFFLFFBQVEsQ0FBQyxZQUFZLEVBQUU7SUFDOUQsU0FBUyxFQUFFLEVBQUU7SUFDYixpQkFBaUIsRUFBRSxLQUFLO0lBQ3hCLFlBQVk7SUFDWixTQUFTO0lBQ1QsTUFBTSxFQUFFLEVBQUUsTUFBTSxFQUFFLGdDQUFnQyxFQUFFLGVBQWUsRUFBRSxHQUFHLEVBQUU7Q0FDM0UsQ0FBQyxDQUFDIn0=
|
@@ -1,7 +1,10 @@
|
|
1
|
+
export * from './AreaChart/AreaChart';
|
1
2
|
export * from './Axis/Axis';
|
2
3
|
export * from './BarChart/BarChart';
|
3
4
|
export * from './Container/Container';
|
4
5
|
export * from './Grid/Grid';
|
5
6
|
export * from './lib/timeIntervals';
|
6
7
|
export * from './lib/utils';
|
8
|
+
export * from './LineChart/LineChart';
|
9
|
+
export * from './Reference/Reference';
|
7
10
|
export * from './Tooltip/Tooltip';
|
package/dist/src/charts/index.js
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
+
export * from './AreaChart/AreaChart';
|
1
2
|
export * from './Axis/Axis';
|
2
3
|
export * from './BarChart/BarChart';
|
3
4
|
export * from './Container/Container';
|
4
5
|
export * from './Grid/Grid';
|
5
6
|
export * from './lib/timeIntervals';
|
6
7
|
export * from './lib/utils';
|
8
|
+
export * from './LineChart/LineChart';
|
9
|
+
export * from './Reference/Reference';
|
7
10
|
export * from './Tooltip/Tooltip';
|
8
|
-
//# sourceMappingURL=data:application/json;base64,
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY2hhcnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsbUJBQW1CLENBQUMifQ==
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type XAxisProps } from '../../../src/charts/Axis/Axis';
|
2
2
|
export declare type ChartProps = {
|
3
|
-
data
|
3
|
+
data?: Array<Record<string, unknown>>;
|
4
4
|
};
|
5
5
|
export declare const getDisplayName: (Comp: React.ComponentType | string) => string;
|
6
6
|
export declare const getXAxisTicks: ({ dataKey, ticks }: XAxisProps, chartProps: ChartProps) => Array<number | string> | undefined;
|
@@ -13,12 +13,13 @@ export const getDisplayName = (Comp) => {
|
|
13
13
|
};
|
14
14
|
const isDateArray = (arr) => arr.every(isDate);
|
15
15
|
export const getXAxisTicks = ({ dataKey, ticks }, chartProps) => {
|
16
|
+
var _a;
|
16
17
|
// Either ticks are not provided or we don't have to process them.
|
17
18
|
if (!ticks || isArray(ticks)) {
|
18
19
|
return ticks !== null && ticks !== void 0 ? ticks : undefined;
|
19
20
|
}
|
20
21
|
// Extract x-axis values and interpolate tick values from them if they all are dates.
|
21
|
-
const xValues = chartProps.data.map((datum) => typeof dataKey === 'function' ? dataKey(datum) : dataKey ? datum[dataKey] : undefined);
|
22
|
+
const xValues = ((_a = chartProps.data) !== null && _a !== void 0 ? _a : []).map((datum) => typeof dataKey === 'function' ? dataKey(datum) : dataKey ? datum[dataKey] : undefined);
|
22
23
|
if (!isDateArray(xValues)) {
|
23
24
|
// eslint-disable-next-line no-console
|
24
25
|
console.warn('Time intervals can only be used with date values. Please make sure that `dataKey` prop refers to a prop type of `Date`.');
|
@@ -30,4 +31,4 @@ export const getXAxisTicks = ({ dataKey, ticks }, chartProps) => {
|
|
30
31
|
.ticks(ticks)
|
31
32
|
.map((v) => v.valueOf());
|
32
33
|
};
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uL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JLG1DQUFJLEVBQUUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQ3BELE9BQU8sT0FBTyxLQUFLLFVBQVUsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUyxDQUN0RixDQUFDO0lBRUYsSUFBSSxDQUFDLFdBQVcsQ0FBQyxPQUFPLENBQUMsRUFBRTtRQUN6QixzQ0FBc0M7UUFDdEMsT0FBTyxDQUFDLElBQUksQ0FDVix5SEFBeUgsQ0FDMUgsQ0FBQztRQUNGLE9BQU8sU0FBUyxDQUFDO0tBQ2xCO0lBRUQsTUFBTSxDQUFDLEdBQUcsR0FBRyxJQUFJLElBQUksRUFBRSxFQUFFLEdBQUcsR0FBRyxJQUFJLElBQUksRUFBRSxDQUFDLEdBQUcsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQzdELE9BQU8sU0FBUyxFQUFFO1NBQ2YsTUFBTSxDQUFDLENBQUMsR0FBRyxFQUFFLEdBQUcsQ0FBQyxDQUFDO1NBQ2xCLEtBQUssQ0FBQyxLQUFLLENBQUM7U0FDWixHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDO0FBQzdCLENBQUMsQ0FBQyJ9
|
@@ -1,14 +1,19 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { useId } from 'react-aria';
|
2
3
|
import omit from 'lodash/omit';
|
3
4
|
import { Button } from '../../../src/molecules/Button/Button';
|
4
5
|
import { Alert as AlertBase } from '../../../src/atoms/Alert/Alert';
|
5
6
|
import { isLink } from '../../../src/utils/link';
|
6
|
-
export const Alert = ({ description, type, title, onDismiss, children, action }) =>
|
7
|
-
|
8
|
-
|
9
|
-
React.createElement(AlertBase
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
export const Alert = ({ description, type, title, onDismiss, children, action }) => {
|
8
|
+
const descriptionID = useId();
|
9
|
+
const titleID = useId();
|
10
|
+
return (React.createElement(AlertBase, { className: "Aquarium-Alert", type: type, dense: Boolean(title), "aria-describedby": descriptionID, "aria-labelledby": title ? titleID : undefined },
|
11
|
+
React.createElement(AlertBase.Icon, { type: type, dense: Boolean(title) }),
|
12
|
+
title && React.createElement(AlertBase.Title, { id: titleID }, title),
|
13
|
+
React.createElement(AlertBase.Description, { id: descriptionID }, children || description),
|
14
|
+
action && (React.createElement(AlertBase.Actions, null,
|
15
|
+
!isLink(action) && (React.createElement(Button.Ghost, Object.assign({ dense: true }, omit(action, 'text')), action.text)),
|
16
|
+
isLink(action) && (React.createElement(Button.ExternalLink, Object.assign({ dense: true, kind: "ghost" }, omit(action, 'text')), action.text)))),
|
17
|
+
onDismiss && React.createElement(AlertBase.Dismiss, { onClick: onDismiss })));
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWxlcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbW9sZWN1bGVzL0FsZXJ0L0FsZXJ0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUM7QUFDMUIsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFlBQVksQ0FBQztBQUNuQyxPQUFPLElBQUksTUFBTSxhQUFhLENBQUM7QUFFL0IsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBRXJELE9BQU8sRUFBRSxLQUFLLElBQUksU0FBUyxFQUFrQixNQUFNLHVCQUF1QixDQUFDO0FBRTNFLE9BQU8sRU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MsSUFBSSxDQUNDLENBQ2hCO1lBQ0EsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQ2pCLG9CQUFDLE1BQU0sQ0FBQyxZQUFZLGtCQUFDLEtBQUssUUFBQyxJQUFJLEVBQUMsT0FBTyxJQUFLLElBQUksQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLEdBQzdELE1BQU0sQ0FBQyxJQUFJLENBQ1EsQ0FDdkIsQ0FDaUIsQ0FDckI7UUFDQSxTQUFTLElBQUksb0JBQUMsU0FBUyxDQUFDLE9BQU8sSUFBQyxPQUFPLEVBQUUsU0FBUyxHQUFJLENBQzdDLENBQ2IsQ0FBQztBQUNKLENBQUMsQ0FBQyJ9
|
@@ -45,10 +45,10 @@ export declare const Box: {
|
|
45
45
|
spaceX?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | undefined;
|
46
46
|
spaceY?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | undefined;
|
47
47
|
backgroundColor?: "error-0" | "error-100" | "error-5" | "error-10" | "error-20" | "error-30" | "error-40" | "error-50" | "error-60" | "error-70" | "error-80" | "error-90" | "grey-0" | "grey-100" | "grey-5" | "grey-10" | "grey-20" | "grey-30" | "grey-40" | "grey-50" | "grey-60" | "grey-70" | "grey-80" | "grey-90" | "info-0" | "info-100" | "info-5" | "info-10" | "info-20" | "info-30" | "info-40" | "info-50" | "info-60" | "info-70" | "info-80" | "info-90" | "primary-0" | "primary-100" | "primary-5" | "primary-10" | "primary-20" | "primary-30" | "primary-40" | "primary-50" | "primary-60" | "primary-70" | "primary-80" | "primary-90" | "secondary-0" | "secondary-100" | "secondary-5" | "secondary-10" | "secondary-20" | "secondary-30" | "secondary-40" | "secondary-50" | "secondary-60" | "secondary-70" | "secondary-80" | "secondary-90" | "success-0" | "success-100" | "success-5" | "success-10" | "success-20" | "success-30" | "success-40" | "success-50" | "success-60" | "success-70" | "success-80" | "success-90" | "warning-0" | "warning-100" | "warning-5" | "warning-10" | "warning-20" | "warning-30" | "warning-40" | "warning-50" | "warning-60" | "warning-70" | "warning-80" | "warning-90" | "black" | "transparent" | "white" | "current" | undefined;
|
48
|
-
width?: "auto" | "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "
|
49
|
-
height?: "auto" | "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "
|
48
|
+
width?: "auto" | "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "full" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "fit" | undefined;
|
49
|
+
height?: "auto" | "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "full" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "fit" | undefined;
|
50
50
|
maxWidth?: "none" | "max" | "min" | "0" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | "fit" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "prose" | "screen-default" | "screen-xs" | "screen-sm" | "screen-md" | "screen-lg" | "screen-xl" | undefined;
|
51
|
-
maxHeight?: "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "
|
51
|
+
maxHeight?: "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "full" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "fit" | undefined;
|
52
52
|
minWidth?: "max" | "min" | "0" | "full" | "fit" | undefined;
|
53
53
|
minHeight?: "screen" | "max" | "min" | "0" | "full" | "fit" | undefined;
|
54
54
|
}> & {
|
@@ -77,10 +77,10 @@ export declare const BorderBox: React.ComponentType<Omit<Pick<any, string | numb
|
|
77
77
|
spaceX?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | undefined;
|
78
78
|
spaceY?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | undefined;
|
79
79
|
backgroundColor?: "error-0" | "error-100" | "error-5" | "error-10" | "error-20" | "error-30" | "error-40" | "error-50" | "error-60" | "error-70" | "error-80" | "error-90" | "grey-0" | "grey-100" | "grey-5" | "grey-10" | "grey-20" | "grey-30" | "grey-40" | "grey-50" | "grey-60" | "grey-70" | "grey-80" | "grey-90" | "info-0" | "info-100" | "info-5" | "info-10" | "info-20" | "info-30" | "info-40" | "info-50" | "info-60" | "info-70" | "info-80" | "info-90" | "primary-0" | "primary-100" | "primary-5" | "primary-10" | "primary-20" | "primary-30" | "primary-40" | "primary-50" | "primary-60" | "primary-70" | "primary-80" | "primary-90" | "secondary-0" | "secondary-100" | "secondary-5" | "secondary-10" | "secondary-20" | "secondary-30" | "secondary-40" | "secondary-50" | "secondary-60" | "secondary-70" | "secondary-80" | "secondary-90" | "success-0" | "success-100" | "success-5" | "success-10" | "success-20" | "success-30" | "success-40" | "success-50" | "success-60" | "success-70" | "success-80" | "success-90" | "warning-0" | "warning-100" | "warning-5" | "warning-10" | "warning-20" | "warning-30" | "warning-40" | "warning-50" | "warning-60" | "warning-70" | "warning-80" | "warning-90" | "black" | "transparent" | "white" | "current" | undefined;
|
80
|
-
width?: "auto" | "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "
|
81
|
-
height?: "auto" | "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "
|
80
|
+
width?: "auto" | "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "full" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "fit" | undefined;
|
81
|
+
height?: "auto" | "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "full" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "fit" | undefined;
|
82
82
|
maxWidth?: "none" | "max" | "min" | "0" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | "fit" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "prose" | "screen-default" | "screen-xs" | "screen-sm" | "screen-md" | "screen-lg" | "screen-xl" | undefined;
|
83
|
-
maxHeight?: "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "
|
83
|
+
maxHeight?: "screen" | "max" | "min" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "1px" | "full" | "l1" | "l2" | "l3" | "l4" | "l5" | "l6" | "l7" | "fit" | undefined;
|
84
84
|
minWidth?: "max" | "min" | "0" | "full" | "fit" | undefined;
|
85
85
|
minHeight?: "screen" | "max" | "min" | "0" | "full" | "fit" | undefined;
|
86
86
|
}> & {
|
@@ -3,7 +3,7 @@ import { type AriaOverlayProps } from '@react-aria/overlays';
|
|
3
3
|
import { type OverlayTriggerState } from '@react-stately/overlays';
|
4
4
|
import { type PositionProps } from '@react-types/overlays';
|
5
5
|
import { type PopoverPlacement } from './Popover';
|
6
|
-
export declare const PopoverOverlay: React.ForwardRefExoticComponent<AriaOverlayProps & Pick<PositionProps, "offset" | "
|
6
|
+
export declare const PopoverOverlay: React.ForwardRefExoticComponent<AriaOverlayProps & Pick<PositionProps, "offset" | "shouldFlip" | "crossOffset"> & {
|
7
7
|
id?: string | undefined;
|
8
8
|
role?: React.AriaRole | undefined;
|
9
9
|
triggerRef: React.RefObject<Element>;
|
package/dist/styles.css
CHANGED
@@ -553,30 +553,63 @@ input[type='number'].no-arrows {
|
|
553
553
|
}
|
554
554
|
.recharts-tooltip-wrapper{
|
555
555
|
font-family: Inter;
|
556
|
-
font-size:
|
556
|
+
font-size: 16px;
|
557
557
|
font-weight: 400;
|
558
558
|
font-style: normal;
|
559
|
-
line-height: 1.
|
559
|
+
line-height: 1.5;
|
560
560
|
text-transform: none;
|
561
|
-
color:
|
562
|
-
color: var(--aquarium-colors-
|
561
|
+
color: #4a4b57;
|
562
|
+
color: var(--aquarium-colors-grey-70, #4a4b57);
|
563
|
+
outline: 2px solid transparent;
|
564
|
+
outline-offset: 2px;
|
565
|
+
}
|
566
|
+
.recharts-tooltip-label{
|
567
|
+
font-family: Inter;
|
568
|
+
font-size: 16px;
|
569
|
+
font-weight: 500;
|
570
|
+
font-style: normal;
|
571
|
+
line-height: 1.5;
|
572
|
+
text-transform: none;
|
573
|
+
padding-bottom: 4px;
|
563
574
|
}
|
564
|
-
.recharts-tooltip-item
|
575
|
+
.recharts-tooltip-item{
|
576
|
+
font-family: Inter;
|
577
|
+
font-size: 16px;
|
578
|
+
font-weight: 400;
|
579
|
+
font-style: normal;
|
580
|
+
line-height: 1.5;
|
581
|
+
text-transform: none;
|
565
582
|
align-items: center;
|
566
583
|
}
|
567
|
-
.recharts-tooltip-item::before
|
584
|
+
.recharts-tooltip-item::before{
|
568
585
|
display: inline-block;
|
586
|
+
background-color: currentColor;
|
587
|
+
background-color: var(--aquarium-colors-current, currentColor);
|
588
|
+
margin-right: 8px;
|
589
|
+
border-radius: 9999px;
|
590
|
+
border-radius: var(--aquarium-border-radius-full, 9999px);
|
569
591
|
content: ' ';
|
570
|
-
width:
|
571
|
-
height:
|
572
|
-
margin-right: 4px;
|
573
|
-
background: currentColor;
|
592
|
+
width: 14px;
|
593
|
+
height: 14px;
|
574
594
|
}
|
575
|
-
.recharts-tooltip-item>span
|
576
|
-
color:
|
595
|
+
.recharts-tooltip-item>span{
|
596
|
+
color: #4a4b57;
|
597
|
+
color: var(--aquarium-colors-grey-70, #4a4b57);
|
577
598
|
}
|
578
|
-
.recharts-tooltip-item-
|
579
|
-
|
599
|
+
.recharts-tooltip-item-name{
|
600
|
+
flex-grow: 1;
|
601
|
+
margin-right: 24px;
|
602
|
+
}
|
603
|
+
.recharts-tooltip-item-separator{
|
604
|
+
display: none;
|
605
|
+
}
|
606
|
+
.recharts-tooltip-item-value{
|
607
|
+
font-family: Inter;
|
608
|
+
font-size: 16px;
|
609
|
+
font-weight: 500;
|
610
|
+
font-style: normal;
|
611
|
+
line-height: 1.5;
|
612
|
+
text-transform: none;
|
580
613
|
}
|
581
614
|
.focusable.focus-visible{
|
582
615
|
outline: 2px solid transparent;
|
package/dist/system.cjs
CHANGED
@@ -4926,6 +4926,7 @@ var Select = {
|
|
4926
4926
|
|
4927
4927
|
// src/molecules/Alert/Alert.tsx
|
4928
4928
|
var import_react22 = __toESM(require("react"));
|
4929
|
+
var import_react_aria = require("react-aria");
|
4929
4930
|
var import_omit = __toESM(require("lodash/omit"));
|
4930
4931
|
|
4931
4932
|
// src/molecules/Button/Button.tsx
|
@@ -7010,21 +7011,31 @@ Alert.Dismiss = (_a) => {
|
|
7010
7011
|
var isLink = (action) => action.href !== void 0;
|
7011
7012
|
|
7012
7013
|
// src/molecules/Alert/Alert.tsx
|
7013
|
-
var Alert2 = ({ description, type, title, onDismiss, children, action }) =>
|
7014
|
-
|
7015
|
-
|
7016
|
-
|
7017
|
-
|
7018
|
-
|
7019
|
-
|
7020
|
-
|
7021
|
-
|
7022
|
-
},
|
7023
|
-
|
7024
|
-
|
7025
|
-
}
|
7026
|
-
|
7027
|
-
})
|
7014
|
+
var Alert2 = ({ description, type, title, onDismiss, children, action }) => {
|
7015
|
+
const descriptionID = (0, import_react_aria.useId)();
|
7016
|
+
const titleID = (0, import_react_aria.useId)();
|
7017
|
+
return /* @__PURE__ */ import_react22.default.createElement(Alert, {
|
7018
|
+
className: "Aquarium-Alert",
|
7019
|
+
type,
|
7020
|
+
dense: Boolean(title),
|
7021
|
+
"aria-describedby": descriptionID,
|
7022
|
+
"aria-labelledby": title ? titleID : void 0
|
7023
|
+
}, /* @__PURE__ */ import_react22.default.createElement(Alert.Icon, {
|
7024
|
+
type,
|
7025
|
+
dense: Boolean(title)
|
7026
|
+
}), title && /* @__PURE__ */ import_react22.default.createElement(Alert.Title, {
|
7027
|
+
id: titleID
|
7028
|
+
}, title), /* @__PURE__ */ import_react22.default.createElement(Alert.Description, {
|
7029
|
+
id: descriptionID
|
7030
|
+
}, children || description), action && /* @__PURE__ */ import_react22.default.createElement(Alert.Actions, null, !isLink(action) && /* @__PURE__ */ import_react22.default.createElement(Button.Ghost, __spreadValues({
|
7031
|
+
dense: true
|
7032
|
+
}, (0, import_omit.default)(action, "text")), action.text), isLink(action) && /* @__PURE__ */ import_react22.default.createElement(Button.ExternalLink, __spreadValues({
|
7033
|
+
dense: true,
|
7034
|
+
kind: "ghost"
|
7035
|
+
}, (0, import_omit.default)(action, "text")), action.text)), onDismiss && /* @__PURE__ */ import_react22.default.createElement(Alert.Dismiss, {
|
7036
|
+
onClick: onDismiss
|
7037
|
+
}));
|
7038
|
+
};
|
7028
7039
|
|
7029
7040
|
// src/molecules/Avatar/Avatar.tsx
|
7030
7041
|
var import_react24 = __toESM(require("react"));
|
package/dist/system.mjs
CHANGED
@@ -4782,6 +4782,7 @@ var Select = {
|
|
4782
4782
|
|
4783
4783
|
// src/molecules/Alert/Alert.tsx
|
4784
4784
|
import React18 from "react";
|
4785
|
+
import { useId } from "react-aria";
|
4785
4786
|
import omit from "lodash/omit";
|
4786
4787
|
|
4787
4788
|
// src/molecules/Button/Button.tsx
|
@@ -6866,21 +6867,31 @@ Alert.Dismiss = (_a) => {
|
|
6866
6867
|
var isLink = (action) => action.href !== void 0;
|
6867
6868
|
|
6868
6869
|
// src/molecules/Alert/Alert.tsx
|
6869
|
-
var Alert2 = ({ description, type, title, onDismiss, children, action }) =>
|
6870
|
-
|
6871
|
-
|
6872
|
-
|
6873
|
-
|
6874
|
-
|
6875
|
-
|
6876
|
-
|
6877
|
-
|
6878
|
-
},
|
6879
|
-
|
6880
|
-
|
6881
|
-
}
|
6882
|
-
|
6883
|
-
})
|
6870
|
+
var Alert2 = ({ description, type, title, onDismiss, children, action }) => {
|
6871
|
+
const descriptionID = useId();
|
6872
|
+
const titleID = useId();
|
6873
|
+
return /* @__PURE__ */ React18.createElement(Alert, {
|
6874
|
+
className: "Aquarium-Alert",
|
6875
|
+
type,
|
6876
|
+
dense: Boolean(title),
|
6877
|
+
"aria-describedby": descriptionID,
|
6878
|
+
"aria-labelledby": title ? titleID : void 0
|
6879
|
+
}, /* @__PURE__ */ React18.createElement(Alert.Icon, {
|
6880
|
+
type,
|
6881
|
+
dense: Boolean(title)
|
6882
|
+
}), title && /* @__PURE__ */ React18.createElement(Alert.Title, {
|
6883
|
+
id: titleID
|
6884
|
+
}, title), /* @__PURE__ */ React18.createElement(Alert.Description, {
|
6885
|
+
id: descriptionID
|
6886
|
+
}, children || description), action && /* @__PURE__ */ React18.createElement(Alert.Actions, null, !isLink(action) && /* @__PURE__ */ React18.createElement(Button.Ghost, __spreadValues({
|
6887
|
+
dense: true
|
6888
|
+
}, omit(action, "text")), action.text), isLink(action) && /* @__PURE__ */ React18.createElement(Button.ExternalLink, __spreadValues({
|
6889
|
+
dense: true,
|
6890
|
+
kind: "ghost"
|
6891
|
+
}, omit(action, "text")), action.text)), onDismiss && /* @__PURE__ */ React18.createElement(Alert.Dismiss, {
|
6892
|
+
onClick: onDismiss
|
6893
|
+
}));
|
6894
|
+
};
|
6884
6895
|
|
6885
6896
|
// src/molecules/Avatar/Avatar.tsx
|
6886
6897
|
import React20 from "react";
|
@@ -10539,7 +10550,7 @@ DataTable.Skeleton = DataListSkeleton;
|
|
10539
10550
|
import React69 from "react";
|
10540
10551
|
import { useDialog } from "@react-aria/dialog";
|
10541
10552
|
import { Overlay as Overlay2, useModalOverlay } from "@react-aria/overlays";
|
10542
|
-
import { useId } from "@react-aria/utils";
|
10553
|
+
import { useId as useId2 } from "@react-aria/utils";
|
10543
10554
|
import { useOverlayTriggerState as useOverlayTriggerState2 } from "@react-stately/overlays";
|
10544
10555
|
import omit8 from "lodash/omit";
|
10545
10556
|
|
@@ -10688,8 +10699,8 @@ var DialogWrapper = ({
|
|
10688
10699
|
secondaryAction
|
10689
10700
|
}) => {
|
10690
10701
|
const ref = React69.useRef(null);
|
10691
|
-
const labelledBy =
|
10692
|
-
const describedBy =
|
10702
|
+
const labelledBy = useId2();
|
10703
|
+
const describedBy = useId2();
|
10693
10704
|
const { dialogProps } = useDialog(
|
10694
10705
|
{ "role": "alertdialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
10695
10706
|
ref
|
@@ -11206,7 +11217,7 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
11206
11217
|
import React82 from "react";
|
11207
11218
|
import { useDialog as useDialog3 } from "@react-aria/dialog";
|
11208
11219
|
import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
|
11209
|
-
import { useId as
|
11220
|
+
import { useId as useId3 } from "@react-aria/utils";
|
11210
11221
|
import { useOverlayTriggerState as useOverlayTriggerState4 } from "@react-stately/overlays";
|
11211
11222
|
import castArray from "lodash/castArray";
|
11212
11223
|
import omit10 from "lodash/omit";
|
@@ -11536,8 +11547,8 @@ var Modal2 = (_a) => {
|
|
11536
11547
|
var ModalWrapper = React82.forwardRef(
|
11537
11548
|
(_a, ref) => {
|
11538
11549
|
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
11539
|
-
const labelledBy =
|
11540
|
-
const describedBy =
|
11550
|
+
const labelledBy = useId3();
|
11551
|
+
const describedBy = useId3();
|
11541
11552
|
const { dialogProps } = useDialog3(
|
11542
11553
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
11543
11554
|
ref
|
@@ -12694,7 +12705,7 @@ RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
|
12694
12705
|
|
12695
12706
|
// src/molecules/Section/Section.tsx
|
12696
12707
|
import React101 from "react";
|
12697
|
-
import { useId as
|
12708
|
+
import { useId as useId4 } from "@react-aria/utils";
|
12698
12709
|
import { animated as animated4, useSpring as useSpring3 } from "@react-spring/web";
|
12699
12710
|
import castArray4 from "lodash/castArray";
|
12700
12711
|
import isUndefined8 from "lodash/isUndefined";
|
@@ -12932,8 +12943,8 @@ var Section4 = (props) => {
|
|
12932
12943
|
},
|
12933
12944
|
immediate: !_collapsible
|
12934
12945
|
}), { transform, backgroundColor } = _f, spring = __objRest(_f, ["transform", "backgroundColor"]);
|
12935
|
-
const toggleId =
|
12936
|
-
const regionId =
|
12946
|
+
const toggleId = useId4();
|
12947
|
+
const regionId = useId4();
|
12937
12948
|
return /* @__PURE__ */ React101.createElement(Section3, {
|
12938
12949
|
"aria-label": title,
|
12939
12950
|
className: "Aquarium-Section"
|