@egov3/system-design 1.3.120 → 1.3.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var css_248z = ".CalendarBody-module_wrapper__fd17C {\n display: flex;\n flex-direction: column;\n color: var(--text-disabled-color);\n}\n\n.CalendarBody-module_weekDays__zXG3- {\n height: 24px;\n}\n\n.CalendarBody-module_grid__HNGTZ,\n.CalendarBody-module_weekDays__zXG3- {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n column-gap: calc((100% - 7 * 28px) / 6);\n text-align: center;\n}\n\n.CalendarBody-module_weekDay__hzksZ,\n.CalendarBody-module_day__0KNDZ {\n width: 28px;\n}\n\n.CalendarBody-module_day__0KNDZ {\n cursor: pointer;\n color: var(--text-primary);\n height: 28px;\n}\n\n.CalendarBody-module_muted__8XysY {\n color: var(--text-disabled-color);\n}\n\n.CalendarBody-module_selected__86UkJ {\n background-color: var(--surface-accent);\n color: var(--text-white-nonconvert-color);\n border-radius: 100px;\n}\n";
6
+ var styles = {"wrapper":"CalendarBody-module_wrapper__fd17C","weekDays":"CalendarBody-module_weekDays__zXG3-","grid":"CalendarBody-module_grid__HNGTZ","weekDay":"CalendarBody-module_weekDay__hzksZ","day":"CalendarBody-module_day__0KNDZ","muted":"CalendarBody-module_muted__8XysY","selected":"CalendarBody-module_selected__86UkJ"};
7
+ function styleInject(css, options) {
8
+ if (typeof document === 'undefined') return;
9
+ const head = document.head || document.getElementsByTagName('head')[0];
10
+ const style = document.createElement('style');
11
+ style.type = 'text/css';
12
+ if (style.styleSheet) {
13
+ style.styleSheet.cssText = css;
14
+ } else {
15
+ style.appendChild(document.createTextNode(css));
16
+ }
17
+ head.appendChild(style);
18
+ }
19
+ styleInject(css_248z);
20
+
21
+ exports.default = styles;
22
+ //# sourceMappingURL=CalendarBody.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarBody.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var index = require('../../../baseComponents/index.js');
5
+ var joinClasses = require('../../../utils/joinClasses.js');
6
+ var CalendarBody_module = require('./CalendarBody.module.css.js');
7
+
8
+ const WEEK_DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
9
+ const CELL_COUNT = 42;
10
+ const isSameDate = (left, right) => left.getFullYear() === right.getFullYear() &&
11
+ left.getMonth() === right.getMonth() &&
12
+ left.getDate() === right.getDate();
13
+ const getCalendarDays = (month, year, selectedDate) => {
14
+ const firstDayIndex = (new Date(year, month, 1).getDay() + 6) % 7;
15
+ const startDate = new Date(year, month, 1 - firstDayIndex);
16
+ const today = new Date();
17
+ return Array.from({ length: CELL_COUNT }, (_, index) => {
18
+ const date = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate() + index);
19
+ return {
20
+ date,
21
+ day: date.getDate(),
22
+ isCurrentMonth: date.getMonth() === month,
23
+ isToday: isSameDate(date, today),
24
+ isSelected: selectedDate ? isSameDate(date, selectedDate) : false,
25
+ };
26
+ });
27
+ };
28
+ const CalendarBody = ({ month = new Date().getMonth(), year = new Date().getFullYear(), selectedDate = null, onDayClick, }) => {
29
+ const days = getCalendarDays(month, year, selectedDate);
30
+ return (jsxRuntime.jsxs("div", { className: CalendarBody_module.default.wrapper, "data-testid": "CalendarBody", children: [jsxRuntime.jsx("div", { className: CalendarBody_module.default.weekDays, children: WEEK_DAYS.map((day) => (jsxRuntime.jsx(index.BaseComponents.Typography, { tag: "span", fontClass: "body2Medium", className: CalendarBody_module.default.weekDay, children: day }, day))) }), jsxRuntime.jsx("div", { className: CalendarBody_module.default.grid, children: days.map((cell) => {
31
+ return (jsxRuntime.jsx("button", { type: "button", className: joinClasses.joinClasses(CalendarBody_module.default.day, !cell.isCurrentMonth && CalendarBody_module.default.muted, cell.isToday && CalendarBody_module.default.today, cell.isSelected && CalendarBody_module.default.selected), onClick: () => {
32
+ onDayClick?.(cell.date);
33
+ }, "data-testid": `CalendarBody_DAY_${cell.date.toISOString().slice(0, 10)}`, children: jsxRuntime.jsx(index.BaseComponents.Typography, { tag: "span", fontClass: "body2Medium", children: cell.day }) }, cell.date.toISOString()));
34
+ }) })] }));
35
+ };
36
+
37
+ exports.CalendarBody = CalendarBody;
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/Calendar/Body/index.tsx"],"sourcesContent":[null],"names":["_jsxs","styles","_jsx","BaseComponents","joinClasses"],"mappings":";;;;;;;AAIA,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AACnE,MAAM,UAAU,GAAG,EAAE;AAiBrB,MAAM,UAAU,GAAG,CAAC,IAAU,EAAE,KAAW,KACzC,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,WAAW,EAAE;AAC1C,IAAA,IAAI,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,QAAQ,EAAE;IACpC,IAAI,CAAC,OAAO,EAAE,KAAK,KAAK,CAAC,OAAO,EAAE;AAEpC,MAAM,eAAe,GAAG,CACtB,KAAa,EACb,IAAY,EACZ,YAA0B,KACJ;IACtB,MAAM,aAAa,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC;AACjE,IAAA,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,aAAa,CAAC;AAC1D,IAAA,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE;AAExB,IAAA,OAAO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,CAIkB,CAC7B,CAAC,EAAA,CACE,EAENC,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAED,2BAAM,CAAC,IAAI,EAAA,QAAA,EACxB,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,KAAI;AACjB,oBAAA,QACEC,cAAA,CAAA,QAAA,EAAA,EAEE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAEE,uBAAW,CACpBH,2BAAM,CAAC,GAAG,EACV,CAAC,IAAI,CAAC,cAAc,IAAIA,2BAAM,CAAC,KAAK,EACpC,IAAI,CAAC,OAAO,IAAIA,2BAAM,CAAC,KAAK,EAC5B,IAAI,CAAC,UAAU,IAAIA,2BAAM,CAAC,QAAQ,CACnC,EACD,OAAO,EAAE,MAAK;AACZ,4BAAA,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC;AACzB,wBAAA,CAAC,iBACY,CAAA,iBAAA,EAAoB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAA,QAAA,EAEvEC,cAAA,CAACC,oBAAc,CAAC,UAAU,IAAC,GAAG,EAAC,MAAM,EAAC,SAAS,EAAC,aAAa,EAAA,QAAA,EAC1D,IAAI,CAAC,GAAG,GACiB,EAAA,EAfvB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAgBrB;AAEb,gBAAA,CAAC,CAAC,EAAA,CACE,CAAA,EAAA,CACF;AAEV;;;;"}
@@ -1,60 +1,62 @@
1
1
  'use strict';
