@scality/core-ui 0.118.0 → 0.119.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.
Files changed (63) hide show
  1. package/dist/components/buttonv2/Buttonv2.component.js +2 -2
  2. package/dist/components/card/Card.component.d.ts +1 -1
  3. package/dist/components/card/Card.component.d.ts.map +1 -1
  4. package/dist/components/card/Card.component.js +7 -13
  5. package/dist/components/checkbox/Checkbox.component.js +2 -2
  6. package/dist/components/dropdown/Dropdown.component.d.ts.map +1 -1
  7. package/dist/components/dropdown/Dropdown.component.js +0 -1
  8. package/dist/components/inputv2/inputv2.d.ts +1 -2
  9. package/dist/components/inputv2/inputv2.d.ts.map +1 -1
  10. package/dist/components/inputv2/inputv2.js +5 -3
  11. package/dist/components/searchinput/SearchInput.component.d.ts +3 -0
  12. package/dist/components/searchinput/SearchInput.component.d.ts.map +1 -1
  13. package/dist/components/searchinput/SearchInput.component.js +33 -52
  14. package/dist/components/sidebar/Sidebar.component.d.ts.map +1 -1
  15. package/dist/components/sidebar/Sidebar.component.js +8 -7
  16. package/dist/components/tablev2/Search.d.ts +1 -1
  17. package/dist/components/tablev2/Search.d.ts.map +1 -1
  18. package/dist/components/tablev2/Search.js +1 -1
  19. package/dist/components/tablev2/SearchWithQueryParams.d.ts +2 -2
  20. package/dist/components/tablev2/SearchWithQueryParams.d.ts.map +1 -1
  21. package/dist/components/tablev2/SearchWithQueryParams.js +1 -1
  22. package/dist/components/tablev2/Tablestyle.js +2 -2
  23. package/dist/components/vegachartv2/VegaChartV2.component.d.ts.map +1 -1
  24. package/dist/components/vegachartv2/VegaChartV2.component.js +44 -42
  25. package/dist/icons/branding-logo.d.ts +4 -0
  26. package/dist/icons/branding-logo.d.ts.map +1 -0
  27. package/dist/icons/branding-logo.js +3 -0
  28. package/dist/index.d.ts +0 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +0 -1
  31. package/dist/style/theme.js +15 -15
  32. package/package.json +15 -15
  33. package/src/lib/components/buttonv2/Buttonv2.component.tsx +2 -2
  34. package/src/lib/components/card/Card.component.tsx +10 -19
  35. package/src/lib/components/checkbox/Checkbox.component.tsx +14 -2
  36. package/src/lib/components/dropdown/Dropdown.component.tsx +0 -1
  37. package/src/lib/components/inputv2/inputv2.tsx +19 -24
  38. package/src/lib/components/searchinput/SearchInput.component.tsx +54 -62
  39. package/src/lib/components/sidebar/Sidebar.component.tsx +8 -9
  40. package/src/lib/components/tablev2/Search.tsx +2 -1
  41. package/src/lib/components/tablev2/SearchWithQueryParams.tsx +4 -3
  42. package/src/lib/components/tablev2/Tablestyle.tsx +2 -2
  43. package/src/lib/components/vegachartv2/VegaChartV2.component.tsx +47 -50
  44. package/src/lib/icons/branding-logo.tsx +47 -0
  45. package/src/lib/index.ts +0 -1
  46. package/src/lib/style/theme.ts +15 -15
  47. package/stories/card.stories.tsx +4 -11
  48. package/stories/color.mdx +3 -3
  49. package/stories/layout.stories.tsx +11 -60
  50. package/stories/navbar.stories.tsx +4 -2
  51. package/stories/searchinput.stories.tsx +21 -1
  52. package/stories/spacing.stories.tsx +8 -8
  53. package/stories/steppers.stories.tsx +14 -15
  54. package/stories/tablev2.stories.tsx +23 -10
  55. package/stories/tabsv2.stories.tsx +0 -2
  56. package/dist/components/input/Input.component.d.ts +0 -24
  57. package/dist/components/input/Input.component.d.ts.map +0 -1
  58. package/dist/components/input/Input.component.js +0 -55
  59. package/dist/components/input/Input.component.style.d.ts +0 -9
  60. package/dist/components/input/Input.component.style.d.ts.map +0 -1
  61. package/dist/components/input/Input.component.style.js +0 -136
  62. package/src/lib/components/input/Input.component.style.ts +0 -141
  63. package/src/lib/components/input/Input.component.tsx +0 -174
