+ );
+ },
+};
+
export const ButtonsWithIcon = {
...DefaultButtons,
args: {
- icon: ,
+ icon: ,
},
};
diff --git a/stories/card.stories.tsx b/stories/card.stories.tsx
index 566403b620..849051dbe5 100644
--- a/stories/card.stories.tsx
+++ b/stories/card.stories.tsx
@@ -15,7 +15,7 @@ import { action } from '@storybook/addon-actions';
const colors = Object.keys(brand).filter((color) => !/RGB/.test(color));
export default {
- title: 'Components/Card',
+ title: 'Components/Data Display/Card',
component: Card,
decorators: [
(story) => (
diff --git a/stories/checkbox.stories.tsx b/stories/checkbox.stories.tsx
index 6c96edd8e8..1bcdff2963 100644
--- a/stories/checkbox.stories.tsx
+++ b/stories/checkbox.stories.tsx
@@ -1,9 +1,9 @@
import React, { useEffect, useRef } from 'react';
import { action } from '@storybook/addon-actions';
import { Checkbox } from '../src/lib/components/checkbox/Checkbox.component';
-import { Wrapper, Title } from './common';
+import { Wrapper } from './common';
export default {
- title: 'Components/Checkbox',
+ title: 'Components/Inputs/Checkbox',
component: Checkbox,
decorators: [
(story) => (
diff --git a/stories/chips.stories.tsx b/stories/chips.stories.tsx
index 432090ec7b..aefb9c3e63 100644
--- a/stories/chips.stories.tsx
+++ b/stories/chips.stories.tsx
@@ -6,7 +6,7 @@ import { Icon } from '../src/lib/components/icon/Icon.component';
import { iconOptions } from './controls';
export default {
- title: 'Components/Chips',
+ title: 'Components/Deprecated/Chips',
component: Chips,
decorators: [
(story) => (
diff --git a/stories/circularprogressbar.stories.tsx b/stories/circularprogressbar.stories.tsx
index e33adab663..5d09964874 100644
--- a/stories/circularprogressbar.stories.tsx
+++ b/stories/circularprogressbar.stories.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import { CircularProgressBar } from '../src/lib/components/circularprogressbar/CircularProgressBar.component';
-import { Wrapper, Title, Text } from './common';
+import { Wrapper, Text } from './common';
export default {
title: 'Components/Progress & loading/CircularProgressBar',
component: CircularProgressBar,
diff --git a/stories/cloudprogressbar.stories.tsx b/stories/cloudprogressbar.stories.tsx
index 4ce919c1c5..2106a169f4 100644
--- a/stories/cloudprogressbar.stories.tsx
+++ b/stories/cloudprogressbar.stories.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import { CloudProgressBar } from '../src/lib/components/cloudprogressbar/CloudProgressBar.component';
import { Wrapper, Title, SubTitle } from './common';
export default {
- title: 'Components/Progress & loading/CloudProgressBar',
+ title: 'Components/Deprecated/CloudProgressBar',
component: CloudProgressBar,
decorators: [
(story) => (
diff --git a/stories/collapsiblepanel.stories.tsx b/stories/collapsiblepanel.stories.tsx
index df9260664e..75e289f744 100644
--- a/stories/collapsiblepanel.stories.tsx
+++ b/stories/collapsiblepanel.stories.tsx
@@ -1,10 +1,10 @@
import React from 'react';
import { action } from '@storybook/addon-actions';
-import { Title, Wrapper } from './common';
+import { Wrapper } from './common';
import { CollapsiblePanel } from '../src/lib/components/collapsiblepanel/CollapsiblePanel.component';
const items = [, 'banana', 'apple', 'grape'];
export default {
- title: 'Components/Navigation/CollapsiblePanel',
+ title: 'Components/Deprecated/Navigation/CollapsiblePanel',
component: CollapsiblePanel,
decorators: [
(story) => (
diff --git a/stories/common.tsx b/stories/common.tsx
index 65ac243120..5864717b2c 100644
--- a/stories/common.tsx
+++ b/stories/common.tsx
@@ -3,7 +3,7 @@ import styled from 'styled-components';
import { getThemePropSelector } from '../src/lib/utils';
const StyledWrapper = styled.div`
padding: 30px;
- min-height: 30vh;
+ height: 30vh;
background-color: ${getThemePropSelector('backgroundLevel1')};
color: ${getThemePropSelector('textPrimary')};
`;
diff --git a/stories/dropdown.stories.tsx b/stories/dropdown.stories.tsx
index c521ad0fee..5ccc19cfb2 100644
--- a/stories/dropdown.stories.tsx
+++ b/stories/dropdown.stories.tsx
@@ -28,7 +28,7 @@ const items = [
];
export default {
- title: 'Components/Dropdown',
+ title: 'Components/Navigation/Dropdown',
component: Dropdown,
decorators: [
(story) => (
diff --git a/stories/dropzone.stories.tsx b/stories/dropzone.stories.tsx
index c2bbec1dad..a53c8b82fb 100644
--- a/stories/dropzone.stories.tsx
+++ b/stories/dropzone.stories.tsx
@@ -1,8 +1,8 @@
import React from 'react';
import { Dropzone } from '../src/lib/components/dropzone/Dropzone';
-import { Wrapper, Title } from './common';
+import { Wrapper } from './common';
export default {
- title: 'Components/Dropzone',
+ title: 'Components/Inputs/Dropzone',
component: Dropzone,
decorators: [
(story) => {story()},
diff --git a/stories/emptystate.stories.tsx b/stories/emptystate.stories.tsx
index 60d659c424..f9cd477490 100644
--- a/stories/emptystate.stories.tsx
+++ b/stories/emptystate.stories.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import { EmptyState } from '../src/lib/components/emptystate/Emptystate.component';
import { Wrapper } from './common';
export default {
- title: 'Components/EmptyState',
+ title: 'Components/Data Display/EmptyState',
component: EmptyState,
decorators: [(story) => {story()}],
args: {
diff --git a/stories/errorpage401.stories.tsx b/stories/errorpage401.stories.tsx
index 21eed1d6e7..22c4baa1c3 100644
--- a/stories/errorpage401.stories.tsx
+++ b/stories/errorpage401.stories.tsx
@@ -3,7 +3,7 @@ import { ErrorPage401 } from '../src/lib/components/error-pages/ErrorPage401.com
import { Wrapper } from './common';
import { localeArgtype } from './controls';
export default {
- title: 'Components/Navigation/ErrorPages/401',
+ title: 'Components/Navigation/Error Pages/401',
component: ErrorPage401,
decorators: [
(story) => {story()},
diff --git a/stories/errorpage404.stories.tsx b/stories/errorpage404.stories.tsx
index 463210f857..dbf79ad713 100644
--- a/stories/errorpage404.stories.tsx
+++ b/stories/errorpage404.stories.tsx
@@ -3,7 +3,7 @@ import { ErrorPage404 } from '../src/lib/components/error-pages/ErrorPage404.com
import { Wrapper } from './common';
import { localeArgtype } from './controls';
export default {
- title: 'Components/Navigation/ErrorPages/404',
+ title: 'Components/Navigation/Error Pages/404',
component: ErrorPage404,
decorators: [
(story) => {story()},
diff --git a/stories/errorpage500.stories.tsx b/stories/errorpage500.stories.tsx
index d354b5e423..6f62e654fa 100644
--- a/stories/errorpage500.stories.tsx
+++ b/stories/errorpage500.stories.tsx
@@ -3,7 +3,7 @@ import { ErrorPage500 } from '../src/lib/components/error-pages/ErrorPage500.com
import { Wrapper } from './common';
import { localeArgtype } from './controls';
export default {
- title: 'Components/Navigation/ErrorPages/500',
+ title: 'Components/Navigation/Error Pages/500',
component: ErrorPage500,
decorators: [
(story) => {story()},
diff --git a/stories/errorpageauth.stories.tsx b/stories/errorpageauth.stories.tsx
index 915437a44f..be60a3b3eb 100644
--- a/stories/errorpageauth.stories.tsx
+++ b/stories/errorpageauth.stories.tsx
@@ -3,7 +3,7 @@ import { ErrorPageAuth } from '../src/lib/components/error-pages/ErrorPageAuth.c
import { Wrapper } from './common';
import { localeArgtype } from './controls';
export default {
- title: 'Components/Navigation/ErrorPages/Auth',
+ title: 'Components/Navigation/Error Pages/Auth',
component: ErrorPageAuth,
decorators: [
(story) => {story()},
diff --git a/stories/form.stories.tsx b/stories/form.stories.tsx
index 29a42da5be..73957d355c 100644
--- a/stories/form.stories.tsx
+++ b/stories/form.stories.tsx
@@ -16,7 +16,7 @@ import { Select } from '../src/lib/components/selectv2/Selectv2.component';
import { iconOptions } from './controls';
export default {
- title: 'Components/Form',
+ title: 'Templates/Form',
component: Form,
args: {
kind: 'page',
diff --git a/stories/globalhealthbar.stories.tsx b/stories/globalhealthbar.stories.tsx
index b403676be3..d611e94ce3 100644
--- a/stories/globalhealthbar.stories.tsx
+++ b/stories/globalhealthbar.stories.tsx
@@ -1,7 +1,7 @@
import React from 'react';
import { GlobalHealthBar } from '../src/lib/components/globalhealthbar/GlobalHealthBar.component';
import { SyncedCursorCharts } from '../src/lib/components/vegachartv2/SyncedCursorCharts';
-import { Wrapper, Title } from './common';
+import { Wrapper } from './common';
const alerts = [
{
id: '1',
@@ -104,7 +104,7 @@ const startNotFirstDay = '2021-02-23T23:00:00Z';
const endNotFirstDay = '2021-03-01T23:00:00Z';
export default {
- title: 'Components/Chart/GlobalHealthBar',
+ title: 'Components/Data Display/Charts/GlobalHealthBar',
component: GlobalHealthBar,
decorators: [
(story) => (
diff --git a/stories/guideline/button-guideline.mdx b/stories/guideline/button-guideline.mdx
index 2030b719f4..0710f23f19 100644
--- a/stories/guideline/button-guideline.mdx
+++ b/stories/guideline/button-guideline.mdx
@@ -1,21 +1,18 @@
-import { Meta, Story, Canvas } from '@storybook/blocks';
-import {Button} from '../../src/lib/components/button/Button.component';
+import { Meta, Story, Canvas, Primary, Controls } from '@storybook/blocks';
+import { Button } from '../../src/lib/components/button/Button.component';
+import * as ButtonStories from '../buttonv2.stories';
-
+
# Button
## Size & style
-* Only 1 size is used - Height: 32px
-* Border-radius: 3px
-* Minimum width: 80px
+- Only 1 size is used - Height: 32px
+- Border-radius: 3px
+- Minimum width: 80px
-{/* is deprecated, please migrate it to see: https://storybook.js.org/migration-guides/7.0 */}
-
-{/* */}
-
-| | px |
+| | px |
| ------- | --- |
| Smaller | 24 |
| Small | 28 |
@@ -27,10 +24,37 @@ import {Button} from '../../src/lib/components/button/Button.component';
Button’s label measurement:
-* Line height: 20px
-* Vertical padding: 8px
-* Horizontal padding of 16px
-* Space between icon & label: 8px
+- Line height: 20px
+- Vertical padding: 8px
+- Horizontal padding of 16px
+- Space between icon & label: 8px
+
+## Explicit button label
+
+Button labels should be as short and clear as possible and should describe the action the button performs.\
+Use one or two words if possible. Remove most prepositions and articles (a, an, the).
+
+Examples: Cancel, Close, Create, Delete, Edit, Learn more, Review, Save, Study, View scores, etc.
+
+Since buttons are action points for the user, button text should also be actionable. Stick to using verbs (Complete, Start/Finish, Search) or a simple verb + noun combination for buttons (Next Page, Submit Post, Learn More). Whichever labeling method you choose, maintain consistency across all of your buttons.
+
+- Use sentence case.
+- Capitalize proper nouns.
+- Use specific action-oriented text for CTAs.
+
+Examples: Add Volume, Create Account, Go to Dashboard, Reset Password, Send Reset link, Sign in, etc.
+
+Be sure to:
+
+- Check for consistent use across the UI.
+- Reserve enough space for translation to other languages.
+- Avoid excessive use of exclamation points (!).
+
+Don't:
+
+- Use icons only.
+- Use punctuation.
+- Write “Click here.”
## Type
@@ -38,52 +62,51 @@ Button’s label measurement:
Used for the main action. It appears once within a group of buttons. For example, “Continue” in a form.
-> Color: #055DFF - secondary
+
### Secondary/base
-{/* */}
-
Use for the secondary action within a group of buttons.
-### Tertiary
+
-
-
-
+### Tertiary
Dismissive action, such as the cancel button.
-```css
-color: #313131; /*border*/
-```
+
+
### Links
-*to add*
+_to add_
## States
-*to produce*
+_to produce_
### Disabled button
Disabled state only if an action on the current screen can enable it (action possibility).
+
+
## Placement
-* Primary buttons placed on the right of a group.
-* Dismissive actions placed on the left. It allows the user to return to the previous screen or step in the process.
+- Primary buttons placed on the right of a group.
+- Dismissive actions placed on the left. It allows the user to return to the previous screen or step in the process.
Align button groups with the container's right side by default; however, based on the use case and visual balance it can be aligned differently.
+
+
### Button spacing
-* Horizontal spacing: 16px
-* Vertical spacing: 12px
-* Space between 2 buttons: 24px - when there is no space constraint
+- Horizontal spacing: 16px
+- Vertical spacing: 12px
+- Space between 2 buttons: 24px - when there is no space constraint
-## Icon & label on buttons
+## Icon on buttons
### Which icon
@@ -103,29 +126,12 @@ Seeing the icon first help users to scan the page more easily, except for few ca
The icon should be (approximately) the same height as the text, or a lot bigger.
-### Explicit button label
-
-Button labels should be as short and clear as possible and should describe the action the button performs.\
-Use one or two words if possible. Remove most prepositions and articles (a, an, the).
-
-Examples: Cancel, Close, Create, Delete, Edit, Learn more, Review, Save, Study, View scores, etc.
+
-Since buttons are action points for the user, button text should also be actionable. Stick to using verbs (Complete, Start/Finish, Search) or a simple verb + noun combination for buttons (Next Page, Submit Post, Learn More). Whichever labeling method you choose, maintain consistency across all of your buttons.
+
-* Use sentence case.
-* Capitalize proper nouns.
-* Use specific action-oriented text for CTAs.
-
-Examples: Add Volume, Create Account, Go to Dashboard, Reset Password, Send Reset link, Sign in, etc.
+### Playground
-Be sure to:
-
-* Check for consistent use across the UI.
-* Reserve enough space for translation to other languages.
-* Avoid excessive use of exclamation points (!).
-
-Don't:
+
-* Use icons only.
-* Use punctuation.
-* Write “Click here.”
+
diff --git a/stories/guideline/chart-guideline.mdx b/stories/guideline/chart-guideline.mdx
index f7d82821f5..61097e4d91 100644
--- a/stories/guideline/chart-guideline.mdx
+++ b/stories/guideline/chart-guideline.mdx
@@ -2,7 +2,7 @@ import { Meta, Story } from '@storybook/blocks';
import { ChartExample } from './mdxExampleComponents';
import { SuccessBanner } from '../banner.stories';
-
+
# Charts
@@ -20,11 +20,11 @@ Only use grid lines when it’s helpful. Possible to use only horizontal or vert
### Elements
-* Title
-* Axis
-* Legend
+- Title
+- Axis
+- Legend
-*produce an example WIP*
+_produce an example WIP_
## Type
@@ -32,24 +32,24 @@ Only use grid lines when it’s helpful. Possible to use only horizontal or vert
### Pie charts
-* No more than 6 categories
-* Values should be different enough (otherwise select Bar charts)
-* Should be a 100% total
-* Categories in the desc order
+- No more than 6 categories
+- Values should be different enough (otherwise select Bar charts)
+- Should be a 100% total
+- Categories in the desc order
-*produce an example WIP*
+_produce an example WIP_
-*(Currently, there is no Pie chart in the UI)*
+_(Currently, there is no Pie chart in the UI)_
### Bar and column charts
-* Should start at a baseline of zero.
-{/* */}
+- Should start at a baseline of zero.
+ {/* */}
### Line charts
-* No more than 5–7 different lines
-* Avoid randomly chosen color (otherwise risk of contrast issues)
+- No more than 5–7 different lines
+- Avoid randomly chosen color (otherwise risk of contrast issues)
Here, the colors for Get and List are too close.
@@ -57,7 +57,7 @@ Components/Chart/LineChart
Area charts
-* Could be a single area, overlapping area, or stacked area
-* Max 3-4 categories
+- Could be a single area, overlapping area, or stacked area
+- Max 3-4 categories
{/* */}
diff --git a/stories/healthselectorv2.stories.tsx b/stories/healthselectorv2.stories.tsx
index 4ab8519532..9366f7e5f2 100644
--- a/stories/healthselectorv2.stories.tsx
+++ b/stories/healthselectorv2.stories.tsx
@@ -8,8 +8,10 @@ import {
import { Wrapper } from './common';
import { Icon } from '../src/lib/components/icon/Icon.component';
export default {
- title: 'Components/v2/Healthselector',
- component: HealthSelector,
+
+ title: 'Components/Healthselector',
+ component: Healthselector,
+
decorators: [
(story) => (
diff --git a/stories/icon.stories.tsx b/stories/icon.stories.tsx
index f2e2f37df3..9f7e2a3203 100644
--- a/stories/icon.stories.tsx
+++ b/stories/icon.stories.tsx
@@ -18,10 +18,6 @@ export default {
},
};
-/**
- * #### Subtitle
- * This is the description
- * */
export const Playground = {
args: {
name: 'Exclamation-triangle',
diff --git a/stories/input.stories.tsx b/stories/input.stories.tsx
index 002ce92819..e9ce441355 100644
--- a/stories/input.stories.tsx
+++ b/stories/input.stories.tsx
@@ -1,9 +1,8 @@
-import React, { useState } from 'react';
-import { Input } from '../src/lib/components/input/Input.component';
+import React from 'react';
import { Input as InputV2 } from '../src/lib/components/inputv2/inputv2';
import { action } from '@storybook/addon-actions';
import styled from 'styled-components';
-import { Wrapper, Title } from './common';
+import { Wrapper } from './common';
const sizes = ['1/3', '1/2', '2/3', '1'];
@@ -13,7 +12,7 @@ const InputWrapper = styled.div`
`;
export default {
- title: 'Components/Input/Input',
+ title: 'Components/Inputs/Input',
component: InputV2,
decorators: [
(story) => {story()},
diff --git a/stories/lateralnavbarlayout.stories.tsx b/stories/lateralnavbarlayout.stories.tsx
index 57763f824e..56463a1e70 100644
--- a/stories/lateralnavbarlayout.stories.tsx
+++ b/stories/lateralnavbarlayout.stories.tsx
@@ -32,7 +32,7 @@ const sideBarActions = [
];
export default {
- title: 'Components/Navigation/LateralNavbarLayout',
+ title: 'Templates/LateralNavbarLayout',
component: LateralNavbarLayout,
args: {
children: ,
diff --git a/stories/layout.stories.tsx b/stories/layout.stories.tsx
index 942bdec488..c486c8a7f6 100644
--- a/stories/layout.stories.tsx
+++ b/stories/layout.stories.tsx
@@ -1,10 +1,7 @@
-import React, { useState } from 'react';
-import { Layout } from '../src/lib/components/layout/Layout.component';
+import React from 'react';
import { Layout as Layout2 } from '../src/lib/components/layout/v2';
import { TwoPanelLayout } from '../src/lib/components/layout/v2/panels';
import { AppContainer } from '../src/lib/components/layout/v2/AppContainer';
-import { Loader } from '../src/lib/components/loader/Loader.component';
-import { action } from '@storybook/addon-actions';
import styled from 'styled-components';
import { Stack } from '../src/lib/spacing';
import { Icon } from '../src/lib/components/icon/Icon.component';
@@ -12,99 +9,10 @@ import { Link, Text } from '../src/lib/components/text/Text.component';
import { TextBadge } from '../src/lib/components/textbadge/TextBadge.component';
import { Breadcrumb } from '../src/lib/components/breadcrumb/Breadcrumb.component';
import { ScrollbarWrapper } from '../src/lib/components/scrollbarwrapper/ScrollbarWrapper.component';
-import { DefaultSidebar } from './sidebar.stories';
import { Meta } from '@storybook/react';
-const sideBarActions = [
- {
- label: 'Dashboard',
- icon: ,
- onClick: action('dashboard clicked'),
- active: true,
- 'data-cy': 'Dashboard',
- },
- {
- label: 'Servers',
- icon: ,
- onClick: action('server clicked'),
- 'data-cy': 'Servers',
- },
- {
- label: 'Disks',
- icon: ,
- onClick: action('disk clicked'),
- 'data-cy': 'Disks',
- },
-];
-const rightActions = [
- {
- type: 'dropdown',
- text: 'FR',
- icon: ,
- items: [
- {
- label: 'English',
- name: 'EN',
- onClick: action('English selected'),
- },
- ],
- },
- {
- type: 'dropdown',
- icon: ,
- items: [
- {
- label: 'Hyperdrive UI',
- onClick: action('Hyperdrive UI clicked'),
- },
- ],
- },
- {
- type: 'dropdown',
- icon: ,
- items: [
- {
- label: 'About',
- onClick: action('About clicked'),
- },
- {
- label: 'Documentation',
- onClick: action('Documentation clicked'),
- },
- {
- label: 'Onboarding',
- onClick: action('Onboarding clicked'),
- },
- ],
- },
- {
- type: 'dropdown',
- text: 'Carlito',
- icon: ,
- items: [
- {
- label: 'Log out',
- onClick: action('Logout clicked'),
- },
- ],
- },
-];
-// const meta: Meta = {
-// title: 'Components/Navigation/Layout',
-// component: Layout,
-// args:{
-// sidebar:{
-// actions: sideBarActions,
-// },
-// navbar:{
-// productName: 'Harware UI',
-// rightActions,
-// }
-// }
-// };
-
const meta: Meta = {
- title: 'Components/Navigation/Layout',
+ title: 'Templates/Layout',
component: Layout2,
args: {},
};
diff --git a/stories/linechart.stories.tsx b/stories/linechart.stories.tsx
index 3b959dbb24..dce407a2c3 100644
--- a/stories/linechart.stories.tsx
+++ b/stories/linechart.stories.tsx
@@ -252,7 +252,7 @@ const tooltipConfigInOut = {
},
};
export default {
- title: 'Components/Chart/LineChart',
+ title: 'Components/Data Display/Charts/LineChart',
component: LineChart,
decorators: [(story) => {story()}],
args: {
diff --git a/stories/linecharttemporal.stories.tsx b/stories/linecharttemporal.stories.tsx
index 8a121dc32c..a1c204143c 100644
--- a/stories/linecharttemporal.stories.tsx
+++ b/stories/linecharttemporal.stories.tsx
@@ -10,7 +10,7 @@ import { Wrapper } from './common';
import { dataLineChartV2, dataLineChartV2_readwrite } from './data/linechart';
import { defaultRenderTooltipSerie } from '../src/lib/components/linetemporalchart/tooltip';
export default {
- title: 'Components/v2/LineTemporalChart',
+ title: 'Components/Data Display/Charts/v2/LineTemporalChart',
component: LineTemporalChart,
decorators: [
(story) => (
diff --git a/stories/modal.stories.tsx b/stories/modal.stories.tsx
index 46ea407a9d..468d344001 100644
--- a/stories/modal.stories.tsx
+++ b/stories/modal.stories.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React from 'react';
import { Modal } from '../src/lib/components/modal/Modal.component';
import { action } from '@storybook/addon-actions';
import { Wrapper } from './common';
@@ -9,7 +9,7 @@ import { Button } from '../src/lib/components/buttonv2/Buttonv2.component';
import { useArgs } from '@storybook/preview-api';
export default {
- title: 'Components/Notification/Modal',
+ title: 'Components/Feedback/Modal',
component: Modal,
decorators: [
(story) => {story()},
@@ -81,93 +81,6 @@ export const CustomizeTitle = {
},
};
-/*
-export const Default = {
- render: ({}) => {
- return (
-
-
-
-
-
- }
- >
- Do you want a cookie?
-
-
- );
- },
-};
-
-export const CustomizeTitle = {
- render: ({}) => {
- return (
-
-
-
-
-
- }
- subTitle={
-
- <>Step 1/2>
-
-