2
2
 
3
3
  require('../styles/colors.css.js');
4
- var index$k = require('./ErrorModal/index.js');
5
- var index$p = require('./Identity/Agreement/index.js');
6
- var index$o = require('./Identity/Auth/index.js');
7
- var index$m = require('./Identity/EdsSuccess/index.js');
8
- var index$4 = require('./Identity/HelpInstruction/index.js');
9
- var index$e = require('./Identity/IdentityHeader/index.js');
10
- var index$d = require('./Identity/IdentityModal/index.js');
11
- var index$l = require('./Messages/EmptyMessages/index.js');
12
- var index$h = require('./Messages/HelpNotification/index.js');
13
- var index$g = require('./Messages/HelpNotificationItem/index.js');
14
- var index$c = require('./Messages/MsgBody/index.js');
15
- var index$b = require('./Messages/MsgComponentHeader/index.js');
16
- var index$a = require('./Messages/MsgSearch/index.js');
17
- var index$5 = require('./Navigation/ViewToggle/index.js');
18
- var index$1 = require('./Notification/Item/index.js');
19
- var index = require('./Notification/Wrapper/index.js');
20
- var index$3 = require('./Presale/index.js');
21
- var index$n = require('./Profile/DocCard/index.js');
22
- var index$f = require('./Profile/IconToggleItem/index.js');
23
- var index$8 = require('./Profile/ProfileHealthGeneral/index.js');
24
- var index$7 = require('./Profile/RightMenuSectionItem/index.js');
25
- var index$6 = require('./Profile/SetUpAccess/index.js');
26
- var index$2 = require('./ServiceCardComponent/index.js');
27
- var index$j = require('./Services/Feedback/index.js');
28
- var index$i = require('./Services/FileForUpload/index.js');
29
- var index$9 = require('./Services/NextStepComponent/index.js');
4
+ var index = require('./Calendar/Body/index.js');
5
+ var index$l = require('./ErrorModal/index.js');
6
+ var index$q = require('./Identity/Agreement/index.js');
7
+ var index$p = require('./Identity/Auth/index.js');
8
+ var index$n = require('./Identity/EdsSuccess/index.js');
9
+ var index$5 = require('./Identity/HelpInstruction/index.js');
10
+ var index$f = require('./Identity/IdentityHeader/index.js');
11
+ var index$e = require('./Identity/IdentityModal/index.js');
12
+ var index$m = require('./Messages/EmptyMessages/index.js');
13
+ var index$i = require('./Messages/HelpNotification/index.js');
14
+ var index$h = require('./Messages/HelpNotificationItem/index.js');
15
+ var index$d = require('./Messages/MsgBody/index.js');
16
+ var index$c = require('./Messages/MsgComponentHeader/index.js');
17
+ var index$b = require('./Messages/MsgSearch/index.js');
18
+ var index$6 = require('./Navigation/ViewToggle/index.js');
19
+ var index$2 = require('./Notification/Item/index.js');
20
+ var index$1 = require('./Notification/Wrapper/index.js');
21
+ var index$4 = require('./Presale/index.js');
22
+ var index$o = require('./Profile/DocCard/index.js');
23
+ var index$g = require('./Profile/IconToggleItem/index.js');
24
+ var index$9 = require('./Profile/ProfileHealthGeneral/index.js');
25
+ var index$8 = require('./Profile/RightMenuSectionItem/index.js');
26
+ var index$7 = require('./Profile/SetUpAccess/index.js');
27
+ var index$3 = require('./ServiceCardComponent/index.js');
28
+ var index$k = require('./Services/Feedback/index.js');
29
+ var index$j = require('./Services/FileForUpload/index.js');
30
+ var index$a = require('./Services/NextStepComponent/index.js');
30
31
 
