From e99f5f39a0480c4c51ac2d669b19e95984f556ef Mon Sep 17 00:00:00 2001 From: Jamie Henson Date: Thu, 7 Nov 2024 17:50:56 +0000 Subject: [PATCH] chore: add further product and gui icons --- src/core/Accordion/utils.ts | 56 +++++++++++++++++++ src/core/Icon/Icon.stories.tsx | 16 +++--- src/core/icons/icon-gui-chevron-down.svg | 3 + src/core/icons/icon-gui-chevron-up.svg | 3 + src/core/icons/icon-gui-hand.svg | 3 + .../icon-product-asset-tracking-mono.svg | 3 + src/core/icons/icon-product-chat-mono.svg | 3 + src/core/icons/icon-product-livesync-mono.svg | 6 ++ src/core/icons/icon-product-platform-mono.svg | 3 + src/core/icons/icon-product-pub-sub-mono.svg | 3 + src/core/icons/icon-product-spaces-mono.svg | 3 + 11 files changed, 94 insertions(+), 8 deletions(-) create mode 100644 src/core/Accordion/utils.ts create mode 100644 src/core/icons/icon-gui-chevron-down.svg create mode 100644 src/core/icons/icon-gui-chevron-up.svg create mode 100644 src/core/icons/icon-gui-hand.svg create mode 100644 src/core/icons/icon-product-asset-tracking-mono.svg create mode 100644 src/core/icons/icon-product-chat-mono.svg create mode 100644 src/core/icons/icon-product-livesync-mono.svg create mode 100644 src/core/icons/icon-product-platform-mono.svg create mode 100644 src/core/icons/icon-product-pub-sub-mono.svg create mode 100644 src/core/icons/icon-product-spaces-mono.svg diff --git a/src/core/Accordion/utils.ts b/src/core/Accordion/utils.ts new file mode 100644 index 000000000..c500957ac --- /dev/null +++ b/src/core/Accordion/utils.ts @@ -0,0 +1,56 @@ +import { AccordionTheme, AccordionThemeColors } from "./types"; + +export const themeClasses: Record = { + dark: { + bg: "bg-neutral-1200", + hoverBg: "hover:bg-neutral-1100", + text: "text-white", + toggleIconColor: "text-orange-600", + selectableBg: "data-[state=open]:bg-neutral-300", + selectableText: "data-[state=open]:text-neutral-1300", + }, + light: { + bg: "bg-neutral-200", + hoverBg: "hover:bg-neutral-300", + text: "text-neutral-1300", + toggleIconColor: "text-neutral-1000", + selectableBg: "data-[state=open]:bg-neutral-1200", + selectableText: "data-[state=open]:text-white", + }, + transparent: { + bg: "bg-transparent", + hoverBg: "hover:bg-transparent", + text: "text-neutral-1000", + toggleIconColor: "text-dark-grey", + border: "border-neutral-500 border-b last:border-none", + }, + darkTransparent: { + bg: "bg-transparent", + hoverBg: "hover:bg-transparent", + text: "text-neutral-000", + toggleIconColor: "text-orange-600", + border: "border-neutral-900 border-b last:border-none", + }, + static: { + bg: "bg-neutral-200", + hoverBg: "hover:bg-neutral-200", + text: "text-neutral-1300", + toggleIconColor: "text-neutral-200", + selectableBg: "data-[state=open]:bg-neutral-1200", + selectableText: "data-[state=open]:text-white", + }, + darkStatic: { + bg: "bg-neutral-1200", + hoverBg: "hover:bg-neutral-1200", + text: "text-white", + toggleIconColor: "text-neutral-1200", + selectableBg: "data-[state=open]:bg-neutral-1200", + selectableText: "data-[state=open]:text-neutral-1300", + }, +}; + +export const isNonTransparentTheme = (theme: AccordionTheme) => + !["transparent", "darkTransparent"].includes(theme); + +export const isStaticTheme = (theme: AccordionTheme) => + ["static", "darkStatic"].includes(theme); diff --git a/src/core/Icon/Icon.stories.tsx b/src/core/Icon/Icon.stories.tsx index f2f678224..dbd454ad0 100644 --- a/src/core/Icon/Icon.stories.tsx +++ b/src/core/Icon/Icon.stories.tsx @@ -69,6 +69,14 @@ export const ProductIcons = { render: () => renderIcons([...iconNames.product]), }; +export const DarkEncapsulatedIcons = { + render: () => renderIcons([...iconNames.product], true), +}; + +export const LightEncapsulatedIcons = { + render: () => renderIcons([...iconNames.product], true, "light"), +}; + export const OtherIcons = { render: () => renderIcons([...iconNames.other]), }; @@ -98,11 +106,3 @@ export const IconWithSecondaryColor = { }, }, }; - -export const DarkEncapsulatedIcons = { - render: () => renderIcons([...iconNames.product], true), -}; - -export const LightEncapsulatedIcons = { - render: () => renderIcons([...iconNames.product], true, "light"), -}; diff --git a/src/core/icons/icon-gui-chevron-down.svg b/src/core/icons/icon-gui-chevron-down.svg new file mode 100644 index 000000000..1a07d14c9 --- /dev/null +++ b/src/core/icons/icon-gui-chevron-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/core/icons/icon-gui-chevron-up.svg b/src/core/icons/icon-gui-chevron-up.svg new file mode 100644 index 000000000..2635ed5d4 --- /dev/null +++ b/src/core/icons/icon-gui-chevron-up.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/core/icons/icon-gui-hand.svg b/src/core/icons/icon-gui-hand.svg new file mode 100644 index 000000000..c1abe6691 --- /dev/null +++ b/src/core/icons/icon-gui-hand.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/core/icons/icon-product-asset-tracking-mono.svg b/src/core/icons/icon-product-asset-tracking-mono.svg new file mode 100644 index 000000000..594d022dd --- /dev/null +++ b/src/core/icons/icon-product-asset-tracking-mono.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/core/icons/icon-product-chat-mono.svg b/src/core/icons/icon-product-chat-mono.svg new file mode 100644 index 000000000..e7dd51266 --- /dev/null +++ b/src/core/icons/icon-product-chat-mono.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/core/icons/icon-product-livesync-mono.svg b/src/core/icons/icon-product-livesync-mono.svg new file mode 100644 index 000000000..98f110d15 --- /dev/null +++ b/src/core/icons/icon-product-livesync-mono.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/core/icons/icon-product-platform-mono.svg b/src/core/icons/icon-product-platform-mono.svg new file mode 100644 index 000000000..a87eb2800 --- /dev/null +++ b/src/core/icons/icon-product-platform-mono.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/core/icons/icon-product-pub-sub-mono.svg b/src/core/icons/icon-product-pub-sub-mono.svg new file mode 100644 index 000000000..fd0cf3f07 --- /dev/null +++ b/src/core/icons/icon-product-pub-sub-mono.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/core/icons/icon-product-spaces-mono.svg b/src/core/icons/icon-product-spaces-mono.svg new file mode 100644 index 000000000..27b08b0ac --- /dev/null +++ b/src/core/icons/icon-product-spaces-mono.svg @@ -0,0 +1,3 @@ + + +