@@ -1,15 +1,8 @@
1
1
  // @ts-nocheck
2
- import React, {
3
- useEffect,
4
- useContext,
5
- useRef,
6
- useLayoutEffect,
7
- useMemo,
8
- } from 'react';
2
+ import React, { useEffect, useRef, useLayoutEffect, useMemo } from 'react';
9
3
  import * as vega from 'vega';
10
4
  import vegaEmbed, { Result } from 'vega-embed';
11
- import { ThemeContext, createGlobalStyle } from 'styled-components';
12
- import { getThemePropSelector } from '../../utils';
5
+ import { createGlobalStyle, css, useTheme } from 'styled-components';
13
6
  import { useCursorX, SyncedCursorChartsContext } from './SyncedCursorCharts';
14
7
  import { TooltipHandlerWithPaint } from '../linetemporalchart/tooltip';
15
8
  export const TOP = 'top';
@@ -33,29 +26,35 @@ https://github.com/vega/vega-tooltip/blob/master/docs/customizing_your_tooltip.m
33
26
  */
34
27
  const VegaTooltipTheme = createGlobalStyle`
35
28
  #vg-tooltip-element.vg-tooltip.custom-theme {
36
- padding: 8px;
37
- position: fixed;
38
- z-index: 1000;
39
- width: calc(100vw/6);
40
- font-family: 'Lato';
41
- font-size: 12px;
42
- border-radius: 3px;
43
- box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
44
- color: ${getThemePropSelector('textPrimary')};
45
- background-color: ${getThemePropSelector('backgroundLevel1')};
46
- border: 1px solid ${getThemePropSelector('border')};
47
- // customize the title
48
- h2 {
49
- color: ${getThemePropSelector('textPrimary')};
50
- margin-bottom: 10px;
51
- font-size: 12px;
52
- }
53
- table {
54
- width: 100%;
55
- }
56
- table tr td.key {
57
- color: ${getThemePropSelector('textSecondary')};
58
- }
29
+ ${(props) => {
30
+ const { theme } = props;
31
+ return css`
32
+ padding: 8px;
33
+ position: fixed;
34
+ z-index: 1000;
35
+ width: calc(100vw / 6);
36
+ font-family: 'Lato';
37
+ font-size: 12px;
38
+ border-radius: 3px;
39
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
40
+ color: ${theme.textPrimary};
41
+ background-color: ${theme.backgroundLevel1};
42
+ border: 1px solid ${theme.border};
43
+ // customize the title
44
+ h2 {
45
+ color: ${theme.textPrimary};
46
+ margin-bottom: 10px;
47
+ font-size: 12px;
48
+ }
49
+ table {
50
+ width: 100%;
51
+ }
52
+ table tr td.key {
53
+ color: ${theme.textSecondary};
54
+ }
55
+ `;
56
+ }}
57
+
59
58
  }
60
59
  `;
61
60
 