31
32
  const Components = {
32
- Agreement: index$p.Agreement,
33
- Auth: index$o.Auth,
34
- DocCard: index$n.DocCard,
35
- EdsSuccess: index$m.EdsSuccess,
36
- EmptyMessages: index$l.EmptyMessages,
37
- ErrorModal: index$k.ErrorModal,
38
- Feedback: index$j.Feedback,
39
- FileForUpload: index$i.FileForUpload,
40
- HelpNotification: index$h.HelpNotification,
41
- HelpNotificationItem: index$g.HelpNotificationItem,
42
- IconToggleItem: index$f.IconToggleItem,
43
- IdentityHeader: index$e.IdentityHeader,
44
- IdentityModal: index$d.IdentityModal,
45
- MsgBody: index$c.MsgBody,
46
- MsgComponentHeader: index$b.MsgComponentHeader,
47
- MsgSearch: index$a.MsgSearch,
48
- NextStepComponent: index$9.NextStepComponent,
49
- ProfileHealthGeneral: index$8.ProfileHealthGeneral,
50
- RightMenuSectionItem: index$7.RightMenuSectionItem,
51
- SetUpAccess: index$6.SetUpAccess,
52
- ViewToggle: index$5.ViewToggle,
53
- HelpInstruction: index$4.HelpInstruction,
54
- PresaleComponent: index$3.PresaleComponent,
55
- ServiceCardComponent: index$2.ServiceCardComponent,
56
- NotificationItem: index$1.NotificationItem,
57
- NotificationWrapper: index.NotificationWrapper,
33
+ Agreement: index$q.Agreement,
34
+ Auth: index$p.Auth,
35
+ DocCard: index$o.DocCard,
36
+ EdsSuccess: index$n.EdsSuccess,
37
+ EmptyMessages: index$m.EmptyMessages,
38
+ ErrorModal: index$l.ErrorModal,
39
+ Feedback: index$k.Feedback,
40
+ FileForUpload: index$j.FileForUpload,
41
+ HelpNotification: index$i.HelpNotification,
42
+ HelpNotificationItem: index$h.HelpNotificationItem,
43
+ IconToggleItem: index$g.IconToggleItem,
44
+ IdentityHeader: index$f.IdentityHeader,
45
+ IdentityModal: index$e.IdentityModal,
46
+ MsgBody: index$d.MsgBody,
47
+ MsgComponentHeader: index$c.MsgComponentHeader,
48
+ MsgSearch: index$b.MsgSearch,
49
+ NextStepComponent: index$a.NextStepComponent,
50
+ ProfileHealthGeneral: index$9.ProfileHealthGeneral,
51
+ RightMenuSectionItem: index$8.RightMenuSectionItem,
52
+ SetUpAccess: index$7.SetUpAccess,
53
+ ViewToggle: index$6.ViewToggle,
54
+ HelpInstruction: index$5.HelpInstruction,
55
+ PresaleComponent: index$4.PresaleComponent,
56
+ ServiceCardComponent: index$3.ServiceCardComponent,
57
+ NotificationItem: index$2.NotificationItem,
58
+ NotificationWrapper: index$1.NotificationWrapper,
59
+ CalendarBody: index.CalendarBody,
58
60
  };
