@jk-core/components 1.0.0 → 1.0.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.cjs","sources":["../../../../../.yarn/berry/cache/react-npm-19.1.0-9804a7da5b-10c0.zip/node_modules/react/cjs/react-jsx-runtime.production.js","../../../../../.yarn/berry/cache/react-npm-19.1.0-9804a7da5b-10c0.zip/node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../.yarn/berry/cache/react-npm-19.1.0-9804a7da5b-10c0.zip/node_modules/react/jsx-runtime.js","../../utils/dist/index.js","../src/assets/close.svg","../src/Calendar/utils/isSameDay.ts","../src/Calendar/utils/isInRange.ts","../src/Calendar/components/DayTile/index.tsx","../src/assets/arrow.svg","../src/assets/drop-arrow.svg","../src/Calendar/components/DateLabel/index.tsx","../src/Calendar/hooks/useCalendarNav.ts","../src/Calendar/utils/getWeeksInMonth.ts","../src/Calendar/RangeCalendar.tsx","../src/Calendar/components/MonthTile/index.tsx","../src/Calendar/components/YearTile/index.tsx","../src/Calendar/hooks/useDateSelect.ts","../src/Calendar/components/ViewSelector/index.tsx","../src/Calendar/SingleCalendar.tsx","../../hooks/dist/index.js","../src/Calendar/ScrollCalendar.tsx","../src/Calendar/index.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(\n type,\n key,\n self,\n source,\n owner,\n props,\n debugStack,\n debugTask\n ) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n self,\n source,\n getOwner(),\n maybeKey,\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_ELEMENT_TYPE &&\n node._store &&\n (node._store.validated = 1);\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n \"react-stack-bottom-frame\": function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React[\"react-stack-bottom-frame\"].bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","function u(t) {\n return Object.entries(t).filter(([, r]) => r).map(([r]) => r).join(\" \");\n}\nconst o = (t, r = 2) => {\n if (t == null || Number.isNaN(Number(t)))\n return 0;\n const i = `${t}`;\n if (!i.includes(\"e\"))\n return +`${Math.round(parseFloat(`${t}e+${r}`))}e-${r}`;\n const e = i.split(\"e\");\n let n = \"\";\n return +e[1] + r > 0 && (n = \"+\"), +`${Math.round(parseFloat(`${+e[0]}e${n}${+e[1] + r}`))}e-${r}`;\n}, s = (t, r = 2) => t == null || Number.isNaN(t) ? \"-\" : o(t, r), c = (t = 0) => {\n const r = t ?? 0, i = Math.trunc(r) || 0, e = Math.floor((r - i) * 60) || 0;\n return {\n fullTime: `${i !== 0 ? `${i}시간` : \"\"}${e !== 0 ? ` ${e}분` : \"\"}` || \"0분\",\n hour: i,\n minute: e\n };\n}, a = () => {\n const { userAgent: t } = navigator;\n return t.match(/Android/i) || t.match(/iPhone|iPad|iPod/i) ? !0 : !(t.match(/Windows/i) || t.match(/Macintosh/i));\n}, d = (t) => t != null;\nexport {\n a as checkIsMobile,\n u as cn,\n s as displayRoundNum,\n c as formatTime,\n d as isDefined,\n o as roundNum\n};\n//# sourceMappingURL=index.js.map\n","import * as React from \"react\";\nconst SvgClose = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"64px\", height: \"64px\", viewBox: \"0 0 24 24\", fill: \"#000000\", xmlns: \"http://www.w3.org/2000/svg\", stroke: \"#000000\", strokeWidth: 0.696, ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_bgCarrier\", strokeWidth: 0 }), /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_tracerCarrier\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_iconCarrier\" }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z\" })));\nexport default SvgClose;\n","import { CalendarView } from '../type';\n\nconst isSameDay = (date1: Date | null, date2: Date | null, view: CalendarView = 'day'): boolean => {\n if (date1 === null || date2 === null) return false;\n\n switch (view) {\n case 'day':\n return date1.getFullYear() === date2.getFullYear()\n && date1.getMonth() === date2.getMonth()\n && date1.getDate() === date2.getDate();\n case 'month':\n return date1.getFullYear() === date2.getFullYear()\n && date1.getMonth() === date2.getMonth();\n case 'year':\n return date1.getFullYear() === date2.getFullYear();\n default:\n return false;\n }\n};\n\nexport default isSameDay;\n","import { CalendarRange } from '../type';\n\nconst isInRange = (day: Date, range?:CalendarRange) => {\n if (!range?.[0] || !range?.[1]) return false;\n return day >= range[0] && day < range[1];\n};\n\nexport default isInRange;\n","/* eslint-disable react/no-array-index-key */\nimport isSameDay from 'Calendar/utils/isSameDay';\nimport { cn } from '@jk-core/utils';\nimport { CalendarRange } from 'Calendar/type';\nimport isInRange from 'Calendar/utils/isInRange';\nimport styles from './DayTile.module.scss';\n\nconst WEEKS = ['일', '월', '화', '수', '목', '금', '토'];\n\ninterface Props {\n hoverDate?:Date | null,\n setHoverDate?:(date:Date | null)=>void,\n selectedDate?: CalendarRange;\n weeksInMonth: {\n thisMonth: string;\n date: Date;\n }[][];\n tileContent?: () => React.ReactNode;\n handleDayClick: (day: Date) => void;\n max?: Date;\n min?: Date;\n hideBefore?: boolean;\n hideAfter?: boolean;\n range?: boolean;\n scroll?: boolean;\n style?: React.CSSProperties;\n}\nexport default function DayTile({\n selectedDate, weeksInMonth, tileContent, handleDayClick, range = false,\n max, min, hideBefore = false, hideAfter = false, style, scroll,\n hoverDate, setHoverDate = () => { },\n}: Props) {\n return (\n <div className={styles['day-tile']} style={style}>\n <div className={styles['day-tile__weeks']}>\n {WEEKS.map((week) => (<div className={styles['day-tile__weeks--date']} key={week}>{week}</div>))}\n </div>\n\n <div className={styles['day-tile__tile']}>\n {weeksInMonth.map((week, index) => (\n <div key={index} className={styles['day-tile__week']}>\n {week.map((day, idx) => (\n <button\n className={cn({\n [styles['day-tile__day']]: true,\n [styles['day-tile__day--today']]: isSameDay(day.date, new Date()),\n [styles['day-tile__day--selected-first']]: !!selectedDate && isSameDay(day.date, selectedDate[0] || null) && range\n && ((!!selectedDate[1]\n || ((!scroll && hoverDate != null && !!selectedDate[0])\n && hoverDate > selectedDate[0]))),\n [styles['day-tile__day--selected-last']]: (!!selectedDate && isSameDay(day.date, selectedDate[1] || null) && range)\n || (!scroll && !selectedDate?.[1] && isSameDay(day.date, hoverDate || null)),\n [styles['day-tile__day--before']]: day.thisMonth !== 'this',\n [styles['day-tile__day--hide-before']]: hideBefore && day.thisMonth === 'before',\n [styles['day-tile__day--hide-after']]: hideAfter && day.thisMonth === 'after',\n [styles['day-tile__day--tile']]: !!(tileContent && tileContent()),\n [styles['day-tile__day--range']]: isInRange(day.date, selectedDate) || (!!selectedDate?.[0] && (isInRange(day.date, [selectedDate[0], hoverDate]))),\n })}\n type=\"button\"\n disabled={(min && day.date < min) || (max && day.date > max)}\n key={idx}\n onMouseOver={() => {\n if (!selectedDate?.[1] && !((min && day.date < min) || (max && day.date > max))) {\n setHoverDate(new Date(\n day.date.getFullYear(),\n day.date.getMonth(),\n day.date.getDate(),\n ));\n }\n }}\n onFocus={() => {\n if (!selectedDate?.[1] && !((min && day.date < min) || (max && day.date > max))) {\n setHoverDate(new Date(\n day.date.getFullYear(),\n day.date.getMonth(),\n day.date.getDate(),\n ));\n }\n }}\n onMouseLeave={() => {\n if (hoverDate) setHoverDate(null);\n }}\n onClick={() => handleDayClick(day.date)}\n >\n <div className={cn({\n [styles['day-tile--content']]: true,\n [styles['day-tile--selected']]: !!selectedDate && (isSameDay(day.date, selectedDate[0] || null) || isSameDay(day.date, selectedDate[1] || null) || isSameDay(day.date, hoverDate || null)),\n })}\n >\n {day.date.getDate()}\n {tileContent && tileContent()}\n </div>\n </button>\n ))}\n </div>\n ))}\n </div>\n </div>\n );\n}\n","import * as React from \"react\";\nconst SvgArrow = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"64px\", height: \"64px\", viewBox: \"0 0 24 24\", fill: \"#0F0F0F\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_bgCarrier\", strokeWidth: 0 }), /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_tracerCarrier\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_iconCarrier\" }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M16.1795 3.26875C15.7889 2.87823 15.1558 2.87823 14.7652 3.26875L8.12078 9.91322C6.94952 11.0845 6.94916 12.9833 8.11996 14.155L14.6903 20.7304C15.0808 21.121 15.714 21.121 16.1045 20.7304C16.495 20.3399 16.495 19.7067 16.1045 19.3162L9.53246 12.7442C9.14194 12.3536 9.14194 11.7205 9.53246 11.33L16.1795 4.68297C16.57 4.29244 16.57 3.65928 16.1795 3.26875Z\" })));\nexport default SvgArrow;\n","import * as React from \"react\";\nconst SvgDropArrow = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 25, height: 25, viewBox: \"0 0 20 20\", fill: \"none\", stroke: \"#2D2D2D\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M5 7.5L10 13L15 7.5\", strokeWidth: 1.4, strokeLinecap: \"round\" }));\nexport default SvgDropArrow;\n","import { cn } from '@jk-core/utils';\nimport { CalendarView } from 'Calendar/type';\nimport ArrowIcon from 'assets/arrow.svg';\nimport DropIcon from 'assets/drop-arrow.svg';\nimport styles from './DateLabel.module.scss';\n\ninterface DateLabelProps {\n viewDate: Date;\n onArrowClick: (direction: 'prev' | 'next') => void;\n disabled: (direction: 'prev' | 'next') => boolean;\n method: CalendarView;\n selectMode?: CalendarView;\n setSelectMode?: (mode: CalendarView) => void;\n hideArrow?: 'prev' | 'next' | 'all' | null;\n range?: boolean;\n}\n\nexport default function DateLabel({\n viewDate, onArrowClick, disabled, method, selectMode = 'day', setSelectMode = () => { }, hideArrow = null, range = false,\n}: DateLabelProps) {\n return (\n <div className={cn({\n [styles.nav]: true,\n [styles['nav--range']]: range,\n [styles['nav--left']]: hideArrow === 'all',\n })}\n >\n {hideArrow !== 'all' && (\n <button\n className={styles.nav__button}\n type=\"button\"\n onClick={() => onArrowClick('prev')}\n disabled={disabled('prev') || hideArrow === 'prev'}\n >\n {hideArrow !== 'prev' && <ArrowIcon />}\n </button>\n )}\n {range ? (\n <div className={cn({\n [styles.nav__label]: true,\n [styles['nav__label--left']]: hideArrow === 'all',\n })}\n >\n {`${viewDate.getFullYear()}년 ${viewDate.getMonth() + 1}월`}\n </div>\n ) : (\n <div className={cn({\n [styles.nav__label]: true,\n [styles['nav__label--left']]: hideArrow === 'all',\n })}\n >\n {method === 'year' && '연도 선택'}\n {method !== 'year' && (\n <button\n className={cn({\n [styles['nav__label--date']]: true,\n [styles['nav__label--date-selected']]: selectMode === 'year',\n })}\n type=\"button\"\n onClick={() => setSelectMode('year')}\n >\n {`${viewDate.getFullYear()}년`}<DropIcon />\n </button>\n )}\n {method === 'day' && (\n <button\n className={cn({\n [styles['nav__label--date']]: true,\n [styles['nav__label--date-selected']]: selectMode === 'month',\n })}\n type=\"button\"\n onClick={() => setSelectMode('month')}\n >\n {`${viewDate.getMonth() + 1}월`}<DropIcon />\n </button>\n )}\n </div>\n )}\n {hideArrow !== 'all' && (\n <button\n className={styles.nav__button}\n type=\"button\"\n onClick={() => onArrowClick('next')}\n disabled={disabled('next') || hideArrow === 'next'}\n >\n {hideArrow !== 'next' && <ArrowIcon style={{ transform: 'rotate(180deg)' }} />}\n </button>\n )}\n </div>\n );\n}\n","import { CalendarView } from '../type';\n\ninterface Props {\n method: CalendarView;\n selectMode: CalendarView;\n viewDate: Date;\n setDate:(date: Date) => void;\n min: Date;\n max: Date;\n}\nconst useCalendarNav = ({\n method, selectMode, viewDate, setDate, min, max,\n}:Props) => {\n const disabled = (direction: 'prev' | 'next') => {\n if (selectMode === 'year' || method !== selectMode) return true;\n\n if (method === 'day') {\n if (direction === 'prev') {\n const prevMonth = new Date(viewDate.getFullYear(), viewDate.getMonth() - 1, 1);\n return prevMonth < min;\n }\n const nextMonth = new Date(viewDate.getFullYear(), viewDate.getMonth() + 1, 1);\n return nextMonth > max;\n }\n\n if (method === 'month') {\n if (direction === 'prev') {\n const prevYear = new Date(viewDate.getFullYear() - 1, viewDate.getMonth(), 1);\n return prevYear < min;\n }\n const nextYear = new Date(viewDate.getFullYear() + 1, viewDate.getMonth(), 1);\n return nextYear > max;\n }\n\n if (method === 'year') {\n if (direction === 'prev') {\n const prevDecade = new Date(viewDate.getFullYear() - 10, viewDate.getMonth(), 1);\n return prevDecade < min;\n }\n const nextDecade = new Date(viewDate.getFullYear() + 10, viewDate.getMonth(), 1);\n return nextDecade > max;\n }\n\n return false;\n };\n\n const onArrowClick = (direction: 'prev' | 'next') => {\n const offset = direction === 'prev' ? -1 : 1;\n const minDate = new Date(2000, 0, 1);\n const maxDate = new Date(2099, 11, 31);\n\n if (method === 'day') {\n const newDate = new Date(viewDate.getFullYear(), viewDate.getMonth() + offset, 1);\n\n if (newDate >= minDate && newDate <= maxDate) {\n setDate(newDate);\n }\n }\n\n if (method === 'month') {\n const newDate = new Date(viewDate.getFullYear() + offset, viewDate.getMonth(), 1);\n\n if (newDate >= minDate && newDate <= maxDate) {\n setDate(newDate);\n }\n }\n\n if (method === 'year') {\n const newDate = new Date(viewDate.getFullYear() + offset * 10, viewDate.getMonth(), 1);\n\n if (newDate >= minDate && newDate <= maxDate) {\n setDate(newDate);\n }\n }\n };\n\n return { disabled, onArrowClick };\n};\n\nexport default useCalendarNav;\n","const getWeeksInMonth = (viewDate:Date) => {\n const startOfMonth = new Date(viewDate.getFullYear(), viewDate.getMonth(), 1);\n const endOfMonth = new Date(viewDate.getFullYear(), viewDate.getMonth() + 1, 0);\n const weeks = [];\n let currentWeek = [];\n\n const startDayOfWeek = startOfMonth.getDay();\n if (startDayOfWeek !== 0) {\n const prevMonthEnd = new Date(startOfMonth);\n prevMonthEnd.setDate(0);\n for (let i = startDayOfWeek - 1; i >= 0; i -= 1) {\n const prevDate = new Date(prevMonthEnd);\n prevDate.setDate(prevMonthEnd.getDate() - i);\n currentWeek.push({ thisMonth: 'before', date: prevDate });\n }\n }\n\n const currentDate = new Date(startOfMonth);\n\n while (currentDate <= endOfMonth) {\n currentWeek.push({ thisMonth: 'this', date: new Date(currentDate) });\n if (currentDate.getDay() === 6) {\n weeks.push(currentWeek);\n currentWeek = [];\n }\n currentDate.setDate(currentDate.getDate() + 1);\n }\n\n const endDayOfWeek = endOfMonth.getDay();\n if (endDayOfWeek !== 6) {\n for (let i = 1; i <= 6 - endDayOfWeek; i += 1) {\n const nextDate = new Date(endOfMonth);\n nextDate.setDate(endOfMonth.getDate() + i);\n currentWeek.push({ thisMonth: 'after', date: nextDate });\n }\n }\n\n if (currentWeek.length > 0) {\n weeks.push(currentWeek);\n }\n\n return weeks;\n};\n\nexport default getWeeksInMonth;\n","/* eslint-disable react/no-array-index-key */\nimport { cn } from '@jk-core/utils';\nimport { useEffect, useState } from 'react';\nimport CloseIcon from '../assets/close.svg';\nimport DayTile from './components/DayTile';\nimport styles from './Calendar.module.scss';\nimport { CalendarRange } from './type';\nimport DateLabel from './components/DateLabel';\nimport useCalendarNav from './hooks/useCalendarNav';\nimport getWeeksInMonth from './utils/getWeeksInMonth';\n\ninterface CalendarProps {\n className?: string;\n date: CalendarRange;\n onChange:(date:CalendarRange)=>void;\n min: Date;\n max: Date;\n onClose?: () => void;\n}\n\nexport default function RangeCalendar({\n className = '', date: selectedDate = [null, null], onChange, onClose,\n min, max,\n}: CalendarProps) {\n const method = 'day';\n const [viewDate, setViewDate] = useState<Date>(selectedDate?.[0] || new Date());\n const [hoverDate, setHoverDate] = useState<Date | null>(null);\n const weeksInMonth = getWeeksInMonth(viewDate);\n\n const onDayClick = (day: Date, maintenance = false) => {\n if (!maintenance) setViewDate(day);\n if (!selectedDate[0] || (!!selectedDate[0] && !!selectedDate[1])) {\n onChange([day, null]);\n }\n if (!!selectedDate[0] && !selectedDate[1]) {\n if (day < selectedDate[0]) {\n onChange([day, null]);\n } else {\n onChange([selectedDate[0], day]);\n }\n }\n };\n\n const { disabled, onArrowClick } = useCalendarNav({\n method, selectMode: 'day', viewDate, setDate: setViewDate, min, max,\n });\n\n useEffect(() => {\n if (viewDate > max) {\n setViewDate(max);\n }\n if (viewDate < min) {\n setViewDate(min);\n }\n }, [viewDate, max, min]);\n\n return (\n <div className={cn({\n [styles.calendar]: true,\n [styles['calendar--range']]: true,\n [className]: !!className,\n })}\n >\n <div className={styles.calendar__close}>\n {onClose && (\n <CloseIcon onClick={onClose} />\n )}\n </div>\n {/* 일/월/년 선택 버튼 */}\n <div className={styles['calendar__range-tile']}>\n <div className={styles.calendar__wrapper}>\n <DateLabel\n viewDate={viewDate}\n method=\"day\"\n onArrowClick={onArrowClick}\n disabled={disabled}\n hideArrow=\"next\"\n range\n />\n <DayTile\n hoverDate={hoverDate}\n setHoverDate={(day) => setHoverDate(day)}\n selectedDate={selectedDate}\n weeksInMonth={weeksInMonth}\n handleDayClick={onDayClick}\n hideAfter\n max={max}\n min={min}\n range\n />\n </div>\n <div className={styles.calendar__wrapper}>\n <DateLabel\n viewDate={new Date(\n viewDate.getFullYear(),\n viewDate.getMonth() + 1,\n 1,\n )}\n method=\"day\"\n onArrowClick={onArrowClick}\n disabled={disabled}\n hideArrow=\"prev\"\n range\n />\n <DayTile\n hoverDate={hoverDate}\n setHoverDate={(day) => setHoverDate(day)}\n selectedDate={selectedDate}\n weeksInMonth={getWeeksInMonth(new Date(\n viewDate.getFullYear(),\n viewDate.getMonth() + 1,\n 1,\n ))}\n handleDayClick={(day) => onDayClick(day, true)}\n hideBefore\n hideAfter\n max={max}\n min={min}\n range\n />\n </div>\n </div>\n </div>\n );\n}\n","import { cn } from '@jk-core/utils';\nimport isSameDay from '../../utils/isSameDay';\nimport { CalendarView } from '../../type';\nimport styles from './MonthTile.module.scss';\n\nconst MONTHS = Array.from({ length: 12 }, (_, i) => i);\n\ninterface Props {\n selectedDate?: Date;\n viewDate: Date;\n handleMonthClick: (month: number) => void;\n tileContent?: (date: Date, view:CalendarView) => React.ReactNode;\n max: Date;\n min: Date;\n}\n\nexport default function MonthTile({\n selectedDate, viewDate, handleMonthClick, tileContent = () => false,\n max, min,\n}: Props) {\n const isDisabled = (month: number) => {\n const monthDate = new Date(viewDate.getFullYear(), month, 1);\n\n return monthDate > new Date(max.getFullYear(), max.getMonth(), 1)\n || monthDate < new Date(min.getFullYear(), min.getMonth(), 1);\n };\n\n return (\n <div className={styles['month-tile']}>\n {MONTHS.map((month) => (\n <button\n className={cn({\n [styles['month-tile__month']]: true,\n [styles['month-tile__month--selected']]: !!selectedDate && isSameDay(selectedDate, new Date(viewDate.getFullYear(), month), 'month'),\n [styles['month-tile__month--today']]: isSameDay(new Date(viewDate.getFullYear(), month), new Date(), 'month'),\n [styles['month-tile__month--tile']]: !!tileContent(new Date(viewDate.getFullYear(), month - 1, 1), 'month'),\n })}\n type=\"button\"\n key={month}\n onClick={() => handleMonthClick(month)}\n disabled={isDisabled(month)}\n >\n <span>{`${month + 1}월`}</span>\n {!!tileContent(new Date(viewDate.getFullYear(), month - 1, 1), 'month')\n && tileContent(new Date(viewDate.getFullYear(), month - 1, 1), 'month')}\n </button>\n ))}\n </div>\n );\n}\n","import { useEffect, useRef } from 'react';\nimport { cn } from '@jk-core/utils';\nimport { CalendarView } from '../../type';\nimport styles from './YearTile.module.scss';\n\ninterface Props {\n selectedDate?: Date;\n onClick: (year: number) => void;\n tileContent?: (date: Date, view:CalendarView) => React.ReactNode;\n max: Date;\n min: Date;\n}\n\nexport default function YearTile({\n selectedDate, onClick,\n tileContent = () => false,\n max, min,\n}: Props) {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const selectedRef = useRef<HTMLButtonElement>(null);\n const YEARS = Array.from(\n { length: max.getFullYear() - min.getFullYear() + 1 },\n (_, i) => min.getFullYear() + i,\n );\n\n useEffect(() => {\n const selectedElement = selectedRef.current;\n const wrapperElement = wrapperRef.current;\n if (!selectedElement || !wrapperElement) return;\n\n const { clientHeight } = wrapperElement;\n const { offsetTop, clientHeight: selectedHeight } = selectedElement;\n\n wrapperElement.scrollTo({\n top: offsetTop - clientHeight / 2 + selectedHeight,\n });\n }, []);\n\n return (\n <div className={styles['year-tile']} ref={wrapperRef}>\n <div className={styles['year-tile__blank']} />\n {YEARS.map((year) => (\n <button\n className={cn({\n [styles['year-tile__year']]: true,\n [styles['year-tile__year--selected']]: !!selectedDate && selectedDate.getFullYear() === year,\n [styles['year-tile__year--border']]: !!tileContent(new Date(year, 1, 1), 'year'),\n })}\n key={year}\n type=\"button\"\n ref={!!selectedDate && selectedDate.getFullYear() === year ? selectedRef : null}\n onClick={() => onClick(year)}\n >\n <span className={styles['yearTile__year--year']}>{year}</span>\n {tileContent(new Date(year, 1, 1), 'year') && (\n <div className={styles['yearTile__year--tile']}>\n {tileContent(new Date(year, 1, 1), 'year')}\n </div>\n )}\n </button>\n ))}\n <div className={styles['year-tile__blank']} />\n </div>\n );\n}\n","import { CalendarView } from '../type';\n\ninterface UseDateSelectProps {\n viewDate: Date;\n setViewDate: (date: Date) => void;\n method: CalendarView;\n setSelectMode:(mode:CalendarView) => void;\n onChange: (date: Date) => void;\n setView:(view:CalendarView)=>void;\n}\n\nconst useDateSelect = ({\n viewDate, setViewDate, onChange, setSelectMode, method, setView,\n}: UseDateSelectProps) => {\n const min = new Date(2000, 0, 1);\n const max = new Date(2099, 11, 31);\n\n const onDayClick = (day: Date) => {\n if (day < min || day > max) {\n return;\n }\n\n setViewDate(day);\n setView('day');\n onChange(day);\n };\n\n const onMonthClick = (month:number) => {\n const newDate = new Date(viewDate.getFullYear(), month, 1);\n\n setViewDate(newDate);\n\n if (method !== 'month') setSelectMode(method);\n if (method === 'month') {\n setView('month');\n onChange(newDate);\n }\n };\n\n const onYearClick = (year:number) => {\n const newDate = new Date(year, 0, 1);\n\n setViewDate(newDate);\n if (method !== 'year') setSelectMode(method);\n if (method === 'year') {\n setView('year');\n onChange(newDate);\n }\n };\n\n return { onDayClick, onMonthClick, onYearClick };\n};\n\nexport default useDateSelect;\n","import { cn } from '@jk-core/utils';\nimport { CalendarView } from 'Calendar/type';\nimport styles from './ViewSelector.module.scss';\n\ninterface ViewSelectorProps {\n method: CalendarView;\n selectView: (value: CalendarView) => void;\n}\nexport default function ViewSelector({ method, selectView }:ViewSelectorProps) {\n return (\n <div className={styles.view}>\n <div className={\n cn({\n [styles.view__block]: true,\n [styles['view__block--second']]: method === 'month',\n [styles['view__block--last']]: method === 'year',\n })\n }\n />\n <button\n className={cn({\n [styles.view__selector]: true,\n [styles['view__selector--selected']]: method === 'day',\n })}\n type=\"button\"\n onClick={() => selectView('day')}\n >일\n </button>\n <button\n className={cn({\n [styles.view__selector]: true,\n [styles['view__selector--selected']]: method === 'month',\n })}\n type=\"button\"\n onClick={() => selectView('month')}\n >월\n </button>\n <button\n className={cn({\n [styles.view__selector]: true,\n [styles['view__selector--selected']]: method === 'year',\n })}\n type=\"button\"\n onClick={() => selectView('year')}\n >년\n </button>\n </div>\n );\n}\n","/* eslint-disable react/no-array-index-key */\nimport { useEffect, useState } from 'react';\nimport { cn } from '@jk-core/utils';\nimport CloseIcon from '../assets/close.svg';\nimport { CalendarView } from './type';\nimport getWeeksInMonth from './utils/getWeeksInMonth';\nimport DayTile from './components/DayTile';\nimport MonthTile from './components/MonthTile';\nimport YearTile from './components/YearTile';\nimport useCalendarNav from './hooks/useCalendarNav';\nimport useDateSelect from './hooks/useDateSelect';\nimport styles from './Calendar.module.scss';\nimport ViewSelector from './components/ViewSelector';\nimport './index.scss';\nimport DateLabel from './components/DateLabel';\n\ninterface CalendarProps {\n className?: string;\n date?: Date;\n view?: CalendarView;\n setView?: (view:CalendarView)=>void;\n tileContent?: (date: Date | undefined, view: CalendarView) => React.ReactNode;\n onChange?:(date:Date)=>void;\n min?: Date;\n max?: Date;\n onClose?: () => void;\n viewSelector?: boolean;\n}\n\nexport default function SingleCalendar({\n className = '', date: selectedDate, view, setView = () => { }, tileContent, onChange = () => { }, onClose, viewSelector = true,\n min = new Date(2000, 0, 1), max = new Date(2099, 11, 31),\n}: CalendarProps) {\n const [viewDate, setViewDate] = useState<Date>(selectedDate || new Date());\n const [method, setMethod] = useState<CalendarView>(view || 'day');\n const [selectMode, setSelectMode] = useState<CalendarView>(view || 'day');\n const weeksInMonth = getWeeksInMonth(viewDate);\n const { onDayClick, onMonthClick, onYearClick } = useDateSelect({\n viewDate,\n setViewDate: (data) => setViewDate(data),\n onChange,\n setSelectMode,\n method,\n setView,\n });\n const { disabled, onArrowClick } = useCalendarNav({\n method, selectMode, viewDate, setDate: setViewDate, min, max,\n });\n\n const selectView = (value: CalendarView) => {\n setMethod(value);\n setSelectMode(value);\n };\n\n useEffect(() => {\n if (viewDate > max) {\n setViewDate(max);\n }\n if (viewDate < min) {\n setViewDate(min);\n }\n }, [viewDate, max, min]);\n\n return (\n <div className={cn({\n [styles.calendar]: true,\n [className]: !!className,\n })}\n >\n <div className={styles.calendar__close}>\n {onClose && (\n <CloseIcon onClick={onClose} />\n )}\n </div>\n {/* 일/월/년 선택 버튼 */}\n {viewSelector && (\n <ViewSelector method={method} selectView={selectView} />\n )}\n <DateLabel\n viewDate={viewDate}\n method={method}\n onArrowClick={onArrowClick}\n disabled={disabled}\n selectMode={selectMode}\n setSelectMode={setSelectMode}\n />\n\n {(method === 'day' && selectMode === 'day') && (\n <DayTile\n selectedDate={[selectedDate, null]}\n weeksInMonth={weeksInMonth}\n handleDayClick={onDayClick}\n tileContent={() => (tileContent ? tileContent(selectedDate, method) : null)}\n max={max}\n min={min}\n />\n )}\n\n {((method === 'month' || selectMode === 'month') && selectMode !== 'year') && (\n <MonthTile\n selectedDate={selectedDate}\n viewDate={viewDate}\n handleMonthClick={onMonthClick}\n tileContent={tileContent}\n max={max}\n min={min}\n />\n )}\n\n {(method === 'year' || selectMode === 'year') && (\n <YearTile\n selectedDate={selectedDate}\n onClick={onYearClick}\n tileContent={tileContent}\n max={max}\n min={min}\n />\n )}\n </div>\n );\n}\n","import { useEffect as a, useState as d, useRef as i, useCallback as w } from \"react\";\nconst m = ({\n target: e,\n parent: r,\n callback: c,\n options: n\n}) => {\n a(() => {\n const t = e.current, o = r == null ? void 0 : r.current;\n if (!t) return () => {\n };\n const s = new IntersectionObserver(([u]) => {\n u.isIntersecting && c();\n }, {\n ...o ? { root: o } : {},\n threshold: 1,\n ...n\n });\n return s.observe(t), () => {\n s.unobserve(t);\n };\n }, [c, n, r, e]);\n}, l = ({ targetRef: e, eventList: r = [], handler: c = () => {\n} }) => {\n a(() => {\n const n = (t) => {\n e.current && !e.current.contains(t.target) && c();\n };\n return Array.isArray(r) && r.map((t) => window.addEventListener(t, n)), () => {\n Array.isArray(r) && r.map((t) => window.removeEventListener(t, n));\n };\n }, [e, c, r]);\n}, v = (e) => {\n const [r, c] = d(() => window.matchMedia(`(max-width: ${e}px)`).matches), n = i(null);\n return a(() => {\n const t = window.matchMedia(`(max-width: ${e}px)`);\n n.current = t;\n function o() {\n c(window.matchMedia(`(max-width: ${e}px)`).matches);\n }\n return n.current.addEventListener(\"change\", o), () => {\n var s;\n (s = n.current) == null || s.removeEventListener(\"change\", o);\n };\n }, [e]), r;\n}, p = () => {\n const { history: e } = window;\n return {\n push: (n) => {\n const t = new URL(window.location.href), o = `${t.origin}${t.pathname}${t.search}${t.hash}/${n}`;\n e.pushState({}, \"\", o);\n },\n back: () => {\n e.back();\n }\n };\n}, f = (e) => {\n a(() => {\n const r = () => {\n const t = \"POP\", { location: o } = window;\n e({ action: t, location: o });\n }, c = () => {\n const t = \"PUSH\", { location: o } = window;\n e({ action: t, location: o });\n }, n = () => {\n const t = \"REPLACE\", { location: o } = window;\n e({ action: t, location: o });\n };\n return window.addEventListener(\"popstate\", r), window.addEventListener(\"pushstate\", c), window.addEventListener(\"replacestate\", n), () => {\n window.removeEventListener(\"popstate\", r), window.removeEventListener(\"pushstate\", c), window.removeEventListener(\"replacestate\", n);\n };\n }, [e]);\n}, E = (e, r) => {\n const c = i(e), n = i(null);\n return a(() => (c.current = e, () => {\n n.current !== null && clearTimeout(n.current);\n }), [e]), w((...o) => {\n n.current && clearTimeout(n.current), n.current = setTimeout(() => {\n c.current(...o);\n }, r);\n }, [r]);\n};\nexport {\n E as useDebounce,\n p as useHistory,\n f as useHistoryEvent,\n l as useInterectOutside,\n m as useIntersectionObserver,\n v as useMediaQuery\n};\n//# sourceMappingURL=index.js.map\n","import { cn } from '@jk-core/utils';\nimport { useEffect, useRef, useState } from 'react';\nimport { useIntersectionObserver } from '@jk-core/hooks';\nimport DayTile from './components/DayTile';\nimport styles from './Calendar.module.scss';\nimport DateLabel from './components/DateLabel';\nimport getWeeksInMonth from './utils/getWeeksInMonth';\nimport { CalendarRange } from './type';\n\ninterface CalendarProps {\n className?: string;\n date: CalendarRange;\n onChange:(date:CalendarRange)=>void;\n min: Date;\n max: Date;\n}\n\nexport default function ScrollCalendar({\n className = '', date: selectedDate = [null, null], onChange,\n min, max,\n}: CalendarProps) {\n const maxCount = new Date().getMonth() - min.getMonth()\n + 12 * (new Date().getFullYear() - min.getFullYear());\n const scrollRef = useRef<HTMLDivElement>(null);\n const targetRef = useRef<HTMLDivElement>(null);\n const [viewDate, setViewDate] = useState<Date>(selectedDate?.[0] || new Date());\n const [hoverDate, setHoverDate] = useState<Date | null>(null);\n const [calendarCount, setCalendarCount] = useState(Array.from({\n length: Math.abs(viewDate.getMonth() - new Date().getMonth()\n + (12 * (viewDate.getFullYear() - new Date().getFullYear() - 1))),\n }).map((_, idx) => idx));\n\n const onDayClick = (day: Date, maintenance = false) => {\n if (!maintenance) setViewDate(day);\n if (!selectedDate[0] || (!!selectedDate[0] && !!selectedDate[1])) {\n onChange([day, null]);\n }\n if (!!selectedDate[0] && !selectedDate[1]) {\n if (day < selectedDate[0]) {\n onChange([day, null]);\n } else {\n onChange([selectedDate[0], day]);\n }\n }\n };\n\n const handleDateChange = (count: number) => {\n const newDate = new Date();\n newDate.setMonth(newDate.getMonth() - count);\n return newDate;\n };\n\n useEffect(() => {\n if (viewDate > max) {\n setViewDate(max);\n }\n if (viewDate < min) {\n setViewDate(min);\n }\n }, [viewDate, max, min]);\n\n useEffect(() => {\n scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight });\n }, []);\n\n useIntersectionObserver({\n target: targetRef as React.RefObject<HTMLDivElement>,\n parent: scrollRef as React.RefObject<HTMLDivElement>,\n callback: () => {\n if (maxCount < calendarCount.length) return;\n const length = maxCount - (calendarCount.length - 1) > 12\n ? 12 : maxCount - (calendarCount.length - 1);\n setCalendarCount((prev) => [...prev,\n ...Array.from({ length }).map((_, i) => prev.length + i)]);\n },\n options: { threshold: 0.1 },\n });\n\n return (\n <div className={cn({\n [styles.calendar]: true,\n [styles['calendar--range']]: true,\n [styles['calendar--scroll']]: true,\n [className]: !!className,\n })}\n >\n {/* 일/월/년 선택 버튼 */}\n <div className={styles.calendar__scroll} ref={scrollRef}>\n {calendarCount.map((count) => (\n <div\n className={styles['calendar__scroll--wrapper']}\n key={count}\n ref={(maxCount > (calendarCount.length - 1)\n && count === calendarCount.length - 2) ? targetRef : null}\n >\n <DateLabel\n viewDate={handleDateChange(count)}\n method=\"day\"\n onArrowClick={() => { }}\n disabled={() => false}\n hideArrow=\"all\"\n range\n />\n <DayTile\n style={{ height: 'auto', minHeight: 'auto' }}\n hoverDate={hoverDate}\n setHoverDate={(day) => setHoverDate(day)}\n selectedDate={selectedDate}\n weeksInMonth={getWeeksInMonth(handleDateChange(count))}\n handleDayClick={onDayClick}\n hideAfter\n hideBefore\n max={max}\n min={min}\n range\n scroll\n />\n </div>\n ))}\n\n </div>\n </div>\n );\n}\n","/* eslint-disable react/no-array-index-key */\nimport { CalendarRange, CalendarView } from './type';\nimport RangeCalendar from './RangeCalendar';\nimport SingleCalendar from './SingleCalendar';\nimport ScrollCalendar from './ScrollCalendar';\n\nimport './index.scss';\n\ninterface CalendarProps {\n className?: string;\n date?: Date | CalendarRange;\n view?: CalendarView;\n setView?: (view:CalendarView)=>void;\n tileContent?: (date: Date | undefined, view: CalendarView) => React.ReactNode;\n onChange?:(date:Date | CalendarRange)=>void;\n min?: Date;\n max?: Date;\n onClose?: () => void;\n viewSelector?: boolean;\n selectRange?: boolean;\n scroll?: boolean;\n}\n\nexport default function Calendar({\n className = '', date: selectedDate, view, setView = () => { }, tileContent, onChange = () => { }, onClose, viewSelector = true,\n min = new Date('2000-01-01'), max = new Date('2099-11-31'), selectRange = false, scroll = false,\n}: CalendarProps) {\n if (scroll) {\n return (\n <ScrollCalendar\n className={className}\n date={selectedDate as CalendarRange}\n onChange={onChange}\n min={min}\n max={max}\n />\n );\n }\n if (selectRange) {\n return (\n <RangeCalendar\n className={className}\n date={selectedDate as CalendarRange}\n onChange={onChange}\n min={min}\n max={max}\n onClose={onClose}\n />\n );\n }\n\n return (\n <SingleCalendar\n className={className}\n date={selectedDate as Date}\n view={view}\n setView={setView}\n tileContent={tileContent}\n onChange={onChange}\n min={min}\n max={max}\n onClose={onClose}\n viewSelector={viewSelector}\n />\n );\n}\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","self","source","owner","debugStack","debugTask","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","u","t","r","SvgClose","isSameDay","date1","date2","view","isInRange","day","range","WEEKS","DayTile","selectedDate","weeksInMonth","tileContent","handleDayClick","max","min","hideBefore","hideAfter","style","scroll","hoverDate","setHoverDate","styles","jsx","week","index","idx","cn","jsxs","SvgArrow","SvgDropArrow","DateLabel","viewDate","onArrowClick","disabled","method","selectMode","setSelectMode","hideArrow","ArrowIcon","DropIcon","useCalendarNav","setDate","direction","offset","minDate","maxDate","newDate","getWeeksInMonth","startOfMonth","endOfMonth","weeks","currentWeek","startDayOfWeek","prevMonthEnd","i","prevDate","currentDate","endDayOfWeek","nextDate","RangeCalendar","className","onChange","onClose","setViewDate","useState","onDayClick","maintenance","useEffect","CloseIcon","MONTHS","_","MonthTile","handleMonthClick","isDisabled","month","monthDate","YearTile","onClick","wrapperRef","useRef","selectedRef","YEARS","selectedElement","wrapperElement","clientHeight","offsetTop","selectedHeight","year","useDateSelect","setView","ViewSelector","selectView","SingleCalendar","viewSelector","setMethod","onMonthClick","onYearClick","data","m","c","n","a","s","ScrollCalendar","maxCount","scrollRef","targetRef","calendarCount","setCalendarCount","handleDateChange","count","_a","useIntersectionObserver","length","prev","Calendar","selectRange"],"mappings":";;;;;;;;4CAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAE,EACb,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EAC9D,MAAMF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,EACV,KAAMG,EACN,IAAKG,EACL,IAAgBF,IAAX,OAAoBA,EAAS,KAClC,MAAOC,CACR,CACH,CACA,OAAAG,EAAA,SAAmBP,EACnBO,EAAA,IAAcN,EACdM,EAAA,KAAeN;;;;;;;;yCCtBE,QAAQ,IAAI,WAA7B,cACG,UAAY,CACX,SAASO,EAAyBN,EAAM,CACtC,GAAYA,GAAR,KAAc,OAAO,KACzB,GAAmB,OAAOA,GAAtB,WACF,OAAOA,EAAK,WAAaO,GACrB,KACAP,EAAK,aAAeA,EAAK,MAAQ,KACvC,GAAiB,OAAOA,GAApB,SAA0B,OAAOA,EACrC,OAAQA,EAAI,CACV,KAAKF,EACH,MAAO,WACT,KAAKU,EACH,MAAO,WACT,KAAKC,EACH,MAAO,aACT,KAAKC,EACH,MAAO,WACT,KAAKC,EACH,MAAO,eACT,KAAKC,GACH,MAAO,UACjB,CACM,GAAiB,OAAOZ,GAApB,SACF,OACgB,OAAOA,EAAK,KAAzB,UACC,QAAQ,MACN,mHACD,EACHA,EAAK,SACf,CACU,KAAKa,EACH,MAAO,SACT,KAAKC,EACH,OAAQd,EAAK,aAAe,WAAa,YAC3C,KAAKe,EACH,OAAQf,EAAK,SAAS,aAAe,WAAa,YACpD,KAAKgB,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AiD,EACA,aAAA+B,CAAA,CACF,CAEJ","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index.umd.cjs","sources":["../../../../../.yarn/berry/cache/react-npm-19.1.0-9804a7da5b-10c0.zip/node_modules/react/cjs/react-jsx-runtime.production.js","../../../../../.yarn/berry/cache/react-npm-19.1.0-9804a7da5b-10c0.zip/node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../.yarn/berry/cache/react-npm-19.1.0-9804a7da5b-10c0.zip/node_modules/react/jsx-runtime.js","../../utils/dist/index.js","../src/assets/close.svg","../src/Calendar/utils/isSameDay.ts","../src/Calendar/utils/isInRange.ts","../src/Calendar/components/DayTile/index.tsx","../src/assets/arrow.svg","../src/assets/drop-arrow.svg","../src/Calendar/components/DateLabel/index.tsx","../src/Calendar/hooks/useCalendarNav.ts","../src/Calendar/utils/getWeeksInMonth.ts","../src/Calendar/RangeCalendar.tsx","../src/Calendar/components/MonthTile/index.tsx","../src/Calendar/components/YearTile/index.tsx","../src/Calendar/hooks/useDateSelect.ts","../src/Calendar/components/ViewSelector/index.tsx","../src/Calendar/SingleCalendar.tsx","../../hooks/dist/index.js","../src/Calendar/ScrollCalendar.tsx","../src/Calendar/index.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(\n type,\n key,\n self,\n source,\n owner,\n props,\n debugStack,\n debugTask\n ) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n self,\n source,\n getOwner(),\n maybeKey,\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_ELEMENT_TYPE &&\n node._store &&\n (node._store.validated = 1);\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n \"react-stack-bottom-frame\": function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React[\"react-stack-bottom-frame\"].bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","function u(t) {\n return Object.entries(t).filter(([, r]) => r).map(([r]) => r).join(\" \");\n}\nconst o = (t, r = 2) => {\n if (t == null || Number.isNaN(Number(t)))\n return 0;\n const i = `${t}`;\n if (!i.includes(\"e\"))\n return +`${Math.round(parseFloat(`${t}e+${r}`))}e-${r}`;\n const e = i.split(\"e\");\n let n = \"\";\n return +e[1] + r > 0 && (n = \"+\"), +`${Math.round(parseFloat(`${+e[0]}e${n}${+e[1] + r}`))}e-${r}`;\n}, s = (t, r = 2) => t == null || Number.isNaN(t) ? \"-\" : o(t, r), c = (t = 0) => {\n const r = t ?? 0, i = Math.trunc(r) || 0, e = Math.floor((r - i) * 60) || 0;\n return {\n fullTime: `${i !== 0 ? `${i}시간` : \"\"}${e !== 0 ? ` ${e}분` : \"\"}` || \"0분\",\n hour: i,\n minute: e\n };\n}, a = () => {\n const { userAgent: t } = navigator;\n return t.match(/Android/i) || t.match(/iPhone|iPad|iPod/i) ? !0 : !(t.match(/Windows/i) || t.match(/Macintosh/i));\n}, d = (t) => t != null;\nexport {\n a as checkIsMobile,\n u as cn,\n s as displayRoundNum,\n c as formatTime,\n d as isDefined,\n o as roundNum\n};\n//# sourceMappingURL=index.js.map\n","import * as React from \"react\";\nconst SvgClose = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"64px\", height: \"64px\", viewBox: \"0 0 24 24\", fill: \"#000000\", xmlns: \"http://www.w3.org/2000/svg\", stroke: \"#000000\", strokeWidth: 0.696, ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_bgCarrier\", strokeWidth: 0 }), /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_tracerCarrier\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_iconCarrier\" }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z\" })));\nexport default SvgClose;\n","import { CalendarView } from '../type';\n\nconst isSameDay = (date1: Date | null, date2: Date | null, view: CalendarView = 'day'): boolean => {\n if (date1 === null || date2 === null) return false;\n\n switch (view) {\n case 'day':\n return date1.getFullYear() === date2.getFullYear()\n && date1.getMonth() === date2.getMonth()\n && date1.getDate() === date2.getDate();\n case 'month':\n return date1.getFullYear() === date2.getFullYear()\n && date1.getMonth() === date2.getMonth();\n case 'year':\n return date1.getFullYear() === date2.getFullYear();\n default:\n return false;\n }\n};\n\nexport default isSameDay;\n","import { CalendarRange } from '../type';\n\nconst isInRange = (day: Date, range?:CalendarRange) => {\n if (!range?.[0] || !range?.[1]) return false;\n return day >= range[0] && day < range[1];\n};\n\nexport default isInRange;\n","/* eslint-disable react/no-array-index-key */\nimport isSameDay from 'Calendar/utils/isSameDay';\nimport { cn } from '@jk-core/utils';\nimport { CalendarRange } from 'Calendar/type';\nimport isInRange from 'Calendar/utils/isInRange';\nimport styles from './DayTile.module.scss';\n\nconst WEEKS = ['일', '월', '화', '수', '목', '금', '토'];\n\ninterface Props {\n hoverDate?:Date | null,\n setHoverDate?:(date:Date | null)=>void,\n selectedDate?: CalendarRange;\n weeksInMonth: {\n thisMonth: string;\n date: Date;\n }[][];\n tileContent?: () => React.ReactNode;\n handleDayClick: (day: Date) => void;\n max?: Date;\n min?: Date;\n hideBefore?: boolean;\n hideAfter?: boolean;\n range?: boolean;\n scroll?: boolean;\n style?: React.CSSProperties;\n}\nexport default function DayTile({\n selectedDate, weeksInMonth, tileContent, handleDayClick, range = false,\n max, min, hideBefore = false, hideAfter = false, style, scroll,\n hoverDate, setHoverDate = () => { },\n}: Props) {\n const handleDisabled = (date: Date): boolean => {\n const compareDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());\n const compareMin = min ? new Date(min.getFullYear(), min.getMonth(), min.getDate()) : null;\n const compareMax = max ? new Date(max.getFullYear(), max.getMonth(), max.getDate()) : null;\n\n return !!((compareMin && compareDate < compareMin) || (compareMax && compareDate > compareMax));\n };\n\n return (\n <div className={styles['day-tile']} style={style}>\n <div className={styles['day-tile__weeks']}>\n {WEEKS.map((week) => (<div className={styles['day-tile__weeks--date']} key={week}>{week}</div>))}\n </div>\n\n <div className={styles['day-tile__tile']}>\n {weeksInMonth.map((week, index) => (\n <div key={index} className={styles['day-tile__week']}>\n {week.map((day, idx) => (\n <button\n className={cn({\n [styles['day-tile__day']]: true,\n [styles['day-tile__day--today']]: isSameDay(day.date, new Date()),\n [styles['day-tile__day--selected-first']]: !!selectedDate && isSameDay(day.date, selectedDate[0] || null) && range\n && ((!!selectedDate[1]\n || ((!scroll && hoverDate != null && !!selectedDate[0])\n && hoverDate > selectedDate[0]))),\n [styles['day-tile__day--selected-last']]: (!!selectedDate && isSameDay(day.date, selectedDate[1] || null) && range)\n || (!scroll && !selectedDate?.[1] && isSameDay(day.date, hoverDate || null)),\n [styles['day-tile__day--before']]: day.thisMonth !== 'this',\n [styles['day-tile__day--hide-before']]: hideBefore && day.thisMonth === 'before',\n [styles['day-tile__day--hide-after']]: hideAfter && day.thisMonth === 'after',\n [styles['day-tile__day--tile']]: !!(tileContent && tileContent()),\n [styles['day-tile__day--range']]: isInRange(day.date, selectedDate) || (!!selectedDate?.[0] && (isInRange(day.date, [selectedDate[0], hoverDate]))),\n })}\n type=\"button\"\n disabled={handleDisabled(day.date)}\n key={idx}\n onMouseOver={() => {\n if (!selectedDate?.[1] && !((min && day.date < min) || (max && day.date > max))) {\n setHoverDate(new Date(\n day.date.getFullYear(),\n day.date.getMonth(),\n day.date.getDate(),\n ));\n }\n }}\n onFocus={() => {\n if (!selectedDate?.[1] && !((min && day.date < min) || (max && day.date > max))) {\n setHoverDate(new Date(\n day.date.getFullYear(),\n day.date.getMonth(),\n day.date.getDate(),\n ));\n }\n }}\n onMouseLeave={() => {\n if (hoverDate) setHoverDate(null);\n }}\n onClick={() => handleDayClick(day.date)}\n >\n <div className={cn({\n [styles['day-tile--content']]: true,\n [styles['day-tile--selected']]: !!selectedDate && (isSameDay(day.date, selectedDate[0] || null) || isSameDay(day.date, selectedDate[1] || null) || isSameDay(day.date, hoverDate || null)),\n })}\n >\n {day.date.getDate()}\n {tileContent && tileContent()}\n </div>\n </button>\n ))}\n </div>\n ))}\n </div>\n </div>\n );\n}\n","import * as React from \"react\";\nconst SvgArrow = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"64px\", height: \"64px\", viewBox: \"0 0 24 24\", fill: \"#0F0F0F\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_bgCarrier\", strokeWidth: 0 }), /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_tracerCarrier\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"g\", { id: \"SVGRepo_iconCarrier\" }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M16.1795 3.26875C15.7889 2.87823 15.1558 2.87823 14.7652 3.26875L8.12078 9.91322C6.94952 11.0845 6.94916 12.9833 8.11996 14.155L14.6903 20.7304C15.0808 21.121 15.714 21.121 16.1045 20.7304C16.495 20.3399 16.495 19.7067 16.1045 19.3162L9.53246 12.7442C9.14194 12.3536 9.14194 11.7205 9.53246 11.33L16.1795 4.68297C16.57 4.29244 16.57 3.65928 16.1795 3.26875Z\" })));\nexport default SvgArrow;\n","import * as React from \"react\";\nconst SvgDropArrow = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 25, height: 25, viewBox: \"0 0 20 20\", fill: \"none\", stroke: \"#2D2D2D\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M5 7.5L10 13L15 7.5\", strokeWidth: 1.4, strokeLinecap: \"round\" }));\nexport default SvgDropArrow;\n","import { cn } from '@jk-core/utils';\nimport { CalendarView } from 'Calendar/type';\nimport ArrowIcon from 'assets/arrow.svg';\nimport DropIcon from 'assets/drop-arrow.svg';\nimport styles from './DateLabel.module.scss';\n\ninterface DateLabelProps {\n viewDate: Date;\n onArrowClick: (direction: 'prev' | 'next') => void;\n disabled: (direction: 'prev' | 'next') => boolean;\n method: CalendarView;\n selectMode?: CalendarView;\n setSelectMode?: (mode: CalendarView) => void;\n hideArrow?: 'prev' | 'next' | 'all' | null;\n range?: boolean;\n}\n\nexport default function DateLabel({\n viewDate, onArrowClick, disabled, method, selectMode = 'day', setSelectMode = () => { }, hideArrow = null, range = false,\n}: DateLabelProps) {\n return (\n <div className={cn({\n [styles.nav]: true,\n [styles['nav--range']]: range,\n [styles['nav--left']]: hideArrow === 'all',\n })}\n >\n {hideArrow !== 'all' && (\n <button\n className={styles.nav__button}\n type=\"button\"\n onClick={() => onArrowClick('prev')}\n disabled={disabled('prev') || hideArrow === 'prev'}\n >\n {hideArrow !== 'prev' && <ArrowIcon />}\n </button>\n )}\n {range ? (\n <div className={cn({\n [styles.nav__label]: true,\n [styles['nav__label--left']]: hideArrow === 'all',\n })}\n >\n {`${viewDate.getFullYear()}년 ${viewDate.getMonth() + 1}월`}\n </div>\n ) : (\n <div className={cn({\n [styles.nav__label]: true,\n [styles['nav__label--left']]: hideArrow === 'all',\n })}\n >\n {method === 'year' && '연도 선택'}\n {method !== 'year' && (\n <button\n className={cn({\n [styles['nav__label--date']]: true,\n [styles['nav__label--date-selected']]: selectMode === 'year',\n })}\n type=\"button\"\n onClick={() => setSelectMode('year')}\n >\n {`${viewDate.getFullYear()}년`}<DropIcon />\n </button>\n )}\n {method === 'day' && (\n <button\n className={cn({\n [styles['nav__label--date']]: true,\n [styles['nav__label--date-selected']]: selectMode === 'month',\n })}\n type=\"button\"\n onClick={() => setSelectMode('month')}\n >\n {`${viewDate.getMonth() + 1}월`}<DropIcon />\n </button>\n )}\n </div>\n )}\n {hideArrow !== 'all' && (\n <button\n className={styles.nav__button}\n type=\"button\"\n onClick={() => onArrowClick('next')}\n disabled={disabled('next') || hideArrow === 'next'}\n >\n {hideArrow !== 'next' && <ArrowIcon style={{ transform: 'rotate(180deg)' }} />}\n </button>\n )}\n </div>\n );\n}\n","import { CalendarView } from '../type';\n\ninterface Props {\n method: CalendarView;\n selectMode: CalendarView;\n viewDate: Date;\n setDate:(date: Date) => void;\n min: Date;\n max: Date;\n}\nconst useCalendarNav = ({\n method, selectMode, viewDate, setDate, min, max,\n}:Props) => {\n const disabled = (direction: 'prev' | 'next') => {\n if (selectMode === 'year' || method !== selectMode) return true;\n\n if (method === 'day') {\n if (direction === 'prev') {\n const prevMonth = new Date(viewDate.getFullYear(), viewDate.getMonth() - 1, 1);\n const isPrevMonthBeforeMin = prevMonth.getFullYear() < min.getFullYear()\n || (prevMonth.getFullYear() === min.getFullYear()\n && prevMonth.getMonth() < min.getMonth());\n return isPrevMonthBeforeMin;\n }\n const nextMonth = new Date(viewDate.getFullYear(), viewDate.getMonth() + 1, 1);\n return nextMonth > max;\n }\n\n if (method === 'month') {\n if (direction === 'prev') {\n const prevYear = new Date(viewDate.getFullYear() - 1, viewDate.getMonth(), 1);\n return prevYear < min;\n }\n const nextYear = new Date(viewDate.getFullYear() + 1, viewDate.getMonth(), 1);\n return nextYear > max;\n }\n\n if (method === 'year') {\n if (direction === 'prev') {\n const prevDecade = new Date(viewDate.getFullYear() - 10, viewDate.getMonth(), 1);\n return prevDecade < min;\n }\n const nextDecade = new Date(viewDate.getFullYear() + 10, viewDate.getMonth(), 1);\n return nextDecade > max;\n }\n\n return false;\n };\n\n const onArrowClick = (direction: 'prev' | 'next') => {\n const offset = direction === 'prev' ? -1 : 1;\n const minDate = new Date(2000, 0, 1);\n const maxDate = new Date(2099, 11, 31);\n\n if (method === 'day') {\n const newDate = new Date(viewDate.getFullYear(), viewDate.getMonth() + offset, 1);\n\n if (newDate >= minDate && newDate <= maxDate) {\n setDate(newDate);\n }\n }\n\n if (method === 'month') {\n const newDate = new Date(viewDate.getFullYear() + offset, viewDate.getMonth(), 1);\n\n if (newDate >= minDate && newDate <= maxDate) {\n setDate(newDate);\n }\n }\n\n if (method === 'year') {\n const newDate = new Date(viewDate.getFullYear() + offset * 10, viewDate.getMonth(), 1);\n\n if (newDate >= minDate && newDate <= maxDate) {\n setDate(newDate);\n }\n }\n };\n\n return { disabled, onArrowClick };\n};\n\nexport default useCalendarNav;\n","const getWeeksInMonth = (viewDate:Date) => {\n const startOfMonth = new Date(viewDate.getFullYear(), viewDate.getMonth(), 1);\n const endOfMonth = new Date(viewDate.getFullYear(), viewDate.getMonth() + 1, 0);\n const weeks = [];\n let currentWeek = [];\n\n const startDayOfWeek = startOfMonth.getDay();\n if (startDayOfWeek !== 0) {\n const prevMonthEnd = new Date(startOfMonth);\n prevMonthEnd.setDate(0);\n for (let i = startDayOfWeek - 1; i >= 0; i -= 1) {\n const prevDate = new Date(prevMonthEnd);\n prevDate.setDate(prevMonthEnd.getDate() - i);\n currentWeek.push({ thisMonth: 'before', date: prevDate });\n }\n }\n\n const currentDate = new Date(startOfMonth);\n\n while (currentDate <= endOfMonth) {\n currentWeek.push({ thisMonth: 'this', date: new Date(currentDate) });\n if (currentDate.getDay() === 6) {\n weeks.push(currentWeek);\n currentWeek = [];\n }\n currentDate.setDate(currentDate.getDate() + 1);\n }\n\n const endDayOfWeek = endOfMonth.getDay();\n if (endDayOfWeek !== 6) {\n for (let i = 1; i <= 6 - endDayOfWeek; i += 1) {\n const nextDate = new Date(endOfMonth);\n nextDate.setDate(endOfMonth.getDate() + i);\n currentWeek.push({ thisMonth: 'after', date: nextDate });\n }\n }\n\n if (currentWeek.length > 0) {\n weeks.push(currentWeek);\n }\n\n return weeks;\n};\n\nexport default getWeeksInMonth;\n","/* eslint-disable react/no-array-index-key */\nimport { cn } from '@jk-core/utils';\nimport { useEffect, useState } from 'react';\nimport CloseIcon from '../assets/close.svg';\nimport DayTile from './components/DayTile';\nimport styles from './Calendar.module.scss';\nimport { CalendarRange } from './type';\nimport DateLabel from './components/DateLabel';\nimport useCalendarNav from './hooks/useCalendarNav';\nimport getWeeksInMonth from './utils/getWeeksInMonth';\n\ninterface CalendarProps {\n className?: string;\n date: CalendarRange;\n onChange:(date:CalendarRange)=>void;\n min: Date;\n max: Date;\n onClose?: () => void;\n}\n\nexport default function RangeCalendar({\n className = '', date: selectedDate = [null, null], onChange, onClose,\n min, max,\n}: CalendarProps) {\n const method = 'day';\n const [viewDate, setViewDate] = useState<Date>(selectedDate?.[0] || new Date());\n const [hoverDate, setHoverDate] = useState<Date | null>(null);\n const weeksInMonth = getWeeksInMonth(viewDate);\n\n const onDayClick = (day: Date, maintenance = false) => {\n if (!maintenance) setViewDate(day);\n if (!selectedDate[0] || (!!selectedDate[0] && !!selectedDate[1])) {\n onChange([day, null]);\n }\n if (!!selectedDate[0] && !selectedDate[1]) {\n if (day < selectedDate[0]) {\n onChange([day, null]);\n } else {\n onChange([selectedDate[0], day]);\n }\n }\n };\n\n const { disabled, onArrowClick } = useCalendarNav({\n method, selectMode: 'day', viewDate, setDate: setViewDate, min, max,\n });\n\n useEffect(() => {\n if (viewDate > max) {\n setViewDate(max);\n }\n if (viewDate < min) {\n setViewDate(min);\n }\n }, [viewDate, max, min]);\n\n return (\n <div className={cn({\n [styles.calendar]: true,\n [styles['calendar--range']]: true,\n [className]: !!className,\n })}\n >\n <div className={styles.calendar__close}>\n {onClose && (\n <CloseIcon onClick={onClose} />\n )}\n </div>\n {/* 일/월/년 선택 버튼 */}\n <div className={styles['calendar__range-tile']}>\n <div className={styles.calendar__wrapper}>\n <DateLabel\n viewDate={viewDate}\n method=\"day\"\n onArrowClick={onArrowClick}\n disabled={disabled}\n hideArrow=\"next\"\n range\n />\n <DayTile\n hoverDate={hoverDate}\n setHoverDate={(day) => setHoverDate(day)}\n selectedDate={selectedDate}\n weeksInMonth={weeksInMonth}\n handleDayClick={onDayClick}\n hideAfter\n max={max}\n min={min}\n range\n />\n </div>\n <div className={styles.calendar__wrapper}>\n <DateLabel\n viewDate={new Date(\n viewDate.getFullYear(),\n viewDate.getMonth() + 1,\n 1,\n )}\n method=\"day\"\n onArrowClick={onArrowClick}\n disabled={disabled}\n hideArrow=\"prev\"\n range\n />\n <DayTile\n hoverDate={hoverDate}\n setHoverDate={(day) => setHoverDate(day)}\n selectedDate={selectedDate}\n weeksInMonth={getWeeksInMonth(new Date(\n viewDate.getFullYear(),\n viewDate.getMonth() + 1,\n 1,\n ))}\n handleDayClick={(day) => onDayClick(day, true)}\n hideBefore\n hideAfter\n max={max}\n min={min}\n range\n />\n </div>\n </div>\n </div>\n );\n}\n","import { cn } from '@jk-core/utils';\nimport isSameDay from '../../utils/isSameDay';\nimport { CalendarView } from '../../type';\nimport styles from './MonthTile.module.scss';\n\nconst MONTHS = Array.from({ length: 12 }, (_, i) => i);\n\ninterface Props {\n selectedDate?: Date;\n viewDate: Date;\n handleMonthClick: (month: number) => void;\n tileContent?: (date: Date, view:CalendarView) => React.ReactNode;\n max: Date;\n min: Date;\n}\n\nexport default function MonthTile({\n selectedDate, viewDate, handleMonthClick, tileContent = () => false,\n max, min,\n}: Props) {\n const isDisabled = (month: number) => {\n const monthDate = new Date(viewDate.getFullYear(), month, 1);\n\n return monthDate > new Date(max.getFullYear(), max.getMonth(), 1)\n || monthDate < new Date(min.getFullYear(), min.getMonth(), 1);\n };\n\n return (\n <div className={styles['month-tile']}>\n {MONTHS.map((month) => (\n <button\n className={cn({\n [styles['month-tile__month']]: true,\n [styles['month-tile__month--selected']]: !!selectedDate && isSameDay(selectedDate, new Date(viewDate.getFullYear(), month), 'month'),\n [styles['month-tile__month--today']]: isSameDay(new Date(viewDate.getFullYear(), month), new Date(), 'month'),\n [styles['month-tile__month--tile']]: !!tileContent(new Date(viewDate.getFullYear(), month - 1, 1), 'month'),\n })}\n type=\"button\"\n key={month}\n onClick={() => handleMonthClick(month)}\n disabled={isDisabled(month)}\n >\n <span>{`${month + 1}월`}</span>\n {!!tileContent(new Date(viewDate.getFullYear(), month - 1, 1), 'month')\n && tileContent(new Date(viewDate.getFullYear(), month - 1, 1), 'month')}\n </button>\n ))}\n </div>\n );\n}\n","import { useEffect, useRef } from 'react';\nimport { cn } from '@jk-core/utils';\nimport { CalendarView } from '../../type';\nimport styles from './YearTile.module.scss';\n\ninterface Props {\n selectedDate?: Date;\n onClick: (year: number) => void;\n tileContent?: (date: Date, view:CalendarView) => React.ReactNode;\n max: Date;\n min: Date;\n}\n\nexport default function YearTile({\n selectedDate, onClick,\n tileContent = () => false,\n max, min,\n}: Props) {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const selectedRef = useRef<HTMLButtonElement>(null);\n const YEARS = Array.from(\n { length: max.getFullYear() - min.getFullYear() + 1 },\n (_, i) => min.getFullYear() + i,\n );\n\n useEffect(() => {\n const selectedElement = selectedRef.current;\n const wrapperElement = wrapperRef.current;\n if (!selectedElement || !wrapperElement) return;\n\n const { clientHeight } = wrapperElement;\n const { offsetTop, clientHeight: selectedHeight } = selectedElement;\n\n wrapperElement.scrollTo({\n top: offsetTop - clientHeight / 2 + selectedHeight,\n });\n }, []);\n\n return (\n <div className={styles['year-tile']} ref={wrapperRef}>\n <div className={styles['year-tile__blank']} />\n {YEARS.map((year) => (\n <button\n className={cn({\n [styles['year-tile__year']]: true,\n [styles['year-tile__year--selected']]: !!selectedDate && selectedDate.getFullYear() === year,\n [styles['year-tile__year--border']]: !!tileContent(new Date(year, 1, 1), 'year'),\n })}\n key={year}\n type=\"button\"\n ref={!!selectedDate && selectedDate.getFullYear() === year ? selectedRef : null}\n onClick={() => onClick(year)}\n >\n <span className={styles['yearTile__year--year']}>{year}</span>\n {tileContent(new Date(year, 1, 1), 'year') && (\n <div className={styles['yearTile__year--tile']}>\n {tileContent(new Date(year, 1, 1), 'year')}\n </div>\n )}\n </button>\n ))}\n <div className={styles['year-tile__blank']} />\n </div>\n );\n}\n","import { CalendarView } from '../type';\n\ninterface UseDateSelectProps {\n viewDate: Date;\n setViewDate: (date: Date) => void;\n method: CalendarView;\n setSelectMode:(mode:CalendarView) => void;\n onChange: (date: Date) => void;\n setView:(view:CalendarView)=>void;\n}\n\nconst useDateSelect = ({\n viewDate, setViewDate, onChange, setSelectMode, method, setView,\n}: UseDateSelectProps) => {\n const min = new Date(2000, 0, 1);\n const max = new Date(2099, 11, 31);\n\n const onDayClick = (day: Date) => {\n if (day < min || day > max) {\n return;\n }\n\n setViewDate(day);\n setView('day');\n onChange(day);\n };\n\n const onMonthClick = (month:number) => {\n const newDate = new Date(viewDate.getFullYear(), month, 1);\n\n setViewDate(newDate);\n\n if (method !== 'month') setSelectMode(method);\n if (method === 'month') {\n setView('month');\n onChange(newDate);\n }\n };\n\n const onYearClick = (year:number) => {\n const newDate = new Date(year, 0, 1);\n\n setViewDate(newDate);\n if (method !== 'year') setSelectMode(method);\n if (method === 'year') {\n setView('year');\n onChange(newDate);\n }\n };\n\n return { onDayClick, onMonthClick, onYearClick };\n};\n\nexport default useDateSelect;\n","import { cn } from '@jk-core/utils';\nimport { CalendarView } from 'Calendar/type';\nimport styles from './ViewSelector.module.scss';\n\ninterface ViewSelectorProps {\n method: CalendarView;\n selectView: (value: CalendarView) => void;\n}\nexport default function ViewSelector({ method, selectView }:ViewSelectorProps) {\n return (\n <div className={styles.view}>\n <div className={\n cn({\n [styles.view__block]: true,\n [styles['view__block--second']]: method === 'month',\n [styles['view__block--last']]: method === 'year',\n })\n }\n />\n <button\n className={cn({\n [styles.view__selector]: true,\n [styles['view__selector--selected']]: method === 'day',\n })}\n type=\"button\"\n onClick={() => selectView('day')}\n >일\n </button>\n <button\n className={cn({\n [styles.view__selector]: true,\n [styles['view__selector--selected']]: method === 'month',\n })}\n type=\"button\"\n onClick={() => selectView('month')}\n >월\n </button>\n <button\n className={cn({\n [styles.view__selector]: true,\n [styles['view__selector--selected']]: method === 'year',\n })}\n type=\"button\"\n onClick={() => selectView('year')}\n >년\n </button>\n </div>\n );\n}\n","/* eslint-disable react/no-array-index-key */\nimport { useEffect, useState } from 'react';\nimport { cn } from '@jk-core/utils';\nimport CloseIcon from '../assets/close.svg';\nimport { CalendarView } from './type';\nimport getWeeksInMonth from './utils/getWeeksInMonth';\nimport DayTile from './components/DayTile';\nimport MonthTile from './components/MonthTile';\nimport YearTile from './components/YearTile';\nimport useCalendarNav from './hooks/useCalendarNav';\nimport useDateSelect from './hooks/useDateSelect';\nimport styles from './Calendar.module.scss';\nimport ViewSelector from './components/ViewSelector';\nimport './index.scss';\nimport DateLabel from './components/DateLabel';\n\ninterface CalendarProps {\n className?: string;\n date?: Date;\n view?: CalendarView;\n setView?: (view:CalendarView)=>void;\n tileContent?: (date: Date | undefined, view: CalendarView) => React.ReactNode;\n onChange?:(date:Date)=>void;\n min?: Date;\n max?: Date;\n onClose?: () => void;\n viewSelector?: boolean;\n}\n\nexport default function SingleCalendar({\n className = '', date: selectedDate, view, setView = () => { }, tileContent, onChange = () => { }, onClose, viewSelector = true,\n min = new Date(2000, 0, 1), max = new Date(2099, 11, 31),\n}: CalendarProps) {\n const [viewDate, setViewDate] = useState<Date>(selectedDate || new Date());\n const [method, setMethod] = useState<CalendarView>(view || 'day');\n const [selectMode, setSelectMode] = useState<CalendarView>(view || 'day');\n const weeksInMonth = getWeeksInMonth(viewDate);\n const { onDayClick, onMonthClick, onYearClick } = useDateSelect({\n viewDate,\n setViewDate: (data) => setViewDate(data),\n onChange,\n setSelectMode,\n method,\n setView,\n });\n const { disabled, onArrowClick } = useCalendarNav({\n method, selectMode, viewDate, setDate: setViewDate, min, max,\n });\n\n const selectView = (value: CalendarView) => {\n setMethod(value);\n setSelectMode(value);\n };\n\n useEffect(() => {\n if (viewDate > max) {\n setViewDate(max);\n }\n if (viewDate < min) {\n setViewDate(min);\n }\n }, [viewDate, max, min]);\n\n return (\n <div className={cn({\n [styles.calendar]: true,\n [className]: !!className,\n })}\n >\n <div className={styles.calendar__close}>\n {onClose && (\n <CloseIcon onClick={onClose} />\n )}\n </div>\n {/* 일/월/년 선택 버튼 */}\n {viewSelector && (\n <ViewSelector method={method} selectView={selectView} />\n )}\n <DateLabel\n viewDate={viewDate}\n method={method}\n onArrowClick={onArrowClick}\n disabled={disabled}\n selectMode={selectMode}\n setSelectMode={setSelectMode}\n />\n\n {(method === 'day' && selectMode === 'day') && (\n <DayTile\n selectedDate={[selectedDate, null]}\n weeksInMonth={weeksInMonth}\n handleDayClick={onDayClick}\n tileContent={() => (tileContent ? tileContent(selectedDate, method) : null)}\n max={max}\n min={min}\n />\n )}\n\n {((method === 'month' || selectMode === 'month') && selectMode !== 'year') && (\n <MonthTile\n selectedDate={selectedDate}\n viewDate={viewDate}\n handleMonthClick={onMonthClick}\n tileContent={tileContent}\n max={max}\n min={min}\n />\n )}\n\n {(method === 'year' || selectMode === 'year') && (\n <YearTile\n selectedDate={selectedDate}\n onClick={onYearClick}\n tileContent={tileContent}\n max={max}\n min={min}\n />\n )}\n </div>\n );\n}\n","import { useEffect as a, useState as d, useRef as i, useCallback as w } from \"react\";\nconst m = ({\n target: e,\n parent: r,\n callback: c,\n options: n\n}) => {\n a(() => {\n const t = e.current, o = r == null ? void 0 : r.current;\n if (!t) return () => {\n };\n const s = new IntersectionObserver(([u]) => {\n u.isIntersecting && c();\n }, {\n ...o ? { root: o } : {},\n threshold: 1,\n ...n\n });\n return s.observe(t), () => {\n s.unobserve(t);\n };\n }, [c, n, r, e]);\n}, l = ({ targetRef: e, eventList: r = [], handler: c = () => {\n} }) => {\n a(() => {\n const n = (t) => {\n e.current && !e.current.contains(t.target) && c();\n };\n return Array.isArray(r) && r.map((t) => window.addEventListener(t, n)), () => {\n Array.isArray(r) && r.map((t) => window.removeEventListener(t, n));\n };\n }, [e, c, r]);\n}, v = (e) => {\n const [r, c] = d(() => window.matchMedia(`(max-width: ${e}px)`).matches), n = i(null);\n return a(() => {\n const t = window.matchMedia(`(max-width: ${e}px)`);\n n.current = t;\n function o() {\n c(window.matchMedia(`(max-width: ${e}px)`).matches);\n }\n return n.current.addEventListener(\"change\", o), () => {\n var s;\n (s = n.current) == null || s.removeEventListener(\"change\", o);\n };\n }, [e]), r;\n}, p = () => {\n const { history: e } = window;\n return {\n push: (n) => {\n const t = new URL(window.location.href), o = `${t.origin}${t.pathname}${t.search}${t.hash}/${n}`;\n e.pushState({}, \"\", o);\n },\n back: () => {\n e.back();\n }\n };\n}, f = (e) => {\n a(() => {\n const r = () => {\n const t = \"POP\", { location: o } = window;\n e({ action: t, location: o });\n }, c = () => {\n const t = \"PUSH\", { location: o } = window;\n e({ action: t, location: o });\n }, n = () => {\n const t = \"REPLACE\", { location: o } = window;\n e({ action: t, location: o });\n };\n return window.addEventListener(\"popstate\", r), window.addEventListener(\"pushstate\", c), window.addEventListener(\"replacestate\", n), () => {\n window.removeEventListener(\"popstate\", r), window.removeEventListener(\"pushstate\", c), window.removeEventListener(\"replacestate\", n);\n };\n }, [e]);\n}, E = (e, r) => {\n const c = i(e), n = i(null);\n return a(() => (c.current = e, () => {\n n.current !== null && clearTimeout(n.current);\n }), [e]), w((...o) => {\n n.current && clearTimeout(n.current), n.current = setTimeout(() => {\n c.current(...o);\n }, r);\n }, [r]);\n};\nexport {\n E as useDebounce,\n p as useHistory,\n f as useHistoryEvent,\n l as useInterectOutside,\n m as useIntersectionObserver,\n v as useMediaQuery\n};\n//# sourceMappingURL=index.js.map\n","import { cn } from '@jk-core/utils';\nimport { useEffect, useRef, useState } from 'react';\nimport { useIntersectionObserver } from '@jk-core/hooks';\nimport DayTile from './components/DayTile';\nimport styles from './Calendar.module.scss';\nimport DateLabel from './components/DateLabel';\nimport getWeeksInMonth from './utils/getWeeksInMonth';\nimport { CalendarRange } from './type';\n\ninterface CalendarProps {\n className?: string;\n date: CalendarRange;\n onChange:(date:CalendarRange)=>void;\n min: Date;\n max: Date;\n}\n\nexport default function ScrollCalendar({\n className = '', date: selectedDate = [null, null], onChange,\n min, max,\n}: CalendarProps) {\n const maxCount = new Date().getMonth() - min.getMonth()\n + 12 * (new Date().getFullYear() - min.getFullYear());\n const scrollRef = useRef<HTMLDivElement>(null);\n const targetRef = useRef<HTMLDivElement>(null);\n const [viewDate, setViewDate] = useState<Date>(selectedDate?.[0] || new Date());\n const [hoverDate, setHoverDate] = useState<Date | null>(null);\n const [calendarCount, setCalendarCount] = useState(Array.from({\n length: Math.abs(viewDate.getMonth() - new Date().getMonth()\n + (12 * (viewDate.getFullYear() - new Date().getFullYear() - 1))),\n }).map((_, idx) => idx));\n\n const onDayClick = (day: Date, maintenance = false) => {\n if (!maintenance) setViewDate(day);\n if (!selectedDate[0] || (!!selectedDate[0] && !!selectedDate[1])) {\n onChange([day, null]);\n }\n if (!!selectedDate[0] && !selectedDate[1]) {\n if (day < selectedDate[0]) {\n onChange([day, null]);\n } else {\n onChange([selectedDate[0], day]);\n }\n }\n };\n\n const handleDateChange = (count: number) => {\n const newDate = new Date();\n newDate.setMonth(newDate.getMonth() - count);\n return newDate;\n };\n\n useEffect(() => {\n if (viewDate > max) {\n setViewDate(max);\n }\n if (viewDate < min) {\n setViewDate(min);\n }\n }, [viewDate, max, min]);\n\n useEffect(() => {\n scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight });\n }, []);\n\n useIntersectionObserver({\n target: targetRef as React.RefObject<HTMLDivElement>,\n parent: scrollRef as React.RefObject<HTMLDivElement>,\n callback: () => {\n if (maxCount < calendarCount.length) return;\n const length = maxCount - (calendarCount.length - 1) > 12\n ? 12 : maxCount - (calendarCount.length - 1);\n setCalendarCount((prev) => [...prev,\n ...Array.from({ length }).map((_, i) => prev.length + i)]);\n },\n options: { threshold: 0.1 },\n });\n\n return (\n <div className={cn({\n [styles.calendar]: true,\n [styles['calendar--range']]: true,\n [styles['calendar--scroll']]: true,\n [className]: !!className,\n })}\n >\n {/* 일/월/년 선택 버튼 */}\n <div className={styles.calendar__scroll} ref={scrollRef}>\n {calendarCount.map((count) => (\n <div\n className={styles['calendar__scroll--wrapper']}\n key={count}\n ref={(maxCount > (calendarCount.length - 1)\n && count === calendarCount.length - 2) ? targetRef : null}\n >\n <DateLabel\n viewDate={handleDateChange(count)}\n method=\"day\"\n onArrowClick={() => { }}\n disabled={() => false}\n hideArrow=\"all\"\n range\n />\n <DayTile\n style={{ height: 'auto', minHeight: 'auto' }}\n hoverDate={hoverDate}\n setHoverDate={(day) => setHoverDate(day)}\n selectedDate={selectedDate}\n weeksInMonth={getWeeksInMonth(handleDateChange(count))}\n handleDayClick={onDayClick}\n hideAfter\n hideBefore\n max={max}\n min={min}\n range\n scroll\n />\n </div>\n ))}\n\n </div>\n </div>\n );\n}\n","/* eslint-disable react/no-array-index-key */\nimport { CalendarRange, CalendarView } from './type';\nimport RangeCalendar from './RangeCalendar';\nimport SingleCalendar from './SingleCalendar';\nimport ScrollCalendar from './ScrollCalendar';\n\nimport './index.scss';\n\ninterface CalendarProps {\n className?: string;\n date?: Date | CalendarRange;\n view?: CalendarView;\n setView?: (view:CalendarView)=>void;\n tileContent?: (date: Date | undefined, view: CalendarView) => React.ReactNode;\n onChange?:(date:Date | CalendarRange)=>void;\n min?: Date;\n max?: Date;\n onClose?: () => void;\n viewSelector?: boolean;\n selectRange?: boolean;\n scroll?: boolean;\n}\n\nexport default function Calendar({\n className = '', date: selectedDate, view, setView = () => { }, tileContent, onChange = () => { }, onClose, viewSelector = true,\n min = new Date('2000-01-01'), max = new Date('2099-11-31'), selectRange = false, scroll = false,\n}: CalendarProps) {\n if (scroll) {\n return (\n <ScrollCalendar\n className={className}\n date={selectedDate as CalendarRange}\n onChange={onChange}\n min={min}\n max={max}\n />\n );\n }\n if (selectRange) {\n return (\n <RangeCalendar\n className={className}\n date={selectedDate as CalendarRange}\n onChange={onChange}\n min={min}\n max={max}\n onClose={onClose}\n />\n );\n }\n\n return (\n <SingleCalendar\n className={className}\n date={selectedDate as Date}\n view={view}\n setView={setView}\n tileContent={tileContent}\n onChange={onChange}\n min={min}\n max={max}\n onClose={onClose}\n viewSelector={viewSelector}\n />\n );\n}\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","self","source","owner","debugStack","debugTask","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","u","t","r","SvgClose","isSameDay","date1","date2","view","isInRange","day","range","WEEKS","DayTile","selectedDate","weeksInMonth","tileContent","handleDayClick","max","min","hideBefore","hideAfter","style","scroll","hoverDate","setHoverDate","handleDisabled","date","compareDate","compareMin","compareMax","styles","jsx","week","index","idx","cn","jsxs","SvgArrow","SvgDropArrow","DateLabel","viewDate","onArrowClick","disabled","method","selectMode","setSelectMode","hideArrow","ArrowIcon","DropIcon","useCalendarNav","setDate","direction","prevMonth","offset","minDate","maxDate","newDate","getWeeksInMonth","startOfMonth","endOfMonth","weeks","currentWeek","startDayOfWeek","prevMonthEnd","i","prevDate","currentDate","endDayOfWeek","nextDate","RangeCalendar","className","onChange","onClose","setViewDate","useState","onDayClick","maintenance","useEffect","CloseIcon","MONTHS","_","MonthTile","handleMonthClick","isDisabled","month","monthDate","YearTile","onClick","wrapperRef","useRef","selectedRef","YEARS","selectedElement","wrapperElement","clientHeight","offsetTop","selectedHeight","year","useDateSelect","setView","ViewSelector","selectView","SingleCalendar","viewSelector","setMethod","onMonthClick","onYearClick","data","m","c","n","a","o","s","ScrollCalendar","maxCount","scrollRef","targetRef","calendarCount","setCalendarCount","handleDateChange","count","_a","useIntersectionObserver","length","prev","Calendar","selectRange"],"mappings":";;;;;;;;4CAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAE,EACb,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EAC9D,MAAMF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,EACV,KAAMG,EACN,IAAKG,EACL,IAAgBF,IAAX,OAAoBA,EAAS,KAClC,MAAOC,CACR,CACH,CACA,OAAAG,EAAA,SAAmBP,EACnBO,EAAA,IAAcN,EACdM,EAAA,KAAeN;;;;;;;;yCCtBE,QAAQ,IAAI,WAA7B,cACG,UAAY,CACX,SAASO,EAAyBN,EAAM,CACtC,GAAYA,GAAR,KAAc,OAAO,KACzB,GAAmB,OAAOA,GAAtB,WACF,OAAOA,EAAK,WAAaO,GACrB,KACAP,EAAK,aAAeA,EAAK,MAAQ,KACvC,GAAiB,OAAOA,GAApB,SAA0B,OAAOA,EACrC,OAAQA,EAAI,CACV,KAAKF,EACH,MAAO,WACT,KAAKU,EACH,MAAO,WACT,KAAKC,EACH,MAAO,aACT,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AgB+D,EAAiBC,CAAK,CAAC,EACrD,eAAgB9C,EAChB,UAAS,GACT,WAAU,GACV,IAAA1D,EACA,IAAAC,EACA,MAAK,GACL,OAAM,EAAA,CAAA,CACR,CAAA,EAzBKuG,CAAA,CA2BR,CAEH,CAAA,CAAA,CACF,CAEJ,CCpGA,SAAwBK,GAAS,CAC/B,UAAAxD,EAAY,GAAI,KAAMzD,EAAc,KAAAN,EAAM,QAAA4F,EAAU,IAAM,CAAE,EAAG,YAAApF,EAAa,SAAAwD,EAAW,IAAM,CAAE,EAAG,QAAAC,EAAS,aAAA+B,EAAe,GAC1H,IAAArF,EAAU,IAAA,KAAK,YAAY,EAAG,IAAAD,EAAU,IAAA,KAAK,YAAY,EAAG,YAAA8G,EAAc,GAAO,OAAAzG,EAAS,EAC5F,EAAkB,CAChB,OAAIA,EAEAS,EAAA,IAACmF,GAAA,CACC,UAAA5C,EACA,KAAMzD,EACN,SAAA0D,EACA,IAAArD,EACA,IAAAD,CAAA,CACF,EAGA8G,EAEAhG,EAAA,IAACsC,GAAA,CACC,UAAAC,EACA,KAAMzD,EACN,SAAA0D,EACA,IAAArD,EACA,IAAAD,EACA,QAAAuD,CAAA,CACF,EAKFzC,EAAA,IAACuE,GAAA,CACC,UAAAhC,EACA,KAAMzD,EACN,KAAAN,EACA,QAAA4F,EACA,YAAApF,EACA,SAAAwD,EACA,IAAArD,EACA,IAAAD,EACA,QAAAuD,EACA,aAAA+B,CAAA,CACF,CAEJ","x_google_ignoreList":[0,1,2]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jk-core/components",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "types": "./dist/index.d.ts",
@@ -48,8 +48,8 @@
48
48
  "lint:stylelint": "stylelint \"./src/**/*.scss\" --config .stylelintrc.json"
