diff --git a/example/src/pages/Icons.tsx b/example/src/pages/Icons.tsx index 9eaf0cb1..f720e856 100644 --- a/example/src/pages/Icons.tsx +++ b/example/src/pages/Icons.tsx @@ -8,6 +8,7 @@ import { IOIcons, IONavIcons, IOProductIcons, + IOSystemIcons, IOThemeContext, IOVisualCostants, Icon, @@ -26,6 +27,7 @@ type IconSubsetObject = Record< interface IconSetObject { [key: string]: ({ size, style }: SVGIconProps) => JSX.Element; } + const filterIconSet = ( iconSubsetObject: IconSubsetObject, iconSetObject: IconSetObject @@ -37,7 +39,13 @@ const filterIconSet = ( ); const filteredIOIcons = filterIconSet( - { ...IONavIcons, ...IOCategoryIcons, ...IOProductIcons, ...IOBiometricIcons }, + { + ...IONavIcons, + ...IOCategoryIcons, + ...IOProductIcons, + ...IOBiometricIcons, + ...IOSystemIcons + }, IOIcons ); @@ -108,6 +116,29 @@ export const Icons = () => { /> ))} +

+ System +

+ + {Object.entries(IOSystemIcons).map(([iconItemName]) => ( + + } + /> + ))} +

( - -

- Pictograms -

- - {Object.entries(IOPictograms).map(([pictogramItemName]) => ( - - } - /> - ))} - -
+// Filter the main object, removing already displayed pictograms in the other sets +type PictogramSubsetObject = Record< + string, + ({ size }: SVGPictogramProps) => JSX.Element +>; +interface PictogramSetObject { + [key: string]: ({ size }: SVGPictogramProps) => JSX.Element; +} + +const filterPictogramSet = ( + pictogramSubsetObject: PictogramSubsetObject, + pictogramSetObject: PictogramSetObject +): PictogramSetObject => + Object.fromEntries( + Object.entries(pictogramSetObject).filter( + ([key]) => !Object.keys(pictogramSubsetObject).includes(key) + ) + ); + +const filteredIOPictograms = filterPictogramSet( + { + ...IOPictogramsLegacy + }, + IOPictograms ); + +export const Pictograms = () => { + const theme = useContext(IOThemeContext); + return ( + +

+ Pictograms +

+ + {Object.entries(filteredIOPictograms).map(([pictogramItemName]) => ( + + } + /> + ))} + + +

+ Legacy Pictograms +

