diff --git a/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiStepsHorizontal_Unordered_Steps.png b/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiStepsHorizontal_Unordered_Steps.png new file mode 100644 index 00000000000..bdcf12ab9ee Binary files /dev/null and b/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiStepsHorizontal_Unordered_Steps.png differ diff --git a/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title.png b/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title.png new file mode 100644 index 00000000000..e4628a771b1 Binary files /dev/null and b/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title.png differ diff --git a/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title_XXS.png b/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title_XXS.png new file mode 100644 index 00000000000..886216021df Binary files /dev/null and b/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title_XXS.png differ diff --git a/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiSteps_Unordered_Steps.png b/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiSteps_Unordered_Steps.png new file mode 100644 index 00000000000..1a4fa6d879a Binary files /dev/null and b/packages/eui/.loki/reference/chrome_desktop_Navigation_EuiSteps_EuiSteps_Unordered_Steps.png differ diff --git a/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiStepsHorizontal_Unordered_Steps.png b/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiStepsHorizontal_Unordered_Steps.png new file mode 100644 index 00000000000..bef583f0761 Binary files /dev/null and b/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiStepsHorizontal_Unordered_Steps.png differ diff --git a/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title.png b/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title.png new file mode 100644 index 00000000000..8d5fcea218a Binary files /dev/null and b/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title.png differ diff --git a/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title_XXS.png b/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title_XXS.png new file mode 100644 index 00000000000..94b4dcdf84f Binary files /dev/null and b/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiSteps_EuiStep_Multiline_Title_XXS.png differ diff --git a/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiSteps_Unordered_Steps.png b/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiSteps_Unordered_Steps.png new file mode 100644 index 00000000000..27c104added Binary files /dev/null and b/packages/eui/.loki/reference/chrome_mobile_Navigation_EuiSteps_EuiSteps_Unordered_Steps.png differ diff --git a/packages/eui/changelogs/upcoming/7813.md b/packages/eui/changelogs/upcoming/7813.md new file mode 100644 index 00000000000..accdf866055 --- /dev/null +++ b/packages/eui/changelogs/upcoming/7813.md @@ -0,0 +1,3 @@ +- Updated `EuiSteps` to support a new `titleSize="xxs"` style, which outputs the same title font size but smaller unnumbered step indicators +- Updated `EuiStepsHorizontal` to support a new `size="xs"` style, which outputs smaller unnumbered step indicators +- Updated `EuiStepNumber` to support new `titleSize="none"` which omits rendering step numbers, and will only render icons \ No newline at end of file diff --git a/packages/eui/src-docs/src/views/steps/steps_example.js b/packages/eui/src-docs/src/views/steps/steps_example.js index 7898befee67..5c3c8d8a9c1 100644 --- a/packages/eui/src-docs/src/views/steps/steps_example.js +++ b/packages/eui/src-docs/src/views/steps/steps_example.js @@ -225,14 +225,21 @@ export const StepsExample = { }, ], text: ( -

- You can set a different title size using titleSize. - If titleSize is set in both{' '} - EuiSteps and EuiStep, the latter - value will override the former. Additionally, the title size{' '} - xs will automatically generate smaller steps - circles. -

+ <> +

+ You can set a different title size using{' '} + titleSize. If titleSize is set + in both EuiSteps and EuiStep, the + latter value will override the former. Additionally, the title size{' '} + xs will automatically generate smaller steps + circles. +

+

+ The title size xxs affects only the size of the + accompanying unnumbered step indicator, but not the + title itself. +

+ ), demo: , snippet: stepsTitleSizesSnippet, diff --git a/packages/eui/src-docs/src/views/steps/steps_horizontal.tsx b/packages/eui/src-docs/src/views/steps/steps_horizontal.tsx index e14361337a0..cd185b92654 100644 --- a/packages/eui/src-docs/src/views/steps/steps_horizontal.tsx +++ b/packages/eui/src-docs/src/views/steps/steps_horizontal.tsx @@ -33,6 +33,10 @@ export default () => { ]; const sizeButtons = [ + { + id: 'xs', + label: 'XSmall', + }, { id: 's', label: 'Small', diff --git a/packages/eui/src-docs/src/views/steps/steps_title_sizes.tsx b/packages/eui/src-docs/src/views/steps/steps_title_sizes.tsx index b99c7c5435e..9f1b203e7dc 100644 --- a/packages/eui/src-docs/src/views/steps/steps_title_sizes.tsx +++ b/packages/eui/src-docs/src/views/steps/steps_title_sizes.tsx @@ -1,14 +1,21 @@ -import React from 'react'; +import React, { useState } from 'react'; -import { EuiCode, EuiSteps } from '../../../../src/components'; +import { + EuiButtonGroup, + EuiCode, + EuiSpacer, + EuiSteps, + EuiTitle, +} from '../../../../src/components'; +import { EuiStepInterface } from '../../../../src/components/steps/step'; -const firstSetOfSteps = [ +const firstSetOfSteps: EuiStepInterface[] = [ { title: 'Step 1', children: (

- Steps with titleSize set to xs{' '} - like this one, get a smaller step circle + Both step title and circle indicators will adjust in size based on the{' '} + titleSize prop

), }, @@ -16,11 +23,55 @@ const firstSetOfSteps = [ title: 'Step 2', children: (

- Steps with titleSize set to xs{' '} - like this one, get a smaller step circle + Both step title and circle indicators will adjust in size based on the{' '} + titleSize prop

), }, ]; -export default () => ; +const sizeButtons = [ + { + id: 'xxs', + label: 'XXSmall', + }, + { + id: 'xs', + label: 'XSmall', + }, + { + id: 's', + label: 'Small', + }, + { + id: 'm', + label: 'Medium', + }, +]; + +type StepSizes = NonNullable; + +export default () => { + const [titleSize, setTitleSize] = useState('m'); + + const sizeOnChange = (optionId: StepSizes) => { + setTitleSize(optionId); + }; + + return ( + <> + +

Step Size

+
+ + sizeOnChange(id as StepSizes)} + /> + + + + ); +}; diff --git a/packages/eui/src/components/steps/__snapshots__/step_horizontal.test.tsx.snap b/packages/eui/src/components/steps/__snapshots__/step_horizontal.test.tsx.snap index d2ae8c45654..71b9c8685ea 100644 --- a/packages/eui/src/components/steps/__snapshots__/step_horizontal.test.tsx.snap +++ b/packages/eui/src/components/steps/__snapshots__/step_horizontal.test.tsx.snap @@ -83,6 +83,27 @@ exports[`EuiStepHorizontal props size s is rendered 1`] = ` `; +exports[`EuiStepHorizontal props size xs is rendered 1`] = ` + +`; + exports[`EuiStepHorizontal props status complete is rendered 1`] = `