Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo committed Jul 23, 2024
1 parent 2196750 commit 0fc700f
Show file tree
Hide file tree
Showing 184 changed files with 1,026 additions and 2,720 deletions.
12 changes: 2 additions & 10 deletions .ladle/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const StoryWrapper: React.FC<{ children: React.ReactNode }> = ({ children

return (
<Provider store={store}>
<StoryHeader>
<div tw="flex flex-row items-center gap-[8px] ">
<h4>Active Theme:</h4>
<SelectMenu value={theme} onValueChange={setTheme}>
{[
Expand Down Expand Up @@ -126,20 +126,12 @@ export const StoryWrapper: React.FC<{ children: React.ReactNode }> = ({ children
<SelectItem key={value} value={value} label={label} />
))}
</SelectMenu>
</StoryHeader>
</div>
<hr />
{content}
</Provider>
);
};

const StoryHeader = styled.div`
display: flex;
flex-direction: row;
align-items: center;
gap: 8px;
`;

const StoryContent = styled.div`
--default-border-width: 1px;
--border-width: var(--default-border-width);
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,5 +220,11 @@
"preset": "styled-components",
"includeClassNames": true
}
},
"optionalDependencies": {
"css-to-tailwindcss": "^1.0.5",
"postcss-safe-parser": "^7.0.0",
"postcss-styled": "^0.34.0",
"postcss-styled-syntax": "^0.6.4"
}
}
121 changes: 121 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const Content = () => {

{isTablet ? <FooterMobile /> : <FooterDesktop />}

<$NotificationsToastArea />
<NotificationsToastArea tw="z-[2] [grid-area:Main]" />

<$DialogArea ref={dialogAreaRef}>
<DialogManager />
Expand Down Expand Up @@ -243,12 +243,6 @@ const $Main = styled.main`
position: relative;
`;

const $NotificationsToastArea = styled(NotificationsToastArea)`
grid-area: Main;
z-index: 2;
`;

const $DialogArea = styled.aside`
position: fixed;
height: 100%;
Expand Down
14 changes: 6 additions & 8 deletions src/components/AssetIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -678,17 +678,15 @@ export const AssetIcon = ({
className?: string;
}) =>
isAssetSymbol(symbol) ? (
<$Img src={assetIcons[symbol]} className={className} alt={symbol} />
<img
src={assetIcons[symbol]}
className={className}
alt={symbol}
tw="h-[1em] w-auto rounded-[50%]"
/>
) : (
<Placeholder className={className} symbol={symbol ?? ''} />
);

const $Img = styled.img`
width: auto;
height: 1em;
border-radius: 50%;
`;

const $Placeholder = styled.div`
background-color: var(--color-layer-5);
width: 1em;
Expand Down
13 changes: 2 additions & 11 deletions src/components/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export const Checkbox: React.FC<CheckboxProps> = ({
onCheckedChange={onCheckedChange}
id={id}
>
<$Indicator>
<Indicator tw="flex items-center justify-center text-text-button">
<CheckIcon />
</$Indicator>
</Indicator>
</$Root>
{label && (
<$Label disabled={disabled} htmlFor={id}>
Expand Down Expand Up @@ -71,15 +71,6 @@ const $Root = styled(Root)`
--checkbox-backgroundColor: var(--color-layer-1);
}
`;

const $Indicator = styled(Indicator)`
display: flex;
align-items: center;
justify-content: center;
color: var(--color-text-button);
`;

const $Label = styled.label<{ disabled?: boolean }>`
cursor: pointer;
color: var(--color-text-2);
Expand Down
11 changes: 2 additions & 9 deletions src/components/Collapsible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ export const Collapsible = ({
withTrigger = true,
}: CollapsibleProps) => {
const trigger = slotTrigger ? (
<$TriggerSlot>
<div tw="flex items-center gap-[0.5em]">
{triggerIconSide === 'right' && label}
<Trigger className={className} disabled={disabled} asChild>
{slotTrigger}
</Trigger>
{triggerIconSide === 'left' && label}
</$TriggerSlot>
</div>
) : (
<$Trigger className={className} disabled={disabled}>
{triggerIconSide === 'right' && (
Expand Down Expand Up @@ -93,13 +93,6 @@ const $Trigger = styled(Trigger)`
--trigger-icon-width: 0.75em;
--trigger-icon-color: inherit;
`;

const $TriggerSlot = styled.div`
display: flex;
align-items: center;
gap: 0.5em;
`;

const $TriggerIcon = styled.span`
width: var(--trigger-icon-width);
Expand Down
9 changes: 2 additions & 7 deletions src/components/CollapsibleNavigationMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const CollapsibleNavigationMenu = <MenuItemValue extends string>({

return (
<Root orientation="vertical">
<$List>
<List tw="gap-0.5">
{items.map((item) =>
!item.subitems ? (
<$NavItem key={item.value} onSelect={onSelectItem} {...item} />
Expand All @@ -81,7 +81,7 @@ export const CollapsibleNavigationMenu = <MenuItemValue extends string>({
</Collapsible>
)
)}
</$List>
</List>
</Root>
);
};
Expand All @@ -92,11 +92,6 @@ const navItemStyle = css`
--item-checked-backgroundColor: var(--color-layer-1);
--item-checked-textColor: var(--color-text-0);
`;

const $List = styled(List)`
gap: 0.5rem;
`;

const $CollapsibleItem = styled(Item)`
${navItemStyle}
--item-padding: 0;
Expand Down
10 changes: 3 additions & 7 deletions src/components/ComboboxMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ export const ComboboxMenu = <
))}
</$Group>
))}
{slotEmpty && searchValue.trim() !== '' && <$Empty>{slotEmpty}</$Empty>}
{slotEmpty && searchValue.trim() !== '' && (
<Command.Empty tw="h-full p-1 text-text-0">{slotEmpty}</Command.Empty>
)}
</$List>
</$Command>
);
Expand Down Expand Up @@ -339,9 +341,3 @@ const $ItemLabel = styled.div`
min-width: 0;
`;

const $Empty = styled(Command.Empty)`
color: var(--color-text-0);
padding: 1rem;
height: 100%;
`;
7 changes: 1 addition & 6 deletions src/components/DetailsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const DetailsDialog = ({ slotIcon, title, items, slotFooter, setIsOpen }:
placement={isTablet ? DialogPlacement.Default : DialogPlacement.Sidebar}
>
<$Content>
<$Details withSeparators justifyItems="end" items={items} />
<Details withSeparators justifyItems="end" items={items} tw="font-small-book" />

<$Footer>{slotFooter}</$Footer>
</$Content>
Expand All @@ -40,11 +40,6 @@ const $Content = styled.div`
--stickyFooterBackdrop-outsetY: var(--dialog-content-paddingBottom);
gap: 1rem;
`;

const $Details = styled(Details)`
font: var(--font-small-book);
`;

const $Footer = styled.footer`
${layoutMixins.gridEqualColumns}
gap: 0.66rem;
Expand Down
Loading

0 comments on commit 0fc700f

Please sign in to comment.