+ + {Object.entries(IOPictogramsLegacy).map(([pictogramItemName]) => ( + + } + /> + ))} + +
+ ); +}; diff --git a/src/components/pictograms/Pictogram.tsx b/src/components/pictograms/Pictogram.tsx index d81a668f..b7a6d1e7 100644 --- a/src/components/pictograms/Pictogram.tsx +++ b/src/components/pictograms/Pictogram.tsx @@ -43,8 +43,23 @@ import PictogramUnrecognized from "./svg/PictogramUnrecognized"; import PictogramUploadFile from "./svg/PictogramUploadFile"; import PictogramSuccess from "./svg/PictogramSuccess"; import PictogramFocusOn from "./svg/PictogramFocusOn"; +import PictogramITWallet from "./svg/PictogramITWallet"; +import PictogramFatalError from "./svg/PictogramFatalError"; +import PictogramUpdateOS from "./svg/PictogramUpdateOS"; +import PictogramIdentityAdd from "./svg/PictogramIdentityAdd"; +import PictogramIdentityRefresh from "./svg/PictogramIdentityRefresh"; +import PictogramIdentity from "./svg/PictogramIdentity"; +import PictogramAccessDenied from "./svg/PictogramAccessDenied"; +import PictogramTime from "./svg/PictogramTime"; +import PictogramStopSecurity from "./svg/PictogramStopSecurity"; +import PictogramPasscode from "./svg/PictogramPasscode"; +import PictogramIdentityCheck from "./svg/PictogramIdentityCheck"; +import PictogramTrash from "./svg/PictogramTrash"; +import PictogramCharity from "./svg/PictogramCharity"; +import PictogramEmpty from "./svg/PictogramEmpty"; export const IOPictograms = { + // Start legacy pictograms // messages: PictogramMessages, airBaloon: PictogramAirBaloon, abacus: PictogramAbacus, @@ -74,18 +89,33 @@ export const IOPictograms = { sms: PictogramSms, heart: PictogramHeart, completed: PictogramCompleted, + // End legacy pictograms ibanCard: PictogramIBANCard, followMessage: PictogramFollowMessage, manual: PictogramManual, + trash: PictogramTrash, setup: PictogramSetup, + empty: PictogramEmpty, donation: PictogramDonation, + charity: PictogramCharity, attention: PictogramAttention, emptyArchive: PictogramEmptyArchive, umbrellaNew: PictogramUmbrellaNew, feedback: PictogramFeedback, cameraRequest: PictogramCameraRequest, success: PictogramSuccess, - focusOn: PictogramFocusOn + fatalError: PictogramFatalError, + focusOn: PictogramFocusOn, + itWallet: PictogramITWallet, + updateOS: PictogramUpdateOS, + identity: PictogramIdentity, + identityAdd: PictogramIdentityAdd, + identityRefresh: PictogramIdentityRefresh, + identityCheck: PictogramIdentityCheck, + accessDenied: PictogramAccessDenied, + stopSecurity: PictogramStopSecurity, + time: PictogramTime, + passcode: PictogramPasscode }; export type IOPictograms = keyof typeof IOPictograms; @@ -128,3 +158,71 @@ const IOPictogramsBleed = { } as const; export type IOPictogramsBleed = keyof typeof IOPictogramsBleed; + +/* Legacy pictograms */ + +const { + messages, + airBaloon, + abacus, + emailValidation, + emailToValidate, + inbox, + piggyBank, + processing, + baloons, + places, + notAvailable, + airship, + search, + unrecognized, + error, + umbrella, + inProgress, + fireworks, + puzzle, + question, + pin, + timeout, + uploadFile, + hourglass, + teaBreak, + beerMug, + sms, + heart, + completed +} = IOPictograms; + +export const IOPictogramsLegacy = { + messages, + airBaloon, + abacus, + emailValidation, + emailToValidate, + inbox, + piggyBank, + processing, + baloons, + places, + notAvailable, + airship, + search, + unrecognized, + error, + umbrella, + inProgress, + fireworks, + puzzle, + question, + pin, + timeout, + uploadFile, + hourglass, + teaBreak, + beerMug, + sms, + heart, + completed +} as const; + +export type IOPictogramsLegacy = keyof typeof IOPictogramsLegacy; diff --git a/src/components/pictograms/svg/PictogramAccessDenied.tsx b/src/components/pictograms/svg/PictogramAccessDenied.tsx new file mode 100644 index 00000000..07aa8275 --- /dev/null +++ b/src/components/pictograms/svg/PictogramAccessDenied.tsx @@ -0,0 +1,46 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramAccessDenied = ({ + size, + color, + ...props +}: SVGPictogramProps) => ( + + + + + + + + + + +); + +export default PictogramAccessDenied; diff --git a/src/components/pictograms/svg/PictogramAttention.tsx b/src/components/pictograms/svg/PictogramAttention.tsx index 126ee49d..e836e247 100644 --- a/src/components/pictograms/svg/PictogramAttention.tsx +++ b/src/components/pictograms/svg/PictogramAttention.tsx @@ -3,29 +3,26 @@ import Svg, { Path } from "react-native-svg"; import { SVGPictogramProps } from "../Pictogram"; const PictogramAttention = ({ size, color, ...props }: SVGPictogramProps) => ( - + + ); diff --git a/src/components/pictograms/svg/PictogramCharity.tsx b/src/components/pictograms/svg/PictogramCharity.tsx new file mode 100644 index 00000000..d3da1434 --- /dev/null +++ b/src/components/pictograms/svg/PictogramCharity.tsx @@ -0,0 +1,34 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramCharity = ({ size, color, ...props }: SVGPictogramProps) => ( + + + + + + + + +); + +export default PictogramCharity; diff --git a/src/components/pictograms/svg/PictogramEmpty.tsx b/src/components/pictograms/svg/PictogramEmpty.tsx new file mode 100644 index 00000000..a22705d0 --- /dev/null +++ b/src/components/pictograms/svg/PictogramEmpty.tsx @@ -0,0 +1,34 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramEmpty = ({ size, ...props }: SVGPictogramProps) => ( + + + + + + + + +); + +export default PictogramEmpty; diff --git a/src/components/pictograms/svg/PictogramEmptyArchive.tsx b/src/components/pictograms/svg/PictogramEmptyArchive.tsx index 441604c0..6c4827fb 100644 --- a/src/components/pictograms/svg/PictogramEmptyArchive.tsx +++ b/src/components/pictograms/svg/PictogramEmptyArchive.tsx @@ -9,36 +9,20 @@ const PictogramEmptyArchive = ({ }: SVGPictogramProps) => ( - - - ); diff --git a/src/components/pictograms/svg/PictogramFatalError.tsx b/src/components/pictograms/svg/PictogramFatalError.tsx new file mode 100644 index 00000000..94f44f4c --- /dev/null +++ b/src/components/pictograms/svg/PictogramFatalError.tsx @@ -0,0 +1,34 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramFatalError = ({ size, color, ...props }: SVGPictogramProps) => ( + + + + + + + + +); + +export default PictogramFatalError; diff --git a/src/components/pictograms/svg/PictogramFeedback.tsx b/src/components/pictograms/svg/PictogramFeedback.tsx index db7e45dd..e6e9d990 100644 --- a/src/components/pictograms/svg/PictogramFeedback.tsx +++ b/src/components/pictograms/svg/PictogramFeedback.tsx @@ -1,59 +1,29 @@ import React from "react"; -import Svg, { ClipPath, Defs, G, Path } from "react-native-svg"; +import Svg, { Path } from "react-native-svg"; import { SVGPictogramProps } from "../Pictogram"; const PictogramFeedback = ({ size, color, ...props }: SVGPictogramProps) => ( - - - - - - - - - - - - - - - - - - - - + + + + + + ); export default PictogramFeedback; diff --git a/src/components/pictograms/svg/PictogramITWallet.tsx b/src/components/pictograms/svg/PictogramITWallet.tsx new file mode 100644 index 00000000..592712a0 --- /dev/null +++ b/src/components/pictograms/svg/PictogramITWallet.tsx @@ -0,0 +1,56 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramITWallet = ({ size, color, ...props }: SVGPictogramProps) => ( + + + + + + + + + + + + +); + +export default PictogramITWallet; diff --git a/src/components/pictograms/svg/PictogramIdentity.tsx b/src/components/pictograms/svg/PictogramIdentity.tsx new file mode 100644 index 00000000..affaef57 --- /dev/null +++ b/src/components/pictograms/svg/PictogramIdentity.tsx @@ -0,0 +1,42 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramIdentity = ({ size, color, ...props }: SVGPictogramProps) => ( + + + + + + + + + + +); + +export default PictogramIdentity; diff --git a/src/components/pictograms/svg/PictogramIdentityAdd.tsx b/src/components/pictograms/svg/PictogramIdentityAdd.tsx new file mode 100644 index 00000000..a6ff5a48 --- /dev/null +++ b/src/components/pictograms/svg/PictogramIdentityAdd.tsx @@ -0,0 +1,42 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramIdentityAdd = ({ size, color, ...props }: SVGPictogramProps) => ( + + + + + + + + + + +); + +export default PictogramIdentityAdd; diff --git a/src/components/pictograms/svg/PictogramIdentityCheck.tsx b/src/components/pictograms/svg/PictogramIdentityCheck.tsx new file mode 100644 index 00000000..31cf9e28 --- /dev/null +++ b/src/components/pictograms/svg/PictogramIdentityCheck.tsx @@ -0,0 +1,58 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramIdentityCheck = ({ + size, + color, + ...props +}: SVGPictogramProps) => ( + + + + + + + + + + + + + +); + +export default PictogramIdentityCheck; diff --git a/src/components/pictograms/svg/PictogramIdentityRefresh.tsx b/src/components/pictograms/svg/PictogramIdentityRefresh.tsx new file mode 100644 index 00000000..8c75c2f2 --- /dev/null +++ b/src/components/pictograms/svg/PictogramIdentityRefresh.tsx @@ -0,0 +1,46 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramIdentityRefresh = ({ + size, + color, + ...props +}: SVGPictogramProps) => ( + + + + + + + + + + +); + +export default PictogramIdentityRefresh; diff --git a/src/components/pictograms/svg/PictogramPasscode.tsx b/src/components/pictograms/svg/PictogramPasscode.tsx new file mode 100644 index 00000000..537e6a6f --- /dev/null +++ b/src/components/pictograms/svg/PictogramPasscode.tsx @@ -0,0 +1,42 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramPasscode = ({ size, color, ...props }: SVGPictogramProps) => ( + + + + + + + + + + +); + +export default PictogramPasscode; diff --git a/src/components/pictograms/svg/PictogramStopSecurity.tsx b/src/components/pictograms/svg/PictogramStopSecurity.tsx new file mode 100644 index 00000000..5eab9b6a --- /dev/null +++ b/src/components/pictograms/svg/PictogramStopSecurity.tsx @@ -0,0 +1,54 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramStopSecurity = ({ + size, + color, + ...props +}: SVGPictogramProps) => ( + + + + + + + + + + + + +); + +export default PictogramStopSecurity; diff --git a/src/components/pictograms/svg/PictogramSuccess.tsx b/src/components/pictograms/svg/PictogramSuccess.tsx index 3552a29c..18976a8f 100644 --- a/src/components/pictograms/svg/PictogramSuccess.tsx +++ b/src/components/pictograms/svg/PictogramSuccess.tsx @@ -1,48 +1,33 @@ import React from "react"; -import Svg, { Circle, ClipPath, Defs, G, Path, Rect } from "react-native-svg"; +import Svg, { Path } from "react-native-svg"; import { SVGPictogramProps } from "../Pictogram"; const PictogramSuccess = ({ size, color, ...props }: SVGPictogramProps) => ( - - - - - - - - - + + + + + + - - - - - ); diff --git a/src/components/pictograms/svg/PictogramTime.tsx b/src/components/pictograms/svg/PictogramTime.tsx new file mode 100644 index 00000000..46a8f894 --- /dev/null +++ b/src/components/pictograms/svg/PictogramTime.tsx @@ -0,0 +1,42 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramTime = ({ size, color, ...props }: SVGPictogramProps) => ( + + + + + + + + + + +); + +export default PictogramTime; diff --git a/src/components/pictograms/svg/PictogramTrash.tsx b/src/components/pictograms/svg/PictogramTrash.tsx new file mode 100644 index 00000000..f06d502f --- /dev/null +++ b/src/components/pictograms/svg/PictogramTrash.tsx @@ -0,0 +1,26 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramTrash = ({ size, color, ...props }: SVGPictogramProps) => ( + + + + + +); + +export default PictogramTrash; diff --git a/src/components/pictograms/svg/PictogramUpdateOS.tsx b/src/components/pictograms/svg/PictogramUpdateOS.tsx new file mode 100644 index 00000000..fb384e45 --- /dev/null +++ b/src/components/pictograms/svg/PictogramUpdateOS.tsx @@ -0,0 +1,34 @@ +import React from "react"; +import { Svg, Path } from "react-native-svg"; +import { SVGPictogramProps } from "../Pictogram"; + +const PictogramUpdateOS = ({ size, color, ...props }: SVGPictogramProps) => ( + + + + + + + + +); + +export default PictogramUpdateOS; diff --git a/src/components/pictograms/svg/originals/PictogramAccessDenied.svg b/src/components/pictograms/svg/originals/PictogramAccessDenied.svg new file mode 100644 index 00000000..efe30fc2 --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramAccessDenied.svg @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramAttention.svg b/src/components/pictograms/svg/originals/PictogramAttention.svg index 23bfb842..99b32476 100644 --- a/src/components/pictograms/svg/originals/PictogramAttention.svg +++ b/src/components/pictograms/svg/originals/PictogramAttention.svg @@ -1,6 +1,22 @@ - - - - - + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramCharity.svg b/src/components/pictograms/svg/originals/PictogramCharity.svg new file mode 100644 index 00000000..979dd8c8 --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramCharity.svg @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramEmpty.svg b/src/components/pictograms/svg/originals/PictogramEmpty.svg new file mode 100644 index 00000000..47f83120 --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramEmpty.svg @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramEmptyArchive.svg b/src/components/pictograms/svg/originals/PictogramEmptyArchive.svg index e5333d09..bec6fed0 100644 --- a/src/components/pictograms/svg/originals/PictogramEmptyArchive.svg +++ b/src/components/pictograms/svg/originals/PictogramEmptyArchive.svg @@ -1,34 +1,18 @@ - - - diff --git a/src/components/pictograms/svg/originals/PictogramFatalError.svg b/src/components/pictograms/svg/originals/PictogramFatalError.svg new file mode 100644 index 00000000..983ef8b4 --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramFatalError.svg @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramFeedback.svg b/src/components/pictograms/svg/originals/PictogramFeedback.svg index 5d3f5271..e892865a 100644 --- a/src/components/pictograms/svg/originals/PictogramFeedback.svg +++ b/src/components/pictograms/svg/originals/PictogramFeedback.svg @@ -1,21 +1,22 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramITWallet.svg b/src/components/pictograms/svg/originals/PictogramITWallet.svg new file mode 100644 index 00000000..1b97d0fb --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramITWallet.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramIdentity.svg b/src/components/pictograms/svg/originals/PictogramIdentity.svg new file mode 100644 index 00000000..a54fd27a --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramIdentity.svg @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramIdentityAdd.svg b/src/components/pictograms/svg/originals/PictogramIdentityAdd.svg new file mode 100644 index 00000000..225e4432 --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramIdentityAdd.svg @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramIdentityCheck.svg b/src/components/pictograms/svg/originals/PictogramIdentityCheck.svg new file mode 100644 index 00000000..b407c90f --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramIdentityCheck.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramIdentityRefresh.svg b/src/components/pictograms/svg/originals/PictogramIdentityRefresh.svg new file mode 100644 index 00000000..022cf61d --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramIdentityRefresh.svg @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramPasscode.svg b/src/components/pictograms/svg/originals/PictogramPasscode.svg new file mode 100644 index 00000000..f975b594 --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramPasscode.svg @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramStopSecurity.svg b/src/components/pictograms/svg/originals/PictogramStopSecurity.svg new file mode 100644 index 00000000..fe60f98d --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramStopSecurity.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramSuccess.svg b/src/components/pictograms/svg/originals/PictogramSuccess.svg index d8530035..a0d9b4b2 100644 --- a/src/components/pictograms/svg/originals/PictogramSuccess.svg +++ b/src/components/pictograms/svg/originals/PictogramSuccess.svg @@ -1,35 +1,26 @@ - - - - - - - - - - - - - - - + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramTime.svg b/src/components/pictograms/svg/originals/PictogramTime.svg new file mode 100644 index 00000000..b8a2cca3 --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramTime.svg @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramTrash.svg b/src/components/pictograms/svg/originals/PictogramTrash.svg new file mode 100644 index 00000000..a116e5a5 --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramTrash.svg @@ -0,0 +1,18 @@ + + + + + diff --git a/src/components/pictograms/svg/originals/PictogramUpdateOS.svg b/src/components/pictograms/svg/originals/PictogramUpdateOS.svg new file mode 100644 index 00000000..24d56b1f --- /dev/null +++ b/src/components/pictograms/svg/originals/PictogramUpdateOS.svg @@ -0,0 +1,26 @@ + + + + + + + +