@@ -73,42 +72,36 @@ function VegaChartInternal(
73
72
  ) {
74
73
  // $FlowFixMe
75
74
  const { cursorX, setCursorX } = useCursorX();
76
- const themeContext = useContext(ThemeContext);
77
- // the background color of the view
78
- const seriesBackgroundColor =
79
- themeContext && themeContext.brand
80
- ? themeContext.brand.backgroundLevel1
81
- : themeContext.backgroundLevel1;
82
- const brandText =
83
- themeContext && themeContext.brand
84
- ? themeContext.brand.textPrimary
85
- : themeContext.textPrimary;
75
+ const currentTheme = useTheme();
86
76
  const themeConfig = {
87
77
  config: {
88
- background: 'transparent',
78
+ background: currentTheme.backgroundLevel1,
89
79
  axis: {
90
- labelColor: brandText,
91
- titleColor: brandText,
80
+ labelColor: currentTheme.textSecondary,
81
+ titleColor: currentTheme.textSecondary,
92
82
  grid: false,
93
83
  domainColor: 'transparent',
94
84
  },
95
85
  title: {
96
- color: brandText,
86
+ color: currentTheme.buttonDelete,
97
87
  font: 'Lato',
98
88
  },
99
89
  view: {
100
90
  stroke: 'transparent',
101
- fill: seriesBackgroundColor,
91
+ fill: currentTheme.backgroundLevel1,
102
92
  },
103
93
  // the headers provide a title and labels for faceted plots.
104
94
  header: {
105
- labelColor: brandText,
95
+ labelColor: currentTheme.textPrimary,
106
96
  },
107
97
  // the label of max/min
108
98
  text: {
109
- color: brandText,
99
+ color: currentTheme.textPrimary,
110
100
  font: 'Lato',
111
101
  },
102
+ legend: {
103
+ labelColor: currentTheme.textSecondary,
104
+ },
112
105
  },
113
106
  };
114
107
  const themedSpec = { ...spec, ...themeConfig };
@@ -195,7 +188,8 @@ function VegaChartInternal(
195
188
  vegaInstance.current.view.finalize();
196
189
  }
197
190
  }; // eslint-disable-next-line react-hooks/exhaustive-deps
