diff --git a/apps/web/src/modules/dashboard/CreateActions.tsx b/apps/web/src/modules/dashboard/CreateActions.tsx index cf59ab9d4..39dd6e9ce 100644 --- a/apps/web/src/modules/dashboard/CreateActions.tsx +++ b/apps/web/src/modules/dashboard/CreateActions.tsx @@ -38,7 +38,7 @@ export const CreateActions: React.FC = ({ userAddress }) => - - This will clear all your DAO settings and start over. - + {helperText} @@ -143,7 +141,7 @@ export const FormNavButtons: React.FC = ({ {isMounted && createPortal(
- + {showReset && ( diff --git a/packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.css.ts b/packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.css.ts index ac681543e..092ad7da7 100644 --- a/packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.css.ts +++ b/packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.css.ts @@ -23,7 +23,6 @@ export const reviewSectionSubHeading = style({ width: '100%', fontSize: 23, fontWeight: 700, - borderRadius: '16px', backgroundColor: vars.color.background2, selectors: { '&:hover': { diff --git a/packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.tsx b/packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.tsx index ce7d09d48..61ad6d07c 100644 --- a/packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.tsx +++ b/packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.tsx @@ -44,6 +44,7 @@ export const ReviewSection: React.FC<{ = ({ variant="ghost" style={{ minWidth: 'auto', - padding: '4px 8px', fontSize: '12px', + padding: '1px 6px', }} - > - - + icon="cross" + /> )} = ({ onClick={handleAddCustomMinter} disabled={!customMinterInput || isSettingUpMinter || isCheckingCustomMinter} variant="secondary" - style={{ minWidth: '80px', marginBottom: '32px' }} + style={{ minWidth: '80px', marginBottom: '32px', height: '60px' }} > {isCheckingCustomMinter ? 'Adding...' : 'Add'} diff --git a/packages/feed-ui/src/AuctionBidPlacedItem.tsx b/packages/feed-ui/src/AuctionBidPlacedItem.tsx index 6aee3dee2..dc314a7f4 100644 --- a/packages/feed-ui/src/AuctionBidPlacedItem.tsx +++ b/packages/feed-ui/src/AuctionBidPlacedItem.tsx @@ -35,7 +35,7 @@ export const AuctionBidPlacedItem: React.FC = ({ item } + loadingPlaceholder={} style={{ width: '100%', height: '100%', objectFit: 'cover' }} /> diff --git a/packages/feed-ui/src/AuctionCreatedItem.tsx b/packages/feed-ui/src/AuctionCreatedItem.tsx index 464038e7f..2beb00ba9 100644 --- a/packages/feed-ui/src/AuctionCreatedItem.tsx +++ b/packages/feed-ui/src/AuctionCreatedItem.tsx @@ -23,7 +23,7 @@ export const AuctionCreatedItem: React.FC = ({ item }) } + loadingPlaceholder={} style={{ width: '100%', height: '100%', objectFit: 'cover' }} /> diff --git a/packages/feed-ui/src/AuctionSettledItem.tsx b/packages/feed-ui/src/AuctionSettledItem.tsx index d33f0920f..a6a5c97ae 100644 --- a/packages/feed-ui/src/AuctionSettledItem.tsx +++ b/packages/feed-ui/src/AuctionSettledItem.tsx @@ -30,7 +30,7 @@ export const AuctionSettledItem: React.FC = ({ item }) } + loadingPlaceholder={} style={{ width: '100%', height: '100%', objectFit: 'cover' }} /> diff --git a/packages/feed-ui/src/ClankerTokenCreatedItem.tsx b/packages/feed-ui/src/ClankerTokenCreatedItem.tsx index 99880b199..acb9b8c6f 100644 --- a/packages/feed-ui/src/ClankerTokenCreatedItem.tsx +++ b/packages/feed-ui/src/ClankerTokenCreatedItem.tsx @@ -25,7 +25,7 @@ export const ClankerTokenCreatedItem: React.FC = ( } + loadingPlaceholder={} style={{ width: '100%', height: '100%', objectFit: 'cover' }} /> diff --git a/packages/feed-ui/src/FeedSkeleton.tsx b/packages/feed-ui/src/FeedSkeleton.tsx index 2e9a2f7e2..fe542057b 100644 --- a/packages/feed-ui/src/FeedSkeleton.tsx +++ b/packages/feed-ui/src/FeedSkeleton.tsx @@ -15,8 +15,17 @@ interface FeedSkeletonProps { count?: number } -export const ImageSkeleton: React.FC = () => { - return +interface ImageSkeletonProps { + fullWidth?: boolean +} + +export const ImageSkeleton: React.FC = ({ fullWidth = false }) => { + return ( + + ) } export const FeedSkeletonItem: React.FC = () => { diff --git a/packages/feed-ui/src/ZoraCoinCreatedItem.tsx b/packages/feed-ui/src/ZoraCoinCreatedItem.tsx index 702ff1b0f..45b8f79ec 100644 --- a/packages/feed-ui/src/ZoraCoinCreatedItem.tsx +++ b/packages/feed-ui/src/ZoraCoinCreatedItem.tsx @@ -43,7 +43,7 @@ export const ZoraCoinCreatedItem: React.FC = ({ item } isMediaTypeLoading || (!shouldUseMediaPreview && !displayImageUrl) ? ( - + ) : shouldUseMediaPreview ? ( @@ -61,7 +61,7 @@ export const ZoraCoinCreatedItem: React.FC = ({ item } } + loadingPlaceholder={} style={{ width: '100%', height: '100%', objectFit: 'cover' }} /> diff --git a/packages/feed-ui/src/ZoraDropCreatedItem.tsx b/packages/feed-ui/src/ZoraDropCreatedItem.tsx index 8bdc1d228..11e4678fb 100644 --- a/packages/feed-ui/src/ZoraDropCreatedItem.tsx +++ b/packages/feed-ui/src/ZoraDropCreatedItem.tsx @@ -43,7 +43,7 @@ export const ZoraDropCreatedItem: React.FC = ({ item } {/* Media - full-width on mobile, fixed width on desktop */} {isMediaTypeLoading ? ( - + ) : shouldUseMediaPreview ? ( @@ -61,7 +61,7 @@ export const ZoraDropCreatedItem: React.FC = ({ item } } + loadingPlaceholder={} style={{ width: '100%', height: '100%', objectFit: 'cover' }} /> diff --git a/packages/ui/src/Artwork/ArtworkUpload.tsx b/packages/ui/src/Artwork/ArtworkUpload.tsx index 0e181f4b8..725fdfded 100644 --- a/packages/ui/src/Artwork/ArtworkUpload.tsx +++ b/packages/ui/src/Artwork/ArtworkUpload.tsx @@ -1,5 +1,5 @@ import { ArtworkError } from '@buildeross/types' -import { Box, Flex, Icon, Stack, Text } from '@buildeross/zord' +import { Box, Button, Flex, Icon, Stack, Text } from '@buildeross/zord' import React, { BaseSyntheticEvent, ReactElement } from 'react' import { @@ -27,6 +27,7 @@ interface ArtworkUploadProps { uploadError: string | undefined fileType?: string layerOrdering: React.ReactNode + onReset?: () => void } export const ArtworkUpload: React.FC = ({ @@ -41,6 +42,7 @@ export const ArtworkUpload: React.FC = ({ uploadError: uploadError, fileType, layerOrdering, + onReset, }) => { const dropInput = React.useRef(null) React.useEffect(() => { @@ -90,33 +92,38 @@ export const ArtworkUpload: React.FC = ({ onChange={onUpload} />
- {((artworkError || uploadError) && ( - - {uploadError && {uploadError}} + + {(artworkError || uploadError) && ( + + {uploadError && {uploadError}} - - {artworkError?.maxTraits &&
  • {artworkError.maxTraits}
  • } - {artworkError?.mime &&
  • {artworkError.mime}
  • } - {artworkError?.directory &&
  • {artworkError.directory}
  • } - {artworkError?.dimensions &&
  • {artworkError.dimensions}
  • } + + {artworkError?.maxTraits &&
  • {artworkError.maxTraits}
  • } + {artworkError?.mime &&
  • {artworkError.mime}
  • } + {artworkError?.directory &&
  • {artworkError.directory}
  • } + {artworkError?.dimensions &&
  • {artworkError.dimensions}
  • } +
    -
    - )) || - (traitCount > 0 && !!fileType && ( - <> - - -
  • - {traitCount > 1 ? `${traitCount} traits` : `${traitCount} trait`}{' '} - ★ -
  • -
  • supported file type: {fileType} ★
  • -
  • correct folder structure ★
  • -
    + )} + {!artworkError && !uploadError && traitCount > 0 && !!fileType && ( + + +
  • + {traitCount > 1 ? `${traitCount} traits` : `${traitCount} trait`} ★ +
  • +
  • supported file type: {fileType} ★
  • +
  • correct folder structure ★
  • - {layerOrdering} - - ))} +
    + )} + {onReset && (fileCount || traitCount > 0) ? ( + + ) : null} +
    + + {!artworkError && !uploadError && Number(fileCount) > 0 && traitCount > 0 && layerOrdering}
    ) } diff --git a/packages/zord/src/elements/Button.css.ts b/packages/zord/src/elements/Button.css.ts index 55f7ffe18..f3d04e942 100644 --- a/packages/zord/src/elements/Button.css.ts +++ b/packages/zord/src/elements/Button.css.ts @@ -28,7 +28,6 @@ export const baseButton = style([ }, '&[disabled]': { cursor: 'not-allowed', - pointerEvents: 'none', }, '&[disabled]:active': { transform: 'unset', @@ -300,10 +299,11 @@ export const buttonVariants = { selectors: { '&[disabled]': { color: vars.color.onGhostDisabled, - backgroundColor: vars.color.ghostDisabled, - borderColor: vars.color.ghostDisabled, + backgroundColor: 'transparent', + borderColor: vars.color.onGhostDisabled, + opacity: 0.56, }, - '&:hover, &:not([disabled]):hover': { + '&:not([disabled]):hover': { cursor: 'pointer', backgroundColor: vars.color.background2, }, diff --git a/packages/zord/src/elements/Button.tsx b/packages/zord/src/elements/Button.tsx index 456764906..47d1505fb 100644 --- a/packages/zord/src/elements/Button.tsx +++ b/packages/zord/src/elements/Button.tsx @@ -77,6 +77,7 @@ export function InnerButton variant = 'primary', size = 'md', type = 'button', + onClick, ...props }: PolymorphicPropsWithoutRef, ref: ForwardedRef @@ -114,6 +115,16 @@ export function InnerButton : undefined }, [pill, size]) + const handleClick = useMemo(() => { + if (disabled) { + return (event: React.MouseEvent) => { + event.preventDefault() + event.stopPropagation() + } + } + return onClick + }, [disabled, onClick]) + return ( ]} px={px} gap={gap} + onClick={handleClick} {...props} > {loading ? ( diff --git a/packages/zord/src/theme.css.ts b/packages/zord/src/theme.css.ts index 3fcec0df3..53bda7c84 100644 --- a/packages/zord/src/theme.css.ts +++ b/packages/zord/src/theme.css.ts @@ -222,7 +222,7 @@ export const theme = createThemeContract({ }, }) -var { colors, shadows } = colorTheme({}) +var { colors, shadows } = colorTheme({ mode: 'light' }) export const lightTheme = createTheme(theme, { fonts: { heading: typography.fonts.body, @@ -244,6 +244,7 @@ export const lightTheme = createTheme(theme, { }) var { colors, shadows } = colorTheme({ + mode: 'dark', // foreground: '#ffff00', // background: '#ff0000', // accent: '#00ffff', diff --git a/packages/zord/src/tokens/color.ts b/packages/zord/src/tokens/color.ts index 6a458f5e4..898bf5442 100644 --- a/packages/zord/src/tokens/color.ts +++ b/packages/zord/src/tokens/color.ts @@ -29,16 +29,16 @@ export const color = { neutral: '#EDEDED', neutralHover: '#DEDEDE', neutralActive: '#D8D8D8', - neutralDisabled: '#EDEDED', + neutralDisabled: '#D9D9D9', onNeutral: '#000000', - onNeutralDisabled: '#C1C1C1', + onNeutralDisabled: '#666666', ghost: '#FFFFFF', ghostHover: '#F2F2F2', ghostActive: '#EDEDED', - ghostDisabled: '#EDEDED', + ghostDisabled: '#F2F2F2', onGhost: '#000000', - onGhostDisabled: '#C1C1C1', + onGhostDisabled: '#A6A6A6', positive: '#1CB687', positiveHover: '#16AD7F', diff --git a/packages/zord/src/utils/color-theme.ts b/packages/zord/src/utils/color-theme.ts index 541459191..3ac4ca809 100644 --- a/packages/zord/src/utils/color-theme.ts +++ b/packages/zord/src/utils/color-theme.ts @@ -39,7 +39,15 @@ export function colorThemeVars({ negative = '#F03232', warning = '#F5A623', warningStrong = '#EC714B', + mode = 'light', }) { + const neutralDisabled = + mode === 'dark' + ? mix(0.14, background, foreground) + : mix(0.18, foreground, background) + const neutralDisabledText = + mode === 'dark' ? mix(0.6, background, foreground) : mix(0.4, foreground, background) + return { background1: background, background2: mix(0.1, background, foreground), @@ -76,16 +84,16 @@ export function colorThemeVars({ neutral: mix(0.9, foreground, background), neutralHover: mix(0.8, foreground, background), neutralActive: mix(0.7, foreground, background), - neutralDisabled: mix(0.9, foreground, background), + neutralDisabled, onNeutral: foreground, - onNeutralDisabled: mix(0.7, foreground, background), + onNeutralDisabled: neutralDisabledText, ghost: background, ghostHover: mix(0.9, foreground, background), ghostActive: mix(0.8, foreground, background), - ghostDisabled: mix(0.7, foreground, background), + ghostDisabled: mix(0.08, foreground, background), onGhost: foreground, - onGhostDisabled: mix(0.7, foreground, background), + onGhostDisabled: mix(0.35, foreground, background), positive: positive, positiveHover: mix(0.3, positive, background),