@yuzu-jobs/ui-components 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -33,8 +33,3 @@ All commands are run from the root of the project, from a terminal:
33
33
  | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34
34
  | `npm link` | Registers this package locally. Run `npm link my-component-library` in an Astro project to install your components |
35
35
  | `npm publish` | [Publishes](https://docs.npmjs.com/creating-and-publishing-unscoped-public-packages#publishing-unscoped-public-packages) this package to NPM. Requires you to be [logged in](https://docs.npmjs.com/cli/v8/commands/npm-adduser) |
36
-
37
- ## Publishing
38
-
39
- - `npm login`
40
- - `npm run release patch` (or `minor` or `major` depending on the type of release)
package/index.ts CHANGED
@@ -5,5 +5,7 @@ import InputText from "./src/InputText.astro";
5
5
  import InputContainer from "./src/InputContainer.astro";
6
6
  import InputLabel from "./src/InputLabel.astro";
7
7
  import Alert from "./src/Alert.astro";
8
+ import ProgressBar from "./src/ProgressBar.astro";
9
+ import Button from "./src/Button.astro";
8
10
 
9
- export { InputText, InputContainer, InputLabel, Alert };
11
+ export { Button, InputText, InputContainer, InputLabel, Alert, ProgressBar };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=22.12.0"
5
5
  },
6
- "version": "0.0.1",
6
+ "version": "0.0.2",
7
7
  "type": "module",
8
8
  "exports": {
9
9
  ".": "./index.ts"
@@ -16,9 +16,9 @@
16
16
  "astro-component"
17
17
  ],
18
18
  "scripts": {
19
- "release:patch": "npm version patch --no-git-tag-version && npm publish --access public",
20
- "release:minor": "npm version minor --no-git-tag-version && npm publish --access public",
21
- "release:major": "npm version major --no-git-tag-version && npm publish --access public"
19
+ "release:patch": "npm version patch && npm publish --access public",
20
+ "release:minor": "npm version minor && npm publish --access public",
21
+ "release:major": "npm version major && npm publish --access public"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@lucide/astro": "^1.6.0",
@@ -0,0 +1,83 @@
1
+ ---
2
+ interface Props {
3
+ id?: string;
4
+ href?: string;
5
+ type?: "button" | "submit" | "reset";
6
+ variant?: "primary" | "secondary" | "outline" | "ghost" | "danger";
7
+ size?: "sm" | "md" | "lg";
8
+ disabled?: boolean;
9
+ fullWidth?: boolean;
10
+ class?: string;
11
+ name?: string;
12
+ value?: string;
13
+ [key: string]: unknown;
14
+ }
15
+
16
+ const {
17
+ id,
18
+ href,
19
+ type = "button",
20
+ variant = "primary",
21
+ size = "md",
22
+ disabled = false,
23
+ fullWidth = false,
24
+ class: className,
25
+ name,
26
+ value,
27
+ ...rest
28
+ } = Astro.props;
29
+
30
+ const variantClasses = {
31
+ // Filled — solid background, white text. Use for primary CTAs on any background.
32
+ primary:
33
+ "bg-indigo-600 hover:bg-indigo-700 text-white border border-transparent",
34
+ // Danger — filled red, white text. Use for destructive actions.
35
+ danger: "bg-red-600 hover:bg-red-700 text-white border border-transparent",
36
+ // Outline — dark border and text on transparent background. Use for secondary actions on light backgrounds.
37
+ secondary:
38
+ "text-gray-700 border border-gray-300 hover:bg-gray-100 hover:border-gray-400 hover:text-gray-900",
39
+ // Alias for secondary
40
+ outline:
41
+ "text-gray-700 border border-gray-300 hover:bg-gray-100 hover:border-gray-400 hover:text-gray-900",
42
+ // Ghost — subtle indigo outline on transparent background. Use for actions on dark/indigo backgrounds.
43
+ ghost:
44
+ "text-indigo-200 border border-indigo-500/50 hover:bg-indigo-500/20 hover:text-white hover:border-indigo-400",
45
+ };
46
+
47
+ const sizeClasses = {
48
+ sm: "px-3 py-1 text-sm",
49
+ md: "px-4 py-1.5 text-sm",
50
+ lg: "px-6 py-2.5 text-base font-medium",
51
+ };
52
+
53
+ const classes = [
54
+ "inline-flex items-center gap-1.5 rounded-lg font-sans font-medium cursor-pointer transition-colors",
55
+ "disabled:opacity-40 disabled:cursor-not-allowed",
56
+ variantClasses[variant],
57
+ sizeClasses[size],
58
+ fullWidth ? "w-full justify-center" : "",
59
+ className,
60
+ ]
61
+ .filter(Boolean)
62
+ .join(" ");
63
+ ---
64
+
65
+ {
66
+ href ? (
67
+ <a id={id} href={href} class={classes} {...rest}>
68
+ <slot />
69
+ </a>
70
+ ) : (
71
+ <button
72
+ id={id}
73
+ type={type}
74
+ class={classes}
75
+ disabled={disabled}
76
+ name={name}
77
+ value={value}
78
+ {...rest}
79
+ >
80
+ <slot />
81
+ </button>
82
+ )
83
+ }
@@ -0,0 +1,37 @@
1
+ ---
2
+ import ProgressBar from "./ProgressBar.astro";
3
+
4
+ interface Props {
5
+ step: number;
6
+ totalSteps: number;
7
+ title: string;
8
+ userRole: "recruiter" | "candidate";
9
+ }
10
+
11
+ const { step, totalSteps, title, userRole } = Astro.props;
12
+ ---
13
+
14
+ <div class="bg-indigo-900 border-b border-indigo-800/60">
15
+ <div class="container mx-auto max-w-3xl px-8 py-6">
16
+ <div class="flex items-center gap-3 mb-4">
17
+ <span class="text-indigo-400 text-sm font-sans">Account setup</span>
18
+ <span class="text-indigo-700">/</span>
19
+ <span class="text-indigo-200 text-sm font-sans"
20
+ >{userRole == "recruiter" ? "Recruiter" : "Candidate"} profile</span
21
+ >
22
+ </div>
23
+
24
+ <div class="mb-5">
25
+ <p
26
+ class="text-indigo-400 text-xs font-sans uppercase tracking-widest font-semibold mb-1"
27
+ >
28
+ Step {step} of {totalSteps}
29
+ </p>
30
+ <h1 class="text-white text-2xl font-sans font-semibold tracking-wide">
31
+ {title}
32
+ </h1>
33
+ </div>
34
+
35
+ <ProgressBar currentStep={step} totalSteps={totalSteps} />
36
+ </div>
37
+ </div>
@@ -0,0 +1,19 @@
1
+ ---
2
+ interface Props {
3
+ totalSteps: number;
4
+ currentStep: number;
5
+ class?: string;
6
+ }
7
+
8
+ const { totalSteps, currentStep, class: className } = Astro.props;
9
+ ---
10
+
11
+ <div class:list={[className]}>
12
+ <div class="w-full bg-gray-200 rounded-full h-2">
13
+ <div
14
+ class="bg-primary h-2 rounded-full"
15
+ style={`width: ${Math.max(8, ((currentStep - 1) / totalSteps) * 100)}%`}
16
+ >
17
+ </div>
18
+ </div>
19
+ </div>