From b7f3b57301bfe87dc3a14ac39dd1805e04ee78a8 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Sat, 15 Jul 2023 21:21:19 -0700 Subject: [PATCH] Rename normal to neutral. --- src/docs/Docs.tsx | 6 +++--- src/docs/pages/flex/Wrap.tsx | 10 +++++----- src/docs/pages/popover/Popover.tsx | 2 +- src/docs/pages/searchResult/SearchResults.tsx | 2 +- src/lib/components/app/AppSideNav.tsx | 2 +- src/lib/components/badge/Badge.tsx | 2 +- src/lib/components/badge/_index.scss | 2 +- src/lib/components/button/ButtonPrimary.tsx | 2 +- src/lib/components/button/ButtonSecondary.tsx | 2 +- src/lib/components/button/ButtonTertiary.tsx | 2 +- src/lib/components/button/buttonPrimary.scss | 2 +- src/lib/components/button/buttonSecondary.scss | 2 +- src/lib/components/button/buttonTertiary.scss | 2 +- src/lib/components/button/iconButton.scss | 2 +- src/lib/components/button/types.ts | 2 +- src/lib/components/callout/_index.scss | 2 +- src/lib/components/code/Code.tsx | 2 +- src/lib/components/copyButton/CopyButton.tsx | 2 +- src/lib/components/drawer/Drawer.tsx | 4 ++-- src/lib/components/icon/_index.scss | 2 +- src/lib/components/icon/types.ts | 2 +- src/lib/components/modal/Modal.tsx | 4 ++-- src/lib/components/optionsButton/_index.scss | 4 ++-- src/lib/components/optionsList/OptionsListItem.tsx | 2 +- src/lib/components/prompt/Prompt.tsx | 11 +++++++++-- src/lib/components/prompt/_index.scss | 2 +- src/lib/components/setting/Setting.tsx | 2 +- src/lib/components/typography/_textColor.scss | 2 +- src/lib/components/typography/types.ts | 2 +- 29 files changed, 46 insertions(+), 39 deletions(-) diff --git a/src/docs/Docs.tsx b/src/docs/Docs.tsx index 44e8f6b..eb055da 100644 --- a/src/docs/Docs.tsx +++ b/src/docs/Docs.tsx @@ -48,7 +48,7 @@ const Page = ({ name, examples }: { name: string; examples: ExampleType[] }) => } - color="normal" + color="neutral" onClick={() => navigateToPreviousPage()} /> @@ -61,7 +61,7 @@ const Page = ({ name, examples }: { name: string; examples: ExampleType[] }) => } - color="normal" + color="neutral" onClick={() => navigateToNextPage()} /> @@ -111,7 +111,7 @@ export const Docs = () => { diff --git a/src/docs/pages/flex/Wrap.tsx b/src/docs/pages/flex/Wrap.tsx index 82a6f80..d6ee870 100644 --- a/src/docs/pages/flex/Wrap.tsx +++ b/src/docs/pages/flex/Wrap.tsx @@ -3,23 +3,23 @@ import { VuiBadge, VuiFlexContainer, VuiFlexItem } from "../../../lib"; export const Wrap = () => ( - 当たり + 当たり - 先手 + 先手 - 気合い + 気合い - 模様 + 模様 - 利かし + 利かし ); diff --git a/src/docs/pages/popover/Popover.tsx b/src/docs/pages/popover/Popover.tsx index 8df74f9..46bfc0e 100644 --- a/src/docs/pages/popover/Popover.tsx +++ b/src/docs/pages/popover/Popover.tsx @@ -18,7 +18,7 @@ export const Popover = () => { setIsOpen={() => setIsOpen(!isOpen)} button={ diff --git a/src/docs/pages/searchResult/SearchResults.tsx b/src/docs/pages/searchResult/SearchResults.tsx index bc7ce4c..3854508 100644 --- a/src/docs/pages/searchResult/SearchResults.tsx +++ b/src/docs/pages/searchResult/SearchResults.tsx @@ -54,7 +54,7 @@ export const SearchResults = () => { return ( <> - setIsSelectionEnabled(!isSelectionEnabled)}> + setIsSelectionEnabled(!isSelectionEnabled)}> Toggle selection diff --git a/src/lib/components/app/AppSideNav.tsx b/src/lib/components/app/AppSideNav.tsx index 4250d0f..ab7fdef 100644 --- a/src/lib/components/app/AppSideNav.tsx +++ b/src/lib/components/app/AppSideNav.tsx @@ -56,7 +56,7 @@ export const VuiAppSideNav = ({ items = [], content }: Props) => { setIsCollapsed(false)} className="appSideNavExpandButton" - color="normal" + color="neutral" icon={ diff --git a/src/lib/components/badge/Badge.tsx b/src/lib/components/badge/Badge.tsx index bc2f922..77186a0 100644 --- a/src/lib/components/badge/Badge.tsx +++ b/src/lib/components/badge/Badge.tsx @@ -4,7 +4,7 @@ import { Link } from "react-router-dom"; import { Props as LinkProps } from "../link/Link"; import { getTrackingProps } from "../../utils/getTrackingProps"; -export const BADGE_COLOR = ["accent", "primary", "danger", "success", "normal"] as const; +export const BADGE_COLOR = ["accent", "primary", "danger", "success", "neutral"] as const; type Props = { children: React.ReactNode; diff --git a/src/lib/components/badge/_index.scss b/src/lib/components/badge/_index.scss index 5d08df0..58ce575 100644 --- a/src/lib/components/badge/_index.scss +++ b/src/lib/components/badge/_index.scss @@ -37,7 +37,7 @@ $color: ( "background-color": transparentize($colorDanger, 0.9), "border-color": transparentize($colorDanger, 0.9) ), - normal: ( + neutral: ( "color": $colorText, "background-color": $colorLightShade, "border-color": transparentize($colorText, 0.9) diff --git a/src/lib/components/button/ButtonPrimary.tsx b/src/lib/components/button/ButtonPrimary.tsx index 9626d48..e2996bb 100644 --- a/src/lib/components/button/ButtonPrimary.tsx +++ b/src/lib/components/button/ButtonPrimary.tsx @@ -26,7 +26,7 @@ const colorToIconColorMap = { success: "empty", danger: "empty", warning: "empty", - normal: "normal" + neutral: "neutral" }; export const VuiButtonPrimary = forwardRef( diff --git a/src/lib/components/button/ButtonSecondary.tsx b/src/lib/components/button/ButtonSecondary.tsx index 7349ec4..89f6a95 100644 --- a/src/lib/components/button/ButtonSecondary.tsx +++ b/src/lib/components/button/ButtonSecondary.tsx @@ -26,7 +26,7 @@ const colorToIconColorMap = { success: "success", danger: "danger", warning: "warning", - normal: "normal" + neutral: "neutral" }; export const VuiButtonSecondary = forwardRef( diff --git a/src/lib/components/button/ButtonTertiary.tsx b/src/lib/components/button/ButtonTertiary.tsx index c06da61..c31fc24 100644 --- a/src/lib/components/button/ButtonTertiary.tsx +++ b/src/lib/components/button/ButtonTertiary.tsx @@ -24,7 +24,7 @@ const colorToIconColorMap = { success: "success", danger: "danger", warning: "warning", - normal: "normal" + neutral: "neutral" }; export const VuiButtonTertiary = forwardRef( diff --git a/src/lib/components/button/buttonPrimary.scss b/src/lib/components/button/buttonPrimary.scss index 20736e3..c4a1483 100644 --- a/src/lib/components/button/buttonPrimary.scss +++ b/src/lib/components/button/buttonPrimary.scss @@ -28,7 +28,7 @@ $color: ( "color": #ffffff, "background-color": $colorWarning ), - normal: ( + neutral: ( "color": $colorText, "background-color": transparentize($colorText, 0.9) ) diff --git a/src/lib/components/button/buttonSecondary.scss b/src/lib/components/button/buttonSecondary.scss index 985658e..b1c33fa 100644 --- a/src/lib/components/button/buttonSecondary.scss +++ b/src/lib/components/button/buttonSecondary.scss @@ -28,7 +28,7 @@ $color: ( "border-color": transparentize($colorWarning, 0.5), "color": $colorWarning ), - normal: ( + neutral: ( "border-color": $borderColor, "color": $colorText ) diff --git a/src/lib/components/button/buttonTertiary.scss b/src/lib/components/button/buttonTertiary.scss index ab44188..e52a650 100644 --- a/src/lib/components/button/buttonTertiary.scss +++ b/src/lib/components/button/buttonTertiary.scss @@ -26,7 +26,7 @@ $color: ( warning: ( "color": $colorWarning ), - normal: ( + neutral: ( "color": $colorText ) ); diff --git a/src/lib/components/button/iconButton.scss b/src/lib/components/button/iconButton.scss index 5657cc4..37663da 100644 --- a/src/lib/components/button/iconButton.scss +++ b/src/lib/components/button/iconButton.scss @@ -12,7 +12,7 @@ $color: ( success: $colorSuccess, warning: $colorWarning, danger: $colorDanger, - normal: $colorText + neutral: $colorText ); @each $colorName, $colorValue in $color { diff --git a/src/lib/components/button/types.ts b/src/lib/components/button/types.ts index 0214868..e9cf2ef 100644 --- a/src/lib/components/button/types.ts +++ b/src/lib/components/button/types.ts @@ -1,3 +1,3 @@ export const BUTTON_SIZE = ["xs", "s", "m"] as const; -export const BUTTON_COLOR = ["accent", "primary", "success", "danger", "warning", "normal"] as const; +export const BUTTON_COLOR = ["accent", "primary", "success", "danger", "warning", "neutral"] as const; export type ButtonColor = (typeof BUTTON_COLOR)[number]; diff --git a/src/lib/components/callout/_index.scss b/src/lib/components/callout/_index.scss index b021399..68c2614 100644 --- a/src/lib/components/callout/_index.scss +++ b/src/lib/components/callout/_index.scss @@ -29,7 +29,7 @@ $color: ( danger: ( "background-color": $colorDangerLight ), - normal: ( + neutral: ( "background-color": $colorLightShade ) ); diff --git a/src/lib/components/code/Code.tsx b/src/lib/components/code/Code.tsx index 44c40c1..e8a0573 100644 --- a/src/lib/components/code/Code.tsx +++ b/src/lib/components/code/Code.tsx @@ -38,7 +38,7 @@ export const VuiCode = ({ onCopy, language = "none", fullHeight, children = "" } diff --git a/src/lib/components/copyButton/CopyButton.tsx b/src/lib/components/copyButton/CopyButton.tsx index 7ab3f85..607a1dc 100644 --- a/src/lib/components/copyButton/CopyButton.tsx +++ b/src/lib/components/copyButton/CopyButton.tsx @@ -37,7 +37,7 @@ export const VuiCopyButton = ({ value, options, size = "s" }: Props) => { type="secondary" isOpen={isOpen} setIsOpen={setIsOpen} - color="normal" + color="neutral" size={size} onClick={() => { navigator.clipboard.writeText(value); diff --git a/src/lib/components/drawer/Drawer.tsx b/src/lib/components/drawer/Drawer.tsx index 2cc1f92..04f4a38 100644 --- a/src/lib/components/drawer/Drawer.tsx +++ b/src/lib/components/drawer/Drawer.tsx @@ -64,9 +64,9 @@ export const VuiDrawer = ({ className, color = "primary", title, children, isOpe + } diff --git a/src/lib/components/icon/_index.scss b/src/lib/components/icon/_index.scss index 5f65b32..39f16a6 100644 --- a/src/lib/components/icon/_index.scss +++ b/src/lib/components/icon/_index.scss @@ -10,7 +10,7 @@ $colors: ( warning: $colorWarning, danger: $colorDanger, subdued: $colorSubdued, - normal: $colorText, + neutral: $colorText, empty: #ffffff ); diff --git a/src/lib/components/icon/types.ts b/src/lib/components/icon/types.ts index 54abe53..2a27ef7 100644 --- a/src/lib/components/icon/types.ts +++ b/src/lib/components/icon/types.ts @@ -6,7 +6,7 @@ export const ICON_COLOR = [ "warning", "danger", "subdued", - "normal", + "neutral", "empty" ] as const; diff --git a/src/lib/components/modal/Modal.tsx b/src/lib/components/modal/Modal.tsx index 5b1dee1..f3d8cd3 100644 --- a/src/lib/components/modal/Modal.tsx +++ b/src/lib/components/modal/Modal.tsx @@ -65,9 +65,9 @@ export const VuiModal = ({ className, color = "primary", title, children, isOpen + } diff --git a/src/lib/components/optionsButton/_index.scss b/src/lib/components/optionsButton/_index.scss index 8ee50ac..1993d41 100644 --- a/src/lib/components/optionsButton/_index.scss +++ b/src/lib/components/optionsButton/_index.scss @@ -17,7 +17,7 @@ $colorPrimaryButton: ( success: transparentize($colorEmptyShade, 0.5), danger: transparentize($colorEmptyShade, 0.5), warning: transparentize($colorEmptyShade, 0.5), - normal: transparentize($colorText, 0.8) + neutral: transparentize($colorText, 0.8) ); @each $colorName, $colorValue in $colorPrimaryButton { @@ -32,7 +32,7 @@ $coloSecondaryButton: ( success: transparentize($colorSuccess, 0.7), danger: transparentize($colorDanger, 0.7), warning: transparentize($colorWarning, 0.7), - normal: transparentize($colorText, 0.8) + neutral: transparentize($colorText, 0.8) ); @each $colorName, $colorValue in $coloSecondaryButton { diff --git a/src/lib/components/optionsList/OptionsListItem.tsx b/src/lib/components/optionsList/OptionsListItem.tsx index ef8a80c..d35af76 100644 --- a/src/lib/components/optionsList/OptionsListItem.tsx +++ b/src/lib/components/optionsList/OptionsListItem.tsx @@ -16,7 +16,7 @@ type Props = OptionListItem & { export const VuiOptionsListItem = ({ value, label, - color = "normal", + color = "neutral", href, onClick, isSelectable, diff --git a/src/lib/components/prompt/Prompt.tsx b/src/lib/components/prompt/Prompt.tsx index c724114..aff103c 100644 --- a/src/lib/components/prompt/Prompt.tsx +++ b/src/lib/components/prompt/Prompt.tsx @@ -1,7 +1,7 @@ import classNames from "classnames"; import { ReactNode } from "react"; -const COLOR = ["danger", "normal"] as const; +const COLOR = ["danger", "neutral"] as const; const paddingToClassNameMap = { xs: "vuiPrompt--paddingXs", @@ -21,7 +21,14 @@ type Props = { isSpeechBubble?: boolean; }; -export const VuiPrompt = ({ children, className, onClick, color = "normal", padding = "l", isSpeechBubble }: Props) => { +export const VuiPrompt = ({ + children, + className, + onClick, + color = "neutral", + padding = "l", + isSpeechBubble +}: Props) => { const Component = onClick ? "button" : "div"; const classes = classNames(className, "vuiPrompt", `vuiPrompt--${color}`, paddingToClassNameMap[padding], { "vuiPrompt--interactive": onClick !== undefined, diff --git a/src/lib/components/prompt/_index.scss b/src/lib/components/prompt/_index.scss index 4b350cc..81ca0bd 100644 --- a/src/lib/components/prompt/_index.scss +++ b/src/lib/components/prompt/_index.scss @@ -40,7 +40,7 @@ $color: ( "color": $colorDanger, "background-color": $colorDangerLightShade ), - normal: ( + neutral: ( "color": $colorDarkShade, "background-color": $colorLightShade ) diff --git a/src/lib/components/setting/Setting.tsx b/src/lib/components/setting/Setting.tsx index dd2c7a2..debf59e 100644 --- a/src/lib/components/setting/Setting.tsx +++ b/src/lib/components/setting/Setting.tsx @@ -42,7 +42,7 @@ export const VuiSetting = ({ {badge && ( - {badge} + {badge} )} diff --git a/src/lib/components/typography/_textColor.scss b/src/lib/components/typography/_textColor.scss index 7559d5d..cc7f9c0 100644 --- a/src/lib/components/typography/_textColor.scss +++ b/src/lib/components/typography/_textColor.scss @@ -5,7 +5,7 @@ $color: ( warning: $colorWarning, danger: $colorDanger, subdued: $colorSubdued, - normal: $colorText + neutral: $colorText ); @each $colorName, $colorValue in $color { diff --git a/src/lib/components/typography/types.ts b/src/lib/components/typography/types.ts index f4e8978..87c98f4 100644 --- a/src/lib/components/typography/types.ts +++ b/src/lib/components/typography/types.ts @@ -1,4 +1,4 @@ export const TITLE_SIZE = ["xxs", "xs", "s", "m", "l", "xl", "xxl"] as const; -export const TEXT_COLOR = ["accent", "primary", "success", "warning", "danger", "subdued", "normal"] as const; +export const TEXT_COLOR = ["accent", "primary", "success", "warning", "danger", "subdued", "neutral"] as const; export type TextColor = (typeof TEXT_COLOR)[number];