From 73ce937c88c12796e0a36d7437fd5ae2a4ddcf19 Mon Sep 17 00:00:00 2001 From: jongomez Date: Wed, 18 Oct 2023 16:37:19 +0100 Subject: [PATCH] fix: update icon names to match names on figma --- .../src/components/Calendar/Month.tsx | 16 ++++++------- .../src/components/Checkbox/Checkbox.tsx | 10 ++++---- .../CollapseHeader/CollapseHeader.tsx | 6 ++--- .../src/components/Dropdown/Dropdown.tsx | 6 ++--- .../components/DropdownItem/DropdownItem.tsx | 6 ++--- .../components/Icons/ArrowDownIcon/index.ts | 1 - .../src/components/Icons/ArrowUpIcon/index.ts | 1 - .../CheckboxFilledIcon/CheckboxFilledIcon.tsx | 24 ------------------- .../Icons/CheckboxFilledIcon/index.ts | 1 - .../Icons/CheckboxIcon/CheckboxIcon.tsx | 4 +++- .../Icons/CheckboxIndeterminate/index.ts | 1 - .../CheckboxOutlineBlankIcon.tsx | 22 +++++++++++++++++ .../Icons/CheckboxOutlineBlankIcon/index.ts | 1 + .../ChevronDownIcon.tsx} | 2 +- .../components/Icons/ChevronDownIcon/index.ts | 1 + .../ChevronLeftIcon.tsx} | 2 +- .../components/Icons/ChevronLeftIcon/index.ts | 1 + .../ChevronRightIcon.tsx} | 2 +- .../Icons/ChevronRightIcon/index.ts | 1 + .../ChevronUpIcon.tsx} | 2 +- .../components/Icons/ChevronUpIcon/index.ts | 1 + .../IndeterminateCheckboxFilledIcon.tsx} | 2 +- .../IndeterminateCheckboxFilledIcon/index.ts | 1 + .../Icons/NavigateBeforeIcon/index.ts | 1 - .../Icons/NavigateNextIcon/index.ts | 1 - .../Icons/NewPageIcon/NewPageIcon.tsx | 24 ------------------- .../src/components/Icons/NewPageIcon/index.ts | 1 - .../RadioButtonCheckedIcon.tsx} | 2 +- .../Icons/RadioButtonCheckedIcon/index.ts | 1 + .../Icons/RadioButtonFilledIcon/index.ts | 1 - .../lsd-react/src/components/Icons/index.ts | 13 +++++----- .../components/RadioButton/RadioButton.tsx | 4 ++-- .../lsd-react/src/components/Tabs/Tabs.tsx | 6 ++--- 33 files changed, 71 insertions(+), 97 deletions(-) delete mode 100644 packages/lsd-react/src/components/Icons/ArrowDownIcon/index.ts delete mode 100644 packages/lsd-react/src/components/Icons/ArrowUpIcon/index.ts delete mode 100644 packages/lsd-react/src/components/Icons/CheckboxFilledIcon/CheckboxFilledIcon.tsx delete mode 100644 packages/lsd-react/src/components/Icons/CheckboxFilledIcon/index.ts delete mode 100644 packages/lsd-react/src/components/Icons/CheckboxIndeterminate/index.ts create mode 100644 packages/lsd-react/src/components/Icons/CheckboxOutlineBlankIcon/CheckboxOutlineBlankIcon.tsx create mode 100644 packages/lsd-react/src/components/Icons/CheckboxOutlineBlankIcon/index.ts rename packages/lsd-react/src/components/Icons/{ArrowDownIcon/ArrowDownIcon.tsx => ChevronDownIcon/ChevronDownIcon.tsx} (90%) create mode 100644 packages/lsd-react/src/components/Icons/ChevronDownIcon/index.ts rename packages/lsd-react/src/components/Icons/{NavigateBeforeIcon/NavigateBeforeIcon.tsx => ChevronLeftIcon/ChevronLeftIcon.tsx} (90%) create mode 100644 packages/lsd-react/src/components/Icons/ChevronLeftIcon/index.ts rename packages/lsd-react/src/components/Icons/{NavigateNextIcon/NavigateNextIcon.tsx => ChevronRightIcon/ChevronRightIcon.tsx} (90%) create mode 100644 packages/lsd-react/src/components/Icons/ChevronRightIcon/index.ts rename packages/lsd-react/src/components/Icons/{ArrowUpIcon/ArrowUpIcon.tsx => ChevronUpIcon/ChevronUpIcon.tsx} (91%) create mode 100644 packages/lsd-react/src/components/Icons/ChevronUpIcon/index.ts rename packages/lsd-react/src/components/Icons/{CheckboxIndeterminate/CheckboxIndeterminateIcon.tsx => IndeterminateCheckboxFilledIcon/IndeterminateCheckboxFilledIcon.tsx} (91%) create mode 100644 packages/lsd-react/src/components/Icons/IndeterminateCheckboxFilledIcon/index.ts delete mode 100644 packages/lsd-react/src/components/Icons/NavigateBeforeIcon/index.ts delete mode 100644 packages/lsd-react/src/components/Icons/NavigateNextIcon/index.ts delete mode 100644 packages/lsd-react/src/components/Icons/NewPageIcon/NewPageIcon.tsx delete mode 100644 packages/lsd-react/src/components/Icons/NewPageIcon/index.ts rename packages/lsd-react/src/components/Icons/{RadioButtonFilledIcon/RadioButtonFilledIcon.tsx => RadioButtonCheckedIcon/RadioButtonCheckedIcon.tsx} (95%) create mode 100644 packages/lsd-react/src/components/Icons/RadioButtonCheckedIcon/index.ts delete mode 100644 packages/lsd-react/src/components/Icons/RadioButtonFilledIcon/index.ts diff --git a/packages/lsd-react/src/components/Calendar/Month.tsx b/packages/lsd-react/src/components/Calendar/Month.tsx index 8731ac3..4b3ab10 100644 --- a/packages/lsd-react/src/components/Calendar/Month.tsx +++ b/packages/lsd-react/src/components/Calendar/Month.tsx @@ -4,10 +4,10 @@ import { useRef, useState } from 'react' import { useClickAway } from 'react-use' import { IconButton } from '../IconButton' import { - ArrowDownIcon, - ArrowUpIcon, - NavigateBeforeIcon, - NavigateNextIcon, + ChevronDownIcon, + ChevronUpIcon, + ChevronLeftIcon, + ChevronRightIcon, } from '../Icons' import { Typography } from '../Typography' import { calendarClasses } from './Calendar.classes' @@ -68,7 +68,7 @@ export const Month = ({ type="button" onClick={goToPreviousMonths} > - +
setYear(year + 1)} className={calendarClasses.changeYearButton} > - + setYear(year - 1)} className={calendarClasses.changeYearButton} > - +
@@ -117,7 +117,7 @@ export const Month = ({ type="button" onClick={goToNextMonths} > - +
diff --git a/packages/lsd-react/src/components/Checkbox/Checkbox.tsx b/packages/lsd-react/src/components/Checkbox/Checkbox.tsx index b433f76..7c06646 100644 --- a/packages/lsd-react/src/components/Checkbox/Checkbox.tsx +++ b/packages/lsd-react/src/components/Checkbox/Checkbox.tsx @@ -7,8 +7,8 @@ import { } from '../../utils/useCommonProps' import { useInput } from '../../utils/useInput' import { useCheckboxGroupContext } from '../CheckboxGroup/CheckboxGroup.context' -import { CheckboxFilledIcon, CheckboxIcon } from '../Icons' -import { CheckboxIndeterminateIcon } from '../Icons/CheckboxIndeterminate' +import { CheckboxIcon, CheckboxOutlineBlankIcon } from '../Icons' +import { IndeterminateCheckboxFilledIcon } from '../Icons/IndeterminateCheckboxFilledIcon' import { Typography } from '../Typography' import { checkboxClasses } from './Checkbox.classes' @@ -98,11 +98,11 @@ export const Checkbox: React.FC & { {...inputProps} /> {indeterminate ? ( - + ) : input.value ? ( - - ) : ( + ) : ( + )} {children} diff --git a/packages/lsd-react/src/components/CollapseHeader/CollapseHeader.tsx b/packages/lsd-react/src/components/CollapseHeader/CollapseHeader.tsx index 04b79c1..8d7e587 100644 --- a/packages/lsd-react/src/components/CollapseHeader/CollapseHeader.tsx +++ b/packages/lsd-react/src/components/CollapseHeader/CollapseHeader.tsx @@ -5,7 +5,7 @@ import { omitCommonProps, useCommonProps, } from '../../utils/useCommonProps' -import { ArrowDownIcon, ArrowUpIcon } from '../Icons' +import { ChevronDownIcon, ChevronUpIcon } from '../Icons' import { Typography } from '../Typography' import { collapseHeaderClasses } from './CollapseHeader.classes' @@ -58,12 +58,12 @@ export const CollapseHeader: React.FC & {
{open ? ( - ) : ( - diff --git a/packages/lsd-react/src/components/Dropdown/Dropdown.tsx b/packages/lsd-react/src/components/Dropdown/Dropdown.tsx index 3699095..63d42d0 100644 --- a/packages/lsd-react/src/components/Dropdown/Dropdown.tsx +++ b/packages/lsd-react/src/components/Dropdown/Dropdown.tsx @@ -8,7 +8,7 @@ import { import { SelectOption, useSelect } from '../../utils/useSelect' import { DropdownItem } from '../DropdownItem' import { DropdownMenu } from '../DropdownMenu' -import { ArrowDownIcon, ArrowUpIcon, ErrorIcon } from '../Icons' +import { ChevronDownIcon, ChevronUpIcon, ErrorIcon } from '../Icons' import { Portal } from '../PortalProvider/Portal' import { Typography } from '../Typography' import { dropdownClasses } from './Dropdown.classes' @@ -138,12 +138,12 @@ export const Dropdown: React.FC & { )} {openState ? ( - ) : ( - diff --git a/packages/lsd-react/src/components/DropdownItem/DropdownItem.tsx b/packages/lsd-react/src/components/DropdownItem/DropdownItem.tsx index 5dd7052..b9ae657 100644 --- a/packages/lsd-react/src/components/DropdownItem/DropdownItem.tsx +++ b/packages/lsd-react/src/components/DropdownItem/DropdownItem.tsx @@ -5,7 +5,7 @@ import { omitCommonProps, useCommonProps, } from '../../utils/useCommonProps' -import { CheckboxFilledIcon, CheckboxIcon, LsdIconProps } from '../Icons' +import { CheckboxIcon, CheckboxOutlineBlankIcon, LsdIconProps } from '../Icons' import { Typography } from '../Typography' import { dropdownItemClasses } from './DropdownItem.classes' @@ -52,9 +52,9 @@ export const DropdownItem: React.FC & { > {withIcon && (selected ? ( - - ) : ( + ) : ( + ))} ( - - - - ), - { - filled: true, - }, -) diff --git a/packages/lsd-react/src/components/Icons/CheckboxFilledIcon/index.ts b/packages/lsd-react/src/components/Icons/CheckboxFilledIcon/index.ts deleted file mode 100644 index 0c3d5b6..0000000 --- a/packages/lsd-react/src/components/Icons/CheckboxFilledIcon/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './CheckboxFilledIcon' diff --git a/packages/lsd-react/src/components/Icons/CheckboxIcon/CheckboxIcon.tsx b/packages/lsd-react/src/components/Icons/CheckboxIcon/CheckboxIcon.tsx index e056a5a..da103d2 100644 --- a/packages/lsd-react/src/components/Icons/CheckboxIcon/CheckboxIcon.tsx +++ b/packages/lsd-react/src/components/Icons/CheckboxIcon/CheckboxIcon.tsx @@ -11,7 +11,9 @@ export const CheckboxIcon = LsdIcon( {...props} > diff --git a/packages/lsd-react/src/components/Icons/CheckboxIndeterminate/index.ts b/packages/lsd-react/src/components/Icons/CheckboxIndeterminate/index.ts deleted file mode 100644 index 1775ffb..0000000 --- a/packages/lsd-react/src/components/Icons/CheckboxIndeterminate/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './CheckboxIndeterminateIcon' diff --git a/packages/lsd-react/src/components/Icons/CheckboxOutlineBlankIcon/CheckboxOutlineBlankIcon.tsx b/packages/lsd-react/src/components/Icons/CheckboxOutlineBlankIcon/CheckboxOutlineBlankIcon.tsx new file mode 100644 index 0000000..0efdc19 --- /dev/null +++ b/packages/lsd-react/src/components/Icons/CheckboxOutlineBlankIcon/CheckboxOutlineBlankIcon.tsx @@ -0,0 +1,22 @@ +import { LsdIcon } from '../LsdIcon' + +export const CheckboxOutlineBlankIcon = LsdIcon( + (props) => ( + + + + ), + { + filled: true, + }, +) diff --git a/packages/lsd-react/src/components/Icons/CheckboxOutlineBlankIcon/index.ts b/packages/lsd-react/src/components/Icons/CheckboxOutlineBlankIcon/index.ts new file mode 100644 index 0000000..774bc54 --- /dev/null +++ b/packages/lsd-react/src/components/Icons/CheckboxOutlineBlankIcon/index.ts @@ -0,0 +1 @@ +export * from './CheckboxOutlineBlankIcon' diff --git a/packages/lsd-react/src/components/Icons/ArrowDownIcon/ArrowDownIcon.tsx b/packages/lsd-react/src/components/Icons/ChevronDownIcon/ChevronDownIcon.tsx similarity index 90% rename from packages/lsd-react/src/components/Icons/ArrowDownIcon/ArrowDownIcon.tsx rename to packages/lsd-react/src/components/Icons/ChevronDownIcon/ChevronDownIcon.tsx index 7ad38fc..f67ebe9 100644 --- a/packages/lsd-react/src/components/Icons/ArrowDownIcon/ArrowDownIcon.tsx +++ b/packages/lsd-react/src/components/Icons/ChevronDownIcon/ChevronDownIcon.tsx @@ -1,6 +1,6 @@ import { LsdIcon } from '../LsdIcon' -export const ArrowDownIcon = LsdIcon( +export const ChevronDownIcon = LsdIcon( (props) => ( ( ( ( ( ( - - - - ), - { - filled: true, - }, -) diff --git a/packages/lsd-react/src/components/Icons/NewPageIcon/index.ts b/packages/lsd-react/src/components/Icons/NewPageIcon/index.ts deleted file mode 100644 index 87719f9..0000000 --- a/packages/lsd-react/src/components/Icons/NewPageIcon/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './NewPageIcon' diff --git a/packages/lsd-react/src/components/Icons/RadioButtonFilledIcon/RadioButtonFilledIcon.tsx b/packages/lsd-react/src/components/Icons/RadioButtonCheckedIcon/RadioButtonCheckedIcon.tsx similarity index 95% rename from packages/lsd-react/src/components/Icons/RadioButtonFilledIcon/RadioButtonFilledIcon.tsx rename to packages/lsd-react/src/components/Icons/RadioButtonCheckedIcon/RadioButtonCheckedIcon.tsx index 9c78c51..6843f88 100644 --- a/packages/lsd-react/src/components/Icons/RadioButtonFilledIcon/RadioButtonFilledIcon.tsx +++ b/packages/lsd-react/src/components/Icons/RadioButtonCheckedIcon/RadioButtonCheckedIcon.tsx @@ -1,6 +1,6 @@ import { LsdIcon } from '../LsdIcon' -export const RadioButtonFilledIcon = LsdIcon( +export const RadioButtonCheckedIcon = LsdIcon( (props) => ( & { {...inputProps} /> {input.value ? ( - + ) : ( )} diff --git a/packages/lsd-react/src/components/Tabs/Tabs.tsx b/packages/lsd-react/src/components/Tabs/Tabs.tsx index 9c73295..4c28548 100644 --- a/packages/lsd-react/src/components/Tabs/Tabs.tsx +++ b/packages/lsd-react/src/components/Tabs/Tabs.tsx @@ -6,7 +6,7 @@ import { useCommonProps, } from '../../utils/useCommonProps' import { useHorizontalScroll } from '../../utils/useHorizontalScroll' -import { NavigateBeforeIcon, NavigateNextIcon } from '../Icons' +import { ChevronLeftIcon, ChevronRightIcon } from '../Icons' import { TabItem } from '../TabItem' import { TabsContext } from './Tab.context' import { tabsClasses } from './Tabs.classes' @@ -69,7 +69,7 @@ export const Tabs: React.FC & { onClick={() => scroll.toLeft()} className={tabsClasses.leftScrollControl} > - + )} {children} @@ -81,7 +81,7 @@ export const Tabs: React.FC & { onClick={() => scroll.toRight()} className={tabsClasses.rightScrollControl} > - + )}