@molecule/app-mini-calendar-react 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +122 -0
  2. package/package.json +14 -8
package/README.md ADDED
@@ -0,0 +1,122 @@
1
+ <!--
2
+ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
+ Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
+ Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
+ To change this document, edit the module-level JSDoc in src/index.ts.
6
+ Generated: 2026-08-04T01:52:08.848Z
7
+ -->
8
+
9
+ # @molecule/app-mini-calendar-react
10
+
11
+ > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
12
+ > It is written to be read by coding agents as much as by people, and is generated from this
13
+ > package's source — edit `src/index.ts` JSDoc, not this file.
14
+
15
+ React mini month-view calendar.
16
+
17
+ Exports `<MiniCalendar>` — compact day picker with prev/next navigation,
18
+ Intl-localized weekday + month names, controlled-optional `selected` +
19
+ `month` props, and an `isDisabled` day predicate.
20
+
21
+ ## Quick Start
22
+
23
+ ```tsx
24
+ import { MiniCalendar } from '@molecule/app-mini-calendar-react'
25
+
26
+ ;<MiniCalendar
27
+ selected={new Date('2026-06-15')}
28
+ onSelect={(date) => console.log(date.toISOString())}
29
+ locale="en-US"
30
+ />
31
+ ```
32
+
33
+ ## Type
34
+
35
+ `feature`
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ npm install @molecule/app-mini-calendar-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
41
+ npm install -D @types/react
42
+ ```
43
+
44
+ ## API
45
+
46
+ ### Interfaces
47
+
48
+ #### `MiniCalendarProps`
49
+
50
+ Props for {@link MiniCalendar}.
51
+
52
+ ```typescript
53
+ interface MiniCalendarProps {
54
+ /** Controlled selected date (ISO yyyy-mm-dd or Date). */
55
+ selected?: Date | string
56
+ /** Called when the user picks a day. */
57
+ onSelect?: (date: Date) => void
58
+ /** Controlled visible month. If omitted the component tracks its own. */
59
+ month?: Date
60
+ /** Called when the user navigates months. */
61
+ onMonthChange?: (date: Date) => void
62
+ /** Locale for weekday + month name formatting. */
63
+ locale?: string
64
+ /** Optional day-disabled predicate. */
65
+ isDisabled?: (date: Date) => boolean
66
+ /** Extra classes. */
67
+ className?: string
68
+ }
69
+ ```
70
+
71
+ ### Functions
72
+
73
+ #### `MiniCalendar(props)`
74
+
75
+ Compact month-view calendar. Supports controlled `selected` + `month`
76
+ props or runs uncontrolled. Weekday / month names come from
77
+ `Intl.DateTimeFormat` so locales render correctly without extra data.
78
+
79
+ ```typescript
80
+ function MiniCalendar({
81
+ selected,
82
+ onSelect,
83
+ month: monthProp,
84
+ onMonthChange,
85
+ locale,
86
+ isDisabled,
87
+ className,
88
+ }: MiniCalendarProps): JSX.Element
89
+ ```
90
+
91
+ - `props` — Component props (see {@link MiniCalendarProps}).
92
+
93
+ ## Injection Notes
94
+
95
+ ### Requirements
96
+
97
+ Peer dependencies:
98
+
99
+ - `@molecule/app-react` ^1.0.1
100
+ - `@molecule/app-ui` ^1.0.1
101
+ - `@molecule/app-ui-react` ^1.0.1
102
+ - `react` ^18.0.0 || ^19.0.0
103
+
104
+ ### Runtime Dependencies
105
+
106
+ - `@molecule/app-react`
107
+ - `@molecule/app-ui`
108
+ - `@molecule/app-ui-react`
109
+ - `react`
110
+
111
+ Requires a wired ClassMap bond (`setClassMap(...)` at startup) —
112
+ `getClassMap()` throws before wiring, and the prev/next buttons come
113
+ from `@molecule/app-ui-react`.
114
+
115
+ Weekday and month names localize automatically through
116
+ `Intl.DateTimeFormat(locale)` — no locale bond involved. The prev/next
117
+ button aria-labels are currently English-only.
118
+
119
+ When `month` is supplied the visible month is fully controlled —
120
+ wire `onMonthChange` too or the arrows will appear dead. The grid
121
+ always renders 6 weeks; days outside the visible month render dimmed
122
+ and remain clickable unless `isDisabled` filters them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-mini-calendar-react",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Month-view calendar with day selection and prev/next navigation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,7 +17,8 @@
17
17
  }
18
18
  },
19
19
  "files": [
20
- "dist"
20
+ "dist",
21
+ "README.md"
21
22
  ],
22
23
  "keywords": [
23
24
  "molecule",
@@ -25,16 +26,21 @@
25
26
  "react"
26
27
  ],
27
28
  "license": "Apache-2.0",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/molecule-dev/molecule.git",
32
+ "directory": "packages/app/features/mini-calendar-react"
33
+ },
28
34
  "peerDependencies": {
29
- "@molecule/app-react": "^1.0.0",
30
- "@molecule/app-ui": "^1.0.0",
31
- "@molecule/app-ui-react": "^1.0.0",
35
+ "@molecule/app-react": "^1.0.1",
36
+ "@molecule/app-ui": "^1.0.1",
37
+ "@molecule/app-ui-react": "^1.0.1",
32
38
  "react": "^18.0.0 || ^19.0.0"
33
39
  },
34
40
  "devDependencies": {
35
- "@molecule/app-react": "1.0.0",
36
- "@molecule/app-ui": "1.0.0",
37
- "@molecule/app-ui-react": "1.0.0",
41
+ "@molecule/app-react": "1.0.1",
42
+ "@molecule/app-ui": "1.0.1",
43
+ "@molecule/app-ui-react": "1.0.1",
38
44
  "@types/node": "26.1.2",
39
45
  "@types/react": "19.2.17",
40
46
  "@types/react-dom": "19.2.3",