49
49
  },
50
50
  "dependencies": {
51
- "@jk-core/hooks": "workspace:^",
52
- "@jk-core/utils": "workspace:^",
51
+ "@jk-core/hooks": "^1.0.0",
52
+ "@jk-core/utils": "^1.0.0",
53
53
  "react": "^19.0.0",
54
54
  "react-dom": "^19.0.0"
55
55
  },
@@ -30,6 +30,14 @@ export default function DayTile({
30
30
  max, min, hideBefore = false, hideAfter = false, style, scroll,
31
31
  hoverDate, setHoverDate = () => { },
32
32
  }: Props) {
33
+ const handleDisabled = (date: Date): boolean => {
34
+ const compareDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
35
+ const compareMin = min ? new Date(min.getFullYear(), min.getMonth(), min.getDate()) : null;
36
+ const compareMax = max ? new Date(max.getFullYear(), max.getMonth(), max.getDate()) : null;
37
+
38
+ return !!((compareMin && compareDate < compareMin) || (compareMax && compareDate > compareMax));
39
+ };
40
+
33
41
  return (
34
42
  <div className={styles['day-tile']} style={style}>
35
43
  <div className={styles['day-tile__weeks']}>
@@ -57,7 +65,7 @@ export default function DayTile({
57
65
  [styles['day-tile__day--range']]: isInRange(day.date, selectedDate) || (!!selectedDate?.[0] && (isInRange(day.date, [selectedDate[0], hoverDate]))),
58
66
  })}
59
67
  type="button"
60
- disabled={(min && day.date < min) || (max && day.date > max)}
68
+ disabled={handleDisabled(day.date)}
61
69
  key={idx}
62
70
  onMouseOver={() => {
63
71
  if (!selectedDate?.[1] && !((min && day.date < min) || (max && day.date > max))) {
@@ -17,7 +17,10 @@ const useCalendarNav = ({
17
17
  if (method === 'day') {
18
18
  if (direction === 'prev') {
19
19
  const prevMonth = new Date(viewDate.getFullYear(), viewDate.getMonth() - 1, 1);
20
- return prevMonth < min;
20
+ const isPrevMonthBeforeMin = prevMonth.getFullYear() < min.getFullYear()
21
+ || (prevMonth.getFullYear() === min.getFullYear()
22
+ && prevMonth.getMonth() < min.getMonth());
23
+ return isPrevMonthBeforeMin;
21
24
  }
22
25
  const nextMonth = new Date(viewDate.getFullYear(), viewDate.getMonth() + 1, 1);
23
26
  return nextMonth > max;