Skip to content

Commit b5987ab

Browse files
authored
Merge pull request #87 from digital-go-jp/v2
merge v2 into main
2 parents f5e7215 + f120d98 commit b5987ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+284
-296
lines changed

.storybook/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
BlinkMacSystemFont,
1515
sans-serif;
1616

17-
@apply text-std-17N-7 text-solid-grey-900;
17+
@apply text-std-17N-170 text-solid-gray-900;
1818
}
1919
}

package-lock.json

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@digital-go-jp/design-system-example-components",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"type": "module",
55
"main": "dist/index.cjs.js",
66
"typings": "dist/index.d.ts",
@@ -39,7 +39,7 @@
3939
"storybook:test": "test-storybook"
4040
},
4141
"dependencies": {
42-
"@digital-go-jp/tailwind-theme-plugin": "^0.1.16",
42+
"@digital-go-jp/tailwind-theme-plugin": "^0.1.17",
4343
"react": "^18.3.1",
4444
"react-dom": "^18.3.1",
4545
"tailwindcss": "^3.4.13"

src/components/Accordion/Accordion.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const WithSquareIcon: Story = {
129129
</AccordionSummary>
130130
<div className='px-1 py-2 desktop:px-2 desktop:py-4'>
131131
<h4
132-
className={`md:text-std-20B-6 mb-4 ${focusVisibleStyles}`}
132+
className={`md:text-std-20B-160 mb-4 ${focusVisibleStyles}`}
133133
ref={focusTargetRef1}
134134
tabIndex={-1}
135135
>

src/components/Accordion/Accordion.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const Accordion = (props: AccordionProps) => {
66
const { children, className, ...rest } = props;
77

88
return (
9-
<details className={`group ${className ?? ''} border-b border-solid-grey-420`} {...rest}>
9+
<details className={`group ${className ?? ''} border-b border-solid-gray-420`} {...rest}>
1010
{children}
1111
</details>
1212
);
@@ -69,9 +69,9 @@ export const AccordionSummary = (props: AccordionSummaryProps) => {
6969
return (
7070
<summary
7171
className={`
72-
group/summary flex cursor-default list-none items-center justify-between gap-4 p-2 text-std-16M-7
73-
desktop:p-3 desktop:text-std-20N-5 desktop:gap-10
74-
hover:bg-solid-grey-50
72+
group/summary flex cursor-default list-none items-center justify-between gap-4 p-2 text-std-16N-170
73+
desktop:p-3 desktop:text-std-20N-150 desktop:gap-10
74+
hover:bg-solid-gray-50
7575
focus-visible:rounded focus-visible:outline focus-visible:outline-4 focus-visible:outline-black focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:ring-[calc(2/16*1rem)] focus-visible:ring-yellow-300
7676
[&::-webkit-details-marker]:hidden ${className ?? ''}
7777
`}

src/components/Button/Button.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export const buttonVariantStyle: { [key in ButtonVariant]: string } = {
1919
hover:underline
2020
active:bg-blue-1200
2121
active:underline
22-
aria-disabled:bg-solid-grey-300
23-
aria-disabled:text-solid-grey-50
22+
aria-disabled:bg-solid-gray-300
23+
aria-disabled:text-solid-gray-50
2424
`,
2525
outline: `
2626
bg-white
@@ -33,7 +33,7 @@ export const buttonVariantStyle: { [key in ButtonVariant]: string } = {
3333
active:text-blue-1200
3434
active:underline
3535
aria-disabled:bg-white
36-
aria-disabled:text-solid-grey-300
36+
aria-disabled:text-solid-gray-300
3737
`,
3838
text: `
3939
bg-transparent
@@ -47,15 +47,15 @@ export const buttonVariantStyle: { [key in ButtonVariant]: string } = {
4747
focus-visible:bg-yellow-300
4848
aria-disabled:bg-transparent
4949
aria-disabled:focus-visible:bg-yellow-300
50-
aria-disabled:text-solid-grey-300
50+
aria-disabled:text-solid-gray-300
5151
`,
5252
};
5353

5454
export const buttonSizeStyle: { [key in ButtonSize]: string } = {
55-
lg: 'min-w-[calc(136/16*1rem)] rounded-lg p-4 text-oln-16B-1 leading-snug',
56-
md: 'min-w-24 rounded-lg px-4 py-3 text-oln-16B-1 leading-snug',
57-
sm: 'relative min-w-20 rounded-md px-3 py-1.5 text-oln-16B-1 leading-snug after:absolute after:-inset-x-[calc(1/16*1rem)] after:-inset-y-[calc(5/16*1rem)]',
58-
xs: 'relative min-w-18 rounded px-2 py-1.5 text-oln-14B-1 after:absolute after:-inset-x-[calc(1/16*1rem)] after:-inset-y-[calc(9/16*1rem)]',
55+
lg: 'min-w-[calc(136/16*1rem)] rounded-lg p-4 text-oln-16B-100 leading-snug',
56+
md: 'min-w-24 rounded-lg px-4 py-3 text-oln-16B-100 leading-snug',
57+
sm: 'relative min-w-20 rounded-md px-3 py-1.5 text-oln-16B-100 leading-snug after:absolute after:-inset-x-[calc(1/16*1rem)] after:-inset-y-[calc(5/16*1rem)]',
58+
xs: 'relative min-w-18 rounded px-2 py-1.5 text-oln-14B-100 after:absolute after:-inset-x-[calc(1/16*1rem)] after:-inset-y-[calc(9/16*1rem)]',
5959
};
6060

6161
export type ButtonProps = {

src/components/Checkbox/Checkbox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>((props, ref)
1313

1414
return (
1515
<label
16-
className='flex w-fit items-start gap-3 py-2 text-dns-16N-3 text-solid-grey-800'
16+
className='flex w-fit items-start gap-3 py-2 text-dns-16N-130 text-solid-gray-800'
1717
htmlFor={id}
1818
>
1919
<input
2020
className={`
21-
appearance-none relative shrink-0 mt-0.5 w-[calc(17/16*1rem)] h-[calc(17/16*1rem)] border-[calc(1.5/16*1rem)] border-solid-grey-900 bg-white rounded-sm
21+
appearance-none relative shrink-0 mt-0.5 w-[calc(17/16*1rem)] h-[calc(17/16*1rem)] border-[calc(1.5/16*1rem)] border-solid-gray-900 bg-white rounded-sm
2222
focus:outline focus:outline-4 focus:outline-black focus:outline-offset-[calc(2/16*1rem)] focus:ring-[calc(2/16*1rem)] focus:ring-yellow-300
2323
before:hidden before:absolute before:top-[calc(3/16*1rem)] before:left-[calc(2.5/16*1rem)] before:w-[calc(9/16*1rem)] before:h-[calc(5.5/16*1rem)] before:border-b-[calc(1.5/16*1rem)] before:border-l-[calc(1.5/16*1rem)] before:border-white before:-rotate-45
2424
checked:bg-blue-900 checked:border-blue-900 checked:before:block
2525
${isError && '!border-error-1 checked:bg-error-1'}
26-
aria-disabled:bg-solid-grey-50 aria-disabled:!border-solid-grey-300 aria-disabled:before:border-solid-grey-50 checked:aria-disabled:bg-solid-grey-300
26+
aria-disabled:bg-solid-gray-50 aria-disabled:!border-solid-gray-300 aria-disabled:before:border-solid-gray-50 checked:aria-disabled:bg-solid-gray-300
2727
`}
2828
id={id}
2929
onClick={props['aria-disabled'] ? handleDisabled : onClick}

src/components/Divider/Divider.stories.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ const meta = {
88
tags: ['autodocs'],
99
argTypes: {
1010
color: {
11-
options: ['grey-420', 'grey-536', 'black'],
11+
options: ['gray-420', 'gray-536', 'black'],
1212
control: { type: 'radio' },
1313
description: '線の色を以下から選択します。',
1414
table: {
15-
defaultValue: { summary: 'grey-420' },
16-
type: { summary: "'grey-420', 'grey-536', 'black'" },
15+
defaultValue: { summary: 'gray-420' },
16+
type: { summary: "'gray-420', 'gray-536', 'black'" },
1717
},
1818
},
1919
},
@@ -33,7 +33,7 @@ type Story = StoryObj<typeof meta>;
3333
export const Playground: Story = {
3434
args: {
3535
className: '',
36-
color: 'grey-420',
36+
color: 'gray-420',
3737
},
3838
};
3939

@@ -42,16 +42,16 @@ export const Solid: Story = {
4242
return (
4343
<div className='flex flex-col gap-8'>
4444
<Divider />
45-
<Divider color='grey-536' />
45+
<Divider color='gray-536' />
4646
<Divider color='black' />
4747
<Divider className='border-t-2' />
48-
<Divider color='grey-536' className='border-t-2' />
48+
<Divider color='gray-536' className='border-t-2' />
4949
<Divider color='black' className='border-t-2' />
5050
<Divider className='border-t-[3px]' />
51-
<Divider color='grey-536' className='border-t-[3px]' />
51+
<Divider color='gray-536' className='border-t-[3px]' />
5252
<Divider color='black' className='border-t-[3px]' />
5353
<Divider className='border-t-4' />
54-
<Divider color='grey-536' className='border-t-4' />
54+
<Divider color='gray-536' className='border-t-4' />
5555
<Divider color='black' className='border-t-4' />
5656
</div>
5757
);
@@ -63,16 +63,16 @@ export const Dash: Story = {
6363
return (
6464
<div className='flex flex-col gap-8'>
6565
<Divider className='border-dashed' />
66-
<Divider color='grey-536' className='border-dashed' />
66+
<Divider color='gray-536' className='border-dashed' />
6767
<Divider color='black' className='border-dashed' />
6868
<Divider className='border-dashed border-t-2' />
69-
<Divider color='grey-536' className='border-dashed border-t-2' />
69+
<Divider color='gray-536' className='border-dashed border-t-2' />
7070
<Divider color='black' className='border-dashed border-t-2' />
7171
<Divider className='border-dashed border-t-[3px]' />
72-
<Divider color='grey-536' className='border-dashed border-t-[3px]' />
72+
<Divider color='gray-536' className='border-dashed border-t-[3px]' />
7373
<Divider color='black' className='border-dashed border-t-[3px]' />
7474
<Divider className='border-dashed border-t-4' />
75-
<Divider color='grey-536' className='border-dashed border-t-4' />
75+
<Divider color='gray-536' className='border-dashed border-t-4' />
7676
<Divider color='black' className='border-dashed border-t-4' />
7777
</div>
7878
);

src/components/Divider/Divider.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { ComponentProps } from 'react';
22

3-
export type DividerColor = 'grey-420' | 'grey-536' | 'black';
3+
export type DividerColor = 'gray-420' | 'gray-536' | 'black';
44

55
export const DividerColorStyle: { [key in DividerColor]: string } = {
6-
'grey-420': 'border-solid-grey-420',
7-
'grey-536': 'border-solid-grey-536',
6+
'gray-420': 'border-solid-gray-420',
7+
'gray-536': 'border-solid-gray-536',
88
black: 'border-black',
99
};
1010

@@ -13,7 +13,7 @@ export type DividerProps = ComponentProps<'hr'> & {
1313
};
1414

1515
export const Divider = (props: DividerProps) => {
16-
const { className, color = 'grey-420', ...rest } = props;
16+
const { className, color = 'gray-420', ...rest } = props;
1717

1818
return <hr className={`${DividerColorStyle[color]} ${className ?? ''}`} {...rest}></hr>;
1919
};

src/components/EmergencyBanner/EmergencyBanner.stories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export const Playground: Story = {
3131
</EmergencyBannerHeading>
3232
<EmergencyBannerBody>
3333
<div className='flex flex-col gap-2 desktop:gap-4'>
34-
<p className='text-std-16N-7'>年月日</p>
35-
<p className='text-std-16N-7 desktop:text-std-20N-5'>バナーデスクリプション</p>
34+
<p className='text-std-16N-170'>年月日</p>
35+
<p className='text-std-16N-170 desktop:text-std-20N-150'>バナーデスクリプション</p>
3636
</div>
3737
</EmergencyBannerBody>
3838
</>
@@ -50,10 +50,10 @@ export const Example = {
5050
</EmergencyBannerHeading>
5151
<EmergencyBannerBody>
5252
<div className='flex flex-col gap-2 desktop:gap-4'>
53-
<p className='text-std-16N-7'>
53+
<p className='text-std-16N-170'>
5454
<time dateTime='2024-01-01T06:00'>2024年1月1日 06:00更新</time>
5555
</p>
56-
<p className='text-std-16N-7 desktop:text-std-20N-5'>
56+
<p className='text-std-16N-170 desktop:text-std-20N-150'>
5757
1時23分に○○地区に対して避難準備情報が発令されました。お年寄りの方等避難に時間がかかる方は、直ちに指定避難所へ避難してください。
5858
</p>
5959
</div>

0 commit comments

Comments
 (0)