@h6s/calendar
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -6,3 +6,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
const { cursorDate, headers, body, navigation, view } = useCalendar(); | ||
return (_jsxs("table", { children: [_jsx("caption", { children: _jsxs("nav", { children: [_jsxs("div", { children: [_jsx("button", { onClick: view.showMonthView, "aria-label": "button for changing view type to month", children: "M" }, void 0), _jsx("button", { onClick: view.showWeekView, "aria-label": "button for changing view type to week", children: "W" }, void 0), _jsx("button", { onClick: view.showDayView, "aria-label": "button for changing view type to day", children: "D" }, void 0)] }, void 0), _jsx("p", { "data-testid": "cursor-date", children: format(cursorDate, 'yyyy. MM') }, void 0), _jsxs("div", { children: [_jsx("button", { "aria-label": "button for navigating to prev calendar", onClick: navigation.toPrev, children: '>' }, void 0), _jsx("button", { "aria-label": "button for navigating to today calendar", onClick: navigation.setToday, children: "TODAY" }, void 0), _jsx("button", { "aria-label": "button for navigating to next calendar", onClick: navigation.toNext, children: '>' }, void 0)] }, void 0)] }, void 0) }, void 0), _jsx("thead", { children: _jsx("tr", { children: headers.weekDays.map(({ key, value }) => { | ||
return (_jsxs("table", { children: [_jsx("caption", { children: _jsxs("nav", { children: [_jsxs("div", { children: [_jsx("button", { onClick: view.showMonthView, "aria-label": "button for changing view type to month", children: "M" }, void 0), _jsx("button", { onClick: view.showWeekView, "aria-label": "button for changing view type to week", children: "W" }, void 0), _jsx("button", { onClick: view.showDayView, "aria-label": "button for changing view type to day", children: "D" }, void 0)] }, void 0), _jsx("p", { "data-testid": "cursor-date", children: format(cursorDate, 'yyyy. MM') }, void 0), _jsxs("div", { children: [_jsx("button", { "aria-label": "button for navigating to prev calendar", onClick: navigation.toPrev, children: '<' }, void 0), _jsx("button", { "aria-label": "button for navigating to today calendar", onClick: navigation.setToday, children: "TODAY" }, void 0), _jsx("button", { "aria-label": "button for navigating to next calendar", onClick: navigation.toNext, children: '>' }, void 0)] }, void 0)] }, void 0) }, void 0), _jsx("thead", { children: _jsx("tr", { children: headers.weekDays.map(({ key, value }) => { | ||
return _jsx("th", { "data-testid": "calendar-weekends", children: format(value, 'E') }, key); | ||
@@ -9,0 +9,0 @@ }) }, void 0) }, void 0), _jsx("tbody", { children: body.value.map((week) => { |
{ | ||
"name": "@h6s/calendar", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"main": "dist/index.js", | ||
@@ -13,3 +13,3 @@ "types": "dist/index.d.ts", | ||
"prepack": "yarn build", | ||
"prebuild": "rimraf dist cjs", | ||
"prebuild": "rimraf dist esm", | ||
"build:type": "yarn run -T tsc --emitDeclarationOnly --declaration", | ||
@@ -20,3 +20,3 @@ "build": "yarn build:type && node ../../scripts/build.js", | ||
"typecheck": "yarn run -T tsc", | ||
"test": "yarn run -T jest --config ../../jest.config.js", | ||
"test": "yarn run -T jest --config ../../jest.config.js --roots './packages/calendar/src'", | ||
"test:playwright": "playwright test", | ||
@@ -23,0 +23,0 @@ "test:cov": "yarn test --coverage", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
164747