Skip to content

Commit 6b72dd9

Browse files
committed
feat(datetime): setup initial datetime package
1 parent e10314d commit 6b72dd9

23 files changed

+712
-8
lines changed

apps/docs/_everything.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
@forward "overrides";
22
@forward "@react-md/code" as code-*;
3+
@forward "@react-md/datetime" as datetime-*;
34

45
@use "@react-md/core";
56
@use "@react-md/code";
7+
@use "@react-md/datetime";
68

79
@mixin light-theme($core) {
810
@if $core {
911
@include core.use-light-theme;
1012
}
1113
@include code.use-light-theme;
14+
@include datetime.use-light-theme;
1215

1316
// Maybe add this one into core? Useful when you want a "transparent"
1417
// background on any surface that actually has a background color so it can
@@ -33,6 +36,7 @@
3336
@include core.use-dark-theme;
3437
}
3538
@include code.use-dark-theme;
39+
@include datetime.use-dark-theme;
3640

3741
--background-color: #{core.$dark-theme-background-color};
3842
--logo-shadow: #{core.$white};

apps/docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"@next/third-parties": "^14.2.15",
5151
"@react-md/code": "workspace:*",
5252
"@react-md/core": "workspace:*",
53+
"@react-md/datetime": "workspace:*",
5354
"@react-md/material-icons": "workspace:*",
5455
"algoliasearch": "^5.34.1",
5556
"cnbuilder": "^3.1.0",

apps/docs/src/app/(main)/layout.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@include everything.styles;
44
@include everything.code-styles;
5+
@include everything.datetime-styles;
56

67
// See the next.config.mjs to see how the `$env` gets defined
78
$is_production: $env == production;
@@ -11,6 +12,7 @@ $is_production: $env == production;
1112
@if everything.$disable-default-root-theme {
1213
@include everything.variables;
1314
@include everything.code-variables;
15+
@include everything.datetime-variables;
1416

1517
@if everything.$color-scheme ==
1618
system and

apps/playground/_everything.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
@forward "overrides";
22
@forward "@react-md/code" as code-*;
3+
@forward "@react-md/datetime" as datetime-*;
34

45
@use "@react-md/core";
56
@use "@react-md/code";
7+
@use "@react-md/datetime";
68

79
@mixin light-theme {
810
@include core.use-light-theme;
911
@include code.use-light-theme;
12+
@include datetime.use-light-theme;
1013
}
1114

1215
@mixin dark-theme {
1316
@include core.use-dark-theme;
1417
@include code.use-dark-theme;
18+
@include datetime.use-dark-theme;
1519
}

apps/playground/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"dependencies": {
2020
"@react-md/code": "workspace:*",
2121
"@react-md/core": "workspace:*",
22+
"@react-md/datetime": "workspace:*",
2223
"@react-md/material-icons": "workspace:*",
2324
"cnbuilder": "^3.1.0",
2425
"js-cookie": "^3.0.5",

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"docs-dev": "pnpm --filter docs dev",
2121
"docs-generator-dev": "pnpm --filter docs-generator dev",
2222
"sassdoc-dev": "pnpm --filter sassdoc-generator dev",
23+
"datetime-dev": "pnpm --filter datetime dev",
2324
"dev": "pnpm turbo-s dev --no-cache --continue",
2425
"lint": "pnpm run turbo-s run lint",
2526
"clean": "pnpm run turbo-s clean && pnpm clean-root",
@@ -31,6 +32,8 @@
3132
"test-core-watch": "pnpm --filter core test --watch",
3233
"test-core-coverage": "pnpm --filter core test --coverage",
3334
"test-core-coverage-watch": "pnpm --filter core test --coverage --watch",
35+
"test-datetime": "pnpm --filter datetime test",
36+
"test-datetime-watch": "pnpm --filter datetime test --watch",
3437
"core-export-map": "pnpm --filter core export-map",
3538
"core-index-file": "pnpm --filter core create-index-file",
3639
"typecheck": "pnpm run turbo-s typecheck",

packages/datetime/.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# I only want the src, dist, README.md, CHANGELOG.md, LICENSE and, package.json to be published
2+
/*
3+
!/src/**
4+
src/**/*.scss
5+
!/dist/**
6+
**/__tests__/**

packages/datetime/.stylelintrc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": ["stylelint-config-recommended-scss"],
3+
"plugins": ["stylelint-order", "stylelint-scss"],
4+
"rules": {
5+
"no-descending-specificity": null,
6+
"selector-pseudo-class-no-unknown": [
7+
true,
8+
{ "ignorePseudoClasses": ["global", "local"] }
9+
],
10+
"order/properties-alphabetical-order": true,
11+
"scss/comment-no-empty": null,
12+
"scss/operator-no-newline-before": null,
13+
"scss/operator-no-newline-after": null
14+
}
15+
}

packages/datetime/.swcrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://json.schemastore.org/swcrc.json",
3+
"exclude": ["__tests__"],
4+
"jsc": {
5+
"parser": {
6+
"syntax": "typescript",
7+
"tsx": true
8+
},
9+
"transform": {
10+
"react": {
11+
"runtime": "automatic"
12+
}
13+
},
14+
"target": "es2021"
15+
},
16+
"sourceMaps": true
17+
}

packages/datetime/LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Mikkel Laursen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

0 commit comments

Comments
 (0)