@molecule/app-mini-calendar-react 4.0.1 → 4.1.0

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 CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-21T12:46:46.590Z
6
+ Generated: 2026-11-25T00:25:46.840Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-mini-calendar-react
@@ -104,7 +104,7 @@ Peer dependencies:
104
104
 
105
105
  - `@molecule/app-react` ^4.0.0
106
106
  - `@molecule/app-ui` ^1.0.1
107
- - `@molecule/app-ui-react` ^4.0.0
107
+ - `@molecule/app-ui-react` ^4.4.0
108
108
  - `react` ^18.0.0 || ^19.0.0
109
109
 
110
110
  ### Runtime Dependencies
@@ -1 +1 @@
1
- {"version":3,"file":"MiniCalendar.d.ts","sourceRoot":"","sources":["../src/MiniCalendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,OAAO,CAAA;AAM1C,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IACxB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAC/B,yEAAyE;IACzE,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,6CAA6C;IAC7C,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IACpC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,uCAAuC;IACvC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAA;IACpC,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAkCD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,EACR,KAAK,EAAE,SAAS,EAChB,aAAa,EACb,MAAM,EACN,UAAU,EACV,SAAS,GACV,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAoGjC"}
1
+ {"version":3,"file":"MiniCalendar.d.ts","sourceRoot":"","sources":["../src/MiniCalendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,OAAO,CAAA;AAO1C,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IACxB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAC/B,yEAAyE;IACzE,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,6CAA6C;IAC7C,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IACpC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,uCAAuC;IACvC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAA;IACpC,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAkCD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,EACR,KAAK,EAAE,SAAS,EAChB,aAAa,EACb,MAAM,EACN,UAAU,EACV,SAAS,GACV,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAsGjC"}
@@ -3,6 +3,7 @@ import { useState } from 'react';
3
3
  import { useLocale, useTranslation } from '@molecule/app-react';
4
4
  import { getClassMap } from '@molecule/app-ui';
5
5
  import { Button } from '@molecule/app-ui-react';
6
+ import { Box, Pressable, Text } from '@molecule/app-ui-react/elements';
6
7
  /**
7
8
  * Coerces a Date or ISO string to a Date, returning undefined for invalid values.
8
9
  * @param v
@@ -74,12 +75,12 @@ export function MiniCalendar({ selected, onSelect, month: monthProp, onMonthChan
74
75
  }
75
76
  // Weekday header derived from the first week
76
77
  const weekdayHeader = days.slice(0, 7);
77
- return (_jsxs("div", { className: cm.cn(cm.stack(2), className), children: [_jsxs("header", { className: cm.flex({ justify: 'between', align: 'center', gap: 'sm' }), children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: () => navigate(-1), "aria-label": t('miniCalendar.aria.previousMonth', undefined, {
78
+ return (_jsxs(Box, { as: "div", className: cm.cn(cm.stack(2), className), children: [_jsxs(Box, { as: "header", className: cm.flex({ justify: 'between', align: 'center', gap: 'sm' }), children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: () => navigate(-1), "aria-label": t('miniCalendar.aria.previousMonth', undefined, {
78
79
  defaultValue: 'Previous month',
79
- }), children: "\u2039" }), _jsx("span", { className: cm.cn(cm.textSize('sm'), cm.fontWeight('semibold')), children: monthFmt.format(visibleMonth) }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => navigate(1), "aria-label": t('miniCalendar.aria.nextMonth', undefined, { defaultValue: 'Next month' }), children: "\u203A" })] }), _jsxs("div", { className: cm.grid({ cols: 7, gap: 'xs' }), children: [weekdayHeader.map((d, i) => (_jsx("span", { className: cm.cn(cm.textSize('xs'), cm.fontWeight('semibold'), cm.textCenter), children: weekdayFmt.format(d) }, i))), days.map((d, i) => {
80
+ }), children: "\u2039" }), _jsx(Text, { as: "span", className: cm.cn(cm.textSize('sm'), cm.fontWeight('semibold')), children: monthFmt.format(visibleMonth) }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => navigate(1), "aria-label": t('miniCalendar.aria.nextMonth', undefined, { defaultValue: 'Next month' }), children: "\u203A" })] }), _jsxs(Box, { as: "div", className: cm.grid({ cols: 7, gap: 'xs' }), children: [weekdayHeader.map((d, i) => (_jsx(Text, { as: "span", className: cm.cn(cm.textSize('xs'), cm.fontWeight('semibold'), cm.textCenter), children: weekdayFmt.format(d) }, i))), days.map((d, i) => {
80
81
  const outOfMonth = d.getMonth() !== visibleMonth.getMonth();
81
82
  const isSelected = selectedDate && isSameDay(d, selectedDate);
82
83
  const disabled = isDisabled?.(d) ?? false;
83
- return (_jsx("button", { type: "button", onClick: () => !disabled && onSelect?.(d), disabled: disabled, "aria-current": isSelected ? 'date' : undefined, className: cm.cn(cm.textSize('xs'), cm.sp('py', 1), cm.textCenter, cm.roundedFull, isSelected ? cm.fontWeight('bold') : cm.fontWeight('medium')), style: outOfMonth ? { opacity: 0.3 } : undefined, children: d.getDate() }, i));
84
+ return (_jsx(Pressable, { as: "button", type: "button", onClick: () => !disabled && onSelect?.(d), disabled: disabled, "aria-current": isSelected ? 'date' : undefined, className: cm.cn(cm.textSize('xs'), cm.sp('py', 1), cm.textCenter, cm.roundedFull, isSelected ? cm.fontWeight('bold') : cm.fontWeight('medium')), webStyle: outOfMonth ? { opacity: 0.3 } : undefined, children: d.getDate() }, i));
84
85
  })] })] }));
85
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-mini-calendar-react",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "description": "Month-view calendar with day selection and prev/next navigation",
5
5
  "homepage": "https://www.molecule.dev/packages/app-mini-calendar-react",
6
6
  "type": "module",
@@ -35,13 +35,13 @@
35
35
  "peerDependencies": {
36
36
  "@molecule/app-react": "^4.0.0",
37
37
  "@molecule/app-ui": "^1.0.1",
38
- "@molecule/app-ui-react": "^4.0.0",
38
+ "@molecule/app-ui-react": "^4.4.0",
39
39
  "react": "^18.0.0 || ^19.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@molecule/app-react": "4.10.1",
43
- "@molecule/app-ui": "1.5.0",
44
- "@molecule/app-ui-react": "4.2.0",
42
+ "@molecule/app-react": "4.17.0",
43
+ "@molecule/app-ui": "1.13.0",
44
+ "@molecule/app-ui-react": "4.11.0",
45
45
  "@types/node": "26.6.5",
46
46
  "@types/react": "19.3.0",
47
47
  "@types/react-dom": "19.3.0",