59
61
 
60
62
  exports.Components = Components;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/index.ts"],"sourcesContent":[null],"names":["Agreement","Auth","DocCard","EdsSuccess","EmptyMessages","ErrorModal","Feedback","FileForUpload","HelpNotification","HelpNotificationItem","IconToggleItem","IdentityHeader","IdentityModal","MsgBody","MsgComponentHeader","MsgSearch","NextStepComponent","ProfileHealthGeneral","RightMenuSectionItem","SetUpAccess","ViewToggle","HelpInstruction","PresaleComponent","ServiceCardComponent","NotificationItem","NotificationWrapper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,UAAU,GAAG;eACxBA,iBAAS;UACTC,YAAI;aACJC,eAAO;gBACPC,kBAAU;mBACVC,qBAAa;gBACbC,kBAAU;cACVC,gBAAQ;mBACRC,qBAAa;sBACbC,wBAAgB;0BAChBC,4BAAoB;oBACpBC,sBAAc;oBACdC,sBAAc;mBACdC,qBAAa;aACbC,eAAO;wBACPC,0BAAkB;eAClBC,iBAAS;uBACTC,yBAAiB;0BACjBC,4BAAoB;0BACpBC,4BAAoB;iBACpBC,mBAAW;gBACXC,kBAAU;qBACVC,uBAAe;sBACfC,wBAAgB;0BAChBC,4BAAoB;sBACpBC,wBAAgB;yBAChBC,yBAAmB;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/index.ts"],"sourcesContent":[null],"names":["Agreement","Auth","DocCard","EdsSuccess","EmptyMessages","ErrorModal","Feedback","FileForUpload","HelpNotification","HelpNotificationItem","IconToggleItem","IdentityHeader","IdentityModal","MsgBody","MsgComponentHeader","MsgSearch","NextStepComponent","ProfileHealthGeneral","RightMenuSectionItem","SetUpAccess","ViewToggle","HelpInstruction","PresaleComponent","ServiceCardComponent","NotificationItem","NotificationWrapper","CalendarBody"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BO,MAAM,UAAU,GAAG;eACxBA,iBAAS;UACTC,YAAI;aACJC,eAAO;gBACPC,kBAAU;mBACVC,qBAAa;gBACbC,kBAAU;cACVC,gBAAQ;mBACRC,qBAAa;sBACbC,wBAAgB;0BAChBC,4BAAoB;oBACpBC,sBAAc;oBACdC,sBAAc;mBACdC,qBAAa;aACbC,eAAO;wBACPC,0BAAkB;eAClBC,iBAAS;uBACTC,yBAAiB;0BACjBC,4BAAoB;0BACpBC,4BAAoB;iBACpBC,mBAAW;gBACXC,kBAAU;qBACVC,uBAAe;sBACfC,wBAAgB;0BAChBC,4BAAoB;sBACpBC,wBAAgB;yBAChBC,2BAAmB;kBACnBC,kBAAY;;;;;"}
