Skip to content

Commit

Permalink
fix: 順序なしリストと定義リストの余白を reset (#4419)
Browse files Browse the repository at this point in the history
  • Loading branch information
uknmr authored Mar 11, 2024
1 parent 66006ca commit 830b026
Show file tree
Hide file tree
Showing 24 changed files with 19 additions and 46 deletions.
2 changes: 1 addition & 1 deletion src/components/Badge/Badge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
}

export const All: StoryFn = () => (
<Stack as="dl" gap={3} className="shr-my-[unset] [&_dd]:shr-ms-[unset]">
<Stack as="dl" gap={3}>
<Stack>
<DtText>種類</DtText>
<dd>
Expand Down
5 changes: 0 additions & 5 deletions src/components/Base/Base.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,8 @@ export const BaseStory: StoryFn = () => {
BaseStory.storyName = 'Base'

const DescriptionList = styled.dl`
margin-block-start: unset;
padding: 24px;
background-color: #eee;
dd {
margin-inline-start: unset;
}
`

const List = styled.ul`
Expand Down
2 changes: 1 addition & 1 deletion src/components/Base/BaseColumn/BaseColumn.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
}

export const All: StoryFn = () => (
<Stack as="ul" className="shr-my-[unset] shr-list-none shr-ps-[unset]">
<Stack as="ul" className="shr-list-none">
<li>
<p>padding / bgColor で余白と背景色を変えることもできます</p>
</li>
Expand Down
1 change: 0 additions & 1 deletion src/components/ComboBox/VRTComboBox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ VRTMultiForcedColors.parameters = {
}

const WrapperList = styled.ul`
margin-block: unset;
padding: 0 24px;
list-style: none;
& > li {
Expand Down
8 changes: 3 additions & 5 deletions src/components/Dialog/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const Default: StoryFn = () => {
data-test="dialog-datepicker"
/>
</Content>
<Fieldset title="Fruits">
<Fieldset title="Fruits" innerMargin={0.5}>
<RadioList>
<li>
<RadioButton name="Apple" checked={value === 'Apple'} onChange={onChangeValue}>
Expand Down Expand Up @@ -357,7 +357,7 @@ export const Form_Dialog: StoryFn = () => {
id="dialog-form"
data-test="form-dialog-content"
>
<Fieldset title="fruits">
<Fieldset title="fruits" innerMargin={0.5}>
<RadioList>
<li>
<RadioButton name="Apple" checked={value === 'Apple'} onChange={onChange}>
Expand Down Expand Up @@ -1083,9 +1083,7 @@ const Content = styled.div`
const StyledHeading = styled(Heading)`
margin: 8px 24px;
`
const RadioList = styled.ul`
margin: 16px 24px;
padding: 0;
const RadioList = styled(Cluster).attrs({ forwardedAs: 'ul', gap: 1.25 })`
list-style: none;
`
const Footer = styled.div`
Expand Down
1 change: 0 additions & 1 deletion src/components/Dropdown/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,5 @@ const Bottom = styled.div`
height: 500px;
`
const RadioButtonList = styled.ul`
padding-inline-start: unset;
list-style: none;
`
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ const Description = styled.p`
padding: 100px 0;
`
const RadioButtonList = styled.ul`
margin-block: unset;
padding-inline-start: unset;
list-style: none;
`

Expand Down
2 changes: 1 addition & 1 deletion src/components/FormControl/FormControl.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
}

export const All: StoryFn = () => (
<Stack gap={2} as="dl" className="shr-my-[unset] [&_dd]:shr-ms-[unset]">
<Stack gap={2} as="dl">
<Stack>
<Text italic color="TEXT_GREY" as="dt">
基本
Expand Down
1 change: 0 additions & 1 deletion src/components/Heading/Heading.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const StyledPageHeading = styled(PageHeading)`
`

const List = styled.ul`
margin-block: unset;
padding: 0 2.4rem;
list-style: none;
Expand Down
6 changes: 1 addition & 5 deletions src/components/Icon/Icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const AltText: StoryFn = () => (
<p>
<span id="text">連絡帳</span>
</p>
<dl className="shr-my-[unset] [&_dd]:shr-ms-[unset]">
<dl>
<dt>visually hidden text</dt>
<dd>
<FaAddressBookIcon alt="連絡帳" />
Expand Down Expand Up @@ -167,9 +167,5 @@ const ItemWrapper = styled(BaseColumn)`
flex-direction: column;
align-items: center;
gap: ${space(0.5)};
dd {
margin-inline-start: unset;
}
`}
`
2 changes: 0 additions & 2 deletions src/components/Input/Input.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ export const Currency: StoryFn = () => {
Currency.storyName = 'CurrencyInput'

const ListStack = styled(Stack).attrs({ forwardedAs: 'ul' })`
margin-block: unset;
padding-inline-start: unset;
list-style-type: none;
`
const StyledInput = styled(Input)`
Expand Down
2 changes: 1 addition & 1 deletion src/components/NewFieldset/Fieldset.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
}

export const All: StoryFn = () => (
<Stack gap={2} as="dl" className="shr-my-[unset] [&_dd]:shr-ms-[unset]">
<Stack gap={2} as="dl">
<Stack>
<Text italic color="TEXT_GREY" as="dt">
基本
Expand Down
5 changes: 0 additions & 5 deletions src/components/NotificationBar/NotificationBar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,8 @@ export const All: StoryFn = () => {

const RootStack = styled(Stack).attrs({ forwardedAs: 'dl', gap: 1.5 })`
${({ theme: { color, spacingByChar } }) => css`
margin-block: unset;
background-color: ${color.BACKGROUND};
padding: ${spacingByChar(1.5)};
dd {
margin-inline-start: unset;
}
`}
`

Expand Down
1 change: 0 additions & 1 deletion src/components/Pagination/Pagination.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ RegFocus.play = () => userEvent.tab()

const List = styled.ul`
list-style-type: none;
margin-block: unset;
padding: 0 20px;
& > li {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const All: StoryFn = () => {
const handleChange = (e: ChangeEvent<HTMLInputElement>) => setCheckedName(e.currentTarget.name)

return (
<Stack as="ul" gap={2} className="shr-my-[unset] shr-ps-[unset]">
<Stack as="ul" gap={2}>
<Stack as="li">
<Fieldset title="標準的な使い方" titleType="blockTitle">
<Stack as="ul" gap={0.5} className="shr-ps-[unset]">
Expand Down
1 change: 0 additions & 1 deletion src/components/SmartHRLogo/SmartHRLogo.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const All: Story = () => (
All.storyName = 'all'

const List = styled.ul`
margin: 0;
padding: 0;
li {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const All: StoryFn = () => {
]

return (
<Stack gap={2} as="dl" className="shr-my-[unset] [&_dd]:shr-ms-[unset]">
<Stack gap={2} as="dl">
<Stack>
<Text italic color="TEXT_GREY" as="dt">
基本
Expand Down
5 changes: 0 additions & 5 deletions src/components/StatusLabel/StatusLabel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ All.storyName = 'all'

const WrapperStack = styled(Stack).attrs({ forwardedAs: 'dl', gap: 1.5 })`
${({ theme: { spacingByChar } }) => css`
margin-block: unset;
padding: ${spacingByChar(1.5)};
dd {
margin-inline-start: unset;
}
`}
`
2 changes: 1 addition & 1 deletion src/components/TabBar/TabBar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
}

export const All: StoryFn = () => (
<Stack as="ul" className="shr-my-[unset] shr-list-none shr-ps-[unset]">
<Stack as="ul" className="shr-list-none">
<li>
<p>標準</p>
<Template subid={1} />
Expand Down
1 change: 0 additions & 1 deletion src/components/TextLink/TextLink.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const Wrapper = styled.ul(
({ theme: { spacingByChar } }) => css`
list-style: none;
margin: ${spacingByChar(1.5)};
padding-inline-start: unset;
li + li {
margin-top: ${spacingByChar(1)};
Expand Down
1 change: 0 additions & 1 deletion src/components/TextLink/VRTTextLink.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ const Wrapper = styled.ul(
({ theme: { spacingByChar } }) => css`
list-style: none;
margin: ${spacingByChar(1.5)};
padding-inline-start: unset;
li + li {
margin-top: ${spacingByChar(1)};
Expand Down
1 change: 0 additions & 1 deletion src/components/Textarea/Textarea.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ RegInput.play = async ({ canvasElement }) => {
}

const ListStack = styled(Stack).attrs({ forwardedAs: 'ul', gap: 1.5 })`
margin-block: unset;
padding: 0 24px;
list-style: none;
`
1 change: 0 additions & 1 deletion src/components/Tooltip/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ const List = styled.dl`
}
dd {
margin-top: 5px;
margin-inline-start: unset;
&.limit {
width: 200px;
Expand Down
9 changes: 8 additions & 1 deletion src/smarthr-ui-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,16 @@ export default {
lineHeight: theme('lineHeight.normal'),
color: theme('colors.black'),
},
p: {
'p, dl': {
marginBlock: 'unset',
},
ul: {
marginBlock: 'unset',
paddingInlineStart: 'unset',
},
dd: {
marginInlineStart: 'unset',
},
'button, input, textarea, select': {
fontFamily: 'inherit',
},
Expand Down

0 comments on commit 830b026

Please sign in to comment.