@aivenio/aquarium 2.8.0 → 2.9.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/atoms.cjs +44 -48
- package/dist/atoms.mjs +11 -15
- package/dist/charts.cjs +13 -10
- package/dist/charts.mjs +8 -5
- package/dist/src/atoms/Card/Card.js +2 -2
- package/dist/src/atoms/ProgressBar/ProgressBar.js +2 -2
- package/dist/src/atoms/Select/Select.js +2 -2
- package/dist/src/atoms/Typography/Typography.js +2 -2
- package/dist/src/charts/AreaChart/AreaChart.d.ts +1 -1
- package/dist/src/charts/BarChart/BarChart.d.ts +1 -1
- package/dist/src/charts/LineChart/LineChart.d.ts +1 -1
- package/dist/src/charts/PieChart/DoughnutChart.d.ts +3 -3
- package/dist/src/charts/PieChart/DoughnutChart.js +2 -2
- package/dist/src/charts/PieChart/PieChart.d.ts +1 -1
- package/dist/src/charts/Tooltip/TooltipContentWrapper.js +2 -2
- package/dist/src/charts/lib/utils.js +2 -3
- package/dist/src/icons/disasterRecovery.js +2 -2
- package/dist/src/molecules/Accordion/Accordion.js +2 -2
- package/dist/src/molecules/Alert/Alert.js +2 -2
- package/dist/src/molecules/Banner/Banner.js +2 -2
- package/dist/src/molecules/Box/Box.js +2 -2
- package/dist/src/molecules/Button/Button.js +2 -2
- package/dist/src/molecules/Chip/Chip.js +2 -2
- package/dist/src/molecules/Combobox/Combobox.js +6 -6
- package/dist/src/molecules/DataList/DataList.js +2 -6
- package/dist/src/molecules/DataList/DataListComponents.js +2 -2
- package/dist/src/molecules/DataList/DataListGroup.js +2 -2
- package/dist/src/molecules/DataList/DataListToolbar.js +2 -2
- package/dist/src/molecules/DataTable/DataTable.js +2 -3
- package/dist/src/molecules/DateField/DateField.js +2 -2
- package/dist/src/molecules/DatePicker/DatePicker.js +2 -2
- package/dist/src/molecules/DatePicker/DateRangePicker.js +2 -2
- package/dist/src/molecules/Dialog/Dialog.js +2 -2
- package/dist/src/molecules/Drawer/Drawer.js +2 -3
- package/dist/src/molecules/DropdownMenu/DropdownMenu.js +2 -2
- package/dist/src/molecules/Grid/Grid.js +2 -4
- package/dist/src/molecules/Input/Input.js +2 -3
- package/dist/src/molecules/ItemList/ItemList.d.ts +5 -1
- package/dist/src/molecules/ItemList/ItemList.js +3 -3
- package/dist/src/molecules/List/List.js +2 -3
- package/dist/src/molecules/Modal/Modal.js +2 -3
- package/dist/src/molecules/MultiInput/MultiInput.js +2 -4
- package/dist/src/molecules/MultiSelect/MultiSelect.js +2 -5
- package/dist/src/molecules/NativeSelect/NativeSelect.js +2 -3
- package/dist/src/molecules/PageHeader/PageHeader.js +2 -2
- package/dist/src/molecules/Pagination/Pagination.js +2 -2
- package/dist/src/molecules/Pagination/usePagination.js +2 -2
- package/dist/src/molecules/Popover/Popover.js +2 -2
- package/dist/src/molecules/PopoverDialog/PopoverDialog.js +2 -2
- package/dist/src/molecules/Section/Section.js +2 -3
- package/dist/src/molecules/Select/Select.js +2 -5
- package/dist/src/molecules/Skeleton/Skeleton.js +2 -3
- package/dist/src/molecules/Tabs/Tabs.js +3 -4
- package/dist/src/molecules/Tailwindify/Tailwindify.js +2 -3
- package/dist/src/molecules/Textarea/Textarea.js +2 -3
- package/dist/src/molecules/TimeField/TimeField.js +2 -2
- package/dist/src/molecules/Toast/Toast.js +2 -2
- package/dist/src/utils/actions.js +2 -2
- package/dist/src/utils/form/HelperText/HelperText.js +2 -2
- package/dist/src/utils/stickyStyles.js +2 -2
- package/dist/styles.css +0 -3
- package/dist/system.cjs +156 -180
- package/dist/system.mjs +50 -74
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +8 -7
- package/dist/src/molecules/ItemList/ItemList.spec.d.ts +0 -24
- package/dist/src/molecules/ItemList/ItemList.spec.js +0 -100
- package/dist/src/utils/mocks/mockDynamicIds.d.ts +0 -1
- package/dist/src/utils/mocks/mockDynamicIds.js +0 -14
- package/dist/src/utils/mocks/mockIntersectionObserver.d.ts +0 -1
- package/dist/src/utils/mocks/mockIntersectionObserver.js +0 -13
- package/dist/src/utils/mocks/mockRecharts.d.ts +0 -1
- package/dist/src/utils/mocks/mockRecharts.js +0 -8
- package/dist/src/utils/mocks/mockResizeObservable.d.ts +0 -1
- package/dist/src/utils/mocks/mockResizeObservable.js +0 -60
- package/dist/src/utils/mocks/mockScrollIntoView.d.ts +0 -1
- package/dist/src/utils/mocks/mockScrollIntoView.js +0 -11
- package/dist/src/utils/setupTests.d.ts +0 -1
- package/dist/src/utils/setupTests.js +0 -25
- package/dist/tailwind.config.js +0 -173
package/dist/tailwind.config.js
DELETED
@@ -1,173 +0,0 @@
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
2
|
-
const plugin = require('tailwindcss/plugin');
|
3
|
-
|
4
|
-
const backgroundColor = require('./tailwind/tailwind.backgroundColor');
|
5
|
-
const borderColor = require('./tailwind/tailwind.borderColor');
|
6
|
-
const borderRadius = require('./tailwind/tailwind.borderRadius');
|
7
|
-
const borderWidth = require('./tailwind/tailwind.borderWidth');
|
8
|
-
const boxShadow = require('./tailwind/tailwind.boxShadow');
|
9
|
-
const colors = require('./tailwind/tailwind.colors');
|
10
|
-
const elevations = require('./tailwind/tailwind.elevations');
|
11
|
-
const margin = require('./tailwind/tailwind.margin');
|
12
|
-
const screens = require('./tailwind/tailwind.screens');
|
13
|
-
const spacing = require('./tailwind/tailwind.spacing');
|
14
|
-
const textColor = require('./tailwind/tailwind.textColor');
|
15
|
-
const typography = require('./tailwind/tailwind.typography');
|
16
|
-
|
17
|
-
// Convert the typography object into a format that tailwind can understand
|
18
|
-
const typographyComponents = Object.fromEntries(Object.entries(typography).map(([key, font]) => [`.${key}`, { font }]));
|
19
|
-
|
20
|
-
// Utility function used to collect all the keys from an object that can be used in the safelist.
|
21
|
-
const collectKeys = (obj, prefix = '') =>
|
22
|
-
Object.entries(obj).reduce((acc, [key, value]) => {
|
23
|
-
if (typeof value === 'object') {
|
24
|
-
return acc.concat(collectKeys(value, `${prefix}${key}-`));
|
25
|
-
}
|
26
|
-
|
27
|
-
return acc.concat(`${prefix}${key}`);
|
28
|
-
}, []);
|
29
|
-
|
30
|
-
// Generate negative margin values
|
31
|
-
const negativeMargin = Object.entries(margin).reduce((acc, [key, value]) => {
|
32
|
-
if (!['auto', '0'].includes(key)) {
|
33
|
-
acc[`-${key}`] = `-${value}`;
|
34
|
-
}
|
35
|
-
|
36
|
-
return acc;
|
37
|
-
}, {});
|
38
|
-
|
39
|
-
/** @type {import('tailwindcss').Config} */
|
40
|
-
module.exports = {
|
41
|
-
theme: {
|
42
|
-
boxShadow,
|
43
|
-
colors,
|
44
|
-
elevations,
|
45
|
-
margin: {
|
46
|
-
auto: 'auto',
|
47
|
-
...margin,
|
48
|
-
...negativeMargin,
|
49
|
-
},
|
50
|
-
screens,
|
51
|
-
spacing,
|
52
|
-
borderWidth,
|
53
|
-
extend: {
|
54
|
-
backgroundColor,
|
55
|
-
borderColor,
|
56
|
-
ringColor: borderColor,
|
57
|
-
outlineColor: borderColor,
|
58
|
-
stroke: borderColor,
|
59
|
-
borderRadius,
|
60
|
-
textColor,
|
61
|
-
zIndex: {
|
62
|
-
modal: '100',
|
63
|
-
},
|
64
|
-
animation: {
|
65
|
-
'positioner-fade-in': 'positioner-fade-in 300ms ease-in-out',
|
66
|
-
'draw': 'draw 2s cubic-bezier(0.47, 0, 0.745, 0.715) forwards',
|
67
|
-
},
|
68
|
-
keyframes: {
|
69
|
-
'positioner-fade-in': {
|
70
|
-
from: { opacity: '0' },
|
71
|
-
to: { opacity: '1' },
|
72
|
-
},
|
73
|
-
'draw': {
|
74
|
-
from: {
|
75
|
-
'stroke-dasharray': '1000',
|
76
|
-
'stroke-dashoffset': '1000',
|
77
|
-
},
|
78
|
-
to: {
|
79
|
-
'stroke-dashoffset': '0',
|
80
|
-
},
|
81
|
-
},
|
82
|
-
},
|
83
|
-
},
|
84
|
-
},
|
85
|
-
// https://tailwindcss.com/docs/configuring-variants#ordering-variants
|
86
|
-
variants: {
|
87
|
-
backgroundColor: ['odd', 'even', 'hover', 'group-hover', 'active', 'disabled', 'focus'],
|
88
|
-
textColor: ['hover', 'hover-save', 'active', 'disabled', 'visited'],
|
89
|
-
cursor: ['disabled'],
|
90
|
-
borderColor: ['children', 'focus', 'hover', 'hover-save', 'active', 'disabled'],
|
91
|
-
borderWidth: ['focus', 'hover', 'hover-save', 'active', 'disabled'],
|
92
|
-
boxShadow: ['focus', 'hover', 'hover-save'],
|
93
|
-
transitionProperty: ['hover', 'focus'],
|
94
|
-
aivenTypographyComponent: ['focus'],
|
95
|
-
display: ['children'],
|
96
|
-
opacity: ['sibling-input-focus', 'focus'],
|
97
|
-
},
|
98
|
-
content: ['./src/**/*.tsx', './src/**/*.ts'],
|
99
|
-
safelist: [
|
100
|
-
...Object.keys(typographyComponents),
|
101
|
-
...collectKeys(colors, 'text-'),
|
102
|
-
...collectKeys(colors, 'bg-'),
|
103
|
-
...collectKeys(colors, 'border-'),
|
104
|
-
...collectKeys(textColor, 'text-'),
|
105
|
-
...collectKeys(backgroundColor, 'bg-'),
|
106
|
-
...collectKeys(borderColor, 'border-'),
|
107
|
-
'line-clamp-1',
|
108
|
-
'line-clamp-2',
|
109
|
-
'line-clamp-3',
|
110
|
-
'line-clamp-4',
|
111
|
-
'line-clamp-5',
|
112
|
-
'line-clamp-6',
|
113
|
-
'animate-draw',
|
114
|
-
],
|
115
|
-
plugins: [
|
116
|
-
require('tailwindcss-children'),
|
117
|
-
require('tailwindcss-react-aria-components'),
|
118
|
-
|
119
|
-
plugin(({ addVariant, e }) => {
|
120
|
-
addVariant('hover-save', ({ modifySelectors, separator }) => {
|
121
|
-
modifySelectors(({ className }) => {
|
122
|
-
return `.${e(`hover-save${separator}${className}`)}:hover:not(:disabled)`;
|
123
|
-
});
|
124
|
-
});
|
125
|
-
}),
|
126
|
-
|
127
|
-
plugin(({ addComponents, variants }) => {
|
128
|
-
return addComponents(typographyComponents, variants('aivenTypographyComponent'));
|
129
|
-
}),
|
130
|
-
|
131
|
-
plugin(({ addVariant, e }) => {
|
132
|
-
addVariant('sibling-input-focus', ({ modifySelectors, separator }) => {
|
133
|
-
modifySelectors(({ className }) => {
|
134
|
-
const eClassName = e(`sibling-input-focus${separator}${className}`);
|
135
|
-
return `input:focus ~ * .${eClassName}`;
|
136
|
-
});
|
137
|
-
});
|
138
|
-
}),
|
139
|
-
|
140
|
-
plugin(({ addUtilities }) => {
|
141
|
-
addUtilities(
|
142
|
-
{
|
143
|
-
'.scrollbar-hide': {
|
144
|
-
/* IE and Edge */
|
145
|
-
'-ms-overflow-style': 'none',
|
146
|
-
|
147
|
-
/* Firefox */
|
148
|
-
'scrollbar-width': 'none',
|
149
|
-
|
150
|
-
/* Safari and Chrome */
|
151
|
-
'&::-webkit-scrollbar': {
|
152
|
-
display: 'none',
|
153
|
-
},
|
154
|
-
},
|
155
|
-
|
156
|
-
'.scrollbar-default': {
|
157
|
-
/* IE and Edge */
|
158
|
-
'-ms-overflow-style': 'auto',
|
159
|
-
|
160
|
-
/* Firefox */
|
161
|
-
'scrollbar-width': 'auto',
|
162
|
-
|
163
|
-
/* Safari and Chrome */
|
164
|
-
'&::-webkit-scrollbar': {
|
165
|
-
display: 'block',
|
166
|
-
},
|
167
|
-
},
|
168
|
-
},
|
169
|
-
['responsive'],
|
170
|
-
);
|
171
|
-
}),
|
172
|
-
],
|
173
|
-
};
|