@betterinternship/components 3.2.6 → 3.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ const TimelineItem = ({ number, status, title, subtitle, isLast = false, childre
14
14
  const isCheckmark = status === 'done' || number === -1;
15
15
  const isWaiting = status === 'waiting' && !isCheckmark;
16
16
  const isExclamation = fromMe;
17
- return (jsxs("div", { className: cn('relative flex items-start gap-3', !isLast && 'pb-6', className), children: [jsxs("div", { className: "relative flex w-7 shrink-0 self-stretch justify-center", children: [isCheckmark ? (jsx("div", { className: "relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-supportive-soft text-supportive-strong", children: jsx(CheckIcon, { className: "size-4", strokeWidth: 2.75, "aria-hidden": "true" }) })) : isWaiting ? (jsx("div", { className: "relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-warning-soft text-warning-strong", children: jsx(ClockIcon, { className: "size-4.5 translate-x-[0.5px]", strokeWidth: 2.5, "aria-hidden": "true" }) })) : isExclamation ? (jsx("div", { className: "relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-selected text-primary", children: jsx(MailWarningIcon, { className: "size-4", strokeWidth: 2.5, "aria-hidden": "true" }) })) : (jsx("div", { className: "relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full border border-input bg-muted text-xs font-semibold text-muted-foreground", children: number })), !isLast && jsx("div", { "aria-hidden": "true", className: "absolute -bottom-5 top-8 w-px bg-border" })] }), jsxs("div", { className: "flex min-w-0 flex-1 flex-wrap items-start justify-between gap-x-3 gap-y-2", children: [jsxs("div", { className: "min-w-0 flex-1", children: [jsxs("div", { className: "flex min-h-7 flex-wrap items-center gap-2", children: [fromMe ? (jsx("div", { className: "text-sm font-semibold text-primary", children: title })) : (jsx("div", { className: "text-sm font-medium text-foreground", children: title })), isMe && (
17
+ return (jsxs("div", { className: cn('relative flex items-start gap-3', !isLast && 'pb-6', className), children: [jsxs("div", { className: "relative flex w-7 shrink-0 self-stretch justify-center", children: [isCheckmark ? (jsx("div", { className: "relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-supportive-soft text-supportive-strong", children: jsx(CheckIcon, { className: "size-4", strokeWidth: 2.75, "aria-hidden": "true" }) })) : isWaiting ? (jsx("div", { className: "relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-warning-soft text-warning-strong", children: jsx(ClockIcon, { className: "size-4.5 translate-x-[0.5px]", strokeWidth: 2.5, "aria-hidden": "true" }) })) : isExclamation ? (jsx("div", { className: "relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-selected text-primary", children: jsx(MailWarningIcon, { className: "size-4", strokeWidth: 2.5, "aria-hidden": "true" }) })) : (jsx("div", { className: "relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full border border-input bg-muted text-xs font-semibold text-muted-foreground", children: number })), !isLast && jsx("div", { "aria-hidden": "true", className: "absolute -bottom-5 top-8 w-px bg-border" })] }), jsxs("div", { className: "flex min-w-0 flex-1 flex-wrap items-start justify-between gap-x-3 gap-y-2", children: [jsxs("div", { className: "min-w-0 flex-1 basis-48", children: [jsxs("div", { className: "flex min-h-7 flex-wrap items-center gap-2", children: [fromMe ? (jsx("div", { className: "text-sm font-semibold text-primary", children: title })) : (jsx("div", { className: "text-sm font-medium text-foreground", children: title })), isMe && (
18
18
  // The waiting clock's colours (warning-soft, -strong), semibold.
19
19
  jsx(Badge, { variant: "soft", type: "warning", className: "font-semibold", children: "You" }))] }), subtitle && (jsx("div", { className: "text-sm leading-snug text-muted-foreground", children: subtitle }))] }), children && jsx("div", { className: "flex min-h-7 shrink-0 items-center", children: children })] })] }));
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"timeline.js","sources":["../../src/components/timeline.tsx"],"sourcesContent":["import React from \"react\";\nimport { CheckIcon, ClockIcon, MailWarningIcon } from \"lucide-react\";\nimport { Badge } from './badge';\nimport { cn } from '@/utils';\n\nexport const Timeline = ({ children, className }: { children: React.ReactNode; className?: string }) => {\n return <div className={cn('w-full', className)}>{children}</div>;\n};\n\ninterface TimelineItemProps {\n number: number;\n /**\n * The step's state, shown in its circle: `done` is the green check (as\n * `number={-1}`), `waiting` a yellow clock for the step it's currently\n * waiting on. Otherwise the step's number.\n */\n status?: 'done' | 'waiting';\n title: string | React.ReactNode;\n subtitle?: React.ReactNode;\n isLast?: boolean;\n children?: React.ReactNode;\n fromMe?: boolean;\n isMe?: boolean;\n className?: string;\n}\n\nexport const TimelineItem = ({\n number,\n status,\n title,\n subtitle,\n isLast = false,\n children,\n fromMe,\n isMe,\n className,\n}: TimelineItemProps) => {\n // Marked steps are soft, like the badges: done and waiting take the\n // \"Completed\" / \"Waiting for recipients\" colours (-soft tint, -strong\n // icon), \"from me\" the primary-selected tint; no ring.\n // 28px circles, icons at a heavier stroke so they hold up in the tint.\n const isCheckmark = status === 'done' || number === -1;\n const isWaiting = status === 'waiting' && !isCheckmark;\n const isExclamation = fromMe;\n\n return (\n <div className={cn('relative flex items-start gap-3', !isLast && 'pb-6', className)}>\n <div className=\"relative flex w-7 shrink-0 self-stretch justify-center\">\n {isCheckmark ? (\n <div className=\"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-supportive-soft text-supportive-strong\">\n <CheckIcon className=\"size-4\" strokeWidth={2.75} aria-hidden=\"true\" />\n </div>\n ) : isWaiting ? (\n <div className=\"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-warning-soft text-warning-strong\">\n {/* A size up from the check, and half a pixel right: the clock's\n lopsided hands (up and to the right) read as off-centre\n though the glyph is geometrically centred. */}\n <ClockIcon className=\"size-4.5 translate-x-[0.5px]\" strokeWidth={2.5} aria-hidden=\"true\" />\n </div>\n ) : isExclamation ? (\n <div className=\"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-selected text-primary\">\n <MailWarningIcon className=\"size-4\" strokeWidth={2.5} aria-hidden=\"true\" />\n </div>\n ) : (\n <div className=\"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full border border-input bg-muted text-xs font-semibold text-muted-foreground\">\n {number}\n </div>\n )}\n {!isLast && <div aria-hidden=\"true\" className=\"absolute -bottom-5 top-8 w-px bg-border\" />}\n </div>\n\n {/* Content */}\n <div className=\"flex min-w-0 flex-1 flex-wrap items-start justify-between gap-x-3 gap-y-2\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex min-h-7 flex-wrap items-center gap-2\">\n {fromMe ? (\n <div className=\"text-sm font-semibold text-primary\">{title}</div>\n ) : (\n <div className=\"text-sm font-medium text-foreground\">{title}</div>\n )}\n {isMe && (\n // The waiting clock's colours (warning-soft, -strong), semibold.\n <Badge variant=\"soft\" type=\"warning\" className=\"font-semibold\">\n You\n </Badge>\n )}\n </div>\n {/* Snug under the title: a one-line detail (an email, a name), not\n prose, so it shouldn't float with prose leading. */}\n {subtitle && (\n <div className=\"text-sm leading-snug text-muted-foreground\">{subtitle}</div>\n )}\n </div>\n {children && <div className=\"flex min-h-7 shrink-0 items-center\">{children}</div>}\n </div>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;AAKO,MAAM,QAAQ,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAqD,KAAI;AACrG,IAAA,OAAOA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAO;AAClE;AAmBO,MAAM,YAAY,GAAG,CAAC,EAC3B,MAAM,EACN,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,GAAG,KAAK,EACd,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,GACS,KAAI;;;;;IAKtB,MAAM,WAAW,GAAG,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,EAAE;IACtD,MAAM,SAAS,GAAG,MAAM,KAAK,SAAS,IAAI,CAAC,WAAW;IACtD,MAAM,aAAa,GAAG,MAAM;AA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EAAC,oCAAoC,YAAE,KAAK,EAAA,CAAO,KAEjEA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,qCAAqC,EAAA,QAAA,EAAE,KAAK,GAAO,CACnE,EACA,IAAI;;AAEH,oCAAAA,GAAA,CAAC,KAAK,EAAA,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,EAAC,SAAS,EAAC,eAAe,EAAA,QAAA,EAAA,KAAA,EAAA,CAEtD,CACT,IACG,EAGL,QAAQ,KACPA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4CAA4C,EAAA,QAAA,EAAE,QAAQ,GAAO,CAC7E,CAAA,EAAA,CACG,EACL,QAAQ,IAAIA,aAAK,SAAS,EAAC,oCAAoC,EAAA,QAAA,EAAE,QAAQ,GAAO,CAAA,EAAA,CAC7E,CAAA,EAAA,CACF;AAEV;;;;"}
1
+ {"version":3,"file":"timeline.js","sources":["../../src/components/timeline.tsx"],"sourcesContent":["import React from \"react\";\nimport { CheckIcon, ClockIcon, MailWarningIcon } from \"lucide-react\";\nimport { Badge } from './badge';\nimport { cn } from '@/utils';\n\nexport const Timeline = ({ children, className }: { children: React.ReactNode; className?: string }) => {\n return <div className={cn('w-full', className)}>{children}</div>;\n};\n\ninterface TimelineItemProps {\n number: number;\n /**\n * The step's state, shown in its circle: `done` is the green check (as\n * `number={-1}`), `waiting` a yellow clock for the step it's currently\n * waiting on. Otherwise the step's number.\n */\n status?: 'done' | 'waiting';\n title: string | React.ReactNode;\n subtitle?: React.ReactNode;\n isLast?: boolean;\n children?: React.ReactNode;\n fromMe?: boolean;\n isMe?: boolean;\n className?: string;\n}\n\nexport const TimelineItem = ({\n number,\n status,\n title,\n subtitle,\n isLast = false,\n children,\n fromMe,\n isMe,\n className,\n}: TimelineItemProps) => {\n // Marked steps are soft, like the badges: done and waiting take the\n // \"Completed\" / \"Waiting for recipients\" colours (-soft tint, -strong\n // icon), \"from me\" the primary-selected tint; no ring.\n // 28px circles, icons at a heavier stroke so they hold up in the tint.\n const isCheckmark = status === 'done' || number === -1;\n const isWaiting = status === 'waiting' && !isCheckmark;\n const isExclamation = fromMe;\n\n return (\n <div className={cn('relative flex items-start gap-3', !isLast && 'pb-6', className)}>\n <div className=\"relative flex w-7 shrink-0 self-stretch justify-center\">\n {isCheckmark ? (\n <div className=\"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-supportive-soft text-supportive-strong\">\n <CheckIcon className=\"size-4\" strokeWidth={2.75} aria-hidden=\"true\" />\n </div>\n ) : isWaiting ? (\n <div className=\"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-warning-soft text-warning-strong\">\n {/* A size up from the check, and half a pixel right: the clock's\n lopsided hands (up and to the right) read as off-centre\n though the glyph is geometrically centred. */}\n <ClockIcon className=\"size-4.5 translate-x-[0.5px]\" strokeWidth={2.5} aria-hidden=\"true\" />\n </div>\n ) : isExclamation ? (\n <div className=\"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-selected text-primary\">\n <MailWarningIcon className=\"size-4\" strokeWidth={2.5} aria-hidden=\"true\" />\n </div>\n ) : (\n <div className=\"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full border border-input bg-muted text-xs font-semibold text-muted-foreground\">\n {number}\n </div>\n )}\n {!isLast && <div aria-hidden=\"true\" className=\"absolute -bottom-5 top-8 w-px bg-border\" />}\n </div>\n\n {/* Content */}\n <div className=\"flex min-w-0 flex-1 flex-wrap items-start justify-between gap-x-3 gap-y-2\">\n {/* At least 12rem for the title and subtitle: on narrow screens the\n right slot (children) wraps below instead of squeezing the title\n into a sliver. */}\n <div className=\"min-w-0 flex-1 basis-48\">\n <div className=\"flex min-h-7 flex-wrap items-center gap-2\">\n {fromMe ? (\n <div className=\"text-sm font-semibold text-primary\">{title}</div>\n ) : (\n <div className=\"text-sm font-medium text-foreground\">{title}</div>\n )}\n {isMe && (\n // The waiting clock's colours (warning-soft, -strong), semibold.\n <Badge variant=\"soft\" type=\"warning\" className=\"font-semibold\">\n You\n </Badge>\n )}\n </div>\n {/* Snug under the title: a one-line detail (an email, a name), not\n prose, so it shouldn't float with prose leading. */}\n {subtitle && (\n <div className=\"text-sm leading-snug text-muted-foreground\">{subtitle}</div>\n )}\n </div>\n {children && <div className=\"flex min-h-7 shrink-0 items-center\">{children}</div>}\n </div>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;AAKO,MAAM,QAAQ,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAqD,KAAI;AACrG,IAAA,OAAOA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAO;AAClE;AAmBO,MAAM,YAAY,GAAG,CAAC,EAC3B,MAAM,EACN,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,GAAG,KAAK,EACd,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,GACS,KAAI;;;;;IAKtB,MAAM,WAAW,GAAG,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,EAAE;IACtD,MAAM,SAAS,GAAG,MAAM,KAAK,SAAS,IAAI,CAAC,WAAW;IACtD,MAAM,aAAa,GAAG,MAAM;AAE5B,IAAA,QACEC,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,CAAC,MAAM,IAAI,MAAM,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CACjFA,cAAK,SAAS,EAAC,wDAAwD,EAAA,QAAA,EAAA,CACpE,WAAW,IACVD,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,uHAAuH,EAAA,QAAA,EACpIA,GAAA,CAAC,SAAS,EAAA,EAAC,SAAS,EAAC,QAAQ,EAAC,WAAW,EAAE,IAAI,EAAA,aAAA,EAAc,MAAM,GAAG,EAAA,CAClE,IACJ,SAAS,IACXA,GAAA,CAAA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