diff --git a/src/accordion/__tests__/accordion.stories.tsx b/src/accordion/__tests__/accordion.stories.tsx
index 16cec9838a..b15fc41d46 100644
--- a/src/accordion/__tests__/accordion.stories.tsx
+++ b/src/accordion/__tests__/accordion.stories.tsx
@@ -53,6 +53,66 @@ const myCustomAccordionTheme = createTheme({
iconColor: '{{colors.inkInverse}}',
},
},
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.interface010}}',
+ color: '{{colors.inkBase}}',
+ borderStyle: 'none none solid none',
+ borderColor: '{{colors.interface050}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.interface010}}',
+ color: '{{colors.inkBase}}',
+ borderStyle: 'none none solid none',
+ borderColor: '{{colors.interface050}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.interface010}}',
+ color: '{{colors.inkBase}}',
+ borderStyle: 'none none solid none',
+ borderColor: '{{colors.interface050}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.interface010}}',
+ color: '{{colors.inkBase}}',
+ borderStyle: 'none none solid none',
+ borderColor: '{{colors.interface050}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
},
},
});
@@ -356,3 +416,97 @@ export const StoryAccordionGroupControlled = () => {
);
};
StoryAccordionGroupControlled.storyName = 'accordion-group-controlled';
+
+export const StoryAccordionOutlineOverrides = () => (
+ <>
+
+ Accordion Outline Overrides
+
+
+
+ Custom Color
+
+ }
+ label="Hide"
+ expanded
+ overrides={{
+ header: {
+ stylePreset: 'customOutlineColor',
+ },
+ }}
+ >
+ {content}
+
+
+
+
+
+ Custom Style
+
+ }
+ label="Hide"
+ expanded
+ overrides={{
+ header: {
+ stylePreset: 'customOutlineStyle',
+ },
+ }}
+ >
+ {content}
+
+
+
+
+
+ Custom Width
+
+ }
+ label="Hide"
+ expanded
+ overrides={{
+ header: {
+ stylePreset: 'customOutlineWidth',
+ },
+ }}
+ >
+ {content}
+
+
+
+
+
+ Custom Offset
+
+ }
+ label="Hide"
+ expanded
+ overrides={{
+ header: {
+ stylePreset: 'customOutlineOffset',
+ },
+ }}
+ >
+ {content}
+
+
+
+ >
+);
+
+StoryAccordionOutlineOverrides.storyName = 'accordion-with-outline-overrides';
diff --git a/src/button/__tests__/button.stories.tsx b/src/button/__tests__/button.stories.tsx
index 5222b2ed97..59d447d96c 100644
--- a/src/button/__tests__/button.stories.tsx
+++ b/src/button/__tests__/button.stories.tsx
@@ -73,6 +73,62 @@ const myCustomTheme = createTheme({
backgroundColor: 'transparent',
},
},
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkInverse}}',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkInverse}}',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkInverse}}',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkInverse}}',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
},
},
});
@@ -633,3 +689,28 @@ export const StoryButtonWithTransitions = () => (
>
);
StoryButtonWithTransitions.storyName = 'button-with-transition';
+
+export const StoryButtonWithOutlineOverride = () => (
+ <>
+ Button with custom outline
+
+ Custom Color
+
+
+
+ Custom Style
+
+
+
+ Custom Width
+
+
+
+ Custom Offset
+
+
+
+
+ >
+);
+StoryButtonWithOutlineOverride.storyName = 'button-with-outline-overrides';
diff --git a/src/checkbox/__tests__/checkbox.stories.tsx b/src/checkbox/__tests__/checkbox.stories.tsx
index 81974645f8..6ac6a2037e 100644
--- a/src/checkbox/__tests__/checkbox.stories.tsx
+++ b/src/checkbox/__tests__/checkbox.stories.tsx
@@ -16,7 +16,6 @@ import {
} from '../..';
import {CheckboxIconProps} from '../types';
import {states, sizes} from './helpers';
-import {defaultFocusVisible} from '../../utils/default-focus-visible';
const myCustomTheme = compileTheme(
createTheme({
@@ -35,7 +34,6 @@ const myCustomTheme = compileTheme(
hover: {
backgroundColor: 'blue',
},
- 'focus-visible': defaultFocusVisible,
},
customCheckboxFeedback: {
base: {
@@ -49,6 +47,70 @@ const myCustomTheme = compileTheme(
iconColor: '{{colors.inkInverse}}',
},
},
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput010}}',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidth020}}',
+ borderRadius: '{{borders.borderRadiusRounded010}}',
+ borderStyle: 'solid',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput010}}',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidth020}}',
+ borderRadius: '{{borders.borderRadiusRounded010}}',
+ borderStyle: 'solid',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput010}}',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidth020}}',
+ borderRadius: '{{borders.borderRadiusRounded010}}',
+ borderStyle: 'solid',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput010}}',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidth020}}',
+ borderRadius: '{{borders.borderRadiusRounded010}}',
+ borderStyle: 'solid',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
},
},
}),
@@ -293,3 +355,47 @@ export const StoryCheckboxTransitions = () => (
);
StoryCheckboxTransitions.storyName = 'checkbox-transitions';
+
+export const StoryCheckboxOutlineOverride = () => (
+
+ Checkbox Outline override
+
+
+
+
+
+
+
+
+
+);
+
+StoryCheckboxOutlineOverride.storyName = 'checkbox-outline-override';
diff --git a/src/icon-button/__tests__/icon-button.stories.tsx b/src/icon-button/__tests__/icon-button.stories.tsx
index 7c3b872e51..6b27cc5efd 100644
--- a/src/icon-button/__tests__/icon-button.stories.tsx
+++ b/src/icon-button/__tests__/icon-button.stories.tsx
@@ -14,6 +14,71 @@ import {
ButtonOverrides,
ButtonSize,
} from '../..';
+import {ThemeProvider, createTheme} from '../../theme';
+
+const myCustomTheme = createTheme({
+ name: 'my-custom-text-input-theme',
+ overrides: {
+ stylePresets: {
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ color: '{{colors.inkInverse}}',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ color: '{{colors.inkInverse}}',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ color: '{{colors.inkInverse}}',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ color: '{{colors.inkInverse}}',
+ iconColor: '{{colors.inkInverse}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
+ },
+ },
+});
const Container = styled.div`
margin: 24px;
@@ -275,3 +340,53 @@ export const StoryIconButtonOverrides = () => (
>
);
StoryIconButtonOverrides.storyName = 'icon-button-overrides';
+
+export const StoryIconButtonWithOutlineOverride = () => (
+ <>
+ Icon Button with custom outline
+
+ Custom Color
+
+
+
+
+
+ Custom Style
+
+
+
+
+
+ Custom Width
+
+
+
+
+
+ Custom Offset
+
+
+
+
+
+
+ >
+);
+StoryIconButtonWithOutlineOverride.storyName =
+ 'icon-button-with-outline-overrides';
diff --git a/src/link/__tests__/link.stories.tsx b/src/link/__tests__/link.stories.tsx
index d7f8f26588..25007b9a76 100644
--- a/src/link/__tests__/link.stories.tsx
+++ b/src/link/__tests__/link.stories.tsx
@@ -30,6 +30,58 @@ const myCustomTheme = createTheme({
},
'focus-visible': defaultFocusVisible,
},
+ customOutlineColor: {
+ base: {
+ color: '{{colors.interactivePrimary030}}',
+ iconColor: '{{colors.interactivePrimary030}}',
+ textDecoration: 'none',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ color: '{{colors.interactivePrimary030}}',
+ iconColor: '{{colors.interactivePrimary030}}',
+ textDecoration: 'none',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ color: '{{colors.interactivePrimary030}}',
+ iconColor: '{{colors.interactivePrimary030}}',
+ textDecoration: 'none',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ color: '{{colors.interactivePrimary030}}',
+ iconColor: '{{colors.interactivePrimary030}}',
+ textDecoration: 'none',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
},
},
});
@@ -568,3 +620,52 @@ export const StoryLinkWithLogicalPropsOverrides = () => (
);
StoryLinkWithLogicalPropsOverrides.storyName =
'link-with-logical-props-overrides';
+
+export const StoryLinkOutlineOverride = () => (
+
+ Outline overrides
+
+
+ Custom Color
+
+
+
+
+ Custom Style
+
+
+
+
+ Custom Width
+
+
+
+
+ Custom Offset
+
+
+
+
+
+);
+StoryLinkOutlineOverride.storyName = 'link with outline override';
diff --git a/src/menu/__tests__/menu.stories.tsx b/src/menu/__tests__/menu.stories.tsx
index 1125d2ebc9..128f2b1ef9 100644
--- a/src/menu/__tests__/menu.stories.tsx
+++ b/src/menu/__tests__/menu.stories.tsx
@@ -39,6 +39,74 @@ const myCustomTheme = compileTheme(
iconColor: '{{colors.inkBrand010}}',
},
},
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.transparent}}',
+ borderWidth:
+ '{{borders.borderWidth000}} {{borders.borderWidth000}} {{borders.borderWidth020}} {{borders.borderWidth000}}',
+ color: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkSubtle}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.transparent}}',
+ borderWidth:
+ '{{borders.borderWidth000}} {{borders.borderWidth000}} {{borders.borderWidth020}} {{borders.borderWidth000}}',
+ color: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkSubtle}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.transparent}}',
+ borderWidth:
+ '{{borders.borderWidth000}} {{borders.borderWidth000}} {{borders.borderWidth020}} {{borders.borderWidth000}}',
+ color: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkSubtle}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.transparent}}',
+ borderWidth:
+ '{{borders.borderWidth000}} {{borders.borderWidth000}} {{borders.borderWidth020}} {{borders.borderWidth000}}',
+ color: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkSubtle}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
},
},
}),
@@ -1248,3 +1316,28 @@ export const StoryMenuLogicalProps = () => (
>
);
StoryMenuLogicalProps.storyName = 'menu - logical props';
+
+export const StoryMenuItemsOutlineOverrides = () => (
+ <>
+
+ Menu items with overrides
+
+
+
+
+ >
+);
+StoryMenuItemsOutlineOverrides.storyName = 'menu items outline overrides';
diff --git a/src/radio-button/__tests__/radio-button.stories.tsx b/src/radio-button/__tests__/radio-button.stories.tsx
index c8568913a9..afd65705e6 100644
--- a/src/radio-button/__tests__/radio-button.stories.tsx
+++ b/src/radio-button/__tests__/radio-button.stories.tsx
@@ -221,6 +221,66 @@ const myCustomTheme = compileTheme(
borderRadius: '50%',
},
},
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput010}}',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidth020}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ borderStyle: 'solid',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput010}}',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidth020}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ borderStyle: 'solid',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput010}}',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidth020}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ borderStyle: 'solid',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput010}}',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidth020}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ borderStyle: 'solid',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
},
},
}),
@@ -382,3 +442,151 @@ export const StoryRadioButtonLogicalPropsOverrides = () => (
);
StoryRadioButtonLogicalPropsOverrides.storyName =
'radio-button-logical-overrides';
+
+export const StoryRadioButtonOutlineOverrides = () => (
+
+
+ Radio Button outline override
+
+
+
+
+
+
+
+
+
+
+
+
+);
+
+StoryRadioButtonOutlineOverrides.storyName = 'radio-button-outline-overrides';
diff --git a/src/select/__tests__/select.stories.tsx b/src/select/__tests__/select.stories.tsx
index e57e0e0109..e351e4629f 100644
--- a/src/select/__tests__/select.stories.tsx
+++ b/src/select/__tests__/select.stories.tsx
@@ -408,6 +408,79 @@ const myCustomTheme = createTheme({
color: '#325C00',
},
},
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidthDefault}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkBase}}',
+ textOverflow: 'ellipsis',
+ placeholderColor: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidthDefault}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkBase}}',
+ textOverflow: 'ellipsis',
+ placeholderColor: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidthDefault}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkBase}}',
+ textOverflow: 'ellipsis',
+ placeholderColor: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidthDefault}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkBase}}',
+ textOverflow: 'ellipsis',
+ placeholderColor: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
},
},
});
@@ -913,4 +986,115 @@ export const SelectVirtualization = () => {
);
};
-// StorySelectVirtualized.name = "sel"
+export const StoryOutlineOverride = () => (
+ <>
+ Outline override
+
+
+
+
+ Custom Color
+
+
+
+ Assistive Text
+
+
+
+ Custom Style
+
+
+
+ Assistive Text
+
+
+
+ Custom Width
+
+
+
+ Assistive Text
+
+
+
+ Custom Offset
+
+
+
+ Assistive Text
+
+
+
+
+
+ >
+);
+StoryOutlineOverride.storyName = 'Select Outline override';
diff --git a/src/slider/__tests__/slider.stories.tsx b/src/slider/__tests__/slider.stories.tsx
index 746b8e26ba..1382b66580 100644
--- a/src/slider/__tests__/slider.stories.tsx
+++ b/src/slider/__tests__/slider.stories.tsx
@@ -3,7 +3,10 @@ import React from 'react';
import {StatefulSlider} from '..';
import {styled} from '../../utils/style';
import {ThumbLabelProps, SliderProps, LabelPosition} from '../types';
-import {StorybookHeading} from '../../test/storybook-comps';
+import {
+ StorybookHeading,
+ StorybookSubHeading,
+} from '../../test/storybook-comps';
import {createTheme, ThemeProvider} from '../../theme';
import {IconOutlinedImage} from '../../icons';
import {withDefaultProps} from '../../utils/with-default-props';
@@ -58,6 +61,74 @@ const myCustomTheme = createTheme({
iconColor: '{{colors.inkNonEssential}}',
},
},
+ customOutlineColor: {
+ base: {
+ boxShadow: '{{shadows.shadow010}}',
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactivePrimary010}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ iconColor: '{{colors.inkNonEssential}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ boxShadow: '{{shadows.shadow010}}',
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactivePrimary010}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ iconColor: '{{colors.inkNonEssential}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ boxShadow: '{{shadows.shadow010}}',
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactivePrimary010}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ iconColor: '{{colors.inkNonEssential}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ boxShadow: '{{shadows.shadow010}}',
+ backgroundColor: '{{colors.interactivePrimary030}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactivePrimary010}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ borderRadius: '{{borders.borderRadiusCircle}}',
+ iconColor: '{{colors.inkNonEssential}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
},
},
});
@@ -500,3 +571,76 @@ export const StorySliderLogicalProps = () => (
>
);
StorySliderLogicalProps.storyName = 'slider-logical-props';
+
+export const StorySliderWithOutlineOverride = () => (
+ <>
+ Slider with custom outline override
+
+ Custom Color
+
+
+
+ Custom Style
+
+
+
+ Custom Width
+
+
+
+ Custom Offset
+
+
+
+
+ >
+);
+StorySliderWithOutlineOverride.storyName = 'slider-with-custom-outline';
diff --git a/src/switch/__tests__/switch.stories.tsx b/src/switch/__tests__/switch.stories.tsx
index b1926a4a06..03e66fd1b7 100644
--- a/src/switch/__tests__/switch.stories.tsx
+++ b/src/switch/__tests__/switch.stories.tsx
@@ -29,7 +29,7 @@ const Container = styled.div`
display: flex;
`;
-const borderedThumbTheme = compileTheme(
+const customTheme = compileTheme(
createTheme({
name: 'bordered-thumb-theme',
overrides: {
@@ -44,6 +44,54 @@ const borderedThumbTheme = compileTheme(
borderWidth: '{{borders.borderWidth010}}',
},
},
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput020}}',
+ borderRadius: '{{borders.borderRadiusPill}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput020}}',
+ borderRadius: '{{borders.borderRadiusPill}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput020}}',
+ borderRadius: '{{borders.borderRadiusPill}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.interactiveInput020}}',
+ borderRadius: '{{borders.borderRadiusPill}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
},
},
}),
@@ -111,7 +159,7 @@ export const StorySwitchIcons = () => (
StorySwitchIcons.storyName = 'switch-icons';
export const StorySwitchOverrides = () => (
-
+
Switch
@@ -135,7 +183,7 @@ export const StorySwitchOverrides = () => (
StorySwitchOverrides.storyName = 'switch-overrides';
export const StorySwitchLabels = () => (
-
+
Switch
@@ -225,3 +273,55 @@ export const StorySwitchLogicalProps = () => (
);
StorySwitchLogicalProps.storyName = 'switch-logical-props';
+
+export const StorySwitchOutlineOverrides = () => (
+
+ Outline overrides
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+);
+
+StorySwitchOutlineOverrides.storyName = 'switch-outline-overrides';
diff --git a/src/tabs/__tests__/tabs.stories.tsx b/src/tabs/__tests__/tabs.stories.tsx
index 17d132e730..74a9470fb3 100644
--- a/src/tabs/__tests__/tabs.stories.tsx
+++ b/src/tabs/__tests__/tabs.stories.tsx
@@ -53,6 +53,58 @@ const myCustomTabTheme = createTheme({
color: '{{colors.green060}}',
},
},
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ color: '{{colors.inkBase}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '-2px',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ color: '{{colors.inkBase}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '-2px',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ color: '{{colors.inkBase}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '-2px',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ color: '{{colors.inkBase}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '-5px',
+ },
+ },
},
},
});
@@ -1444,3 +1496,102 @@ export const StoryTagLogicalProps = () => (
>
);
StoryTagLogicalProps.storyName = 'tabs-logical-props';
+
+export const StoryTabsOutlineOverride = () => (
+
+ Tabs Outline Overrides
+
+ Custom Color
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Custom Style
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Custom Width
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Custom Offset
+
+
+
+
+
+
+
+
+
+
+
+
+
+);
+StoryTabsOutlineOverride.storyName = 'tabs-outline-overrides';
diff --git a/src/tag/__tests__/tag.stories.tsx b/src/tag/__tests__/tag.stories.tsx
index 2a1b56f9e0..c84afddf99 100644
--- a/src/tag/__tests__/tag.stories.tsx
+++ b/src/tag/__tests__/tag.stories.tsx
@@ -8,7 +8,6 @@ import {getColorFromTheme, styled} from '../../utils/style';
import {IconFilledEmail} from '../../icons';
import {Stack} from '../../stack';
import {createTheme, ThemeProvider} from '../../theme';
-import {defaultFocusVisible} from '../../utils/default-focus-visible';
const Container = styled.div<{hasBlackBackground?: boolean}>`
margin: 24px;
@@ -30,7 +29,74 @@ const myCustomTheme = createTheme({
iconColor: '{{colors.inkInverse}}',
backgroundColor: '{{colors.red020}}',
},
- 'focus-visible': defaultFocusVisible,
+ },
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveSecondary030}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ color: '{{colors.inkBase}}',
+ iconColor: '{{colors.inkBase}}',
+ borderRadius: '{{borders.borderRadiusSharp}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveSecondary030}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ color: '{{colors.inkBase}}',
+ iconColor: '{{colors.inkBase}}',
+ borderRadius: '{{borders.borderRadiusSharp}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveSecondary030}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ color: '{{colors.inkBase}}',
+ iconColor: '{{colors.inkBase}}',
+ borderRadius: '{{borders.borderRadiusSharp}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '{{outlines.outlineOffsetDefault}}',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveSecondary030}}',
+ borderWidth: '{{borders.borderWidth010}}',
+ color: '{{colors.inkBase}}',
+ iconColor: '{{colors.inkBase}}',
+ borderRadius: '{{borders.borderRadiusSharp}}',
+ },
+ 'focus-visible': {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
},
},
},
@@ -239,7 +305,6 @@ const myCustomThemeTransitions = createTheme({
backgroundColor: '{{colors.amber070}}',
borderColor: '{{colors.green040}}',
},
- 'focus-visible': defaultFocusVisible,
},
},
},
@@ -371,3 +436,46 @@ export const StoryTagLogicalProps = () => (
>
);
StoryTagLogicalProps.storyName = 'tag-logical-props';
+
+export const StoryTagWithOutlineOverride = () => (
+ <>
+ Tag with outline overrides
+
+ with Style Presets overrides
+
+
+
+ Custom Color
+
+
+
+
+ Custom Style
+
+
+
+
+ Custom Width
+
+
+
+
+ Custom Offset
+
+
+
+ >
+);
+StoryTagWithOutlineOverride.storyName = 'tag with outline overrides';
diff --git a/src/text-field/__tests__/text-field.stories.tsx b/src/text-field/__tests__/text-field.stories.tsx
index d0a3065a92..38be7f125a 100644
--- a/src/text-field/__tests__/text-field.stories.tsx
+++ b/src/text-field/__tests__/text-field.stories.tsx
@@ -48,6 +48,79 @@ const myCustomTheme = createTheme({
color: '#0ed200',
},
},
+ customOutlineColor: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidthDefault}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkBase}}',
+ textOverflow: 'ellipsis',
+ placeholderColor: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: '{{outlines.outlineStyleDefault}}',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ },
+ },
+ customOutlineStyle: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidthDefault}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkBase}}',
+ textOverflow: 'ellipsis',
+ placeholderColor: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '{{outlines.outlineWidthDefault}}',
+ },
+ },
+ customOutlineWidth: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidthDefault}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkBase}}',
+ textOverflow: 'ellipsis',
+ placeholderColor: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ },
+ },
+ customOutlineOffset: {
+ base: {
+ backgroundColor: '{{colors.transparent}}',
+ borderStyle: 'solid',
+ borderColor: '{{colors.interactiveInput020}}',
+ borderWidth: '{{borders.borderWidthDefault}}',
+ borderRadius: '{{borders.borderRadiusDefault}}',
+ color: '{{colors.inkBase}}',
+ textOverflow: 'ellipsis',
+ placeholderColor: '{{colors.inkSubtle}}',
+ iconColor: '{{colors.inkBase}}',
+ },
+ focus: {
+ outlineColor: 'red',
+ outlineStyle: 'dotted',
+ outlineWidth: '5px',
+ outlineOffset: '5px',
+ },
+ },
},
},
});
@@ -445,3 +518,118 @@ export const TextFieldAddOn = () => {
>
);
};
+
+export const TextFieldOutlineOverrideExamples = () => (
+ <>
+ Outline override
+
+
+
+
+
+
+
+ Custom Color
+
+
+
+ Assistive Text Goes Here
+
+ |
+
+
+
+
+
+ Custom Style
+
+
+
+ Assistive Text Goes Here
+
+ |
+
+
+
+
+
+ Custom Width
+
+
+
+ Assistive Text Goes Here
+
+ |
+
+
+
+
+
+ Custom Offset
+
+
+
+ Assistive Text Goes Here
+
+ |
+
+
+
+
+
+
+ >
+);
| |