calendar-components 0.0.0 → 0.7.3

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.
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import {
3
+ TimeGridAllDayDataAttributes_exports,
4
+ TimeGridAllDayEventDataAttributes_exports,
5
+ TimeGridColumnDataAttributes_exports,
6
+ TimeGridDayHeaderDataAttributes_exports,
7
+ TimeGridEventDataAttributes_exports,
8
+ TimeGridEventResizeHandleDataAttributes_exports,
9
+ TimeGridHourDataAttributes_exports,
10
+ TimeGridHoursDataAttributes_exports,
11
+ TimeGridLineDataAttributes_exports,
12
+ TimeGridNowDataAttributes_exports,
13
+ TimeGridRootCssVars_exports,
14
+ TimeGridRootDataAttributes_exports,
15
+ index_parts_exports,
16
+ useEventPlacement,
17
+ useTimeGrid,
18
+ useTimeGridColumnContext,
19
+ useTimeGridEvent
20
+ } from "../chunk-X6ZOEKT4.js";
21
+ import "../chunk-E6WBQCX3.js";
22
+ export {
23
+ index_parts_exports as TimeGrid,
24
+ TimeGridAllDayDataAttributes_exports as TimeGridAllDayDataAttributes,
25
+ TimeGridAllDayEventDataAttributes_exports as TimeGridAllDayEventDataAttributes,
26
+ TimeGridColumnDataAttributes_exports as TimeGridColumnDataAttributes,
27
+ TimeGridDayHeaderDataAttributes_exports as TimeGridDayHeaderDataAttributes,
28
+ TimeGridEventDataAttributes_exports as TimeGridEventDataAttributes,
29
+ TimeGridEventResizeHandleDataAttributes_exports as TimeGridEventResizeHandleDataAttributes,
30
+ TimeGridHourDataAttributes_exports as TimeGridHourDataAttributes,
31
+ TimeGridHoursDataAttributes_exports as TimeGridHoursDataAttributes,
32
+ TimeGridLineDataAttributes_exports as TimeGridLineDataAttributes,
33
+ TimeGridNowDataAttributes_exports as TimeGridNowDataAttributes,
34
+ TimeGridRootCssVars_exports as TimeGridRootCssVariables,
35
+ TimeGridRootDataAttributes_exports as TimeGridRootDataAttributes,
36
+ useEventPlacement,
37
+ useTimeGrid,
38
+ useTimeGridColumnContext as useTimeGridColumn,
39
+ useTimeGridEvent
40
+ };
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+
3
+ type CalendarComponentsEvent<E = React.SyntheticEvent> = E & {
4
+ preventCalendarComponentsHandler(): void;
5
+ };
6
+ type CalendarComponentsHandlers<P> = {
7
+ [K in keyof P]: K extends `on${string}` ? (NonNullable<P[K]> extends (event: infer E) => void ? ((event: CalendarComponentsEvent<E>) => void) | undefined : P[K]) : P[K];
8
+ };
9
+ type ElementProps<E extends Element = HTMLElement> = React.HTMLAttributes<E> & {
10
+ ref?: React.Ref<E>;
11
+ };
12
+ type RenderProp<S, E extends Element = HTMLElement> = React.ReactElement<Record<string, unknown>> | ((props: ElementProps<E>, state: S) => React.ReactElement);
13
+ interface CalendarComponentsPartProps<S, E extends Element = HTMLElement> {
14
+ className?: string | ((state: S) => string | undefined);
15
+ style?: React.CSSProperties | ((state: S) => React.CSSProperties | undefined);
16
+ render?: RenderProp<S, E>;
17
+ }
18
+ type Children<S> = {
19
+ children?: React.ReactNode | ((state: S) => React.ReactNode);
20
+ };
21
+ type CalendarComponentsPartElementProps<S, E extends Element = HTMLDivElement, Omitted extends string = never> = CalendarComponentsHandlers<Omit<React.HTMLAttributes<E>, "className" | "style" | "children" | Omitted>> & CalendarComponentsPartProps<S, E> & Children<S>;
22
+ interface CalendarComponentsInteractionState {
23
+ hovered: boolean;
24
+ focused: boolean;
25
+ focusVisible: boolean;
26
+ pressed: boolean;
27
+ disabled: boolean;
28
+ }
29
+
30
+ export type { CalendarComponentsEvent as C, CalendarComponentsHandlers as a, CalendarComponentsInteractionState as b, CalendarComponentsPartElementProps as c, CalendarComponentsPartProps as d };
package/package.json CHANGED
@@ -1,8 +1,99 @@
1
1
  {
2
2
  "name": "calendar-components",
3
- "version": "0.0.0",
4
- "description": "Unstyled, composable calendar views for React. Not released yet.",
3
+ "version": "0.7.3",
4
+ "description": "Unstyled, composable calendar views for React: a day or week by the hour, a month of days, and a schedule as a list.",
5
+ "keywords": [
6
+ "react",
7
+ "calendar",
8
+ "time-grid",
9
+ "week-view",
10
+ "day-view",
11
+ "headless",
12
+ "unstyled",
13
+ "shadcn",
14
+ "schedule"
15
+ ],
5
16
  "license": "MIT",
6
17
  "author": "Brian Hung",
7
- "files": ["README.md"]
18
+ "type": "module",
19
+ "engines": {
20
+ "node": ">=20"
21
+ },
22
+ "sideEffects": [
23
+ "**/*.css"
24
+ ],
25
+ "files": [
26
+ "dist",
27
+ "src/styles"
28
+ ],
29
+ "exports": {
30
+ ".": {
31
+ "calendar-components-source": "./src/index.ts",
32
+ "types": "./dist/index.d.ts",
33
+ "default": "./dist/index.js"
34
+ },
35
+ "./time-grid": {
36
+ "calendar-components-source": "./src/time-grid/index.ts",
37
+ "types": "./dist/time-grid/index.d.ts",
38
+ "default": "./dist/time-grid/index.js"
39
+ },
40
+ "./base.css": "./src/styles/base.css",
41
+ "./apple.css": "./src/styles/apple.css",
42
+ "./google.css": "./src/styles/google.css",
43
+ "./date-grid": {
44
+ "calendar-components-source": "./src/date-grid/index.ts",
45
+ "types": "./dist/date-grid/index.d.ts",
46
+ "default": "./dist/date-grid/index.js"
47
+ },
48
+ "./agenda": {
49
+ "calendar-components-source": "./src/agenda/index.ts",
50
+ "types": "./dist/agenda/index.d.ts",
51
+ "default": "./dist/agenda/index.js"
52
+ },
53
+ "./package.json": "./package.json"
54
+ },
55
+ "scripts": {
56
+ "build": "tsup",
57
+ "test": "vitest run",
58
+ "typecheck": "tsc -p tsconfig.json",
59
+ "prepack": "cp ../../LICENSE . && cp ../../README.md ."
60
+ },
61
+ "peerDependencies": {
62
+ "react": "^18.2.0 || ^19.0.0",
63
+ "react-dom": "^18.2.0 || ^19.0.0"
64
+ },
65
+ "dependencies": {
66
+ "calendar-components-core": "0.7.3",
67
+ "@internationalized/date": "^3.12.4",
68
+ "@react-aria/live-announcer": "^3.5.1",
69
+ "@react-types/shared": "^3.37.0",
70
+ "react-aria": "^3.53.1",
71
+ "react-aria-components": "^1.22.1",
72
+ "react-stately": "^3.51.0",
73
+ "use-sync-external-store": "^1.7.0"
74
+ },
75
+ "devDependencies": {
76
+ "@guidepup/virtual-screen-reader": "^0.33.0",
77
+ "@testing-library/react": "^16.3.0",
78
+ "@testing-library/user-event": "^14.6.1",
79
+ "@types/react": "^19.1.0",
80
+ "@types/react-dom": "^19.1.0",
81
+ "@types/use-sync-external-store": "^1.5.0",
82
+ "jsdom": "^26.1.0",
83
+ "react": "^19.1.0",
84
+ "react-dom": "^19.1.0",
85
+ "tsup": "^8.5.0",
86
+ "typescript": "^5.9.3",
87
+ "vitest": "^3.2.4"
88
+ },
89
+ "repository": {
90
+ "type": "git",
91
+ "url": "git+https://github.com/BrianHung/calendar-components.git",
92
+ "directory": "packages/react"
93
+ },
94
+ "publishConfig": {
95
+ "access": "public",
96
+ "registry": "https://registry.npmjs.org"
97
+ },
98
+ "homepage": "https://calendar.brianhung.me"
8
99
  }