Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/curly-parents-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@shipfox/react-ui": minor
"@shipfox/vitest": minor
---

Add Argos CI Upload Screenshots
5 changes: 5 additions & 0 deletions .changeset/soft-swans-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shipfox/react-ui": minor
---

Add Modal components
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"!**/out",
"!**/coverage",
"!**/nix/store",
"!**/storybook-static"
"!**/storybook-static",
"!**/screenshots"
],
"ignoreUnknown": false
},
Expand Down
11 changes: 11 additions & 0 deletions libs/react/ui/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ const withTheme: Decorator = (Story, context) => {
const preview: Preview = {
decorators: [withTheme],
parameters: {
viewport: {
viewports: {
large: {
name: 'Large Viewport',
styles: {
width: '1280px',
height: '2000px',
},
},
},
},
options: {
storySort: {
method: 'alphabetical',
Expand Down
2 changes: 1 addition & 1 deletion libs/react/ui/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
--background-contrast-pressed: var(--color-neutral-700);
--background-contrast-base: var(--color-neutral-900);
--background-neutral-background: var(--color-neutral-50);
--background-backdrop-backdrop: var(--color-neutral-0);
--background-backdrop-backdrop: var(--color-alpha-black-64);

/* Button Background */
--background-button-transparent-default: var(--color-alpha-white-0);
Expand Down
3 changes: 2 additions & 1 deletion libs/react/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"recharts": "^3.1.0",
"shiki": "^3.15.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.2.0"
"tailwind-merge": "^3.2.0",
"vaul": "^1.1.1"
},
"peerDependencies": {
"@tanstack/react-table": "^8.19.3",
Expand Down
67 changes: 37 additions & 30 deletions libs/react/ui/src/components/code-block/code-block-footer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Slot} from '@radix-ui/react-slot';
import {Icon} from 'components/icon/icon';
import {Text} from 'components/typography';
import type {ComponentProps, HTMLAttributes, ReactNode} from 'react';
import {cn} from 'utils/cn';

Expand Down Expand Up @@ -53,22 +54,12 @@ export function CodeBlockFooter({
className={cn('flex w-full items-center justify-start gap-12 px-16 py-12', className)}
{...props}
>
<div className="flex shrink-0 items-center justify-center size-20 text-tag-success-icon">
{defaultIcon}
</div>
<CodeBlockFooterIcon className="text-tag-success-icon">{defaultIcon}</CodeBlockFooterIcon>
{(message || description) && (
<div className="flex flex-col items-start justify-center gap-0">
{message && (
<div className="overflow-hidden text-ellipsis whitespace-nowrap text-xs leading-20 text-foreground-neutral-base">
{message}
</div>
)}
{description && (
<div className="overflow-hidden text-ellipsis whitespace-nowrap text-xs leading-20 text-foreground-neutral-subtle">
{description}
</div>
)}
</div>
<CodeBlockFooterContent>
{message && <CodeBlockFooterMessage>{message}</CodeBlockFooterMessage>}
{description && <CodeBlockFooterDescription>{description}</CodeBlockFooterDescription>}
</CodeBlockFooterContent>
)}
</Comp>
);
Expand Down Expand Up @@ -112,7 +103,7 @@ export function CodeBlockFooterContent({
return (
<Comp
data-slot="code-block-footer-content"
className={cn('flex flex-col items-start justify-center gap-0', className)}
className={cn('flex flex-col items-start justify-center gap-0 min-w-0 flex-1', className)}
{...props}
>
{children}
Expand All @@ -130,19 +121,27 @@ export function CodeBlockFooterMessage({
children,
...props
}: CodeBlockFooterMessageProps) {
const Comp = asChild ? Slot : 'div';
if (asChild) {
return (
<Slot
data-slot="code-block-footer-message"
className={cn('overflow-hidden text-ellipsis whitespace-nowrap text-xs', className)}
{...props}
>
{children}
</Slot>
);
}

return (
<Comp
<Text
data-slot="code-block-footer-message"
className={cn(
'overflow-hidden text-ellipsis whitespace-nowrap text-xs leading-20 text-foreground-neutral-base',
className,
)}
size="xs"
className={cn('overflow-hidden text-ellipsis whitespace-nowrap', className)}
{...props}
>
{children}
</Comp>
</Text>
);
}

Expand All @@ -156,18 +155,26 @@ export function CodeBlockFooterDescription({
children,
...props
}: CodeBlockFooterDescriptionProps) {
const Comp = asChild ? Slot : 'div';
if (asChild) {
return (
<Slot
data-slot="code-block-footer-description"
className={cn('text-xs text-foreground-neutral-subtle', className)}
{...props}
>
{children}
</Slot>
);
}

return (
<Comp
<Text
data-slot="code-block-footer-description"
className={cn(
'overflow-hidden text-ellipsis whitespace-nowrap text-xs leading-20 text-foreground-neutral-subtle',
className,
)}
size="xs"
className={cn('text-foreground-neutral-subtle', className)}
{...props}
>
{children}
</Comp>
</Text>
);
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type {Meta, StoryObj} from '@storybook/react';
import {Button} from 'components/button/button';
import {ItemTitle} from 'components/item';
import {MovingBorder} from 'components/moving-border';
import {cn} from 'utils/cn';
import illustration1 from '../../assets/illustration-1.svg';
import illustration2 from '../../assets/illustration-2.svg';
import illustrationBg from '../../assets/illustration-gradient.svg';
import {Avatar} from '../avatar/avatar';
import {AvatarGroup, AvatarGroupTooltip} from '../avatar/avatar-group';
import {Icon} from '../icon/icon';
import {MovingBorder} from '../moving-border/moving-border';
import {DynamicItem} from './dynamic-item';

const meta = {
Expand Down
2 changes: 2 additions & 0 deletions libs/react/ui/src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
type RemixiconComponentType,
RiAddLine,
RiArrowRightSLine,
RiBookOpenFill,
RiCheckLine,
RiCloseLine,
RiFileCopyLine,
Expand Down Expand Up @@ -60,6 +61,7 @@ const iconsMap = {
copy: RiFileCopyLine,
addLine: RiAddLine,
chevronRight: RiArrowRightSLine,
bookOpen: RiBookOpenFill,
} as const satisfies Record<string, RemixiconComponentType>;

export type IconName = keyof typeof iconsMap;
Expand Down
1 change: 1 addition & 0 deletions libs/react/ui/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export * from './inline-tips';
export * from './input';
export * from './item';
export * from './label';
export * from './modal';
export * from './textarea';
export * from './theme';
export * from './toast';
Expand Down
23 changes: 23 additions & 0 deletions libs/react/ui/src/components/modal/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export type {
ModalContentProps,
ModalDescriptionProps,
ModalHeaderProps,
ModalOverlayProps,
ModalTitleProps,
} from './modal';
export {
Modal,
ModalBody,
ModalClose,
ModalContent,
ModalDescription,
ModalFooter,
ModalHeader,
ModalOverlay,
ModalPortal,
ModalTitle,
ModalTrigger,
modalContentVariants,
modalDefaultTransition,
modalOverlayVariants,
} from './modal';
Loading
Loading