198
- }, [vegaDOMInstance]);
191
+ }, [vegaDOMInstance, currentTheme]);
192
+
199
193
  useLayoutEffect(() => {
200
194
  if (vegaInstance.current) {
201
195
  const view = vegaInstance.current.view;
@@ -205,6 +199,7 @@ function VegaChartInternal(
205
199
  tooltipHandler.paint(); // to repaint the tooltip
206
200
  }
207
201
  }, [formatTooltip, vegaInstance, onHover]);
202
+
208
203
  useLayoutEffect(() => {
209
204
  if (vegaInstance.current) {
210
205
  const view = vegaInstance.current.view;
@@ -227,6 +222,7 @@ function VegaChartInternal(
227
222
  JSON.stringify(themedSpec.data.values),
228
223
  vegaInstance,
229
224
  ]);
225
+
230
226
  useLayoutEffect(() => {
231
227
  if (vegaInstance.current && themedSpec.params) {
232
228
  const view = vegaInstance.current.view;
@@ -269,6 +265,7 @@ function VegaChartInternal(
269
265
  ref={vegaDOMInstance}
270
266
  style={{
271
267
  width: '100%',
268
+ border: `${currentTheme.backgroundLevel3} 1px solid`,
272
269
  }}
273
270
  >
274
271
  <VegaTooltipTheme />
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+
3
+ const Logo = () => (
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="49"
7
+ height="49"
8
+ viewBox="0 0 49 49"
9
+ >
10
+ <path
11
+ fill="#3d9bd6"
12
+ d="M21.25 4.42v7.25h3.99V4.33l5.16 2.92 2-3.36L27.14.97A7.7 7.7 0 0 0 23.15 0c-1.36 0-2.72.35-3.89 1.06L14 3.98l1.99 3.36z"
13
+ />
14
+ <path
15
+ fill="#007664"
16
+ d="M21.25 4.42v7.25h3.99V4.33l5.16 2.92 2-3.36L27.14.97A7.7 7.7 0 0 0 23.15 0c-1.36 0-2.72.35-3.89 1.06L14 3.98l1.99 3.36z"
17
+ />
18
+ <path
19
+ fill="#ee4642"
20
+ d="M21.16 44.25V37h3.99v7.25l5.16-2.92 2 3.36-5.17 2.92a7.9 7.9 0 0 1-7.88 0L14 44.69l1.99-3.36z"
21
+ />
22
+ <path
23
+ fill="#2aad8e"
24
+ d="M40.43 13.28L34 16.9l1.99 3.36 6.44-3.62v5.83h3.99v-5.92c0-1.33-.37-2.65-1.09-3.8a8.82 8.82 0 0 0-2.9-2.83L37.17 7l-1.99 3.36z"
25
+ />
26
+ <path
27
+ fill="#d71d4f"
28
+ d="M4.99 32.84l6.43-3.63 2 3.36-6.44 3.63 5.17 2.91-2 3.36-5.25-2.92a7.6 7.6 0 0 1-2.81-2.82A7.1 7.1 0 0 1 1 32.92V27h3.99z"
29
+ />
30
+ <path
31
+ fill="#9e2569"
32
+ d="M4.08 16.64l6.43 3.62 2-3.36-6.44-3.62 5.17-2.92-2-3.36-5.25 2.92a8.72 8.72 0 0 0-2.9 2.83A7.16 7.16 0 0 0 0 16.64v5.92h3.99z"
33
+ />
34
+ <path
35
+ fill="#f79836"
36
+ d="M40.34 36.2L34 32.57l1.99-3.36 6.44 3.63V27h3.99v5.92c0 1.33-.37 2.57-1.09 3.81a8.69 8.69 0 0 1-2.9 2.82l-5.26 2.92-1.99-3.36z"
37
+ />
38
+ <path fill="#007664" d="M24 15v8.22l7.34-4.06z" />
39
+ <path fill="#9e2569" d="M23.25 15L16 19.16l7.25 4.06z" />
40
+ <path fill="#d71d4f" d="M22.25 25.07L15 21v8.13z" />
41
+ <path fill="#2aad8e" d="M24 24.98l7.25 4.07V21z" />
42
+ <path fill="#ee4642" d="M23.16 26L16 30.07l7.16 4.15z" />
43
+ <path fill="#f79836" d="M24 26v8.22l7.25-4.15z" />
44
+ </svg>
45
+ );
46
+
47
+ export { Logo };
package/src/lib/index.ts CHANGED
@@ -6,7 +6,6 @@ export { Button } from './components/button/Button.component';
6
6
  export { Checkbox } from './components/checkbox/Checkbox.component';
7
7
  export { Chips } from './components/chips/Chips.component';
8
8
  export { Dropdown } from './components/dropdown/Dropdown.component';
9
- export { Input } from './components/input/Input.component';
10
9
  export { LOADER_SIZE } from './components/constants';
11
10
  export { Layout } from './components/layout/Layout.component';
12
11
  export { Loader } from './components/loader/Loader.component';
@@ -90,25 +90,25 @@ export const coreUIAvailableThemes: Record<CoreUIThemeName, CoreUITheme> = {
90
90
  },
91
91
  artescaLight: {
92
92
  statusHealthy: '#009E93',
93
- statusHealthyRGB: '43,171,81',
93
+ statusHealthyRGB: '0, 158, 147',
94
94
  statusWarning: '#E77B00',
95
- statusWarningRGB: '252,138,50',
95
+ statusWarningRGB: '231, 123, 0',
96
96
  statusCritical: '#C10004',
97
- statusCriticalRGB: '232,72,85,1',
98
- selectedActive: '#90D0FF',
97
+ statusCriticalRGB: '193, 0, 4',
98
+ selectedActive: '#63A9D4',
99
99
  highlight: '#E3F2FD',
100
- border: '#999999',
101
- buttonPrimary: '#9DA6EC',
102
- buttonSecondary: '#CACFE3',
100
+ border: '#A9A9A9',
101
+ buttonPrimary: '#ABB4F5',
102
+ buttonSecondary: '#B8BCCD',
103
103
  buttonDelete: '#FFCDD2',
104
104
  infoPrimary: '#5C486D',
105
- infoSecondary: '#EBE3F1',
106
- backgroundLevel1: '#F9F9FB',
107
- backgroundLevel2: '#F3F3F5',
108
- backgroundLevel3: '#EAEAEC',
109
- backgroundLevel4: '#FAFAF8',
110
- textPrimary: '#101010',
111
- textSecondary: '#515170',
105
+ infoSecondary: '#E2D0E2',
106
+ backgroundLevel1: '#FCFCFC',
107
+ backgroundLevel2: '#F0F0F4',
108
+ backgroundLevel3: '#E4E6EC',
109
+ backgroundLevel4: '#FAFAF6',
110
+ textPrimary: '#0D0D0D',
111
+ textSecondary: '#4F506D',
112
112
  textTertiary: '#DFDFDF', // TO CHECK
113
113
  textReverse: '#EAEAEA',
114
114
  textLink: '#1349C5',
@@ -119,7 +119,7 @@ export const coreUIAvailableThemes: Record<CoreUIThemeName, CoreUITheme> = {
119
119
  statusWarning: '#FC8A32',
120
120
  statusWarningRGB: '252,138,50',
121
121
  statusCritical: '#E84855',
122
- statusCriticalRGB: '232,72,85,1',
122
+ statusCriticalRGB: '232,72,85',
123
123
  selectedActive: '#2196F3',
124
124
  highlight: '#1A3C75',
125
125
  border: '#313131',
@@ -17,13 +17,6 @@ const colors = Object.keys(brand).filter((color) => !/RGB/.test(color));
17
17
  export default {
18
18
  title: 'Components/Data Display/Card',
19
19
  component: Card,
20
- decorators: [
21
- (story) => (
22
- <Wrapper style={{ minHeight: '10vh', padding: '3rem' }}>
23
- {story()}
24
- </Wrapper>
25
- ),
26
- ],
27
20
  argTypes: {
28
21
  status: {
29
22
  options: ['healthy', 'warning', 'critical'],
@@ -79,7 +72,7 @@ export const Playground = {
79
72
  ...defaultPropsCard,
80
73
  children: [
81
74
  <CardHeader>
82
- <div>RINGXcore</div>
75
+ <div>Capacity usage</div>
83
76
  </CardHeader>,
84
77
  <CardBodyContainer>
85
78
  <CardBody>{defaultBody}</CardBody>
@@ -103,7 +96,7 @@ export const NormalCards = {
103
96
  ...defaultPropsCard,
104
97
  children: [
105
98
  <CardHeader>
106
- <div>RINGXcore</div>
99
+ <div>Capacity usage</div>
107
100
  </CardHeader>,
108
101
  <CardBodyContainer>
109
102
  <CardBody>{defaultBody}</CardBody>
@@ -154,7 +147,7 @@ export const NoBody = {
154
147
  status: 'critical',
155
148
  children: (
156
149
  <CardHeader>
157
- <div>RINGXcore</div>
150
+ <div>Capacity usage</div>
158
151
  </CardHeader>
159
152
  ),
160
153
  },
@@ -174,7 +167,7 @@ export const MultipleBodies = {
174
167
  status: 'critical',
175
168
  children: [
176
169
  <CardHeader>
177
- <div>RINGXcore</div>
170
+ <div>Capacity usage</div>
178
171
  </CardHeader>,
179
172
  <CardBodyContainer>
180
173
  <CardBody>{defaultBody}</CardBody>
package/stories/color.mdx CHANGED
@@ -6,7 +6,7 @@ import { coreUIAvailableThemes } from '../src/lib/style/theme';
6
6
 
7
7
  # Colors
8
8
 
9
- ## Artesca Dark
9
+ ## A-Dark
10
10
 
11
11
  <ColorPalette>
12
12
  {
@@ -18,7 +18,7 @@ import { coreUIAvailableThemes } from '../src/lib/style/theme';
18
18
 
19
19
  </ColorPalette>
20
20
 
21
- ## Artesca Light
21
+ ## A-Light
22
22
 
23
23
  <ColorPalette>
24
24
  {
@@ -30,7 +30,7 @@ import { coreUIAvailableThemes } from '../src/lib/style/theme';
30
30
 
31
31
  </ColorPalette>
32
32
 
33
- ## Ring Dark
33
+ ## R-Dark
34
34
 
35
35
  <ColorPalette>
36
36
  {
@@ -22,65 +22,16 @@ const HeaderComponent = styled.div`
22
22
  background: #ff9c54;
23
23
  flex: 1;
24
24
  color: black;
25
- }`;
26
-
27
- export const Layout2SimplestV2 = {
28
- args: {
29
- children: (
30
- <AppContainer>
31
- <AppContainer.ContextContainer background="backgroundLevel1">
32
- <>Context bar</>
33
- </AppContainer.ContextContainer>
34
- <AppContainer.OverallSummary noPadding>
35
- <Stack withSeparators={true} gap="r32">
36
- <Stack gap="r20">
37
- <Icon name="Account" size="2x" withWrapper />
38
- <Stack direction="vertical" gap="r4">
39
- <Text variant="Larger">6 Accounts</Text>
40
- <Text variant="Smaller" color="textSecondary">
41
- for this instance
42
- </Text>
43
- </Stack>
44
- </Stack>
45
- <Stack gap="r32">
46
- <Stack>
47
- <Icon name={'Check-circle'} color={'statusHealthy'} />
48
- <Text color="textSecondary">Replication</Text>
49
- </Stack>
50
- <Stack>
51
- <Icon name={'Check-circle'} color={'statusHealthy'} />
52
- <Text color="textSecondary">Expiration</Text>
53
- </Stack>
54
- <Stack>
55
- <Icon name={'Check-circle'} color={'statusHealthy'} />
56
- <Text color="textSecondary">Transition</Text>
57
- </Stack>
58
- </Stack>
59
- <Stack direction="vertical" gap="r4">
60
- <Stack gap="r4">
61
- <Text isEmphazed>Active Alerts</Text>
62
- <TextBadge text="0" variant="infoPrimary" />
63
- </Stack>
64
- <Text variant="Smaller" color="textSecondary">
65
- No active alerts
66
- </Text>
67
- </Stack>
68
- </Stack>
69
- </AppContainer.OverallSummary>
70
- <AppContainer.MainContent>Main content</AppContainer.MainContent>
71
- </AppContainer>
72
- ),
73
- },
74
- };
25
+ `;
75
26
 
76
27
  export const Layout2Simplest = {
77
28
  render: () => {
78
29
  return (
79
30
  <Layout2
80
31
  headerNavigation={
81
- // <HeaderComponent>
82
- <h3>Header navigation</h3>
83
- // </HeaderComponent>
32
+ <HeaderComponent>
33
+ <h3>Header navigation</h3>
34
+ </HeaderComponent>
84
35
  }
85
36
  >
86
37
  <AppContainer>
@@ -92,33 +43,33 @@ export const Layout2Simplest = {
92
43
  <Stack gap="r20">
93
44
  <Icon name="Account" size="2x" withWrapper />
94
45
  <Stack direction="vertical" gap="r4">
95
- <Text variant="Larger">6 Accounts</Text>
46
+ <Text variant="Larger">Title</Text>
96
47
  <Text variant="Smaller" color="textSecondary">
97
- for this instance
48
+ subtitle
98
49
  </Text>
99
50
  </Stack>
100
51
  </Stack>
101
52
  <Stack gap="r32">
102
53
  <Stack>
103
54
  <Icon name={'Check-circle'} color={'statusHealthy'} />
104
- <Text color="textSecondary">Replication</Text>
55
+ <Text color="textSecondary">Status 1</Text>
105
56
  </Stack>
106
57
  <Stack>
107
58
  <Icon name={'Check-circle'} color={'statusHealthy'} />
108
- <Text color="textSecondary">Expiration</Text>
59
+ <Text color="textSecondary">Status 2</Text>
109
60
  </Stack>
110
61
  <Stack>
111
62
  <Icon name={'Check-circle'} color={'statusHealthy'} />
112
- <Text color="textSecondary">Transition</Text>
63
+ <Text color="textSecondary">Status 3</Text>
113
64
  </Stack>
114
65
  </Stack>
115
66
  <Stack direction="vertical" gap="r4">
116
67
  <Stack gap="r4">
117
- <Text isEmphazed>Active Alerts</Text>
68
+ <Text isEmphazed>Alerts</Text>
118
69
  <TextBadge text="0" variant="infoPrimary" />
119
70
  </Stack>
120
71
  <Text variant="Smaller" color="textSecondary">
121
- No active alerts
72
+ No alerts
122
73
  </Text>
123
74
  </Stack>
124
75
  </Stack>
@@ -4,6 +4,7 @@ import { action } from '@storybook/addon-actions';
4
4
  import { Link } from '../src/lib/components/text/Text.component';
5
5
  import { InlineInput } from '../src/lib';
6
6
  import { Stack } from '../src/lib/spacing';
7
+ import { Logo } from '../src/lib/icons/branding-logo';
7
8
 
8
9
  const tabs = [
9
10
  {
@@ -86,8 +87,8 @@ const rightActions = [
86
87
  icon: <i className="fas fa-th" />,
87
88
  items: [
88
89
  {
89
- label: 'Hyperdrive UI',
90
- onClick: action('Hyperdrive UI clicked'),
90
+ label: 'App 1',
91
+ onClick: action('App 1 clicked'),
91
92
  },
92
93
  ],
93
94
  },
@@ -143,6 +144,7 @@ export default {
143
144
  productName: 'Hardware UI',
144
145
  rightActions,
145
146
  tabs,
147
+ logo: <Logo />,
146
148
  },
147
149
  };
148
150
 
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useState } from 'react';
2
2
  import { action } from '@storybook/addon-actions';
3
3
  import { SearchInput } from '../src/lib/components/searchinput/SearchInput.component';
4
4
  import { Wrapper, Title } from './common';
@@ -84,3 +84,23 @@ export const Default = {
84
84
  );
85
85
  },
86
86
  };
87
+ export const Debounce = {
88
+ render: (args) => {
89
+ const [value, setValue] = useState('');
90
+ return (
91
+ <Wrapper>
92
+ <SearchInput
93
+ placeholder="Search"
94
+ value={value}
95
+ disableToggle
96
+ onReset={action('on input reset')}
97
+ onChange={(e) => {
98
+ setValue(e.target.value);
99
+ action('debounce')(`${e.target} changed`);
100
+ }}
101
+ {...args}
102
+ />
103
+ </Wrapper>
104
+ );
105
+ },
106
+ };
@@ -19,7 +19,7 @@ export const Playground = {
19
19
  render: (args) => (
20
20
  <Stack {...args}>
21
21
  <Icon name="Account" size="2x" color="infoPrimary" withWrapper />
22
- <LargerText>6 Accounts</LargerText>
22
+ <LargerText>My Title</LargerText>
23
23
  </Stack>
24
24
  ),
25
25
  };
@@ -41,30 +41,30 @@ export const StackStory = {
41
41
  <Stack gap="r20">
42
42
  <Icon name="Account" size="2x" color="infoPrimary" withWrapper />
43
43
  <Stack direction="vertical" gap="r4">
44
- <LargerText>6 Accounts</LargerText>
45
- <SmallerSecondaryText>for this instance</SmallerSecondaryText>
44
+ <LargerText>Title</LargerText>
45
+ <SmallerSecondaryText>Subtitle</SmallerSecondaryText>
46
46
  </Stack>
47
47
  </Stack>
48
48
  <Stack gap="r32">
49
49
  <Stack>
50
50
  <Icon name={'Check-circle'} color={'statusHealthy'} />
51
- <SecondaryText>Replication</SecondaryText>
51
+ <SecondaryText>Status 1</SecondaryText>
52
52
  </Stack>
53
53
  <Stack>
54
54
  <Icon name={'Check-circle'} color={'statusHealthy'} />
55
- <SecondaryText>Expiration</SecondaryText>
55
+ <SecondaryText>Status 2</SecondaryText>
56
56
  </Stack>
57
57
  <Stack>
58
58
  <Icon name={'Check-circle'} color={'statusHealthy'} />
59
- <SecondaryText>Transition</SecondaryText>
59
+ <SecondaryText>Status 3</SecondaryText>
60
60
  </Stack>
61
61
  </Stack>
62
62
  <Stack direction="vertical" gap="r4">
63
63
  <Stack gap="r4">
64
- <EmphaseText>Active Alerts</EmphaseText>
64
+ <EmphaseText>Alerts</EmphaseText>
65
65
  <TextBadge text="0" variant="infoPrimary" />
66
66
  </Stack>
67
- <SmallerSecondaryText>No active alerts</SmallerSecondaryText>
67
+ <SmallerSecondaryText>No alerts</SmallerSecondaryText>
68
68
  </Stack>
69
69
  </Stack>
70
70
  </div>
@@ -2,10 +2,9 @@ import React from 'react';
2
2
  import { Steppers } from '../src/lib/components/steppers/Steppers.component';
3
3
  import { action } from '@storybook/addon-actions';
4
4
  import { Button } from '../src/lib/components/buttonv2/Buttonv2.component';
5
- import { Wrapper } from './common';
6
5
  const steps = [
7
6
  {
8
- title: 'Node Registered',
7
+ title: 'Step 1',
9
8
  content: (
10
9
  <Button
11
10
  variant="secondary"
@@ -13,10 +12,10 @@ const steps = [
13
12
  onClick={action('Button Apply Click')}
14
13
  />
15
14
  ),
16
- 'data-cy': 'Node_Registered',
15
+ 'data-cy': 'Step_1',
17
16
  },
18
17
  {
19
- title: 'Deploy Salt Minion on node',
18
+ title: 'Step 2',
20
19
  inProgress: false,
21
20
  content: (
22
21
  <Button
@@ -25,10 +24,10 @@ const steps = [
25
24
  onClick={action('Button Apply Click')}
26
25
  />
27
26
  ),
28
- 'data-cy': 'Deploy_Salt',
27
+ 'data-cy': 'Step_2',
29
28
  },
30
29
  {
31
- title: 'Add node to Workload Plane',
30
+ title: 'Step 3',
32
31
  error: false,
33
32
  content: (
34
33
  <Button
@@ -37,10 +36,10 @@ const steps = [
37
36
  onClick={action('Button Apply Click')}
38
37
  />
39
38
  ),
40
- 'data-cy': 'Add_Node_WP',
39
+ 'data-cy': 'Step_3',
41
40
  },
42
41
  {
43
- title: 'Add node to Control Plane',
42
+ title: 'Step 4',
44
43
  content: (
45
44
  <Button
46
45
  label="Apply"
@@ -48,10 +47,10 @@ const steps = [
48
47
  onClick={action('Button Apply Click')}
49
48
  />
50
49
  ),
51
- 'data-cy': 'Add_Node_CP',
50
+ 'data-cy': 'Step_4',
52
51
  },
53
52
  {
54
- title: 'Extend etcd cluster to node',
53
+ title: 'Step 5',
55
54
  content: (
56
55
  <Button
57
56
  label="Apply"
@@ -59,12 +58,12 @@ const steps = [
59
58
  onClick={action('Button Apply Click')}
60
59
  />
61
60
  ),
62
- 'data-cy': 'Extend_Node',
61
+ 'data-cy': 'Step_5',
63
62
  },
64
63
  ];
65
64
  const stepsWithProgress = [...steps];
66
65
  stepsWithProgress[1] = {
67
- title: 'Deploy Salt Minion on node',
66
+ title: 'Step 2',
68
67
  inProgress: true,
69
68
  content: (
70
69
  <Button
@@ -73,11 +72,11 @@ stepsWithProgress[1] = {
73
72
  onClick={action('Button Apply Click')}
74
73
  />
75
74
  ),
76
- 'data-cy': 'Deploy_Salt',
75
+ 'data-cy': 'Step_2',
77
76
  };
78
77
  const stepsWithError = [...steps];
79
78
  stepsWithError[2] = {
80
- title: 'Add node to Workload Plane',
79
+ title: 'Step 3',
81
80
  error: true,
82
81
  content: (
83
82
  <Button
@@ -86,7 +85,7 @@ stepsWithError[2] = {
86
85
  onClick={action('Button Apply Click')}
87
86
  />
88
87
  ),
89
- 'data-cy': 'Add_Node_WP',
88
+ 'data-cy': 'Step_3',
90
89
  };
91
90
  export default {
92
91
  title: 'Components/Progress & loading/Steppers',