@scality/core-ui 0.166.0 → 0.168.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/.storybook/preview.js +6 -4
- package/README.md +27 -80
- package/dist/components/barchart/BarChart.component.d.ts +5 -0
- package/dist/components/barchart/BarChart.component.d.ts.map +1 -1
- package/dist/components/barchart/BarChart.component.js +5 -0
- package/dist/components/barchartv2/Barchart.component.d.ts +5 -1
- package/dist/components/barchartv2/Barchart.component.d.ts.map +1 -1
- package/dist/components/barchartv2/Barchart.component.js +6 -2
- package/dist/components/barchartv2/utils.js +2 -2
- package/dist/components/button/Button.component.d.ts +2 -1
- package/dist/components/button/Button.component.d.ts.map +1 -1
- package/dist/components/button/Button.component.js +2 -1
- package/dist/components/chartlegend/ChartLegend.d.ts.map +1 -1
- package/dist/components/chartlegend/ChartLegend.js +7 -13
- package/dist/components/chartlegend/ChartLegendWrapper.d.ts +1 -2
- package/dist/components/chartlegend/ChartLegendWrapper.d.ts.map +1 -1
- package/dist/components/chartlegend/ChartLegendWrapper.js +4 -9
- package/dist/components/date/FormattedDateTime.d.ts +6 -1
- package/dist/components/date/FormattedDateTime.d.ts.map +1 -1
- package/dist/components/date/FormattedDateTime.js +11 -0
- package/dist/components/icon/Icon.component.d.ts +9 -11
- package/dist/components/icon/Icon.component.d.ts.map +1 -1
- package/dist/components/icon/Icon.component.js +2 -0
- package/dist/components/linetemporalchart/ChartUtil.d.ts +3 -2
- package/dist/components/linetemporalchart/ChartUtil.d.ts.map +1 -1
- package/dist/components/linetemporalchart/ChartUtil.js +30 -20
- package/dist/components/linetemporalchart/LineTemporalChart.component.d.ts +4 -0
- package/dist/components/linetemporalchart/LineTemporalChart.component.d.ts.map +1 -1
- package/dist/components/linetemporalchart/LineTemporalChart.component.js +4 -0
- package/dist/components/linetimeseriechart/linetimeseriechart.component.d.ts +8 -2
- package/dist/components/linetimeseriechart/linetimeseriechart.component.d.ts.map +1 -1
- package/dist/components/linetimeseriechart/linetimeseriechart.component.js +17 -11
- package/dist/index.d.ts +1 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -11
- package/dist/next.d.ts +1 -0
- package/dist/next.d.ts.map +1 -1
- package/jest.config.js +1 -0
- package/package.json +16 -37
- package/src/lib/components/barchart/BarChart.component.tsx +5 -0
- package/src/lib/components/barchartv2/Barchart.component.test.tsx +11 -7
- package/src/lib/components/barchartv2/Barchart.component.tsx +15 -3
- package/src/lib/components/barchartv2/utils.test.ts +2 -2
- package/src/lib/components/barchartv2/utils.ts +2 -2
- package/src/lib/components/button/Button.component.tsx +2 -1
- package/src/lib/components/chartlegend/ChartLegend.test.tsx +17 -0
- package/src/lib/components/chartlegend/ChartLegend.tsx +6 -12
- package/src/lib/components/chartlegend/ChartLegendWrapper.tsx +5 -13
- package/src/lib/components/date/FormattedDateTime.tsx +14 -1
- package/src/lib/components/icon/Icon.component.tsx +12 -1
- package/src/lib/components/linetemporalchart/ChartUtil.test.ts +23 -35
- package/src/lib/components/linetemporalchart/ChartUtil.ts +38 -26
- package/src/lib/components/linetemporalchart/LineTemporalChart.component.tsx +19 -15
- package/src/lib/components/linetimeseriechart/linetimeseriechart.component.tsx +36 -13
- package/src/lib/components/linetimeseriechart/linetimeseriechart.test.tsx +68 -0
- package/src/lib/components/selectv2/selectv2.test.tsx +1 -1
- package/src/lib/components/toast/useMutationsHandler.test.tsx +22 -32
- package/src/lib/index.ts +6 -11
- package/src/lib/next.ts +1 -0
- package/stories/BarChart/barchart.stories.tsx +108 -13
- package/stories/barchart.stories.tsx +1 -1
- package/stories/card.stories.tsx +7 -5
- package/stories/controls.ts +19 -20
- package/stories/linecharttemporal.stories.tsx +1 -1
- package/stories/linetimeseriechart.stories.tsx +146 -0
- package/stories/navbar.stories.tsx +103 -0
- package/stories/tabsv2.stories.tsx +51 -56
- package/dist/components/areachart/AreaChart.component.d.ts +0 -13
- package/dist/components/areachart/AreaChart.component.d.ts.map +0 -1
- package/dist/components/areachart/AreaChart.component.js +0 -27
- package/dist/components/chips/Chips.component.d.ts +0 -21
- package/dist/components/chips/Chips.component.d.ts.map +0 -1
- package/dist/components/chips/Chips.component.js +0 -105
- package/dist/components/cloudprogressbar/CloudProgressBar.component.d.ts +0 -10
- package/dist/components/cloudprogressbar/CloudProgressBar.component.d.ts.map +0 -1
- package/dist/components/cloudprogressbar/CloudProgressBar.component.js +0 -38
- package/dist/components/collapsiblepanel/CollapsiblePanel.component.d.ts +0 -9
- package/dist/components/collapsiblepanel/CollapsiblePanel.component.d.ts.map +0 -1
- package/dist/components/collapsiblepanel/CollapsiblePanel.component.js +0 -44
- package/dist/components/linechart/LineChart.component.d.ts +0 -21
- package/dist/components/linechart/LineChart.component.d.ts.map +0 -1
- package/dist/components/linechart/LineChart.component.js +0 -109
- package/dist/components/multiselect/MultiSelect.component.d.ts +0 -28
- package/dist/components/multiselect/MultiSelect.component.d.ts.map +0 -1
- package/dist/components/multiselect/MultiSelect.component.js +0 -73
- package/dist/components/select/Select.component.d.ts +0 -14
- package/dist/components/select/Select.component.d.ts.map +0 -1
- package/dist/components/select/Select.component.js +0 -71
- package/dist/components/spacedbox/SpacedBox.d.ts +0 -34
- package/dist/components/spacedbox/SpacedBox.d.ts.map +0 -1
- package/dist/components/spacedbox/SpacedBox.js +0 -64
- package/dist/components/sparkline/SparkLine.component.d.ts +0 -18
- package/dist/components/sparkline/SparkLine.component.d.ts.map +0 -1
- package/dist/components/sparkline/SparkLine.component.js +0 -148
- package/dist/components/vegachart/VegaChart.component.d.ts +0 -13
- package/dist/components/vegachart/VegaChart.component.d.ts.map +0 -1
- package/dist/components/vegachart/VegaChart.component.js +0 -120
- package/plopfile.js +0 -38
- package/src/lib/components/areachart/AreaChart.component.tsx +0 -49
- package/src/lib/components/chips/Chips.component.tsx +0 -169
- package/src/lib/components/cloudprogressbar/CloudProgressBar.component.tsx +0 -105
- package/src/lib/components/collapsiblepanel/CollapsiblePanel.component.tsx +0 -77
- package/src/lib/components/linechart/LineChart.component.tsx +0 -152
- package/src/lib/components/multiselect/MultiSelect.component.tsx +0 -158
- package/src/lib/components/select/Select.component.tsx +0 -98
- package/src/lib/components/spacedbox/SpacedBox.ts +0 -116
- package/src/lib/components/sparkline/SparkLine.component.tsx +0 -176
- package/src/lib/components/vegachart/VegaChart.component.tsx +0 -146
- package/stories/areachart.stories.tsx +0 -120
- package/stories/chips.stories.tsx +0 -107
- package/stories/cloudprogressbar.stories.tsx +0 -93
- package/stories/collapsiblepanel.stories.tsx +0 -57
- package/stories/data/areachart.ts +0 -122
- package/stories/data/sparklinechart.ts +0 -164
- package/stories/linechart.stories.tsx +0 -319
- package/stories/multiselect.stories.tsx +0 -126
- package/stories/select.stories.tsx +0 -52
- package/stories/sparkline.stories.tsx +0 -85
- package/stories/vegachart.stories.tsx +0 -98
|
@@ -11,6 +11,7 @@ const tabs = [
|
|
|
11
11
|
render: (
|
|
12
12
|
<InlineInput
|
|
13
13
|
id="instanceName"
|
|
14
|
+
// @ts-ignore
|
|
14
15
|
changeMutation={{
|
|
15
16
|
isLoading: false,
|
|
16
17
|
mutate: () => {},
|
|
@@ -174,3 +175,105 @@ export const NavbarWithOnlyLinkTabs = {
|
|
|
174
175
|
tabs: linkTabs,
|
|
175
176
|
},
|
|
176
177
|
};
|
|
178
|
+
|
|
179
|
+
export const NavbarDropdownShowcase = {
|
|
180
|
+
args: {
|
|
181
|
+
rightActions: [
|
|
182
|
+
{
|
|
183
|
+
type: 'dropdown',
|
|
184
|
+
text: 'Language',
|
|
185
|
+
variant: 'secondary',
|
|
186
|
+
size: 'default',
|
|
187
|
+
items: [
|
|
188
|
+
{
|
|
189
|
+
label: 'English',
|
|
190
|
+
name: 'EN',
|
|
191
|
+
onClick: action('English selected'),
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
label: 'Français',
|
|
195
|
+
name: 'FR',
|
|
196
|
+
onClick: action('French selected'),
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
label: 'Español',
|
|
200
|
+
name: 'ES',
|
|
201
|
+
onClick: action('Spanish selected'),
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
type: 'dropdown',
|
|
207
|
+
text: 'Help',
|
|
208
|
+
icon: <i className="fas fa-question-circle" />,
|
|
209
|
+
variant: 'outline',
|
|
210
|
+
size: 'default',
|
|
211
|
+
items: [
|
|
212
|
+
{
|
|
213
|
+
label: 'Documentation',
|
|
214
|
+
onClick: action('Documentation clicked'),
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
label: 'Tutorials',
|
|
218
|
+
onClick: action('Tutorials clicked'),
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: 'Contact Support',
|
|
222
|
+
onClick: action('Contact Support clicked'),
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
label: 'Release Notes',
|
|
226
|
+
onClick: action('Release Notes clicked'),
|
|
227
|
+
},
|
|
228
|
+
],
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
type: 'dropdown',
|
|
232
|
+
icon: <i className="fas fa-user" />,
|
|
233
|
+
variant: 'primary',
|
|
234
|
+
size: 'default',
|
|
235
|
+
caret: false,
|
|
236
|
+
items: [
|
|
237
|
+
{
|
|
238
|
+
label: 'Profile Settings',
|
|
239
|
+
onClick: action('Profile clicked'),
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
label: 'Preferences',
|
|
243
|
+
onClick: action('Preferences clicked'),
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
label: 'API Keys',
|
|
247
|
+
onClick: action('API Keys clicked'),
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
label: 'Log out',
|
|
251
|
+
onClick: action('Logout clicked'),
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
tabs: [
|
|
257
|
+
{
|
|
258
|
+
selected: true,
|
|
259
|
+
title: 'Dashboard',
|
|
260
|
+
link: <a href="/dashboard">Dashboard</a>,
|
|
261
|
+
onClick: action('Dashboard clicked'),
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
selected: false,
|
|
265
|
+
title: 'Analytics',
|
|
266
|
+
link: <a href="/analytics">Analytics</a>,
|
|
267
|
+
onClick: action('Analytics clicked'),
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
},
|
|
271
|
+
parameters: {
|
|
272
|
+
docs: {
|
|
273
|
+
description: {
|
|
274
|
+
story:
|
|
275
|
+
'This story showcases different dropdown variants within the navbar. The dropdowns use the new ButtonV2 styling with variants: secondary, outline, and primary. Notice how the different variants provide visual hierarchy and the icon-only dropdown uses caret: false for a cleaner look.',
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
};
|
|
@@ -3,12 +3,13 @@ import { TextBadge } from '../src/lib/components/textbadge/TextBadge.component';
|
|
|
3
3
|
import { Tabs, Tab } from '../src/lib/components/tabsv2/Tabsv2.component';
|
|
4
4
|
import { Wrapper, Title } from './common';
|
|
5
5
|
import { BrowserRouter } from 'react-router-dom';
|
|
6
|
-
import {
|
|
6
|
+
import { coreUIAvailableThemes } from '../src/lib/style/theme';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
-
import {
|
|
8
|
+
import { useLocation } from 'react-router';
|
|
9
|
+
import { spacing } from '../src/lib';
|
|
9
10
|
|
|
10
11
|
const Content = styled.div`
|
|
11
|
-
padding: ${spacing.
|
|
12
|
+
padding: ${spacing.r24};
|
|
12
13
|
color: ${(props) => props.theme.textPrimary};
|
|
13
14
|
height: 100%;
|
|
14
15
|
`;
|
|
@@ -55,13 +56,13 @@ const generateTab = (n = 10, selectedIndex = 0) => {
|
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
const customTabStyle = {
|
|
58
|
-
activeTabColor:
|
|
59
|
-
activeTabSeparator:
|
|
60
|
-
tabLineColor:
|
|
61
|
-
inactiveTabColor:
|
|
62
|
-
tabContentColor:
|
|
63
|
-
separatorColor:
|
|
64
|
-
tabHoverColor:
|
|
59
|
+
activeTabColor: coreUIAvailableThemes.darkRebrand.selectedActive,
|
|
60
|
+
activeTabSeparator: coreUIAvailableThemes.darkRebrand.statusHealthy,
|
|
61
|
+
tabLineColor: coreUIAvailableThemes.darkRebrand.backgroundLevel3,
|
|
62
|
+
inactiveTabColor: coreUIAvailableThemes.darkRebrand.highlight,
|
|
63
|
+
tabContentColor: coreUIAvailableThemes.darkRebrand.buttonPrimary,
|
|
64
|
+
separatorColor: coreUIAvailableThemes.darkRebrand.statusCritical,
|
|
65
|
+
tabHoverColor: coreUIAvailableThemes.darkRebrand.statusHealthy,
|
|
65
66
|
};
|
|
66
67
|
|
|
67
68
|
const DefaultTabsDetails = (props) => {
|
|
@@ -87,52 +88,46 @@ const DefaultTabsDetails = (props) => {
|
|
|
87
88
|
<Title>
|
|
88
89
|
{location.pathname} / {location.search}
|
|
89
90
|
</Title>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<Content>Properties Content</Content>
|
|
131
|
-
</Tab>
|
|
132
|
-
</Tabs>
|
|
133
|
-
)}
|
|
134
|
-
/>
|
|
135
|
-
</MemoryRouter>
|
|
91
|
+
|
|
92
|
+
<Tabs {...props}>
|
|
93
|
+
<Tab path="/path" label="Users" withoutPadding>
|
|
94
|
+
<Content>Users Content</Content>
|
|
95
|
+
</Tab>
|
|
96
|
+
<Tab
|
|
97
|
+
path="/path1"
|
|
98
|
+
query={{
|
|
99
|
+
tab: 'group',
|
|
100
|
+
}}
|
|
101
|
+
label="Groups"
|
|
102
|
+
>
|
|
103
|
+
{details()}
|
|
104
|
+
</Tab>
|
|
105
|
+
<Tab
|
|
106
|
+
path="/path1"
|
|
107
|
+
query={{
|
|
108
|
+
tab: 'role',
|
|
109
|
+
}}
|
|
110
|
+
label="Roles"
|
|
111
|
+
withoutPadding
|
|
112
|
+
>
|
|
113
|
+
<Content>Roles content</Content>
|
|
114
|
+
</Tab>
|
|
115
|
+
<Tab
|
|
116
|
+
path="/path1"
|
|
117
|
+
query={{
|
|
118
|
+
tab: 'policies',
|
|
119
|
+
}}
|
|
120
|
+
label="Policies"
|
|
121
|
+
>
|
|
122
|
+
<Content>Policies content</Content>
|
|
123
|
+
</Tab>
|
|
124
|
+
<Tab path="/path4" label="Storage Location">
|
|
125
|
+
<Content>Storage Location Content</Content>
|
|
126
|
+
</Tab>
|
|
127
|
+
<Tab path="/path5" label="Properties">
|
|
128
|
+
<Content>Properties Content</Content>
|
|
129
|
+
</Tab>
|
|
130
|
+
</Tabs>
|
|
136
131
|
</>
|
|
137
132
|
);
|
|
138
133
|
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type Props = {
|
|
2
|
-
id: string;
|
|
3
|
-
data: Array<Record<string, any>>;
|
|
4
|
-
xAxis: Record<string, any>;
|
|
5
|
-
yAxis: Array<Record<string, any>>;
|
|
6
|
-
color?: Record<string, any>;
|
|
7
|
-
areas: Array<Record<string, any>>;
|
|
8
|
-
width?: number;
|
|
9
|
-
height?: number;
|
|
10
|
-
};
|
|
11
|
-
declare function AreaChart({ id, data, xAxis, yAxis, color, height, width, areas, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export { AreaChart };
|
|
13
|
-
//# sourceMappingURL=AreaChart.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AreaChart.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/areachart/AreaChart.component.tsx"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,iBAAS,SAAS,CAAC,EACjB,EAAE,EACF,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAY,EACZ,KAAY,EACZ,KAAU,EACV,GAAG,IAAI,EACR,EAAE,KAAK,2CAuBP;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { VegaChart } from '../vegachart/VegaChart.component';
|
|
3
|
-
function AreaChart({ id, data, xAxis, yAxis, color, height = 300, width = 1000, areas = [], ...rest }) {
|
|
4
|
-
const lines = yAxis.map((y) => ({
|
|
5
|
-
mark: {
|
|
6
|
-
type: 'line',
|
|
7
|
-
},
|
|
8
|
-
encoding: {
|
|
9
|
-
y,
|
|
10
|
-
},
|
|
11
|
-
}));
|
|
12
|
-
const spec = {
|
|
13
|
-
data: {
|
|
14
|
-
values: data,
|
|
15
|
-
},
|
|
16
|
-
encoding: {
|
|
17
|
-
x: xAxis,
|
|
18
|
-
color,
|
|
19
|
-
},
|
|
20
|
-
layer: [...lines, ...areas],
|
|
21
|
-
height,
|
|
22
|
-
width,
|
|
23
|
-
...rest,
|
|
24
|
-
};
|
|
25
|
-
return _jsx(VegaChart, { className: "sc-areachart", id: id, spec: spec });
|
|
26
|
-
}
|
|
27
|
-
export { AreaChart };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Size } from '../constants';
|
|
2
|
-
type Props = {
|
|
3
|
-
text: string;
|
|
4
|
-
variant?: 'statusHealthy' | 'statusWarning' | 'statusCritical' | 'infoPrimary' | 'infoSecondary';
|
|
5
|
-
icon?: JSX.Element;
|
|
6
|
-
onClick?: (arg0: any) => void;
|
|
7
|
-
onRemove?: (arg0: any) => void;
|
|
8
|
-
size?: Size;
|
|
9
|
-
};
|
|
10
|
-
export declare const ChipsIcon: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
11
|
-
variant: any;
|
|
12
|
-
text: string;
|
|
13
|
-
size: Size;
|
|
14
|
-
}, never>;
|
|
15
|
-
export declare const ChipsText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
16
|
-
icon: any;
|
|
17
|
-
isRemovable: boolean;
|
|
18
|
-
}, never>;
|
|
19
|
-
declare const Chips: ({ text, variant, icon, onClick, onRemove, size, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export { Chips };
|
|
21
|
-
//# sourceMappingURL=Chips.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chips.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/chips/Chips.component.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EACJ,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,eAAe,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AA0FF,eAAO,MAAM,SAAS;aACX,GAAG;UACN,MAAM;UACN,IAAI;SAOX,CAAC;AACF,eAAO,MAAM,SAAS;UAAuB,GAAG;iBAAe,OAAO;SAKrE,CAAC;AAEF,QAAA,MAAM,KAAK,sDAOR,KAAK,4CAgCP,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { lighten } from 'polished';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
import { fontSize, grayLight, white } from '../../style/theme';
|
|
5
|
-
import { Button } from '../button/Button.component';
|
|
6
|
-
import { Icon } from '../icon/Icon.component';
|
|
7
|
-
const ChipsContainer = styled.div `
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
.sc-chips-remove {
|
|
10
|
-
padding-right: 10px;
|
|
11
|
-
color: ${white};
|
|
12
|
-
&:hover {
|
|
13
|
-
color: ${grayLight};
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
${(props) => {
|
|
17
|
-
switch (props.size) {
|
|
18
|
-
case 'smaller':
|
|
19
|
-
return css `
|
|
20
|
-
border-radius: 10px;
|
|
21
|
-
.sc-chips-icon {
|
|
22
|
-
border-radius: 10px;
|
|
23
|
-
padding: 5px;
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
case 'small':
|
|
27
|
-
return css `
|
|
28
|
-
border-radius: 12px;
|
|
29
|
-
.sc-chips-icon {
|
|
30
|
-
border-radius: 12px;
|
|
31
|
-
padding: 6px;
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
case 'large':
|
|
35
|
-
return css `
|
|
36
|
-
border-radius: 14px;
|
|
37
|
-
.sc-chips-icon {
|
|
38
|
-
border-radius: 14px;
|
|
39
|
-
padding: 6px;
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
|
-
case 'larger':
|
|
43
|
-
return css `
|
|
44
|
-
border-radius: 17px;
|
|
45
|
-
.sc-chips-icon {
|
|
46
|
-
border-radius: 17px;
|
|
47
|
-
padding: 7px;
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
default:
|
|
51
|
-
return css `
|
|
52
|
-
border-radius: 12px;
|
|
53
|
-
.sc-chips-icon {
|
|
54
|
-
border-radius: 12px;
|
|
55
|
-
padding: 6px;
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
58
|
-
}
|
|
59
|
-
}}
|
|
60
|
-
${(props) => {
|
|
61
|
-
const brand = props.theme;
|
|
62
|
-
return css `
|
|
63
|
-
color: ${brand.textReverse};
|
|
64
|
-
`;
|
|
65
|
-
}}
|
|
66
|
-
|
|
67
|
-
${(props) => {
|
|
68
|
-
const brand = props.theme;
|
|
69
|
-
const brandLight = lighten(0.1, brand[props.variant]).toString();
|
|
70
|
-
return props.onClick
|
|
71
|
-
? css `
|
|
72
|
-
background-color: ${brand[props.variant]};
|
|
73
|
-
font-size: ${fontSize[props.size || 'base']};
|
|
74
|
-
&:hover {
|
|
75
|
-
cursor: pointer;
|
|
76
|
-
background-color: ${brandLight};
|
|
77
|
-
}
|
|
78
|
-
&:active {
|
|
79
|
-
background-color: ${brand[props.variant]};
|
|
80
|
-
}
|
|
81
|
-
`
|
|
82
|
-
: css `
|
|
83
|
-
background-color: ${brand[props.variant]};
|
|
84
|
-
font-size: ${fontSize[props.size || 'base']};
|
|
85
|
-
`;
|
|
86
|
-
}}
|
|
87
|
-
`;
|
|
88
|
-
export const ChipsIcon = styled.span `
|
|
89
|
-
display: inline-flex;
|
|
90
|
-
justify-content: center;
|
|
91
|
-
align-items: center;
|
|
92
|
-
background-color: ${(props) => lighten(0.15, props.theme[props.variant]).toString()};
|
|
93
|
-
`;
|
|
94
|
-
export const ChipsText = styled.span `
|
|
95
|
-
display: inline-flex;
|
|
96
|
-
justify-content: center;
|
|
97
|
-
align-items: center;
|
|
98
|
-
padding: ${(props) => (props.icon || props.isRemovable ? '5px' : '5px 10px')};
|
|
99
|
-
`;
|
|
100
|
-
const Chips = ({ text = '', variant = 'infoPrimary', icon = undefined, onClick, onRemove, size = 'base', }) => (_jsxs(ChipsContainer, { className: "sc-chips", onClick: onClick, variant: variant, icon: icon, size: size, children: [icon && (_jsx(ChipsIcon, { className: "sc-chips-icon", text: text, variant: variant, size: size, children: icon })), _jsx(ChipsText, { className: "sc-chips-text", icon: icon, isRemovable: !!onRemove, children: text }), onRemove && (_jsx(Button
|
|
101
|
-
// @ts-ignore
|
|
102
|
-
, {
|
|
103
|
-
// @ts-ignore
|
|
104
|
-
className: "sc-chips-remove", size: size, inverted: true, icon: _jsx(Icon, { name: "Close" }), onClick: onRemove }))] }));
|
|
105
|
-
export { Chips };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type CloudProgressBarProps = {
|
|
2
|
-
percentage: number;
|
|
3
|
-
borderSize: string;
|
|
4
|
-
cloudColor?: string;
|
|
5
|
-
progressCloudColor?: string;
|
|
6
|
-
children: JSX.Element;
|
|
7
|
-
};
|
|
8
|
-
declare const CloudProgressBar: ({ percentage, borderSize, cloudColor, progressCloudColor, children, }: CloudProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { CloudProgressBar };
|
|
10
|
-
//# sourceMappingURL=CloudProgressBar.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloudProgressBar.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/cloudprogressbar/CloudProgressBar.component.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;CACvB,CAAC;AA6EF,QAAA,MAAM,gBAAgB,0EAMnB,qBAAqB,4CAWvB,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import styled, { css, keyframes } from 'styled-components';
|
|
3
|
-
import { coreUIAvailableThemes } from '../../style/theme';
|
|
4
|
-
const keyFrameCloud = (props) => {
|
|
5
|
-
return keyframes `
|
|
6
|
-
from {
|
|
7
|
-
height:100%
|
|
8
|
-
}
|
|
9
|
-
to {
|
|
10
|
-
height:${100 - props.percentage}%
|
|
11
|
-
}`;
|
|
12
|
-
};
|
|
13
|
-
const Container = styled.div `
|
|
14
|
-
${(props) => {
|
|
15
|
-
return css `
|
|
16
|
-
text-align: center;
|
|
17
|
-
position: relative;
|
|
18
|
-
`;
|
|
19
|
-
}}
|
|
20
|
-
`;
|
|
21
|
-
const ContainerProgress = styled.div `
|
|
22
|
-
${(props) => {
|
|
23
|
-
return css `
|
|
24
|
-
animation-duration: 1s;
|
|
25
|
-
animation-fill-mode: both;
|
|
26
|
-
animation-name: ${keyFrameCloud};
|
|
27
|
-
position: absolute;
|
|
28
|
-
top: 0;
|
|
29
|
-
left: 0;
|
|
30
|
-
width: 100%;
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
`;
|
|
33
|
-
}}
|
|
34
|
-
`;
|
|
35
|
-
const Cloud = ({ strokeColor, borderSize }) => (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 15 72 42", enableBackground: "new 0 0 72 72", children: _jsx("g", { children: _jsx("path", { fill: "none", stroke: strokeColor, strokeWidth: borderSize, strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", d: "M15.9,30.3c0,0.4-0.4,0.8-0.8,0.8C10,31.6,6,36.7,6,42.9c0,6.6,4.5,11.9,10.2,11.9h38.7C61,54.8,66,49.1,66,42.2c0-6.6-4.6-12.1-10.4-12.5c-0.4,0-0.8-0.3-0.9-0.8c-1.3-6.7-7.3-11.7-14.3-11.7c-4.6,0-8.7,2.1-11.3,5.4C28.8,23,28.3,23.1,28,23c-1-0.4-2.1-0.6-3.3-0.6C20.1,22.3,16.3,25.8,15.9,30.3z" }) }) }));
|
|
36
|
-
const CloudProgress = ({ strokeColor, percentage, borderSize }) => (_jsx(ContainerProgress, { percentage: percentage, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 15 72 42", enableBackground: "new 0 0 72 72", children: _jsx("g", { children: _jsx("path", { fill: "none", stroke: strokeColor, strokeWidth: borderSize, strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", d: "M15.9,30.3c0,0.4-0.4,0.8-0.8,0.8C10,31.6,6,36.7,6,42.9c0,6.6,4.5,11.9,10.2,11.9h38.7C61,54.8,66,49.1,66,42.2c0-6.6-4.6-12.1-10.4-12.5c-0.4,0-0.8-0.3-0.9-0.8c-1.3-6.7-7.3-11.7-14.3-11.7c-4.6,0-8.7,2.1-11.3,5.4C28.8,23,28.3,23.1,28,23c-1-0.4-2.1-0.6-3.3-0.6C20.1,22.3,16.3,25.8,15.9,30.3z" }) }) }) }));
|
|
37
|
-
const CloudProgressBar = ({ percentage = 0, borderSize = '2px', cloudColor = coreUIAvailableThemes.darkRebrand.statusHealthy, progressCloudColor = coreUIAvailableThemes.darkRebrand.backgroundLevel1, children, }) => (_jsxs(Container, { className: "sc-cloudprogressbar", children: [_jsx(Cloud, { strokeColor: progressCloudColor, borderSize: borderSize }), _jsx(CloudProgress, { strokeColor: cloudColor, percentage: percentage, borderSize: borderSize }), children] }));
|
|
38
|
-
export { CloudProgressBar };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type Props = {
|
|
2
|
-
expanded: boolean;
|
|
3
|
-
onHeaderClick: (arg0: any) => void;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
headerItems: Array<JSX.Element>;
|
|
6
|
-
};
|
|
7
|
-
declare function CollapsiblePanel({ expanded, onHeaderClick, children, headerItems, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export { CollapsiblePanel };
|
|
9
|
-
//# sourceMappingURL=CollapsiblePanel.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsiblePanel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/collapsiblepanel/CollapsiblePanel.component.tsx"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;CACjC,CAAC;AAqCF,iBAAS,gBAAgB,CAAC,EACxB,QAAgB,EAChB,aAAa,EACb,QAAQ,EACR,WAAgB,GACjB,EAAE,KAAK,2CAuBP;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { spacing } from '../../spacing';
|
|
4
|
-
import { fontSize } from '../../style/theme';
|
|
5
|
-
import { Icon } from '../icon/Icon.component';
|
|
6
|
-
const ARROW = {
|
|
7
|
-
colapsed: 'fas fa-angle-down',
|
|
8
|
-
expanded: 'fas fa-angle-up',
|
|
9
|
-
};
|
|
10
|
-
const HeaderText = styled.div `
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
flex-grow: 1;
|
|
14
|
-
`;
|
|
15
|
-
const HeaderItem = styled.div `
|
|
16
|
-
margin-right: ${spacing.r16};
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-grow: 1;
|
|
19
|
-
`;
|
|
20
|
-
const HeaderIcon = styled.div `
|
|
21
|
-
font-size: ${fontSize.larger};
|
|
22
|
-
margin: 0 ${spacing.r16};
|
|
23
|
-
`;
|
|
24
|
-
const CollapsiblePanelContainer = styled.div `
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
border-radius: 4px;
|
|
28
|
-
background-color: ${(props) => props.theme.backgroundLevel1};
|
|
29
|
-
color: ${(props) => props.theme.textPrimary};
|
|
30
|
-
`;
|
|
31
|
-
const HeaderContainer = styled.div `
|
|
32
|
-
display: flex;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
padding: ${spacing.r16};
|
|
35
|
-
`;
|
|
36
|
-
const ExpandedContainer = styled.div `
|
|
37
|
-
padding: ${spacing.r16};
|
|
38
|
-
color: ${(props) => props.theme.textPrimary};
|
|
39
|
-
background-color: ${(props) => props.theme.backgroundLevel1};
|
|
40
|
-
`;
|
|
41
|
-
function CollapsiblePanel({ expanded = false, onHeaderClick, children, headerItems = [], }) {
|
|
42
|
-
return (_jsxs(CollapsiblePanelContainer, { className: "sc-collapsiblepanel", children: [_jsxs(HeaderContainer, { onClick: onHeaderClick, className: "sc-collapsiblepanel-header", children: [_jsx(HeaderText, { children: headerItems.map((item, index) => (_jsx(HeaderItem, { children: item }, index))) }), _jsx(HeaderIcon, { children: _jsx(Icon, { name: expanded ? 'Dropdown-up' : 'Dropdown-down' }) })] }), expanded && (_jsx(ExpandedContainer, { className: "sc-collapsiblepanel-content", children: children }))] }));
|
|
43
|
-
}
|
|
44
|
-
export { CollapsiblePanel };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { $PropertyType } from 'utility-types';
|
|
2
|
-
import type { Encoding, Field } from 'vega-lite';
|
|
3
|
-
type Props = {
|
|
4
|
-
id: string;
|
|
5
|
-
data: Array<Record<string, any>>;
|
|
6
|
-
xAxis: Record<string, any>;
|
|
7
|
-
yAxis: Array<Record<string, any>>;
|
|
8
|
-
color?: Record<string, any>;
|
|
9
|
-
tooltip?: boolean;
|
|
10
|
-
lineConfig?: Record<string, any>;
|
|
11
|
-
width?: number;
|
|
12
|
-
height?: number;
|
|
13
|
-
displayTrendLine?: boolean;
|
|
14
|
-
strokeDashEncodingConfig?: $PropertyType<Encoding<Field>, 'strokeDash'>;
|
|
15
|
-
opacityEncodingConfig?: $PropertyType<Encoding<Field>, 'opacity'>;
|
|
16
|
-
tooltipConfig?: $PropertyType<Encoding<Field>, 'tooltip'>;
|
|
17
|
-
tooltipTheme?: 'light' | 'dark' | 'custom';
|
|
18
|
-
};
|
|
19
|
-
declare function LineChart({ id, data, xAxis, yAxis, color, tooltip, lineConfig, height, width, displayTrendLine, strokeDashEncodingConfig, opacityEncodingConfig, tooltipConfig, tooltipTheme, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export { LineChart };
|
|
21
|
-
//# sourceMappingURL=LineChart.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/linechart/LineChart.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACjD,KAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC;IACxE,qBAAqB,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;IAClE,aAAa,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;IAC1D,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;CAC5C,CAAC;AAEF,iBAAS,SAAS,CAAC,EACjB,EAAE,EACF,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,OAAe,EACf,UAAU,EACV,MAAY,EACZ,KAAY,EACZ,gBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,GAAG,IAAI,EACR,EAAE,KAAK,2CAgHP;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|