@yuzu-jobs/ui-components 0.0.8 → 0.1.0
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/index.ts +2 -0
- package/package.json +5 -3
- package/src/Alert.astro +3 -3
- package/src/Button.astro +12 -9
- package/src/ProfileSetupFlowHeader.astro +5 -5
- package/src/ProgressBar.astro +2 -2
- package/src/StatusDot.astro +33 -0
- package/theme.css +61 -0
package/index.ts
CHANGED
|
@@ -10,9 +10,11 @@ import Alert from "./src/Alert.astro";
|
|
|
10
10
|
import ProgressBar from "./src/ProgressBar.astro";
|
|
11
11
|
import Button from "./src/Button.astro";
|
|
12
12
|
import ProfileSetupFlowHeader from "./src/ProfileSetupFlowHeader.astro";
|
|
13
|
+
import StatusDot from "./src/StatusDot.astro";
|
|
13
14
|
|
|
14
15
|
export {
|
|
15
16
|
Button,
|
|
17
|
+
StatusDot,
|
|
16
18
|
InputText,
|
|
17
19
|
InputSelect,
|
|
18
20
|
InputSwitch,
|
package/package.json
CHANGED
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=22.12.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.0
|
|
6
|
+
"version": "0.1.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
|
-
".": "./index.ts"
|
|
9
|
+
".": "./index.ts",
|
|
10
|
+
"./theme.css": "./theme.css"
|
|
10
11
|
},
|
|
11
12
|
"files": [
|
|
12
13
|
"src",
|
|
13
|
-
"index.ts"
|
|
14
|
+
"index.ts",
|
|
15
|
+
"theme.css"
|
|
14
16
|
],
|
|
15
17
|
"keywords": [
|
|
16
18
|
"astro-component"
|
package/src/Alert.astro
CHANGED
|
@@ -15,14 +15,14 @@ const variantClasses: Record<Variant, string> = {
|
|
|
15
15
|
success: "bg-emerald-50 border-emerald-500 text-emerald-800",
|
|
16
16
|
error: "bg-red-50 border-red-500 text-red-800",
|
|
17
17
|
warning: "bg-amber-50 border-amber-500 text-amber-800",
|
|
18
|
-
info: "bg-
|
|
18
|
+
info: "bg-brand-50 border-brand-500 text-brand-800",
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const iconClasses: Record<Variant, string> = {
|
|
22
22
|
success: "text-emerald-500",
|
|
23
23
|
error: "text-red-500",
|
|
24
24
|
warning: "text-amber-500",
|
|
25
|
-
info: "text-
|
|
25
|
+
info: "text-brand-500",
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const icons: Record<Variant, typeof CircleCheck> = {
|
|
@@ -38,7 +38,7 @@ const Icon = icons[variant];
|
|
|
38
38
|
<div
|
|
39
39
|
id={id}
|
|
40
40
|
class:list={[
|
|
41
|
-
"flex items-start gap-3 border border-transparent border-l-4 px-4 py-3 rounded-lg text-sm font-sans
|
|
41
|
+
"flex items-start gap-3 border border-transparent border-l-4 px-4 py-3 rounded-lg text-sm font-sans",
|
|
42
42
|
variantClasses[variant],
|
|
43
43
|
className,
|
|
44
44
|
]}
|
package/src/Button.astro
CHANGED
|
@@ -3,7 +3,7 @@ interface Props {
|
|
|
3
3
|
id?: string;
|
|
4
4
|
href?: string;
|
|
5
5
|
type?: "button" | "submit" | "reset";
|
|
6
|
-
variant?: "primary" | "secondary" | "outline" | "ghost" | "danger";
|
|
6
|
+
variant?: "primary" | "accent" | "secondary" | "outline" | "ghost" | "danger";
|
|
7
7
|
size?: "sm" | "md" | "lg";
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
fullWidth?: boolean;
|
|
@@ -28,20 +28,23 @@ const {
|
|
|
28
28
|
} = Astro.props;
|
|
29
29
|
|
|
30
30
|
const variantClasses = {
|
|
31
|
-
// Filled — solid background, white text. Use for primary CTAs on
|
|
31
|
+
// Filled ink — solid background, white text. Use for primary CTAs on light backgrounds.
|
|
32
32
|
primary:
|
|
33
|
-
"bg-
|
|
33
|
+
"bg-primary hover:bg-primary-hover text-white border border-transparent",
|
|
34
|
+
// Filled teal — the brand accent. Use sparingly (e.g. spoke "Join free" CTA).
|
|
35
|
+
accent:
|
|
36
|
+
"bg-accent hover:bg-accent-hover text-white border border-transparent",
|
|
34
37
|
// Danger — filled red, white text. Use for destructive actions.
|
|
35
38
|
danger: "bg-red-600 hover:bg-red-700 text-white border border-transparent",
|
|
36
|
-
// Outline —
|
|
39
|
+
// Outline — ink text, hairline border. Use for secondary actions on light backgrounds.
|
|
37
40
|
secondary:
|
|
38
|
-
"text-
|
|
41
|
+
"text-ink-900 border border-slate-300 hover:bg-slate-50 hover:border-slate-400",
|
|
39
42
|
// Alias for secondary
|
|
40
43
|
outline:
|
|
41
|
-
"text-
|
|
42
|
-
// Ghost — subtle
|
|
44
|
+
"text-ink-900 border border-slate-300 hover:bg-slate-50 hover:border-slate-400",
|
|
45
|
+
// Ghost — subtle teal outline on transparent background. Use for actions on dark (ink) surfaces.
|
|
43
46
|
ghost:
|
|
44
|
-
"text-
|
|
47
|
+
"text-brand-200 border border-brand-500/50 hover:bg-brand-500/20 hover:text-white hover:border-brand-400",
|
|
45
48
|
};
|
|
46
49
|
|
|
47
50
|
const sizeClasses = {
|
|
@@ -51,7 +54,7 @@ const sizeClasses = {
|
|
|
51
54
|
};
|
|
52
55
|
|
|
53
56
|
const classes = [
|
|
54
|
-
"inline-flex items-center gap-1.5 rounded-
|
|
57
|
+
"inline-flex items-center gap-1.5 rounded-md font-sans font-medium cursor-pointer transition-colors",
|
|
55
58
|
"disabled:opacity-40 disabled:cursor-not-allowed",
|
|
56
59
|
variantClasses[variant],
|
|
57
60
|
sizeClasses[size],
|
|
@@ -11,19 +11,19 @@ interface Props {
|
|
|
11
11
|
const { step, totalSteps, title, userRole } = Astro.props;
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<div class="bg-
|
|
14
|
+
<div class="bg-ink-900 border-b border-ink-800/60">
|
|
15
15
|
<div class="container mx-auto max-w-3xl px-8 py-6">
|
|
16
16
|
<div class="flex items-center gap-3 mb-4">
|
|
17
|
-
<span class="text-
|
|
18
|
-
<span class="text-
|
|
19
|
-
<span class="text-
|
|
17
|
+
<span class="text-ink-300 text-sm font-sans">Account setup</span>
|
|
18
|
+
<span class="text-ink-500">/</span>
|
|
19
|
+
<span class="text-ink-200 text-sm font-sans"
|
|
20
20
|
>{userRole == "recruiter" ? "Recruiter" : "Candidate"} profile</span
|
|
21
21
|
>
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<div class="mb-5">
|
|
25
25
|
<p
|
|
26
|
-
class="text-
|
|
26
|
+
class="text-brand-400 text-[11px] font-mono uppercase tracking-[0.08em] font-semibold mb-1"
|
|
27
27
|
>
|
|
28
28
|
Step {step} of {totalSteps}
|
|
29
29
|
</p>
|
package/src/ProgressBar.astro
CHANGED
|
@@ -9,9 +9,9 @@ const { totalSteps, currentStep, class: className } = Astro.props;
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
<div class:list={[className]}>
|
|
12
|
-
<div class="w-full bg-
|
|
12
|
+
<div class="w-full bg-slate-200/40 rounded-full h-2">
|
|
13
13
|
<div
|
|
14
|
-
class="bg-
|
|
14
|
+
class="bg-brand-500 h-2 rounded-full"
|
|
15
15
|
style={`width: ${Math.max(8, ((currentStep - 1) / totalSteps) * 100)}%`}
|
|
16
16
|
>
|
|
17
17
|
</div>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Status indicator: colored dot + plain text (replaces pill badges).
|
|
3
|
+
// Semantic colors per the Precision theme: emerald=active/success,
|
|
4
|
+
// slate=draft/neutral, amber=closed/attention, teal=pending, red=error.
|
|
5
|
+
type Color = "emerald" | "slate" | "amber" | "teal" | "red";
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
color: Color;
|
|
9
|
+
label: string;
|
|
10
|
+
class?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { color, label, class: className } = Astro.props;
|
|
14
|
+
|
|
15
|
+
const dotClasses: Record<Color, string> = {
|
|
16
|
+
emerald: "bg-emerald-500",
|
|
17
|
+
slate: "bg-slate-400",
|
|
18
|
+
amber: "bg-amber-500",
|
|
19
|
+
teal: "bg-brand-500",
|
|
20
|
+
red: "bg-red-500",
|
|
21
|
+
};
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<span
|
|
25
|
+
class:list={[
|
|
26
|
+
"inline-flex items-center gap-1.5 text-[13px] font-sans text-slate-600 whitespace-nowrap",
|
|
27
|
+
className,
|
|
28
|
+
]}
|
|
29
|
+
>
|
|
30
|
+
<span class:list={["w-1.5 h-1.5 rounded-full shrink-0", dotClasses[color]]}
|
|
31
|
+
></span>
|
|
32
|
+
{label}
|
|
33
|
+
</span>
|
package/theme.css
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Shared "Precision" design tokens for mizu.health (hub) and the spoke sites.
|
|
3
|
+
* Consumers @import this after tailwindcss in their global.css:
|
|
4
|
+
*
|
|
5
|
+
* @import "tailwindcss";
|
|
6
|
+
* @import "@yuzu-jobs/ui-components/theme.css";
|
|
7
|
+
*
|
|
8
|
+
* The --font-schibsted-grotesk / --font-spline-sans-mono variables are
|
|
9
|
+
* provided by each app's astro.config.mjs fonts entry (astro:assets <Font>).
|
|
10
|
+
*/
|
|
11
|
+
@theme {
|
|
12
|
+
--font-sans: var(--font-schibsted-grotesk), ui-sans-serif, system-ui,
|
|
13
|
+
sans-serif;
|
|
14
|
+
--font-mono: var(--font-spline-sans-mono), ui-monospace, monospace;
|
|
15
|
+
|
|
16
|
+
/* Brand = teal (accent) scale, built from the logo node #0E8FA6 */
|
|
17
|
+
--color-brand-50: #eff6f8;
|
|
18
|
+
--color-brand-100: #ddf3f6;
|
|
19
|
+
--color-brand-200: #b6e0e7;
|
|
20
|
+
--color-brand-300: #7cc6d2;
|
|
21
|
+
--color-brand-400: #3faabc;
|
|
22
|
+
--color-brand-500: #14b0c6; /* bright accent — dark surfaces */
|
|
23
|
+
--color-brand-600: #0e8fa6; /* the logo node — primary accent */
|
|
24
|
+
--color-brand-700: #0b6e80;
|
|
25
|
+
--color-brand-800: #0a5866;
|
|
26
|
+
--color-brand-900: #0a4854;
|
|
27
|
+
--color-brand-950: #06222e;
|
|
28
|
+
|
|
29
|
+
/* Ink = structural navy (nav, sidebar, headings, primary buttons) */
|
|
30
|
+
--color-ink-50: #f4f7fa;
|
|
31
|
+
--color-ink-100: #e7edf3;
|
|
32
|
+
--color-ink-200: #c4d2df;
|
|
33
|
+
--color-ink-300: #93a9bd;
|
|
34
|
+
--color-ink-400: #5f7b94;
|
|
35
|
+
--color-ink-500: #3d5a75;
|
|
36
|
+
--color-ink-600: #28425c;
|
|
37
|
+
--color-ink-700: #1a344c;
|
|
38
|
+
--color-ink-800: #142c42;
|
|
39
|
+
--color-ink-900: #0f2e4c; /* the logo ink */
|
|
40
|
+
--color-ink-950: #0a1f33;
|
|
41
|
+
|
|
42
|
+
/* Semantic */
|
|
43
|
+
--color-primary: var(--color-ink-900); /* primary buttons are INK, not teal */
|
|
44
|
+
--color-primary-hover: var(--color-ink-700);
|
|
45
|
+
--color-accent: var(--color-brand-600); /* links, data, highlights */
|
|
46
|
+
--color-accent-hover: var(--color-brand-700);
|
|
47
|
+
|
|
48
|
+
/* Neutrals: the theme standardizes on slate. gray-* utilities are aliased
|
|
49
|
+
to slate so existing markup renders correctly; prefer slate-* in new code. */
|
|
50
|
+
--color-gray-50: var(--color-slate-50);
|
|
51
|
+
--color-gray-100: var(--color-slate-100);
|
|
52
|
+
--color-gray-200: var(--color-slate-200);
|
|
53
|
+
--color-gray-300: var(--color-slate-300);
|
|
54
|
+
--color-gray-400: var(--color-slate-400);
|
|
55
|
+
--color-gray-500: var(--color-slate-500);
|
|
56
|
+
--color-gray-600: var(--color-slate-600);
|
|
57
|
+
--color-gray-700: var(--color-slate-700);
|
|
58
|
+
--color-gray-800: var(--color-slate-800);
|
|
59
|
+
--color-gray-900: var(--color-slate-900);
|
|
60
|
+
--color-gray-950: var(--color-slate-950);
|
|
61
|
+
}
|