Skip to content

Commit

Permalink
Merge branch 'master' into SHRUI-152
Browse files Browse the repository at this point in the history
  • Loading branch information
cidermitaina committed Oct 5, 2020
2 parents 5e4d235 + bf12672 commit 9d8d92a
Show file tree
Hide file tree
Showing 14 changed files with 202 additions and 94 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "10.0.0",
"author": "SmartHR-UI Team",
"dependencies": {
"dayjs": "^1.8.34",
"dayjs": "^1.9.1",
"lodash.merge": "^4.6.2",
"lodash.range": "^3.2.0",
"polished": "^3.6.7",
Expand Down Expand Up @@ -35,9 +35,9 @@
"babel-loader": "^8.1.0",
"ecma-version-validator-webpack-plugin": "^1.0.4",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.4",
"enzyme-adapter-react-16": "^1.15.5",
"enzyme-to-json": "^3.5.0",
"eslint": "^7.9.0",
"eslint": "^7.10.0",
"eslint-config-smarthr": "^5.0.0",
"fixpack": "^3.0.6",
"husky": "^4.3.0",
Expand All @@ -57,13 +57,13 @@
"storybook-readme": "^5.0.8",
"storycap": "^2.3.7",
"styled-components": "^5.1.1",
"stylelint": "^13.7.1",
"stylelint": "^13.7.2",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-smarthr": "^0.1.2",
"stylelint-config-standard": "^20.0.0",
"stylelint-config-styled-components": "^0.1.1",
"stylelint-processor-styled-components": "^1.10.0",
"ts-jest": "^26.4.0",
"ts-jest": "^26.4.1",
"ts-loader": "^8.0.4",
"typescript": "^4.0.3",
"webpack": "^4.44.2"
Expand Down
48 changes: 24 additions & 24 deletions src/components/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ storiesOf('Button', module)
<Wrapper>
<p>Only icon</p>
<PrimaryButton onClick={action('clicked')} square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</PrimaryButton>
<PrimaryButtonAnchor href="#" square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</PrimaryButtonAnchor>
<PrimaryButton disabled={true} square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</PrimaryButton>
</Wrapper>

Expand Down Expand Up @@ -146,13 +146,13 @@ storiesOf('Button', module)
<Wrapper>
<p>Only icon</p>
<PrimaryButton size="s" onClick={action('clicked')} square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</PrimaryButton>
<PrimaryButtonAnchor size="s" href="#" square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</PrimaryButtonAnchor>
<PrimaryButton size="s" disabled={true} square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</PrimaryButton>
</Wrapper>

Expand Down Expand Up @@ -218,13 +218,13 @@ storiesOf('Button', module)
<Wrapper>
<p>Only icon</p>
<SecondaryButton onClick={action('clicked')} square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SecondaryButton>
<SecondaryButtonAnchor href="#" square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SecondaryButtonAnchor>
<SecondaryButton disabled={true} square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SecondaryButton>
</Wrapper>

Expand Down Expand Up @@ -295,13 +295,13 @@ storiesOf('Button', module)
<Wrapper>
<p>Only icon</p>
<SecondaryButton size="s" onClick={action('clicked')} square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SecondaryButton>
<SecondaryButtonAnchor size="s" href="#" square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SecondaryButtonAnchor>
<SecondaryButton size="s" disabled={true} square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SecondaryButton>
</Wrapper>

Expand Down Expand Up @@ -361,13 +361,13 @@ storiesOf('Button', module)
<Wrapper>
<p>Only icon</p>
<DangerButton onClick={action('clicked')} square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</DangerButton>
<DangerButtonAnchor href="#" square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</DangerButtonAnchor>
<DangerButton disabled={true} square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</DangerButton>
</Wrapper>

Expand Down Expand Up @@ -438,13 +438,13 @@ storiesOf('Button', module)
<Wrapper>
<p>Only icon</p>
<DangerButton size="s" onClick={action('clicked')} square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</DangerButton>
<DangerButtonAnchor size="s" href="#" square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</DangerButtonAnchor>
<DangerButton size="s" disabled={true} square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</DangerButton>
</Wrapper>

Expand Down Expand Up @@ -510,13 +510,13 @@ storiesOf('Button', module)
<Wrapper>
<p>Only icon</p>
<SkeletonButton onClick={action('clicked')} square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SkeletonButton>
<SkeletonButtonAnchor href="#" square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SkeletonButtonAnchor>
<SkeletonButton disabled={true} square>
<Icon size={16} name="fa-plus-circle" />
<Icon size={16} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SkeletonButton>
</Wrapper>

Expand Down Expand Up @@ -587,13 +587,13 @@ storiesOf('Button', module)
<Wrapper>
<p>Only icon</p>
<SkeletonButton size="s" onClick={action('clicked')} square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SkeletonButton>
<SkeletonButtonAnchor size="s" href="#" square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SkeletonButtonAnchor>
<SkeletonButton size="s" disabled={true} square>
<Icon size={13} name="fa-plus-circle" />
<Icon size={13} name="fa-plus-circle" visuallyHiddenText="プラスボタン" />
</SkeletonButton>
</Wrapper>

Expand Down
10 changes: 7 additions & 3 deletions src/components/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ export const Calendar = forwardRef<HTMLElement, Props>(({ from, to, onSelectDate
{currentMonth.year()}{currentMonth.month() + 1}
</YearMonth>
<SecondaryButton onClick={() => setIsSelectingYear(!isSelectingYear)} size="s" square>
<Icon size={13} name={isSelectingYear ? 'fa-caret-up' : 'fa-caret-down'} />
<Icon
size={13}
visuallyHiddenText="年を選択する"
name={isSelectingYear ? 'fa-caret-up' : 'fa-caret-down'}
/>
</SecondaryButton>
<MonthButtonLayout>
<SecondaryButton
Expand All @@ -51,15 +55,15 @@ export const Calendar = forwardRef<HTMLElement, Props>(({ from, to, onSelectDate
size="s"
square
>
<Icon size={13} name="fa-chevron-left" />
<Icon visuallyHiddenText="前の月へ" size={13} name="fa-chevron-left" />
</SecondaryButton>
<SecondaryButton
disabled={isSelectingYear || nextMonth.isAfter(toDay, 'month')}
onClick={() => setCurrentMonth(nextMonth)}
size="s"
square
>
<Icon size={13} name="fa-chevron-right" />
<Icon visuallyHiddenText="次の月へ" size={13} name="fa-chevron-right" />
</SecondaryButton>
</MonthButtonLayout>
</Header>
Expand Down
14 changes: 10 additions & 4 deletions src/components/CheckBox/__snapshots__/CheckBox.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ exports[`CheckBox should be match snapshot 1`] = `
}
>
<div
className="sc-AxjAm impYQq"
className="sc-AxirZ clMtsN"
>
<styled.input
checked={true}
Expand Down Expand Up @@ -147,7 +147,7 @@ exports[`CheckBox should be match snapshot 1`] = `
>
<input
checked={true}
className="sc-AxiKw igyvWT"
className="sc-AxhCb bzdyKr"
name="sample"
onChange={[Function]}
type="checkbox"
Expand Down Expand Up @@ -221,7 +221,7 @@ exports[`CheckBox should be match snapshot 1`] = `
}
>
<span
className="sc-AxirZ hRgeHQ active "
className="sc-AxiKw kXHM active "
/>
</styled.span>
<styled.span
Expand Down Expand Up @@ -291,33 +291,39 @@ exports[`CheckBox should be match snapshot 1`] = `
}
>
<span
className="sc-AxhCb DoGBp"
className="sc-AxhUy cfHhAU"
>
<Component
color="#fff"
name="fa-check"
size={10}
>
<FaCheck
aria-hidden={true}
className=""
color="#fff"
focusable={false}
role="img"
size={10}
>
<IconBase
aria-hidden={true}
attr={
Object {
"viewBox": "0 0 512 512",
}
}
className=""
color="#fff"
focusable={false}
role="img"
size={10}
>
<svg
aria-hidden={true}
color="#fff"
fill="currentColor"
focusable={false}
height={10}
role="img"
size={10}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`CheckBoxLabel should be match snapshot 1`] = `
className=""
>
<div
className="sc-AxhUy hejoPV"
className="sc-AxgMl khpreb"
>
<styled.label
className=""
Expand Down Expand Up @@ -81,7 +81,7 @@ exports[`CheckBoxLabel should be match snapshot 1`] = `
}
>
<label
className="sc-AxgMl hMZYSl"
className="sc-AxheI ldTmjf"
>
<Component
checked={true}
Expand Down Expand Up @@ -156,7 +156,7 @@ exports[`CheckBoxLabel should be match snapshot 1`] = `
}
>
<div
className="sc-AxjAm impYQq"
className="sc-AxirZ clMtsN"
>
<styled.input
checked={true}
Expand Down Expand Up @@ -231,7 +231,7 @@ exports[`CheckBoxLabel should be match snapshot 1`] = `
>
<input
checked={true}
className="sc-AxiKw igyvWT"
className="sc-AxhCb bzdyKr"
disabled={false}
name="name"
onChange={[Function]}
Expand Down Expand Up @@ -306,7 +306,7 @@ exports[`CheckBoxLabel should be match snapshot 1`] = `
}
>
<span
className="sc-AxirZ hRgeHQ active "
className="sc-AxiKw kXHM active "
/>
</styled.span>
<styled.span
Expand Down Expand Up @@ -376,33 +376,39 @@ exports[`CheckBoxLabel should be match snapshot 1`] = `
}
>
<span
className="sc-AxhCb DoGBp"
className="sc-AxhUy cfHhAU"
>
<Component
color="#fff"
name="fa-check"
size={10}
>
<FaCheck
aria-hidden={true}
className=""
color="#fff"
focusable={false}
role="img"
size={10}
>
<IconBase
aria-hidden={true}
attr={
Object {
"viewBox": "0 0 512 512",
}
}
className=""
color="#fff"
focusable={false}
role="img"
size={10}
>
<svg
aria-hidden={true}
color="#fff"
fill="currentColor"
focusable={false}
height={10}
role="img"
size={10}
Expand Down Expand Up @@ -497,7 +503,7 @@ exports[`CheckBoxLabel should be match snapshot 1`] = `
}
>
<p
className="sc-AxheI fDRfns"
className="sc-Axmtr ibdPSj"
>
label
</p>
Expand Down
Loading

0 comments on commit 9d8d92a

Please sign in to comment.