Skip to content

Commit

Permalink
Merge branch 'main' into eslint9
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnrusschen committed Jan 21, 2025
2 parents cf62884 + 7080adf commit 0a998ca
Show file tree
Hide file tree
Showing 53 changed files with 3,488 additions and 4,344 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,5 @@ scripts/.DS_Store
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions
/.yarn/cache
1 change: 1 addition & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

"rules": {
"at-rule-no-unknown": null,
"at-rule-disallowed-list": ["import"],
"scss/at-rule-no-unknown": true,
"scss/dollar-variable-pattern": null,
"scss/at-import-partial-extension": null,
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2024 HackerOne Inc and individual contributors
Copyright (c) 2014-2025 HackerOne Inc and individual contributors

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
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ import "react-datepicker/dist/react-datepicker.css";

const Example = () => {
const [startDate, setStartDate] = useState(new Date());
return (
<DatePicker selected={startDate} onChange={(date) => setStartDate(date)} />
);
return <DatePicker selected={startDate} onChange={(date) => setStartDate(date)} />;
};
```

Expand Down Expand Up @@ -69,12 +67,7 @@ See [here](https://github.com/Hacker0x01/react-datepicker/blob/main/docs/datepic
You can also include a time picker by adding the showTimeSelect prop

```js
<DatePicker
selected={date}
onChange={handleDateChange}
showTimeSelect
dateFormat="Pp"
/>
<DatePicker selected={date} onChange={handleDateChange} showTimeSelect dateFormat="Pp" />
```

Times will be displayed at 30-minute intervals by default (default configurable via timeIntervals prop)
Expand Down Expand Up @@ -174,4 +167,4 @@ The examples are hosted within the docs folder and are ran in the simple app tha

## License

Copyright (c) 2014-2024 HackerOne Inc. and individual contributors. Licensed under MIT license, see [LICENSE](LICENSE) for the full license.
Copyright (c) 2014-2025 HackerOne Inc. and individual contributors. Licensed under MIT license, see [LICENSE](LICENSE) for the full license.
12 changes: 6 additions & 6 deletions docs-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"highlight.js": "^11.10.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-live": "^4.1.7"
"highlight.js": "^11.11.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-live": "^4.1.8"
},
"scripts": {
"start": "react-app-rewired start",
Expand All @@ -29,10 +29,10 @@
"raw-loader": "^4.0.2",
"react-app-rewired": "^2.2.1",
"react-scripts": "5.0.1",
"sass": "^1.80.2"
"sass": "^1.83.4"
},
"resolutions": {
"strip-ansi": "6.0.1"
},
"packageManager": "yarn@4.3.1"
"packageManager": "yarn@4.6.0"
}
8 changes: 5 additions & 3 deletions docs-site/src/components/Examples/examples.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@use "helpers";

.examples__navigation {
display: none;

@include breakpoint(640px) {
@include helpers.breakpoint(640px) {
width: 200px;
float: left;
display: block;
Expand Down Expand Up @@ -76,7 +78,7 @@
overflow-x: auto;
overflow-y: hidden;

@include breakpoint(768px) {
@include helpers.breakpoint(768px) {
width: 70%;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
Expand All @@ -98,7 +100,7 @@
}
&__preview {
padding: 20px;
@include breakpoint(768px) {
@include helpers.breakpoint(768px) {
width: 30%;
}
@media (max-width: 768px) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
@content;
}
}

%container-styling {
max-width: 1100px;
margin: 0 auto;
}
2 changes: 2 additions & 0 deletions docs-site/src/components/Examples/hero.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "helpers" as *;

.hero {
color: #fff;
background-color: #216ba5;
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/components/Examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ import "react-datepicker/dist/react-datepicker.css";

export default class exampleComponents extends React.Component {
componentDidMount() {
hljs.initHighlightingOnLoad();
hljs.registerLanguage("javascript", hljsJavaScriptLanguage);
hljs.highlightAll();
}

examples = [
Expand Down
17 changes: 6 additions & 11 deletions docs-site/src/components/Examples/style.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
@import "reset";
@import "higlight";
@import "breakpoint";
@import "hero";
@import "examples";

%container-styling {
max-width: 1100px;
margin: 0 auto;
}
@use "reset";
@use "highlight";
@use "helpers";
@use "examples";
@use "hero";

html,
body {
Expand Down Expand Up @@ -88,7 +83,7 @@ strong {
}

.row {
@include breakpoint(768px) {
@include helpers.breakpoint(768px) {
display: flex;
}
}
Expand Down
Loading

0 comments on commit 0a998ca

Please sign in to comment.