@syscore/ui-library 2.0.0-beta-publish-workflow-beta.3 → 2.0.0-beta-publish-workflow-beta.5
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.
- package/client/components/ui/copy.tsx +68 -0
- package/client/components/ui/credit-card-preview.tsx +118 -0
- package/client/components/ui/drop-zone.tsx +127 -0
- package/client/components/ui/field-group.tsx +103 -0
- package/client/components/ui/file-upload-trigger.tsx +98 -0
- package/client/components/ui/inline-notice.tsx +39 -0
- package/client/components/ui/labeled-divider.tsx +32 -0
- package/client/components/ui/meta-row.tsx +39 -0
- package/client/components/ui/modal-panel.tsx +164 -0
- package/client/components/ui/pill-button.tsx +116 -0
- package/client/components/ui/profile-avatar.tsx +176 -0
- package/client/components/ui/resource-thumbnail.tsx +20 -0
- package/client/components/ui/social-button.tsx +70 -0
- package/client/components/ui/status-pill.tsx +58 -0
- package/client/components/ui/table.tsx +30 -0
- package/client/components/ui/text-link.tsx +63 -0
- package/client/global.css +2779 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +81 -0
- package/dist/index.es.js +614 -0
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "@/lib/utils";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* TextLink — an inline text action.
|
|
6
|
+
*
|
|
7
|
+
* Figma: Mazzard Medium 16/21 blue-600 (#2e74ad). Renders as a <button> by
|
|
8
|
+
* default (most of these drive in-app navigation or state) — pass `as="a"` with
|
|
9
|
+
* an href for a real outbound link, or `as={Link}` for a router link.
|
|
10
|
+
*
|
|
11
|
+
* `emphasis="legal"` is the italic 14/19.6 variant used inside LegalNote.
|
|
12
|
+
*
|
|
13
|
+
* ⚠️ The CSS class is `inline-link`, NOT `text-link`. `cn` is tailwind-merge, which
|
|
14
|
+
* reads `text-link` as a `text-<colour>` utility and drops it as conflicting with
|
|
15
|
+
* `text-link--default` — silently leaving the link grey and unstyled. Never give a
|
|
16
|
+
* class in this file a `text-` / `bg-` / `p-` / `w-` style prefix.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
type LinkEmphasis = "default" | "legal";
|
|
20
|
+
|
|
21
|
+
interface TextLinkProps extends React.HTMLAttributes<HTMLElement> {
|
|
22
|
+
as?: React.ElementType;
|
|
23
|
+
emphasis?: LinkEmphasis;
|
|
24
|
+
href?: string;
|
|
25
|
+
to?: string;
|
|
26
|
+
type?: "button" | "submit" | "reset";
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const TextLink = React.forwardRef<HTMLElement, TextLinkProps>(
|
|
31
|
+
(
|
|
32
|
+
{ as: Component = "button", emphasis = "default", className, ...props },
|
|
33
|
+
ref,
|
|
34
|
+
) => (
|
|
35
|
+
<Component
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={cn("inline-link", `inline-link--${emphasis}`, className)}
|
|
38
|
+
{...(Component === "button" ? { type: props.type ?? "button" } : null)}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
),
|
|
42
|
+
);
|
|
43
|
+
TextLink.displayName = "TextLink";
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* LegalNote — the centred italic terms line under an auth form.
|
|
47
|
+
* Figma: 14/19.6 italic gray-600, 10.5px block padding, link half in blue-600.
|
|
48
|
+
*/
|
|
49
|
+
interface LegalNoteProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
50
|
+
children: React.ReactNode;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const LegalNote = React.forwardRef<HTMLDivElement, LegalNoteProps>(
|
|
54
|
+
({ children, className, ...props }, ref) => (
|
|
55
|
+
<div ref={ref} className={cn("legal-note", className)} {...props}>
|
|
56
|
+
<span className="legal-note__text">{children}</span>
|
|
57
|
+
</div>
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
LegalNote.displayName = "LegalNote";
|
|
61
|
+
|
|
62
|
+
export { TextLink, LegalNote };
|
|
63
|
+
export type { TextLinkProps, LegalNoteProps, LinkEmphasis };
|