Skip to content

Commit

Permalink
Merge pull request #1104 from kufu/update-smarthr-ui-to-v44.0.0
Browse files Browse the repository at this point in the history
Update smarthr UI to v44.0.0
  • Loading branch information
uknmr committed Mar 22, 2024
2 parents 71a57a6 + 39f6384 commit 28921e9
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 101 deletions.
2 changes: 1 addition & 1 deletion content/articles/basics/illustration/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ order: 5
---
import { Grid } from '@Components/shared/Grid/Grid'
import { ImgWithDesc } from '@Components/article/ImgWithDesc/ImgWithDesc'
import { Cluster, LineUp, Stack } from 'smarthr-ui'
import { Cluster, Stack } from 'smarthr-ui'
import { DoAndDont } from '@Components/DoAndDont'
import { AnchorButton } from 'smarthr-ui'

Expand Down
2 changes: 1 addition & 1 deletion content/articles/basics/illustration/smarthr-co.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ order: 1

import { Grid } from '@Components/shared/Grid/Grid'
import { ImgWithDesc } from '@Components/article/ImgWithDesc/ImgWithDesc'
import { Cluster, LineUp, Stack } from 'smarthr-ui'
import { Cluster, Stack } from 'smarthr-ui'
import { DoAndDont } from '@Components/DoAndDont'
import { AnchorButton } from 'smarthr-ui'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 'ページの概要はヘッダーに書けます。ページの概
order: 1
---

import { Button, Cluster, FaPlusCircleIcon, LineUp, Stack, Table, Td, Th, Text } from 'smarthr-ui'
import { Button, Cluster, FaPlusCircleIcon, Stack, Table, Td, Th, Text } from 'smarthr-ui'
import { ComponentPreview } from '@Components/ComponentPreview'
import { DoAndDont } from '@Components/DoAndDont'
import { StaticImage } from '@Components/StaticImage'
Expand Down Expand Up @@ -121,17 +121,6 @@ SmartHR UI Layoutコンポーネントを使用できます。
))}
</Cluster>

### LineUp

* `align-items``justify-content`など`Flexbox`に準じたプロパティを渡せます。
* `gap`に使える値は`XXS`,`XS`,`S`,`M`,`L`,`XL`、他`1`,`0.5`などの数値です。詳しくはsmarthr-uiのドキュメントを参照してください。

<LineUp gap="XS">
{[...Array(10)].map((_, i) => (
<div key={i} style={{background: 'black', width: `${100}px`, height: '100px'}} />
))}
</LineUp>

### Stack

* 等間隔に隙間を保ち、積み重ねるレイアウトが作れます。
Expand Down Expand Up @@ -224,7 +213,7 @@ import imageUrl from './images/sample.jpg';

## Do And Don&apos;t

<LineUp gap="XS">
<Cluster gap="XS">
<DoAndDont
type="do"
img={<StaticImage src={imageUrl} alt="Do" width="200" />}
Expand All @@ -235,5 +224,5 @@ import imageUrl from './images/sample.jpg';
img={<StaticImage src={imageUrl} alt="Dont" width="200" />}
label={<Text>ほげほげ</Text>}
/>
</LineUp>
</Cluster>

23 changes: 0 additions & 23 deletions content/articles/products/components/headline-area.mdx

This file was deleted.

17 changes: 0 additions & 17 deletions content/articles/products/components/layout/line-up.mdx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ order: 2
---

import { DoAndDont } from '@Components/DoAndDont'
import { FaExclamationTriangleIcon, LineUp } from 'smarthr-ui'
import { FaExclamationTriangleIcon, Cluster} from 'smarthr-ui'

import imageUrl6Do from './images/access-control-setting-pattern6-do.png'
import imageUrl6Dont from './images/access-control-setting-pattern6-dont.png'
Expand Down Expand Up @@ -103,7 +103,7 @@ SmartHR基本機能の共通設定おける、操作権限を設定する項目

横幅に十分なスペースがある場合は、基本的に横並びにすることで縦幅が長くなりすぎることを防ぎます。

<LineUp gap="XS">
<Cluster gap="XS">
<DoAndDont
type="do"
img={<img src={imageUrl6Do} alt="スクリーンショット: 設定項目の縦横に配置するレイアウトのDo"/>}
Expand All @@ -114,7 +114,7 @@ SmartHR基本機能の共通設定おける、操作権限を設定する項目
img={<img src={imageUrl6Dont} alt="スクリーンショット: 設定項目の縦横に配置するレイアウトのDon't"/>}
label="縦並びにすると、親項目の幅に対して要素の配置が偏ってしまい、視認性が低下する恐れがあります。"
/>
</LineUp>
</Cluster>

ただし、選択肢の文字が長くなる場合は縦並びを検討します。

Expand All @@ -125,7 +125,7 @@ SmartHR基本機能の共通設定おける、操作権限を設定する項目
CRUDなど、設定項目の組み合わせが決まっている操作権限項目が連続して複数並ぶケースで、一部の設定項目が対応していない場合は該当の設定項目を非表示にします。その際、設定項目が表示されていた箇所はそのまま空白として残します。
この場合のコンテンツ領域の横幅は、選択肢が存在しているときと同じ横幅になるように固定します。

<LineUp gap="XS">
<Cluster gap="XS">
<DoAndDont
type="do"
img={<img src={imageUrl13Do} alt="スクリーンショット: 対応しない設定項目を空白として残すレイアウトのDo"/>}
Expand All @@ -136,7 +136,7 @@ CRUDなど、設定項目の組み合わせが決まっている操作権限項
img={<img src={imageUrl13Dont} alt="スクリーンショット: 対応しない設定項目を空白として残すレイアウトのDon't"/>}
label="詰めずに配置すると、どの設定項目が対応していないのか把握しづらくなるため、空白が必要です。"
/>
</LineUp>
</Cluster>

## 種類

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"react-instantsearch-dom": "^6.40.4",
"react-live": "^4.1.5",
"react-string-replace": "^1.1.1",
"smarthr-ui": "^43.3.0",
"smarthr-ui": "^44.0.0",
"styled-components": "^5.3.11"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 28921e9

Please sign in to comment.