@@ -0,0 +1,18 @@
1
+ var css_248z = ".CalendarBody-module_wrapper__fd17C {\n display: flex;\n flex-direction: column;\n color: var(--text-disabled-color);\n}\n\n.CalendarBody-module_weekDays__zXG3- {\n height: 24px;\n}\n\n.CalendarBody-module_grid__HNGTZ,\n.CalendarBody-module_weekDays__zXG3- {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n column-gap: calc((100% - 7 * 28px) / 6);\n text-align: center;\n}\n\n.CalendarBody-module_weekDay__hzksZ,\n.CalendarBody-module_day__0KNDZ {\n width: 28px;\n}\n\n.CalendarBody-module_day__0KNDZ {\n cursor: pointer;\n color: var(--text-primary);\n height: 28px;\n}\n\n.CalendarBody-module_muted__8XysY {\n color: var(--text-disabled-color);\n}\n\n.CalendarBody-module_selected__86UkJ {\n background-color: var(--surface-accent);\n color: var(--text-white-nonconvert-color);\n border-radius: 100px;\n}\n";
2
+ var styles = {"wrapper":"CalendarBody-module_wrapper__fd17C","weekDays":"CalendarBody-module_weekDays__zXG3-","grid":"CalendarBody-module_grid__HNGTZ","weekDay":"CalendarBody-module_weekDay__hzksZ","day":"CalendarBody-module_day__0KNDZ","muted":"CalendarBody-module_muted__8XysY","selected":"CalendarBody-module_selected__86UkJ"};
3
+ function styleInject(css, options) {
4
+ if (typeof document === 'undefined') return;
5
+ const head = document.head || document.getElementsByTagName('head')[0];
6
+ const style = document.createElement('style');
7
+ style.type = 'text/css';
8
+ if (style.styleSheet) {
9
+ style.styleSheet.cssText = css;
10
+ } else {
11
+ style.appendChild(document.createTextNode(css));
12
+ }
13
+ head.appendChild(style);
14
+ }
15
+ styleInject(css_248z);
16
+
17
+ export { styles as default };
18
+ //# sourceMappingURL=CalendarBody.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarBody.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,36 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { BaseComponents } from '../../../baseComponents/index.js';
3
+ import { joinClasses } from '../../../utils/joinClasses.js';
4
+ import styles from './CalendarBody.module.css.js';
5
+
6
+ const WEEK_DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
7
+ const CELL_COUNT = 42;
8
+ const isSameDate = (left, right) => left.getFullYear() === right.getFullYear() &&
9
+ left.getMonth() === right.getMonth() &&
10
+ left.getDate() === right.getDate();
11
+ const getCalendarDays = (month, year, selectedDate) => {
12
+ const firstDayIndex = (new Date(year, month, 1).getDay() + 6) % 7;
13
+ const startDate = new Date(year, month, 1 - firstDayIndex);
14
+ const today = new Date();
15
+ return Array.from({ length: CELL_COUNT }, (_, index) => {
16
+ const date = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate() + index);
17
+ return {
18
+ date,
19
+ day: date.getDate(),
20
+ isCurrentMonth: date.getMonth() === month,
21
+ isToday: isSameDate(date, today),
22
+ isSelected: selectedDate ? isSameDate(date, selectedDate) : false,
23
+ };
24
+ });
25
+ };
26
+ const CalendarBody = ({ month = new Date().getMonth(), year = new Date().getFullYear(), selectedDate = null, onDayClick, }) => {
27
+ const days = getCalendarDays(month, year, selectedDate);
28
+ return (jsxs("div", { className: styles.wrapper, "data-testid": "CalendarBody", children: [jsx("div", { className: styles.weekDays, children: WEEK_DAYS.map((day) => (jsx(BaseComponents.Typography, { tag: "span", fontClass: "body2Medium", className: styles.weekDay, children: day }, day))) }), jsx("div", { className: styles.grid, children: days.map((cell) => {
29
+ return (jsx("button", { type: "button", className: joinClasses(styles.day, !cell.isCurrentMonth && styles.muted, cell.isToday && styles.today, cell.isSelected && styles.selected), onClick: () => {
30
+ onDayClick?.(cell.date);
31
+ }, "data-testid": `CalendarBody_DAY_${cell.date.toISOString().slice(0, 10)}`, children: jsx(BaseComponents.Typography, { tag: "span", fontClass: "body2Medium", children: cell.day }) }, cell.date.toISOString()));
32
+ }) })] }));
33
+ };
34
+
35
+ export { CalendarBody };
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/Calendar/Body/index.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;AAIA,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AACnE,MAAM,UAAU,GAAG,EAAE;AAiBrB,MAAM,UAAU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AAC,cAAc,CAAC,UAAU,IAAC,GAAG,EAAC,MAAM,EAAC,SAAS,EAAC,aAAa,EAAA,QAAA,EAC1D,IAAI,CAAC,GAAG,GACiB,EAAA,EAfvB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAgBrB;AAEb,gBAAA,CAAC,CAAC,EAAA,CACE,CAAA,EAAA,CACF;AAEV;;;;"}
@@ -1,4 +1,5 @@
1
1
  import '../styles/colors.css.js';
