Skip to content

Commit 26b9a07

Browse files
committed
Merge branch 'main' into enhancement/docs-site-ts
2 parents a5b953d + 346221d commit 26b9a07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4448
-2127
lines changed

.github/workflows/claude.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 1
31+
32+
- name: Run Claude Code
33+
id: claude
34+
uses: anthropics/claude-code-action@beta
35+
with:
36+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
37+

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use yarn instead of npm for running commands

docs-site/eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export default [
4242
languageOptions: {
4343
globals: {
4444
useState: false,
45+
useMemo: false,
4546
render: false,
4647
DatePicker: false,
4748
getHours: false,

docs-site/package.json

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"highlight.js": "^11.11.1",
1111
"lodash": "^4.17.21",
1212
"prism-react-renderer": "^2.4.1",
13-
"react": "^19.1.0",
13+
"react": "^19.1.1",
1414
"react-datepicker": "portal:../",
15-
"react-dom": "^19.1.0",
15+
"react-dom": "^19.1.1",
1616
"react-live": "^4.1.8",
1717
"slugify": "^1.6.6"
1818
},
@@ -24,21 +24,19 @@
2424
"type-check": "tsc --noEmit"
2525
},
2626
"devDependencies": {
27-
"@eslint/js": "^9.25.0",
28-
"@types/lodash": "^4.17.11",
29-
"@types/react": "^19.1.2",
30-
"@types/react-dom": "^19.1.2",
31-
"@typescript-eslint/eslint-plugin": "^7.0.0",
32-
"@typescript-eslint/parser": "^7.0.0",
33-
"@vitejs/plugin-react": "^4.4.1",
34-
"eslint": "^9.25.0",
27+
"@eslint/js": "^9.34.0",
28+
"@types/lodash": "^4.17.0",
29+
"@types/react": "^19.1.12",
30+
"@types/react-dom": "^19.1.9",
31+
"@vitejs/plugin-react": "^5.0.1",
32+
"eslint": "^9.34.0",
3533
"eslint-plugin-react": "^7.37.5",
36-
"eslint-plugin-react-hooks": "^5.2.0",
37-
"eslint-plugin-react-refresh": "^0.4.19",
38-
"globals": "^16.0.0",
39-
"sass": "^1.86.3",
40-
"typescript": "^5.3.3",
41-
"vite": "^6.3.2"
34+
"eslint-plugin-react-hooks": "^6.0.0",
35+
"eslint-plugin-react-refresh": "^0.4.20",
36+
"globals": "^16.3.0",
37+
"sass": "^1.92.0",
38+
"typescript": "^5.7.2",
39+
"vite": "^7.1.3"
4240
},
43-
"packageManager": "yarn@4.6.0"
41+
"packageManager": "yarn@4.9.2"
4442
}

docs-site/src/components/Examples/examples.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@
197197
color: #f00;
198198
}
199199

200+
.react-datepicker__week.highlighted {
201+
background-color: #ddffdd;
202+
border-radius: 5px;
203+
}
204+
200205
.example-custom-input {
201206
cursor: pointer;
202207
padding: 5px 15px;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
() => {
2+
const [startDate, setStartDate] = useState(new Date());
3+
const [endDate, setEndDate] = useState(addDays(new Date(), 3));
4+
5+
const onChange = (dates) => {
6+
const [start, end] = dates;
7+
setStartDate(start);
8+
setEndDate(end);
9+
};
10+
11+
return (
12+
<DatePicker
13+
selected={startDate}
14+
onChange={onChange}
15+
startDate={startDate}
16+
endDate={endDate}
17+
selectsRange
18+
rangeSeparator=" to "
19+
/>
20+
);
21+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
() => {
2+
const [selectedDate, setSelectedDate] = useState(new Date());
3+
return (
4+
<DatePicker
5+
selected={selectedDate}
6+
onChange={(date) => setSelectedDate(date)}
7+
weekClassName={(date) =>
8+
getDate(date) % 2 === 0 ? "highlighted" : undefined
9+
}
10+
/>
11+
);
12+
};

docs-site/src/examples/ts/renderCustomHeaderTwoMonths.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const RenderCustomHeaderTwoMonths = () => {
2020
customHeaderCount === 1 ? { visibility: "hidden" } : undefined
2121
}
2222
onClick={decreaseMonth}
23+
style={{
24+
visibility: customHeaderCount === 0 ? "visible" : "hidden",
25+
}}
2326
>
2427
<span
2528
className={

docs-site/vite.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
import { defineConfig } from "vite";
22
import react from "@vitejs/plugin-react";
3+
import path from "path";
4+
import { fileURLToPath } from "url";
5+
6+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
37

48
export default defineConfig({
59
plugins: [react()],
10+
resolve: {
11+
alias: {
12+
// Ensure single React instance to avoid "Invalid hook call" errors
13+
react: path.resolve(__dirname, "node_modules/react"),
14+
"react-dom": path.resolve(__dirname, "node_modules/react-dom"),
15+
},
16+
},
617
});

0 commit comments

Comments
 (0)