diff --git a/packages/react/components/Account/Avatar.mjs b/packages/react/components/Account/Avatar.mjs index c590a167d49..eca3edc0ec1 100644 --- a/packages/react/components/Account/Avatar.mjs +++ b/packages/react/components/Account/Avatar.mjs @@ -12,8 +12,10 @@ import { useBackend } from '@freesewing/react/hooks/useBackend' // Components import { Link as WebLink } from '@freesewing/react/components/Link' -import { SaveIcon } from '@freesewing/react/components/Icon' +import { SaveIcon, RightIcon } from '@freesewing/react/components/Icon' import { PassiveImageInput } from '@freesewing/react/components/Input' +import { IconButton } from '@freesewing/react/components/Button' +import { WelcomeIcons } from './shared.mjs' /* * Component for the account/bio page @@ -67,10 +69,13 @@ export const Avatar = ({ welcome = false, Link = false }) => { /> {welcome ? ( <> - - + + + Save + + + Continue + {welcomeSteps[account.control].length > 0 ? ( <> { 7 / {welcomeSteps[account.control].length} - { {welcome ? ( <> - + + Continue + {welcomeSteps[account.control].length > 0 ? ( <> 6 / {welcomeSteps[account.control].length} - { /> {welcome ? ( <> - + + Continue + {welcomeSteps[account?.control].length > 0 ? ( <> 4 / {welcomeSteps[account?.control].length} - {
({ val, label: ( @@ -69,18 +71,20 @@ export const Control = ({ welcome = false }) => { /> {welcome ? ( <> - + + Continue + {welcomeSteps[control].length > 1 ? ( <> 1 / {welcomeSteps[control].length} - + ) : null} diff --git a/packages/react/components/Account/Links.mjs b/packages/react/components/Account/Links.mjs index 7faca7858fa..4cee1068344 100644 --- a/packages/react/components/Account/Links.mjs +++ b/packages/react/components/Account/Links.mjs @@ -83,7 +83,7 @@ const titles = { img: 'Avatar', email: 'E-mail Address', newsletter: 'Newsletter Subscription', - compare: 'Measurements Sets Comparison', + compare: 'Measurements Comparison', consent: 'Consent & Privacy', control: 'User Experience', github: 'GitHub', diff --git a/packages/react/components/Account/Newsletter.mjs b/packages/react/components/Account/Newsletter.mjs index 3d446ca0011..7efc6e012f6 100644 --- a/packages/react/components/Account/Newsletter.mjs +++ b/packages/react/components/Account/Newsletter.mjs @@ -12,24 +12,11 @@ import { useBackend } from '@freesewing/react/hooks/useBackend' // Components import { Link as WebLink } from '@freesewing/react/components/Link' -import { NoIcon, OkIcon, SaveIcon } from '@freesewing/react/components/Icon' +import { NoIcon, OkIcon, SaveIcon, RightIcon } from '@freesewing/react/components/Icon' import { ListInput } from '@freesewing/react/components/Input' import { Popout } from '@freesewing/react/components/Popout' - -const strings = { - yes: { - title: 'Yes, in case it may help me', - desc: - 'Allowing us to compare your measurments to a baseline or others measurements sets ' + - 'allows us to detect potential problems in your measurements or patterns.', - }, - no: { - title: 'No, never compare', - desc: - 'We get it, comparison is the thief of joy. Just be aware that this limits our ability ' + - 'to warn you about potential problems in your measurements sets or patterns.', - }, -} +import { IconButton } from '@freesewing/react/components/Button' +import { WelcomeIcons } from './shared.mjs' /* * Component for the account/preferences/newsletter page @@ -99,18 +86,20 @@ export const Newsletter = ({ welcome = false, Link = false }) => { /> {welcome ? ( <> - + + Continue + {welcomeSteps[account?.control].length > 0 ? ( <> 2 / {welcomeSteps[account?.control].length} - { ) : null} ) : null} - -
You can unsubscribe at any time with the link below
-

- This unsubscribe link will also be included at the bottom of every newsletter we send you, - so you do not need to bookmark it, but you can if you want to. -

-

- - Unsubscribe link - -

-

- This link is to unsubscribe you specifically, do not share it with other subscribers. -

-
+ {welcome ? null : ( + +
You can unsubscribe at any time with the link below
+

+ This unsubscribe link will also be included at the bottom of every newsletter we send + you, so you do not need to bookmark it, but you can if you want to. +

+

+ + Unsubscribe link + +

+

+ This link is to unsubscribe you specifically, do not share it with other subscribers. +

+
+ )}
) } diff --git a/packages/react/components/Account/Units.mjs b/packages/react/components/Account/Units.mjs index d181763f18a..75c3a94e1b2 100644 --- a/packages/react/components/Account/Units.mjs +++ b/packages/react/components/Account/Units.mjs @@ -11,9 +11,11 @@ import { useBackend } from '@freesewing/react/hooks/useBackend' // Components import { Link as WebLink } from '@freesewing/react/components/Link' -import { SaveIcon } from '@freesewing/react/components/Icon' +import { SaveIcon, RightIcon } from '@freesewing/react/components/Icon' import { ListInput } from '@freesewing/react/components/Input' import { NumberCircle } from '@freesewing/react/components/Number' +import { IconButton } from '@freesewing/react/components/Button' +import { WelcomeIcons } from './shared.mjs' /* * Component for the account/preferences/units page @@ -74,18 +76,20 @@ export const Units = ({ welcome = false }) => { /> {welcome ? ( <> - + + Continue + {welcomeSteps[account?.control].length > 0 ? ( <> 3 / {welcomeSteps[account?.control].length} - { {welcome ? ( <> - + + Continue + {welcomeSteps[account.control].length > 0 ? ( <> 5 / {welcomeSteps[account.control].length} - ( + + + +) +export const WelcomeTodoIcon = ({ href }) => ( + + + +) + +const WelcomeTopicIcon = (props) => { + const Icon = + props.href === '' || props.href === 'control' + ? ControlIcon + : icons[props.href] + ? icons[props.href] + : SettingsIcon + + return +} + +const WelcomeDoingIcon = ({ href }) => ( + +) + +export const WelcomeIcons = ({ done = [], todo = [], current = '' }) => ( +
+ {done.map((href) => ( + + ))} + + {todo.map((href) => ( + + ))} +
+) + +const icons = { + newsletter: NewsletterIcon, + units: UnitsIcon, + compare: CompareIcon, + username: UserIcon, + bio: DocsIcon, + img: ShowcaseIcon, +} diff --git a/packages/react/components/Button/index.mjs b/packages/react/components/Button/index.mjs index ea2f31490c9..e2c5afeb52a 100644 --- a/packages/react/components/Button/index.mjs +++ b/packages/react/components/Button/index.mjs @@ -19,7 +19,7 @@ export const IconButton = ({ btnProps = {}, }) => { const allProps = { - className: `flex flex-row gap-2 lg:gap-12 items-center justify-between w-full lg:w-auto daisy-btn daisy-btn-${color} capitalize my-2 ${className}`, + className: `${staticLinkClasses} daisy-btn-${color} hover:text-${color}-content ${className}`, title: title, ...btnProps, } @@ -28,3 +28,5 @@ export const IconButton = ({ return onClick ? : {children} } + +const staticLinkClasses = `flex flex-row gap-2 lg:gap-12 items-center justify-between w-full lg:w-auto daisy-btn hover:no-underline capitalize my-2` diff --git a/packages/react/components/Input/index.mjs b/packages/react/components/Input/index.mjs index 62b74848ab7..957b981736b 100644 --- a/packages/react/components/Input/index.mjs +++ b/packages/react/components/Input/index.mjs @@ -467,11 +467,11 @@ export const MarkdownInput = ({ > -
+