Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

track changes from origin fork #1

Open
wants to merge 91 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
52a1756
Bump lodash from 4.17.15 to 4.17.19 (#406)
dependabot[bot] Jul 17, 2020
af2ca0c
Improve wording
wojtekmaj Jul 23, 2020
9d71d1c
Update `sideEffects` property for webpack 4 (#402)
Noor0 Jul 24, 2020
9b9addb
Add funding to package.json
wojtekmaj Jul 26, 2020
b0ccd95
Add link to Travis CI
wojtekmaj Aug 4, 2020
f397593
Turn on jest env in test files only
wojtekmaj Aug 10, 2020
34500b2
Add links to React-Calendar Wiki
wojtekmaj Aug 27, 2020
3d6fea4
Bump yargs-parser from 18.1.1 to 18.1.3 (#427)
dependabot[bot] Sep 7, 2020
8c94777
Allow two-letter locales to be used in test
wojtekmaj Sep 10, 2020
a1de1bc
Upgrade Yarn to Yarn Berry (v2) (#430)
wojtekmaj Sep 11, 2020
f971e04
Replace Parcel with Webpack 5 (#432)
wojtekmaj Sep 11, 2020
b63e093
Fix build command not working on some operating systems
wojtekmaj Sep 11, 2020
996b7c4
Hide previous/next button when prevLabel/nextLabel is set to null (#436)
wojtekmaj Sep 16, 2020
8cf7b33
Add unit test for wrapper class name
wojtekmaj Oct 16, 2020
c4f48ae
Reorder propTypes in alphabetical order
wojtekmaj Oct 16, 2020
cb9c28b
Add support for inputRef prop
wojtekmaj Oct 16, 2020
312891c
v3.2.0
wojtekmaj Nov 5, 2020
503c334
Remove unnecessary Babel override
wojtekmaj Nov 5, 2020
6970a58
Remove arrow-parens rule override
wojtekmaj Nov 6, 2020
209d0ad
Replace eslint-config-airbnb with eslint-config-wojtekmaj
wojtekmaj Nov 6, 2020
25868d6
Replace Travis CI with GitHub Actions
wojtekmaj Nov 6, 2020
fe98281
Remove CodeClimate integration
wojtekmaj Nov 6, 2020
b71242c
Update eslint-config-wojtekmaj
wojtekmaj Nov 6, 2020
1efedb1
Remove unnecessary cross-env dependency
wojtekmaj Nov 6, 2020
f183e78
Change prepublishOnly hook to prepack
wojtekmaj Nov 18, 2020
96664fc
v3.2.1
wojtekmaj Nov 18, 2020
2744936
Remove lonely "instead" from README
wojtekmaj Nov 20, 2020
746e174
Remove unnecessary eslint-disable
wojtekmaj Nov 25, 2020
73340a0
Remove parcel-ts sample
wojtekmaj Nov 26, 2020
42e48f2
Update sample
wojtekmaj Nov 26, 2020
c45eaa7
Update test suite
wojtekmaj Nov 26, 2020
58c65b2
Update React to 17.0.0
wojtekmaj Nov 26, 2020
563688b
Use safer, more explicit definition of peerDependencies
wojtekmaj Nov 26, 2020
b6bbe1c
Enable remote debugging
wojtekmaj Nov 27, 2020
54f5d9a
Remove unnecessary eslint-disable
wojtekmaj Dec 4, 2020
4eff207
Remove unnecessary dependency
wojtekmaj Dec 10, 2020
4a510a8
Fix handling years < 1000 in Years and Months components
wojtekmaj Jan 3, 2021
6bf8ea9
Enable Navigation before year 1000
wojtekmaj Jan 3, 2021
5c13b17
Add default minDate and maxDate
wojtekmaj Jan 3, 2021
bd8e81d
Update year in LICENSE
wojtekmaj Jan 3, 2021
822f5b2
v3.3.0
wojtekmaj Jan 3, 2021
ee0b430
Update Jest to 26.6.0
wojtekmaj Jan 3, 2021
2083993
Update Yarn to 2.4.0
wojtekmaj Jan 3, 2021
31a12e5
Dedupe dependencies
wojtekmaj Jan 3, 2021
c81ce1d
Remove unnecessary eslint-disable
wojtekmaj Jan 6, 2021
92a90bf
Rename react-container to react-root
wojtekmaj Jan 11, 2021
2bc8097
Replace instanceof Array with Array.isArray
wojtekmaj Jan 20, 2021
41b1981
Rewrite test suite to React Hooks
wojtekmaj Jan 20, 2021
80cb50a
Remove unused file-loader
wojtekmaj Jan 24, 2021
be0e9cc
Set defaultMinDate to 0001-01-01 local time, not UTC time
wojtekmaj Jan 29, 2021
7a61215
Fix crash on IE 11 caused by passing date to Date constructor (#480)
wojtekmaj Jan 29, 2021
d7b9ba6
Reset min/max date to undefined, not null in test suite
wojtekmaj Jan 29, 2021
10802e9
v3.3.1
wojtekmaj Jan 29, 2021
651fda2
Update html-webpack-plugin to 5.1.0
wojtekmaj Feb 13, 2021
4f50942
Remove unnecessary script tags
wojtekmaj Feb 14, 2021
a32593e
Fix String/Number type in @param
wojtekmaj Feb 16, 2021
fe83e09
Use mergeClassNames to merge class names in MonthView
wojtekmaj Feb 18, 2021
cde2772
Dedupe dependencies
wojtekmaj Mar 17, 2021
d826fd5
Update Webpack to 5.20.0
wojtekmaj Mar 17, 2021
1d77019
Update less to 4.0.0
wojtekmaj Mar 17, 2021
328949b
Update less-loader to 8.0.0
wojtekmaj Mar 17, 2021
6b96450
Loose exact dependency resolutions
wojtekmaj Mar 17, 2021
066b7cf
Change link in README to HTTPS
wojtekmaj Mar 19, 2021
d4c145b
Remove confusing parentheses
wojtekmaj Mar 19, 2021
929d0b7
Add missing propType
wojtekmaj Mar 19, 2021
35069bc
Update @wojtekmaj/enzyme-adapter-react-17 to 0.6.0
wojtekmaj Mar 24, 2021
1349806
Update y18n from 4.0.0 to 4.0.1
wojtekmaj Apr 2, 2021
a77389f
Add formatDay prop, fix Day ignoring locale when formatting day numbers
wojtekmaj Apr 16, 2021
bd25943
Fix ESLint error
wojtekmaj Apr 16, 2021
4418758
v3.4.0
wojtekmaj Apr 16, 2021
0e82d27
Fix formatDay format example
wojtekmaj Apr 16, 2021
3a197bd
Fix security vulnerability in lodash dependency
wojtekmaj May 8, 2021
eb4e47f
Fix security vulnerability in hosted-git-info dependency
wojtekmaj May 8, 2021
a7c797e
Remove unnecessary devServer.host from Webpack config
wojtekmaj May 10, 2021
134bbf8
Fix security vulnerability in lodash dependency
wojtekmaj May 11, 2021
f41f4c4
Fix security vulnerability in ws dependency
wojtekmaj Jun 7, 2021
35c1a68
Remove inline styles from Navigation component
wojtekmaj Jun 25, 2021
93ce671
Move font-weight definition of weekNumbers
wojtekmaj Jun 25, 2021
2cb3956
Update ESLint to 7.19.0
wojtekmaj Jul 7, 2021
046ab18
Use Node 16 for CI, update actions/setup-node
wojtekmaj Jul 8, 2021
01532f8
Upgrade Yarn to v3
wojtekmaj Jul 27, 2021
679a2f6
Fix security vulnerability in tar dependency
wojtekmaj Aug 5, 2021
b2f9d9b
Update dependencies
wojtekmaj Aug 13, 2021
d74f03d
Add aria-label prop for navigation button (#538)
gabe-lingco Aug 19, 2021
1ab17f8
Add unit tests for navigationAriaLive
wojtekmaj Aug 19, 2021
9123142
Update webpack-dev-server to 4.0.0
wojtekmaj Aug 19, 2021
2a42c69
Update webpack-cli to 4.7.0
wojtekmaj Aug 19, 2021
c1b0ada
Update react-refresh and @pmmmwh/react-refresh-webpack-plugin
wojtekmaj Aug 19, 2021
4ab6b18
Update dependencies in sample directory
wojtekmaj Aug 23, 2021
53e2fbc
Fix security vulnerability in path-parse dependency
wojtekmaj Aug 24, 2021
c7c51bd
Fix security vulnerability in glob-parent dependency
wojtekmaj Aug 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"presets": [
["@babel/env", { "modules": false }],
"@babel/react"
],
"plugins": [
"@babel/proposal-class-properties"
]
}
}
Expand Down
16 changes: 0 additions & 16 deletions .codeclimate.yml

This file was deleted.

20 changes: 2 additions & 18 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
{
"extends": "airbnb",
"env": {
"browser": true,
"es6": true,
"jest": true
},
"extends": "wojtekmaj/react",
"parser": "babel-eslint",
"rules": {
"arrow-parens": ["error", "as-needed", {
"requireForBlockBody": true
}],
"jsx-a11y/label-has-associated-control": ["error", { "required": { "some": ["id", "nesting"] }}],
"no-restricted-globals": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-sort-props": ["error", {
"reservedFirst": ["key"]
}],
"react/require-default-props": "off",
"react/sort-prop-types": "error",
"react/state-in-constructor": ["error", "never"]
"no-restricted-globals": "off"
},
"overrides": [
{
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies and run tests
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: CI

on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: yarn --immutable

- name: Run tests
run: yarn test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
.cache
.idea
.vscode
**/.yarn/*
!**/.yarn/releases
!**/.yarn/plugins
dist
coverage
node_modules
Expand Down
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

631 changes: 631 additions & 0 deletions .yarn/releases/yarn-3.0.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.0.0.cjs
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017–2019 Wojciech Maj
Copyright (c) 2017–2021 Wojciech Maj

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![npm](https://img.shields.io/npm/v/react-calendar.svg)](https://www.npmjs.com/package/react-calendar) ![downloads](https://img.shields.io/npm/dt/react-calendar.svg) ![build](https://travis-ci.com/wojtekmaj/react-calendar.svg?branch=master) ![dependencies](https://img.shields.io/david/wojtekmaj/react-calendar.svg) ![dev dependencies](https://img.shields.io/david/dev/wojtekmaj/react-calendar.svg) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
[![npm](https://img.shields.io/npm/v/react-calendar.svg)](https://www.npmjs.com/package/react-calendar) ![downloads](https://img.shields.io/npm/dt/react-calendar.svg) [![CI](https://github.com/wojtekmaj/react-calendar/workflows/CI/badge.svg)](https://github.com/wojtekmaj/react-calendar/actions) ![dependencies](https://img.shields.io/david/wojtekmaj/react-calendar.svg) ![dev dependencies](https://img.shields.io/david/dev/wojtekmaj/react-calendar.svg) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)

# React-Calendar

Expand All @@ -20,7 +20,7 @@ Ultimate calendar for your React app.

## Demo

Minimal demo page is included in sample directory.
A minimal demo page can be found in `sample` directory.

[Online demo](http://projects.wojtekmaj.pl/react-calendar/) is also available!

Expand Down Expand Up @@ -68,7 +68,7 @@ function MyApp() {
}
```

Check the [sample directory](https://github.com/wojtekmaj/react-calendar/tree/master/sample) in this repository for a full working example. For more examples and more advanced use cases, check [Recipes](https://github.com/wojtekmaj/react-calendar/wiki/Recipes) in React-Calendar Wiki.
Check the [sample directory](https://github.com/wojtekmaj/react-calendar/tree/master/sample) in this repository for a full working example. For more examples and more advanced use cases, check [Recipes](https://github.com/wojtekmaj/react-calendar/wiki/Recipes) in [React-Calendar Wiki](https://github.com/wojtekmaj/react-calendar/wiki).

### Custom styling

Expand All @@ -78,8 +78,6 @@ If you want to use default React-Calendar styling to build upon it, you can impo
import 'react-calendar/dist/Calendar.css';
```

instead.

## User guide

### Calendar
Expand All @@ -97,17 +95,20 @@ Displays a complete, interactive calendar.
|defaultActiveStartDate|The beginning of a period that shall be displayed by default. If you wish to use React-Calendar in a controlled way, use `activeStartDate` instead.|(today)|`new Date(2017, 0, 1)`|
|defaultValue|Calendar value that shall be selected initially. Can be either one value or an array of two values. If you wish to use React-Calendar in a controlled way, use `value` instead.|n/a|<ul><li>Date: `new Date()`</li><li>An array of dates: `[new Date(2017, 0, 1), new Date(2017, 7, 1)]`|
|defaultView|Determines which calendar view shall be opened initially. Does not disable navigation. Can be `"month"`, `"year"`, `"decade"` or `"century"`. If you wish to use React-Calendar in a controlled way, use `view` instead.|The most detailed view allowed|`"year"`|
|formatLongDate|Function called to override default formatting of day tiles. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'dd MMM YYYY')`|
|formatDay|Function called to override default formatting of day tile labels. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'd')`|
|formatLongDate|Function called to override default formatting of day tile `abbr` labels. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'dd MMM YYYY')`|
|formatMonth|Function called to override default formatting of month names. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'MMM')`|
|formatMonthYear|Function called to override default formatting of months and years. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'MMMM YYYY')`|
|formatShortWeekday|Function called to override default formatting of weekday names. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'dd')`|
|formatYear|Function called to override default formatting of year in the top navigation section. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'YYYY')`|
|inputRef|A prop that behaves like [ref](https://reactjs.org/docs/refs-and-the-dom.html), but it's passed to main `<div>` rendered by `<Calendar>` component.|n/a|<ul><li>Function:<br />`(ref) => { this.myCalendar = ref; }`</li><li>Ref created using `React.createRef`:<br />`this.ref = React.createRef();`<br />…<br />`inputRef={this.ref}`</li><li>Ref created using `React.useRef`:<br />`const ref = React.useRef();`<br />…<br />`inputRef={ref}`</li></ul>|
|locale|Locale that should be used by the calendar. Can be any [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag).|User's browser settings|`"hu-HU"`|
|maxDate|Maximum date that the user can select. Periods partially overlapped by maxDate will also be selectable, although React-Calendar will ensure that no later date is selected.|n/a|Date: `new Date()`|
|maxDetail|The most detailed view that the user shall see. View defined here also becomes the one on which clicking an item will select a date and pass it to onChange. Can be `"month"`, `"year"`, `"decade"` or `"century"`.|`"month"`|`"year"`|
|minDate|Minimum date that the user can select. Periods partially overlapped by minDate will also be selectable, although React-Calendar will ensure that no earlier date is selected.|n/a|Date: `new Date()`|
|minDetail|The least detailed view that the user shall see. Can be `"month"`, `"year"`, `"decade"` or `"century"`.|`"century"`|`"decade"`|
|navigationAriaLabel|`aria-label` attribute of a label rendered on calendar navigation bar.|n/a|`"Go up"`|
|navigationAriaLive|`aria-live` attribute of a label rendered on calendar navigation bar.|`undefined`|`"polite"`|
|navigationLabel|Content of a label rendered on calendar navigation bar.|(default label)|``({ date, label, locale, view }) => `Current view: ${view}, date: ${date.toLocaleDateString(locale)}` ``|
|nextAriaLabel|`aria-label` attribute of the "next" button on the navigation pane.|n/a|`"Next"`|
|nextLabel|Content of the "next" button on the navigation pane. Setting the value explicitly to null will hide the icon.|`"›"`|<ul><li>String: `"›"`</li><li>React element: `<NextIcon />`</li></ul>|
Expand Down Expand Up @@ -157,6 +158,10 @@ Displays a given month, year, decade and a century, respectively.
|tileContent|Allows to render custom content within a given item (day on month view, month on year view and so on). Note: For tiles with custom content you might want to set fixed height of `react-calendar__tile` to ensure consistent layout.|n/a|`({ date, view }) => view === 'month' && date.getDay() === 0 ? <p>It's Sunday!</p> : null`|
|value|Calendar value. Can be either one value or an array of two values.|n/a|<ul><li>Date: `new Date()`</li><li>An array of dates: `[new Date(2017, 0, 1), new Date(2017, 7, 1)]`</li><li>String: `2017-01-01`</li><li>An array of strings: `['2017-01-01', '2017-08-01']`</li></ul>|

## Useful links

* [React-Calendar Wiki](https://github.com/wojtekmaj/react-calendar/wiki)

## License

The MIT License.
Expand All @@ -171,7 +176,7 @@ The MIT License.
<td>
Wojciech Maj<br />
<a href="mailto:[email protected]">[email protected]</a><br />
<a href="http://wojtekmaj.pl">http://wojtekmaj.pl</a>
<a href="https://wojtekmaj.pl">https://wojtekmaj.pl</a>
</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

Enzyme.configure({ adapter: new Adapter() });
43 changes: 22 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
{
"name": "react-calendar",
"version": "3.1.0",
"version": "3.4.0",
"description": "Ultimate calendar for your React app.",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
"source": "src/index.js",
"sideEffects": false,
"sideEffects": [
"*.css",
"*.less"
],
"scripts": {
"build": "yarn build-js-all && yarn copy-styles && yarn build-styles",
"build-js-all": "yarn build-js-esm && yarn build-js-umd",
"build-js-esm": "cross-env BABEL_ENV=production-esm babel src -d dist/esm --ignore **/*.spec.js,**/*.spec.jsx",
"build-js-umd": "cross-env BABEL_ENV=production-umd babel src -d dist/umd --ignore **/*.spec.js,**/*.spec.jsx",
"build-js-esm": "BABEL_ENV=production-esm babel src -d dist/esm --ignore \"**/*.spec.js,**/*.spec.jsx\"",
"build-js-umd": "BABEL_ENV=production-umd babel src -d dist/umd --ignore \"**/*.spec.js,**/*.spec.jsx\"",
"build-styles": "lessc ./dist/Calendar.less ./dist/Calendar.css",
"clean": "rimraf dist",
"copy-styles": "node ./copy-styles.js",
"jest": "jest",
"jest-coverage": "jest --coverage",
"lint": "eslint sample/ src/ test/ --ext .jsx,.js",
"prepublishOnly": "yarn clean && yarn build",
"prepack": "yarn clean && yarn build",
"test": "yarn lint && yarn jest"
},
"jest": {
Expand Down Expand Up @@ -84,26 +87,23 @@
"@babel/plugin-proposal-class-properties": "^7.8.0",
"@babel/preset-env": "^7.9.0",
"@babel/preset-react": "^7.9.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.0",
"babel-eslint": "^10.0.0",
"cross-env": "^7.0.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"eslint": "~7.2.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jsx-a11y": "^6.3.0",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.0",
"jest": "^26.0.0",
"less": "^3.8.1",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-test-renderer": "^16.7.0",
"eslint": "~7.19.0",
"eslint-config-wojtekmaj": "^0.5.0",
"jest": "^26.6.0",
"less": "^4.0.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"rimraf": "^3.0.0"
},
"peerDependencies": {
"react": ">=16.3",
"react-dom": ">=16.3"
"react": "^16.3.0 || ^17.0.0-0",
"react-dom": "^16.3.0 || ^17.0.0-0"
},
"resolutions": {
"[email protected]": "^7.0.0"
},
"files": [
"LICENSE",
Expand All @@ -114,5 +114,6 @@
"repository": {
"type": "git",
"url": "https://github.com/wojtekmaj/react-calendar.git"
}
},
"funding": "https://github.com/wojtekmaj/react-calendar?sponsor=1"
}
8 changes: 8 additions & 0 deletions sample/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", {
"modules": false
}],
"@babel/react"
]
}
1 change: 0 additions & 1 deletion sample/parcel/.gitignore → sample/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dist
node_modules
yarn.lock
25 changes: 25 additions & 0 deletions sample/Sample.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { useState } from 'react';
import Calendar from 'react-calendar';

import './Sample.less';

export default function Sample() {
const [value, onChange] = useState(new Date());

return (
<div className="Sample">
<header>
<h1>react-calendar sample page</h1>
</header>
<div className="Sample__container">
<main className="Sample__container__content">
<Calendar
onChange={onChange}
showWeekNumbers
value={value}
/>
</main>
</div>
</div>
);
}
File renamed without changes.
3 changes: 1 addition & 2 deletions sample/parcel-ts/index.html → sample/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<title>react-calendar sample page</title>
</head>
<body>
<div id="react-container"></div>
<script src="index.jsx"></script>
<div id="react-root"></div>
</body>
</html>
2 changes: 1 addition & 1 deletion sample/parcel/index.jsx → sample/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import React from 'react';
import { render } from 'react-dom';
import Sample from './Sample';

render(<Sample />, document.getElementById('react-container'));
render(<Sample />, document.getElementById('react-root'));
38 changes: 38 additions & 0 deletions sample/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "react-calendar-sample-page",
"version": "2.18.0",
"description": "A sample page for React-Calendar.",
"private": true,
"scripts": {
"build": "NODE_ENV=production webpack",
"start": "NODE_ENV=development webpack serve"
},
"author": {
"name": "Wojciech Maj",
"email": "[email protected]"
},
"license": "MIT",
"dependencies": {
"prop-types": "^15.6.2",
"react": "^17.0.0",
"react-calendar": "latest",
"react-dom": "^17.0.0"
},
"devDependencies": {
"@babel/core": "^7.12.0",
"@babel/preset-env": "^7.12.0",
"@babel/preset-react": "^7.12.0",
"babel-loader": "^8.0.0",
"css-loader": "^6.0.0",
"html-webpack-plugin": "^5.1.0",
"less": "^4.0.0",
"less-loader": "^10.0.0",
"style-loader": "^3.0.0",
"webpack": "^5.20.0",
"webpack-cli": "^4.7.0",
"webpack-dev-server": "^4.0.0"
},
"resolutions": {
"[email protected]": "^7.0.0"
}
}
3 changes: 0 additions & 3 deletions sample/parcel-ts/.gitignore

This file was deleted.

Loading