From 15a0453bb2d2767dffc38008fc92b3d941f6dbb2 Mon Sep 17 00:00:00 2001 From: KANAMORI Yu Date: Fri, 22 Nov 2024 10:46:43 +0900 Subject: [PATCH] =?UTF-8?q?feat(CompactInformationPanel)!:=20=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=8D=E3=83=B3=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4=20(#5129)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompactInformationPanel.stories.tsx | 38 -------------- .../CompactInformationPanel.tsx | 34 ------------ .../VRTCompactInformationPanel.stories.tsx | 52 ------------------- .../CompactInformationPanel/index.ts | 1 - packages/smarthr-ui/src/index.ts | 1 - sandbox/next/e2e/rsc.test.ts | 1 - .../rsc_test/CompactInformationPanel/page.tsx | 12 ----- 7 files changed, 139 deletions(-) delete mode 100644 packages/smarthr-ui/src/components/CompactInformationPanel/CompactInformationPanel.stories.tsx delete mode 100644 packages/smarthr-ui/src/components/CompactInformationPanel/CompactInformationPanel.tsx delete mode 100644 packages/smarthr-ui/src/components/CompactInformationPanel/VRTCompactInformationPanel.stories.tsx delete mode 100644 packages/smarthr-ui/src/components/CompactInformationPanel/index.ts delete mode 100644 sandbox/next/src/app/rsc_test/CompactInformationPanel/page.tsx diff --git a/packages/smarthr-ui/src/components/CompactInformationPanel/CompactInformationPanel.stories.tsx b/packages/smarthr-ui/src/components/CompactInformationPanel/CompactInformationPanel.stories.tsx deleted file mode 100644 index 3add701540..0000000000 --- a/packages/smarthr-ui/src/components/CompactInformationPanel/CompactInformationPanel.stories.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { StoryFn } from '@storybook/react' -import React from 'react' - -import { Stack } from '../Layout' - -import { CompactInformationPanel } from '.' - -export default { - title: 'Data Display(データ表示)/CompactInformationPanel(非推奨)', - component: CompactInformationPanel, -} - -export const Default: StoryFn = () => ( - - CompactInformationPanel - は画面内の操作を進めるにあたってユーザーに伝えるべきメッセージを表示する領域です。 -
- InformationPanel とは異なり、パネルを閉じることはできません。 -
-) -export const Type: StoryFn = () => ( - - - これは [type=info] の CompactInformationPanel です。 -
- type を省略した場合も [type=info] になります。 -
- - これは [type=success] の CompactInformationPanel です。 - - - これは [type=warning] の CompactInformationPanel です。 - - - これは [type=error] の CompactInformationPanel です。 - -
-) diff --git a/packages/smarthr-ui/src/components/CompactInformationPanel/CompactInformationPanel.tsx b/packages/smarthr-ui/src/components/CompactInformationPanel/CompactInformationPanel.tsx deleted file mode 100644 index 2af0f22a16..0000000000 --- a/packages/smarthr-ui/src/components/CompactInformationPanel/CompactInformationPanel.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React, { FC, PropsWithChildren, useMemo } from 'react' -import { tv } from 'tailwind-variants' - -import { Base, BaseElementProps } from '../Base' -import { ResponseMessage } from '../ResponseMessage' - -type Props = PropsWithChildren<{ - /** 表示する情報の種類 */ - type?: 'info' | 'success' | 'warning' | 'error' -}> - -const compactInformationPanel = tv({ - base: ['smarthr-ui-CompactInformationPanel', 'shr-flex shr-p-1 shr-shadow-layer-3'], -}) - -/** - * @deprecated `CompactInformationPanel` は非推奨です。`NotificationBar[base="base"]` を使用してください。 - */ -export const CompactInformationPanel: FC = ({ - type = 'info', - className, - children, - ...props -}) => { - const styles = useMemo(() => compactInformationPanel({ className }), [className]) - - return ( - - - {children} - - - ) -} diff --git a/packages/smarthr-ui/src/components/CompactInformationPanel/VRTCompactInformationPanel.stories.tsx b/packages/smarthr-ui/src/components/CompactInformationPanel/VRTCompactInformationPanel.stories.tsx deleted file mode 100644 index f36182b2d0..0000000000 --- a/packages/smarthr-ui/src/components/CompactInformationPanel/VRTCompactInformationPanel.stories.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import { StoryFn } from '@storybook/react' -import * as React from 'react' -import styled from 'styled-components' - -import { InformationPanel } from '../InformationPanel' - -import { Type } from './CompactInformationPanel.stories' - -import { CompactInformationPanel } from '.' - -export default { - title: 'Data Display(データ表示)/CompactInformationPanel(非推奨)', - component: CompactInformationPanel, - parameters: { - withTheming: true, - }, -} - -export const VRTNarrow: StoryFn = () => ( - <> - - 画面幅が狭い状態で表示されます - - - -) -VRTNarrow.parameters = { - viewport: { - defaultViewport: 'vrtMobile', - }, - chromatic: { - modes: { - vrtMobile: { viewport: 'vrtMobile' }, - }, - }, -} - -export const VRTForcedColors: StoryFn = () => ( - <> - - Chromatic 上では強制カラーモードで表示されます - - - -) -VRTForcedColors.parameters = { - chromatic: { forcedColors: 'active' }, -} - -const VRTInformationPanel = styled(InformationPanel)` - margin-bottom: 24px; -` diff --git a/packages/smarthr-ui/src/components/CompactInformationPanel/index.ts b/packages/smarthr-ui/src/components/CompactInformationPanel/index.ts deleted file mode 100644 index 6cc99120ea..0000000000 --- a/packages/smarthr-ui/src/components/CompactInformationPanel/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { CompactInformationPanel } from './CompactInformationPanel' diff --git a/packages/smarthr-ui/src/index.ts b/packages/smarthr-ui/src/index.ts index cde0a53327..9ec15914a3 100644 --- a/packages/smarthr-ui/src/index.ts +++ b/packages/smarthr-ui/src/index.ts @@ -71,7 +71,6 @@ export { FormControl } from './components/FormControl' export { Fieldset } from './components/Fieldset' export { MultiComboBox, SingleComboBox } from './components/ComboBox' export { SideNav } from './components/SideNav' -export { CompactInformationPanel } from './components/CompactInformationPanel' export { Text, RangeSeparator } from './components/Text' export { LineClamp } from './components/LineClamp' export { NotificationBar } from './components/NotificationBar' diff --git a/sandbox/next/e2e/rsc.test.ts b/sandbox/next/e2e/rsc.test.ts index 8f783289a8..7e4eae179a 100644 --- a/sandbox/next/e2e/rsc.test.ts +++ b/sandbox/next/e2e/rsc.test.ts @@ -12,7 +12,6 @@ const SERVER_COMPONENTS = [ 'Balloon', 'BaseColumn', 'Chip', - 'CompactInformationPanel', 'DefinitionList', 'DefinitionListItem', 'ErrorScreen', diff --git a/sandbox/next/src/app/rsc_test/CompactInformationPanel/page.tsx b/sandbox/next/src/app/rsc_test/CompactInformationPanel/page.tsx deleted file mode 100644 index c732ad6570..0000000000 --- a/sandbox/next/src/app/rsc_test/CompactInformationPanel/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react' -import { CompactInformationPanel } from 'smarthr-ui' - -import { RSCChecker } from '../components/RSCChecker'; -export default function CompactInformationPanelPage() { - return ( - <> - - - - ) -}