2
+ import { CalendarBody } from './Calendar/Body/index.js';
2
3
  import { ErrorModal } from './ErrorModal/index.js';
3
4
  import { Agreement } from './Identity/Agreement/index.js';
4
5
  import { Auth } from './Identity/Auth/index.js';
@@ -53,6 +54,7 @@ const Components = {
53
54
  ServiceCardComponent,
54
55
  NotificationItem,
55
56
  NotificationWrapper,
57
+ CalendarBody,
56
58
  };
57
59
 
58
60
  export { Components };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,UAAU,GAAG;IACxB,SAAS;IACT,IAAI;IACJ,OAAO;IACP,UAAU;IACV,aAAa;IACb,UAAU;IACV,QAAQ;IACR,aAAa;IACb,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;IACd,cAAc;IACd,aAAa;IACb,OAAO;IACP,kBAAkB;IAClB,SAAS;IACT,iBAAiB;IACjB,oBAAoB;IACpB,oBAAoB;IACpB,WAAW;IACX,UAAU;IACV,eAAe;IACf,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,mBAAmB;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BO,MAAM,UAAU,GAAG;IACxB,SAAS;IACT,IAAI;IACJ,OAAO;IACP,UAAU;IACV,aAAa;IACb,UAAU;IACV,QAAQ;IACR,aAAa;IACb,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;IACd,cAAc;IACd,aAAa;IACb,OAAO;IACP,kBAAkB;IAClB,SAAS;IACT,iBAAiB;IACjB,oBAAoB;IACpB,oBAAoB;IACpB,WAAW;IACX,UAAU;IACV,eAAe;IACf,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,mBAAmB;IACnB,YAAY;;;;;"}
@@ -0,0 +1,8 @@
1
+ interface ICalendarBodyProps {
2
+ month?: number;
3
+ year?: number;
4
+ selectedDate?: Date | null;
5
+ onDayClick?: (date: Date) => void;
6
+ }
7
+
8
+ export type { ICalendarBodyProps };
@@ -1,3 +1,4 @@
1
+ import { ICalendarBodyProps } from './components/Calendar/Body/index.js';
1
2
  import { INotificationWrapperProps } from './components/Notification/Wrapper/index.js';
2
3
  import { INotificationComponentProps } from './components/Notification/Item/index.js';
3
4
  import { IServiceCardComponentProps } from './components/ServiceCardComponent/index.js';
@@ -99,6 +100,7 @@ declare const SystemDesign: {
99
100
  ServiceCardComponent: ({ handleOrderService, badge, isNew, title, }: IServiceCardComponentProps) => react_jsx_runtime.JSX.Element;
100
101
  NotificationItem: ({ type, text, onClick, }: INotificationComponentProps) => react_jsx_runtime.JSX.Element;
101
102
  NotificationWrapper: ({ items, removeNotificationData, }: INotificationWrapperProps) => react_jsx_runtime.JSX.Element | null;
103
+ CalendarBody: ({ month, year, selectedDate, onDayClick, }: ICalendarBodyProps) => react_jsx_runtime.JSX.Element;
102
104
  };
103
105
  };
104
106
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egov3/system-design",
3
- "version": "1.3.120",
3
+ "version": "1.3.121",
4
4
  "type": "module",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/types/index.d.ts",