project-portfolio 1.0.2 → 1.0.4

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/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "project-portfolio",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Self-contained project portfolio component for Next.js App Router. Drop in one component, pass a clientSlug and apiBase, done.",
5
- "keywords": ["nextjs", "react", "portfolio", "projects"],
5
+ "keywords": [
6
+ "nextjs",
7
+ "react",
8
+ "portfolio",
9
+ "projects"
10
+ ],
6
11
  "license": "MIT",
7
12
  "type": "module",
8
13
  "main": "./dist/index.js",
@@ -14,7 +19,9 @@
14
19
  "types": "./dist/index.d.ts"
15
20
  }
16
21
  },
17
- "files": ["dist"],
22
+ "files": [
23
+ "dist"
24
+ ],
18
25
  "scripts": {
19
26
  "build": "tsc",
20
27
  "prepublishOnly": "npm run build"
@@ -25,8 +32,10 @@
25
32
  "react-dom": ">=18.0.0"
26
33
  },
27
34
  "devDependencies": {
28
- "@types/react": "^18.0.0",
29
- "@types/react-dom": "^18.0.0",
35
+ "@types/react": "^18.3.28",
36
+ "@types/react-dom": "^18.3.7",
37
+ "react": "^19.2.4",
38
+ "react-dom": "^19.2.4",
30
39
  "typescript": "^5.0.0"
31
40
  }
32
41
  }
@@ -1,11 +0,0 @@
1
- import type { CustomFieldSchema } from "./types";
2
- interface ProjectFiltersProps {
3
- fields: CustomFieldSchema[];
4
- filters: Record<string, string>;
5
- onFilterChange: (key: string, value: string) => void;
6
- onClearFilters: () => void;
7
- hasActiveFilters: boolean;
8
- }
9
- export declare function ProjectFilters({ fields, filters, onFilterChange, onClearFilters, hasActiveFilters, }: ProjectFiltersProps): import("react/jsx-runtime").JSX.Element;
10
- export {};
11
- //# sourceMappingURL=ProjectFilters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProjectFilters.d.ts","sourceRoot":"","sources":["../src/ProjectFilters.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD,UAAU,mBAAmB;IAC3B,MAAM,EAAE,iBAAiB,EAAE,CAAA;IAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACpD,cAAc,EAAE,MAAM,IAAI,CAAA;IAC1B,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,cAAc,EACd,cAAc,EACd,gBAAgB,GACjB,EAAE,mBAAmB,2CA8FrB"}
@@ -1,49 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function ProjectFilters({ fields, filters, onFilterChange, onClearFilters, hasActiveFilters, }) {
3
- const deduped = fields.filter((f, i, arr) => arr.findIndex((x) => x.key === f.key) === i);
4
- return (_jsxs("div", { style: {
5
- marginBottom: "2rem",
6
- paddingBottom: "2rem",
7
- borderBottom: "1px solid #e4e4e7",
8
- display: "flex",
9
- flexWrap: "wrap",
10
- alignItems: "flex-end",
11
- gap: "1rem",
12
- }, children: [deduped.map((field, fieldIndex) => {
13
- if (field.type === "select" || field.type === "multi-select") {
14
- return (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: [_jsx("label", { style: { fontSize: "13px", fontWeight: 500, color: "#71717a" }, children: field.name }), _jsxs("select", { value: filters[field.key] || "all", onChange: (e) => onFilterChange(field.key, e.target.value === "all" ? "" : e.target.value), style: {
15
- width: "180px",
16
- padding: "8px 12px",
17
- border: "1px solid #e4e4e7",
18
- borderRadius: "6px",
19
- fontSize: "14px",
20
- backgroundColor: "#fff",
21
- color: "#18181b",
22
- outline: "none",
23
- cursor: "pointer",
24
- }, children: [_jsxs("option", { value: "all", children: ["All ", field.name] }), [...new Set(field.options)].map((option, i) => (_jsx("option", { value: option, children: option }, `${field.key}-opt-${i}`)))] })] }, `filter-${fieldIndex}-${field.key}`));
25
- }
26
- if (field.type === "text" || field.type === "location") {
27
- return (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: [_jsx("label", { style: { fontSize: "13px", fontWeight: 500, color: "#71717a" }, children: field.name }), _jsx("input", { type: "text", placeholder: `Search ${field.name.toLowerCase()}...`, value: filters[field.key] || "", onChange: (e) => onFilterChange(field.key, e.target.value), style: {
28
- width: "180px",
29
- padding: "8px 12px",
30
- border: "1px solid #e4e4e7",
31
- borderRadius: "6px",
32
- fontSize: "14px",
33
- color: "#18181b",
34
- outline: "none",
35
- } })] }, `filter-${fieldIndex}-${field.key}`));
36
- }
37
- return null;
38
- }), hasActiveFilters && (_jsx("button", { onClick: onClearFilters, style: {
39
- display: "flex",
40
- alignItems: "center",
41
- gap: "4px",
42
- padding: "8px 12px",
43
- background: "none",
44
- border: "none",
45
- fontSize: "14px",
46
- color: "#71717a",
47
- cursor: "pointer",
48
- }, children: "\u00D7 Clear filters" }))] }));
49
- }