@mijn-ui/react-calendar 0.0.8 → 0.0.10
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/README.md +0 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +23 -31
- package/dist/metafile-esm.json +1 -1
- package/package.json +11 -10
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { UnstyledProps } from '@mijn-ui/react-core';
|
|
3
4
|
import { DayPicker } from 'react-day-picker';
|
|
4
5
|
|
|
5
|
-
type CalendarProps = React.ComponentProps<typeof DayPicker
|
|
6
|
-
declare const Calendar: ({ className, classNames, showOutsideDays, ...props }: CalendarProps) => react_jsx_runtime.JSX.Element;
|
|
6
|
+
type CalendarProps = React.ComponentProps<typeof DayPicker> & UnstyledProps;
|
|
7
|
+
declare const Calendar: ({ unstyled, className, classNames, showOutsideDays, ...props }: CalendarProps) => react_jsx_runtime.JSX.Element;
|
|
7
8
|
|
|
8
9
|
export { Calendar, type CalendarProps };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
// src/calendar.tsx
|
|
4
|
-
import {
|
|
5
|
-
import { cn } from "@mijn-ui/react-utilities/shared";
|
|
4
|
+
import { createTVUnstyledSlots } from "@mijn-ui/react-core";
|
|
6
5
|
import { DayFlag, DayPicker, SelectionState, UI } from "react-day-picker";
|
|
7
6
|
import {
|
|
8
7
|
ChevronDownIcon,
|
|
@@ -10,47 +9,40 @@ import {
|
|
|
10
9
|
ChevronRightIcon,
|
|
11
10
|
ChevronUpIcon
|
|
12
11
|
} from "@mijn-ui/shared-icons";
|
|
12
|
+
import { calendarStyles } from "@mijn-ui/react-theme";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
var Calendar = ({
|
|
15
|
+
unstyled,
|
|
15
16
|
className,
|
|
16
17
|
classNames,
|
|
17
18
|
showOutsideDays = true,
|
|
18
19
|
...props
|
|
19
20
|
}) => {
|
|
21
|
+
const styles = createTVUnstyledSlots(calendarStyles(), unstyled);
|
|
20
22
|
return /* @__PURE__ */ jsx(
|
|
21
23
|
DayPicker,
|
|
22
24
|
{
|
|
23
25
|
showOutsideDays,
|
|
24
|
-
className:
|
|
26
|
+
className: styles.base({ className }),
|
|
25
27
|
classNames: {
|
|
26
|
-
[UI.Months]:
|
|
27
|
-
[UI.Month]:
|
|
28
|
-
[UI.MonthCaption]:
|
|
29
|
-
[UI.
|
|
30
|
-
[UI.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
),
|
|
34
|
-
[UI.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
),
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
|
|
44
|
-
"size-9 p-0 font-normal aria-selected:opacity-100"
|
|
45
|
-
),
|
|
46
|
-
[UI.DayButton]: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
47
|
-
[SelectionState.range_end]: "day-range-end",
|
|
48
|
-
[SelectionState.selected]: "bg-primary text-primary-text hover:bg-primary hover:text-primary-text focus:bg-primary focus:text-primary-text",
|
|
49
|
-
[SelectionState.range_middle]: "aria-selected:bg-accent/75 aria-selected:text-accent-text",
|
|
50
|
-
[DayFlag.today]: "bg-accent text-accent-text",
|
|
51
|
-
[DayFlag.outside]: "day-outside text-muted-text opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-text aria-selected:opacity-30",
|
|
52
|
-
[DayFlag.disabled]: "text-muted-text opacity-50",
|
|
53
|
-
[DayFlag.hidden]: "invisible",
|
|
28
|
+
[UI.Months]: styles.months(),
|
|
29
|
+
[UI.Month]: styles.month(),
|
|
30
|
+
[UI.MonthCaption]: styles.month_caption(),
|
|
31
|
+
[UI.PreviousMonthButton]: styles.button_previous(),
|
|
32
|
+
[UI.NextMonthButton]: styles.button_next(),
|
|
33
|
+
[UI.MonthGrid]: styles.month_grid(),
|
|
34
|
+
[UI.Weekdays]: styles.weekdays(),
|
|
35
|
+
[UI.Weekday]: styles.weekday(),
|
|
36
|
+
[UI.Week]: styles.week(),
|
|
37
|
+
[UI.Day]: styles.day(),
|
|
38
|
+
[UI.DayButton]: styles.day_button(),
|
|
39
|
+
[SelectionState.range_end]: styles.range_end(),
|
|
40
|
+
[SelectionState.selected]: styles.selected(),
|
|
41
|
+
[SelectionState.range_middle]: styles.range_middle(),
|
|
42
|
+
[DayFlag.today]: styles.today(),
|
|
43
|
+
[DayFlag.outside]: styles.outside(),
|
|
44
|
+
[DayFlag.disabled]: styles.disabled(),
|
|
45
|
+
[DayFlag.hidden]: styles.hidden(),
|
|
54
46
|
...classNames
|
|
55
47
|
},
|
|
56
48
|
components: {
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/calendar.tsx":{"bytes":
|
|
1
|
+
{"inputs":{"src/calendar.tsx":{"bytes":2133,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@mijn-ui/react-core","kind":"import-statement","external":true},{"path":"react-day-picker","kind":"import-statement","external":true},{"path":"@mijn-ui/shared-icons","kind":"import-statement","external":true},{"path":"@mijn-ui/react-theme","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":27,"imports":[{"path":"src/calendar.tsx","kind":"import-statement","original":"./calendar"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"@mijn-ui/react-core","kind":"import-statement","external":true},{"path":"react-day-picker","kind":"import-statement","external":true},{"path":"@mijn-ui/shared-icons","kind":"import-statement","external":true},{"path":"@mijn-ui/react-theme","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"exports":["Calendar"],"entryPoint":"src/index.ts","inputs":{"src/calendar.tsx":{"bytesInOutput":2128},"src/index.ts":{"bytesInOutput":0}},"bytes":2171}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mijn-ui/react-calendar",
|
|
3
3
|
"author": "Htet Aung Lin<htetaunglin.coder@gmail.com>",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
5
|
"homepage": "https://mijn-ui.vercel.app",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -20,24 +20,25 @@
|
|
|
20
20
|
"exports": "./dist/index.js",
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"devDependencies": {
|
|
23
|
+
"react": "19.0.0",
|
|
24
|
+
"react-dom": "19.0.0",
|
|
23
25
|
"@next/eslint-plugin-next": "^15.0.3",
|
|
24
|
-
"@types/react": "^
|
|
25
|
-
"@types/react-dom": "^
|
|
26
|
+
"@types/react": "^19.0.0",
|
|
27
|
+
"@types/react-dom": "^19.0.0",
|
|
26
28
|
"eslint-config-custom": "0.0.1",
|
|
27
29
|
"tsconfig": "0.0.0",
|
|
28
30
|
"tsup-config": "0.0.0"
|
|
29
31
|
},
|
|
30
32
|
"dependencies": {
|
|
31
|
-
"react": "19.0.0-rc-b01722d5-20241114",
|
|
32
|
-
"react-dom": "19.0.0-rc-b01722d5-20241114",
|
|
33
33
|
"react-day-picker": "^9.3.0",
|
|
34
|
-
"@mijn-ui/react-
|
|
35
|
-
"@mijn-ui/
|
|
36
|
-
"@mijn-ui/
|
|
34
|
+
"@mijn-ui/react-core": "0.0.2",
|
|
35
|
+
"@mijn-ui/shared-icons": "0.0.3",
|
|
36
|
+
"@mijn-ui/react-utilities": "0.0.8"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "^19.0",
|
|
40
|
-
"react-dom": "^19.0"
|
|
40
|
+
"react-dom": "^19.0",
|
|
41
|
+
"@mijn-ui/react-theme": "0.0.7"
|
|
41
42
|
},
|
|
42
43
|
"publishConfig": {
|
|
43
44
|
"access": "public"
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"nextjs"
|
|
49
50
|
],
|
|
50
51
|
"scripts": {
|
|
51
|
-
"clean": "rimraf dist",
|
|
52
|
+
"clean": "rimraf dist .turbo",
|
|
52
53
|
"build": "tsup",
|
|
53
54
|
"lint": "eslint .",
|
|
54
55
|
"lint:fix": "eslint . --fix",
|