@jenesei-software/jenesei-kit-react 1.3.1 → 1.3.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.
- package/build/{area-BO9opwkf.cjs → area-AbheP_ot.cjs} +2 -2
- package/build/{area-BO9opwkf.cjs.map → area-AbheP_ot.cjs.map} +1 -1
- package/build/{area-C8w6fMSn.cjs → area-C3wR_pPr.cjs} +2 -2
- package/build/{area-C8w6fMSn.cjs.map → area-C3wR_pPr.cjs.map} +1 -1
- package/build/{area-3gVEQsJq.js → area-CFZW3T1g.js} +2 -2
- package/build/{area-3gVEQsJq.js.map → area-CFZW3T1g.js.map} +1 -1
- package/build/{area-jPT5NusX.js → area-CH6c_n7-.js} +2 -2
- package/build/{area-jPT5NusX.js.map → area-CH6c_n7-.js.map} +1 -1
- package/build/area-preview.cjs.js +1 -1
- package/build/area-preview.es.js +1 -1
- package/build/area-skeleton.cjs.js +1 -1
- package/build/area-skeleton.es.js +1 -1
- package/build/build-info.txt +3 -3
- package/build/{component-Cbmm9vBS.js → component-BFhXrZ3a.js} +3 -3
- package/build/{component-Cbmm9vBS.js.map → component-BFhXrZ3a.js.map} +1 -1
- package/build/{component-CPMrcwD_.cjs → component-BuxekWox.cjs} +2 -2
- package/build/{component-CPMrcwD_.cjs.map → component-BuxekWox.cjs.map} +1 -1
- package/build/{component-Xqvx28O4.js → component-BvLPfi2B.js} +2 -2
- package/build/{component-Xqvx28O4.js.map → component-BvLPfi2B.js.map} +1 -1
- package/build/{component-zZ5X_UdT.js → component-Bwu-fBEh.js} +2 -2
- package/build/{component-zZ5X_UdT.js.map → component-Bwu-fBEh.js.map} +1 -1
- package/build/{component-CKS169EE.cjs → component-CMkU2lIg.cjs} +2 -2
- package/build/{component-CKS169EE.cjs.map → component-CMkU2lIg.cjs.map} +1 -1
- package/build/{component-C8fz1syk.cjs → component-CeWNemV1.cjs} +2 -2
- package/build/{component-C8fz1syk.cjs.map → component-CeWNemV1.cjs.map} +1 -1
- package/build/{component-Cd8Sqijy.js → component-CmotrA_9.js} +4 -4
- package/build/{component-Cd8Sqijy.js.map → component-CmotrA_9.js.map} +1 -1
- package/build/{component-CI1bPd1b.js → component-D8qbXvM4.js} +3 -3
- package/build/{component-CI1bPd1b.js.map → component-D8qbXvM4.js.map} +1 -1
- package/build/{component-DTu8fMn3.cjs → component-DUUxsxY6.cjs} +2 -2
- package/build/{component-DTu8fMn3.cjs.map → component-DUUxsxY6.cjs.map} +1 -1
- package/build/{component-I33SFLkW.cjs → component-DfqhPd0e.cjs} +2 -2
- package/build/{component-I33SFLkW.cjs.map → component-DfqhPd0e.cjs.map} +1 -1
- package/build/component-accordion.cjs.js +1 -1
- package/build/component-accordion.es.js +1 -1
- package/build/component-button-group.cjs.js +1 -1
- package/build/component-button-group.es.js +1 -1
- package/build/component-button.cjs.js +1 -1
- package/build/component-button.es.js +1 -1
- package/build/component-checkbox-group.cjs.js +1 -1
- package/build/component-checkbox-group.es.js +1 -1
- package/build/component-checkbox.cjs.js +1 -1
- package/build/component-checkbox.es.js +1 -1
- package/build/component-date-picker.cjs.js +1 -1
- package/build/component-date-picker.d.ts +8 -4
- package/build/component-date-picker.es.js +1 -1
- package/build/component-icon.cjs.js +1 -1
- package/build/component-icon.es.js +1 -1
- package/build/component-image-button.cjs.js +1 -1
- package/build/component-image-button.es.js +1 -1
- package/build/component-image-select.cjs.js +1 -1
- package/build/component-image-select.es.js +1 -1
- package/build/component-image-slider.cjs.js +1 -1
- package/build/component-image-slider.es.js +1 -1
- package/build/component-image.cjs.js +1 -1
- package/build/component-image.es.js +1 -1
- package/build/component-input-otp.cjs.js +1 -1
- package/build/component-input-otp.es.js +1 -1
- package/build/component-input.cjs.js +1 -1
- package/build/component-input.es.js +2 -2
- package/build/component-map.cjs.js +1 -1
- package/build/component-map.es.js +1 -1
- package/build/component-pagination.cjs.js +1 -1
- package/build/component-pagination.es.js +1 -1
- package/build/component-range.cjs.js +1 -1
- package/build/component-range.es.js +1 -1
- package/build/component-select.cjs.js +1 -1
- package/build/component-select.es.js +1 -1
- package/build/component-textarea.cjs.js +1 -1
- package/build/component-textarea.es.js +1 -1
- package/build/component-toggle.cjs.js +1 -1
- package/build/component-toggle.es.js +1 -1
- package/build/component-tooltip.cjs.js +1 -1
- package/build/component-tooltip.es.js +1 -1
- package/build/component-typography.cjs.js +1 -1
- package/build/component-typography.es.js +1 -1
- package/build/{component.components-CEahleVE.js → component.components-BPIVZi-R.js} +3 -3
- package/build/{component.components-CEahleVE.js.map → component.components-BPIVZi-R.js.map} +1 -1
- package/build/{component.components-BybNKDu3.cjs → component.components-BWWKHxKD.cjs} +2 -2
- package/build/{component.components-BybNKDu3.cjs.map → component.components-BWWKHxKD.cjs.map} +1 -1
- package/build/{component.constants-Dv6opwFG.js → component.constants-CmQuESzl.js} +2 -2
- package/build/{component.constants-Dv6opwFG.js.map → component.constants-CmQuESzl.js.map} +1 -1
- package/build/{component.constants-BTqRt0oT.cjs → component.constants-D8QVKsqc.cjs} +2 -2
- package/build/{component.constants-BTqRt0oT.cjs.map → component.constants-D8QVKsqc.cjs.map} +1 -1
- package/build/{component.constants-Xzo8ve1j.js → component.constants-Dtw4932G.js} +6 -6
- package/build/{component.constants-Xzo8ve1j.js.map → component.constants-Dtw4932G.js.map} +1 -1
- package/build/{component.constants-C6bU6nl_.cjs → component.constants-DyKCJRH3.cjs} +2 -2
- package/build/{component.constants-C6bU6nl_.cjs.map → component.constants-DyKCJRH3.cjs.map} +1 -1
- package/build/{component.styles-O1SAy-GB.cjs → component.styles-B294m7QY.cjs} +2 -2
- package/build/{component.styles-O1SAy-GB.cjs.map → component.styles-B294m7QY.cjs.map} +1 -1
- package/build/{component.styles-D0jefRNH.cjs → component.styles-B5kjhqh4.cjs} +2 -2
- package/build/{component.styles-D0jefRNH.cjs.map → component.styles-B5kjhqh4.cjs.map} +1 -1
- package/build/{component.styles-DtFCv3SL.js → component.styles-BHBTNQ8p.js} +4 -4
- package/build/{component.styles-DtFCv3SL.js.map → component.styles-BHBTNQ8p.js.map} +1 -1
- package/build/{component.styles-CMxkHzEu.cjs → component.styles-BMJamWba.cjs} +2 -2
- package/build/{component.styles-CMxkHzEu.cjs.map → component.styles-BMJamWba.cjs.map} +1 -1
- package/build/{component.styles-DhJeYxo2.js → component.styles-BfzC8j7O.js} +7 -7
- package/build/{component.styles-DhJeYxo2.js.map → component.styles-BfzC8j7O.js.map} +1 -1
- package/build/{component.styles-BI4OuDrG.js → component.styles-BirbSbuD.js} +3 -3
- package/build/{component.styles-BI4OuDrG.js.map → component.styles-BirbSbuD.js.map} +1 -1
- package/build/{component.styles-CVYk0EXw.cjs → component.styles-C-mr1A0b.cjs} +2 -2
- package/build/{component.styles-CVYk0EXw.cjs.map → component.styles-C-mr1A0b.cjs.map} +1 -1
- package/build/{component.styles-EnGR_IyC.js → component.styles-CKArb78Q.js} +5 -5
- package/build/{component.styles-EnGR_IyC.js.map → component.styles-CKArb78Q.js.map} +1 -1
- package/build/{component.styles-DJP7e7be.cjs → component.styles-CKLd9UoP.cjs} +2 -2
- package/build/{component.styles-DJP7e7be.cjs.map → component.styles-CKLd9UoP.cjs.map} +1 -1
- package/build/{component.styles-CUNUEB0K.js → component.styles-CMXsg9Uj.js} +4 -4
- package/build/{component.styles-CUNUEB0K.js.map → component.styles-CMXsg9Uj.js.map} +1 -1
- package/build/{component.styles-Cx7rBBnD.js → component.styles-CQbSHrL_.js} +7 -7
- package/build/{component.styles-Cx7rBBnD.js.map → component.styles-CQbSHrL_.js.map} +1 -1
- package/build/{component.styles-B32Iz_qp.cjs → component.styles-CS_lQRm0.cjs} +2 -2
- package/build/{component.styles-B32Iz_qp.cjs.map → component.styles-CS_lQRm0.cjs.map} +1 -1
- package/build/{component.styles-CBnEu0_t.cjs → component.styles-CbkvPvEl.cjs} +2 -2
- package/build/{component.styles-CBnEu0_t.cjs.map → component.styles-CbkvPvEl.cjs.map} +1 -1
- package/build/{component.styles-CGiPShK6.js → component.styles-ClU_KFe9.js} +4 -4
- package/build/{component.styles-CGiPShK6.js.map → component.styles-ClU_KFe9.js.map} +1 -1
- package/build/{component.styles-D6vdSbHc.cjs → component.styles-DETkOSnM.cjs} +2 -2
- package/build/{component.styles-D6vdSbHc.cjs.map → component.styles-DETkOSnM.cjs.map} +1 -1
- package/build/{component.styles-BLh29xwF.cjs → component.styles-DLU0S0KI.cjs} +2 -2
- package/build/{component.styles-BLh29xwF.cjs.map → component.styles-DLU0S0KI.cjs.map} +1 -1
- package/build/{component.styles-nkvjDCzl.js → component.styles-DYAuT7U2.js} +2 -2
- package/build/{component.styles-nkvjDCzl.js.map → component.styles-DYAuT7U2.js.map} +1 -1
- package/build/{component.styles-CO20q5q1.js → component.styles-DkL2qYQQ.js} +3 -3
- package/build/{component.styles-CO20q5q1.js.map → component.styles-DkL2qYQQ.js.map} +1 -1
- package/build/{component.styles-D6jQq4GK.js → component.styles-DoUBnv1C.js} +3 -3
- package/build/{component.styles-D6jQq4GK.js.map → component.styles-DoUBnv1C.js.map} +1 -1
- package/build/{component.styles-B4RXk9nx.js → component.styles-DyTB01CW.js} +3 -3
- package/build/{component.styles-B4RXk9nx.js.map → component.styles-DyTB01CW.js.map} +1 -1
- package/build/{component.styles-Dg8gHTTE.cjs → component.styles-R92hjRRA.cjs} +2 -2
- package/build/{component.styles-Dg8gHTTE.cjs.map → component.styles-R92hjRRA.cjs.map} +1 -1
- package/build/{component.styles-iM9QpRbs.cjs → component.styles-b_DLfQqU.cjs} +2 -2
- package/build/{component.styles-iM9QpRbs.cjs.map → component.styles-b_DLfQqU.cjs.map} +1 -1
- package/build/{component.styles-D-4B1aHv.cjs → component.styles-l0Dr5zHf.cjs} +2 -2
- package/build/{component.styles-D-4B1aHv.cjs.map → component.styles-l0Dr5zHf.cjs.map} +1 -1
- package/build/{component.styles-8qvjpBKQ.js → component.styles-usmYNSi8.js} +2 -2
- package/build/{component.styles-8qvjpBKQ.js.map → component.styles-usmYNSi8.js.map} +1 -1
- package/build/component.types-OWBOCmrk.cjs +174 -0
- package/build/component.types-OWBOCmrk.cjs.map +1 -0
- package/build/{component.types-tJb9YGhn.js → component.types-_k1S6r4E.js} +22 -10
- package/build/component.types-_k1S6r4E.js.map +1 -0
- package/build/context-app.cjs.js +1 -1
- package/build/context-app.es.js +1 -1
- package/build/context-dialog.cjs.js +1 -1
- package/build/context-dialog.es.js +1 -1
- package/build/context-sonner.cjs.js +1 -1
- package/build/context-sonner.es.js +1 -1
- package/build/{context.constants-C0q77J1f.js → context.constants-4kkNHBzR.js} +5 -5
- package/build/{context.constants-C0q77J1f.js.map → context.constants-4kkNHBzR.js.map} +1 -1
- package/build/{context.constants-COR-ReeN.js → context.constants-B9Yk6CGe.js} +2 -2
- package/build/{context.constants-COR-ReeN.js.map → context.constants-B9Yk6CGe.js.map} +1 -1
- package/build/{context.constants-BJPyze-d.cjs → context.constants-CTfUKury.cjs} +2 -2
- package/build/{context.constants-BJPyze-d.cjs.map → context.constants-CTfUKury.cjs.map} +1 -1
- package/build/{context.constants-B-AObmnC.cjs → context.constants-DKCD80Pp.cjs} +2 -2
- package/build/{context.constants-B-AObmnC.cjs.map → context.constants-DKCD80Pp.cjs.map} +1 -1
- package/build/{context.hooks-Bq70-oJI.js → context.hooks-Cfr2Mp8e.js} +3 -3
- package/build/{context.hooks-Bq70-oJI.js.map → context.hooks-Cfr2Mp8e.js.map} +1 -1
- package/build/{context.hooks-C1M8jdAu.cjs → context.hooks-DGmZRxkb.cjs} +2 -2
- package/build/{context.hooks-C1M8jdAu.cjs.map → context.hooks-DGmZRxkb.cjs.map} +1 -1
- package/build/index.cjs.js +1 -1
- package/build/index.d.ts +9 -4
- package/build/index.es.js +28 -28
- package/build/{style-BX0S5FEa.cjs → style-BVejuajH.cjs} +2 -2
- package/build/{style-BX0S5FEa.cjs.map → style-BVejuajH.cjs.map} +1 -1
- package/build/{style-Bvt_Melk.js → style-BgcnmVAY.js} +2 -2
- package/build/style-BgcnmVAY.js.map +1 -0
- package/build/{style-BUTdwE0W.js → style-CQOBaUTO.js} +2 -2
- package/build/{style-BUTdwE0W.js.map → style-CQOBaUTO.js.map} +1 -1
- package/build/style-add.cjs.js +1 -1
- package/build/style-add.d.ts +1 -0
- package/build/style-add.es.js +1 -1
- package/build/style-error.cjs.js +1 -1
- package/build/style-error.es.js +1 -1
- package/build/{style-f3_KtJIt.cjs → style-mc2ST5fY.cjs} +2 -2
- package/build/style-mc2ST5fY.cjs.map +1 -0
- package/build/{use-C-1ZZdCQ.js → use-BsyZ6-h6.js} +5 -5
- package/build/{use-C-1ZZdCQ.js.map → use-BsyZ6-h6.js.map} +1 -1
- package/build/{use-Cte4Ivsp.cjs → use-D0mgQexh.cjs} +2 -2
- package/build/{use-Cte4Ivsp.cjs.map → use-D0mgQexh.cjs.map} +1 -1
- package/package.json +1 -1
- package/build/component.types-B_1YkE7n.cjs +0 -173
- package/build/component.types-B_1YkE7n.cjs.map +0 -1
- package/build/component.types-tJb9YGhn.js.map +0 -1
- package/build/style-Bvt_Melk.js.map +0 -1
- package/build/style-f3_KtJIt.cjs.map +0 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("./component-CMkU2lIg.cjs");require("./component.styles-Dpg-__rn.cjs");const o=require("./component-D7A-4DNQ.cjs"),s=require("./component.styles-B5kjhqh4.cjs"),n=require("./component-BV_7tGiu.cjs"),r=require("./style-BVejuajH.cjs"),l=require("./theme.global-B9wIU_rF.cjs"),i=require("moment"),a=require("react"),u=require("styled-components"),d=require("./component-CeWNemV1.cjs"),c=require("./component.styles-DETkOSnM.cjs"),p=require("./style-mc2ST5fY.cjs"),h=require("./style-fRZ6xrVp.cjs"),g=require("framer-motion");const f=u.div`
|
|
2
|
+
width: 100%;
|
|
3
|
+
position: relative;
|
|
4
|
+
height: fit-content;
|
|
5
|
+
${e=>e.$isMinWidth&&u.css`
|
|
6
|
+
width: min-content;
|
|
7
|
+
`}
|
|
8
|
+
${h.addSX};
|
|
9
|
+
${p.addNiceNumber};
|
|
10
|
+
`,m=u(g.motion.div)`
|
|
11
|
+
${p.addRemoveScrollbar};
|
|
12
|
+
`,$=u.div`
|
|
13
|
+
position: relative;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
width: 100%;
|
|
17
|
+
padding-top: 6px;
|
|
18
|
+
transform: translateZ(0);
|
|
19
|
+
justify-content: flex-start;
|
|
20
|
+
gap: 10px;
|
|
21
|
+
${c.addInputIsInputEffect};
|
|
22
|
+
`,Y=u.div`
|
|
23
|
+
display: grid;
|
|
24
|
+
column-gap: normal;
|
|
25
|
+
row-gap: normal;
|
|
26
|
+
gap: 6px;
|
|
27
|
+
grid-template-columns: repeat(7, 28px);
|
|
28
|
+
grid-template-rows: repeat(${e=>e.$rows}, 28px);
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
`,x=u.css`
|
|
31
|
+
${e=>e.$size&&u.css`
|
|
32
|
+
border-radius: ${l.KEY_SIZE_DATA[e.$size].radius}px;
|
|
33
|
+
${e=>d.getFontSizeStyles(12,700,e.theme.font.family)};
|
|
34
|
+
`};
|
|
35
|
+
position: relative;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
isolation: isolate;
|
|
38
|
+
user-select: none;
|
|
39
|
+
background: ${e=>e.theme.colors.date[e.$genre].background.rest};
|
|
40
|
+
border-color: ${e=>e.theme.colors.date[e.$genre].border.rest};
|
|
41
|
+
color: ${e=>e.theme.colors.date[e.$genre].color.rest};
|
|
42
|
+
border: 1px solid transparent;
|
|
43
|
+
grid-row: ${e=>e.$row};
|
|
44
|
+
grid-column: ${e=>e.$column};
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
&:hover {
|
|
52
|
+
${e=>!e.$isDisabled&&u.css`
|
|
53
|
+
background: ${e.theme.colors.date[e.$genre].background.hover};
|
|
54
|
+
border-color: ${e.theme.colors.date[e.$genre].border.hover};
|
|
55
|
+
color: ${e.theme.colors.date[e.$genre].color.hover};
|
|
56
|
+
`}
|
|
57
|
+
}
|
|
58
|
+
${p.addTransition};
|
|
59
|
+
|
|
60
|
+
${e=>e.$isWeekend&&u.css`
|
|
61
|
+
background: ${e.theme.colors.date[e.$genre].background.weekend};
|
|
62
|
+
border-color: ${e.theme.colors.date[e.$genre].border.weekend};
|
|
63
|
+
color: ${e.theme.colors.date[e.$genre].color.weekend};
|
|
64
|
+
`}
|
|
65
|
+
${e=>e.$isToday&&u.css`
|
|
66
|
+
background: ${e.theme.colors.date[e.$genre].background.today};
|
|
67
|
+
border-color: ${e.theme.colors.date[e.$genre].border.today};
|
|
68
|
+
color: ${e.theme.colors.date[e.$genre].color.today};
|
|
69
|
+
`}
|
|
70
|
+
${e=>e.$isChoice&&u.css`
|
|
71
|
+
background: ${e.theme.colors.date[e.$genre].background.choice};
|
|
72
|
+
border-color: ${e.theme.colors.date[e.$genre].border.choice};
|
|
73
|
+
color: ${e.theme.colors.date[e.$genre].color.choice};
|
|
74
|
+
`}
|
|
75
|
+
${e=>e.$isDisabled&&u.css`
|
|
76
|
+
background: ${e.theme.colors.date[e.$genre].background.weekend};
|
|
77
|
+
border-color: ${e.theme.colors.date[e.$genre].border.weekend};
|
|
78
|
+
color: ${e.theme.colors.date[e.$genre].color.weekend};
|
|
79
|
+
opacity: 0.5;
|
|
80
|
+
`}
|
|
81
|
+
${e=>!e.$isCurrentMonth&&u.css`
|
|
82
|
+
opacity: 0.5;
|
|
83
|
+
`}
|
|
84
|
+
${e=>d.getFontSizeStyles(12,700,e.theme.font.family)};
|
|
85
|
+
|
|
86
|
+
${p.addOutline};
|
|
87
|
+
`,D=u.button`
|
|
88
|
+
${x}
|
|
89
|
+
`,b=u.button`
|
|
90
|
+
${x}
|
|
91
|
+
opacity: 1;
|
|
92
|
+
background-color: transparent;
|
|
93
|
+
`,M=u.css`
|
|
94
|
+
background-color: ${e=>e.$isActive?e.theme.palette.black10:"transparent"};
|
|
95
|
+
|
|
96
|
+
${e=>d.getFontSizeStyles(16,e.$isBold?500:400,e.theme.font.family,e.theme.font.lineHeight)};
|
|
97
|
+
${e=>e.$isHaveValue?u.css`
|
|
98
|
+
color: ${e.theme.colors.input[e.$genre].color.rest};
|
|
99
|
+
&:focus-visible {
|
|
100
|
+
color: ${e.theme.colors.input[e.$genre].color.rest};
|
|
101
|
+
}
|
|
102
|
+
`:u.css`
|
|
103
|
+
color: ${e.theme.colors.input[e.$genre].color.placeholder};
|
|
104
|
+
`};
|
|
105
|
+
`,v=u.css`
|
|
106
|
+
border-radius: 4px;
|
|
107
|
+
padding: 2px;
|
|
108
|
+
min-width: 10px;
|
|
109
|
+
`,y=u.div`
|
|
110
|
+
text-align: center;
|
|
111
|
+
resize: none;
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
border: 0px solid;
|
|
114
|
+
background: transparent;
|
|
115
|
+
margin: 0px !important;
|
|
116
|
+
white-space: nowrap;
|
|
117
|
+
${v};
|
|
118
|
+
${M};
|
|
119
|
+
${p.addRemoveOutline};
|
|
120
|
+
`,k=u.css`
|
|
121
|
+
${e=>u.css`
|
|
122
|
+
background: ${e.theme.colors.input[e.$genre].background.rest};
|
|
123
|
+
border-color: ${e.theme.colors.input[e.$genre].border.rest};
|
|
124
|
+
color: ${e.theme.colors.input[e.$genre].color.rest};
|
|
125
|
+
outline: 2px solid transparent;
|
|
126
|
+
outline-offset: 1px;
|
|
127
|
+
&:hover {
|
|
128
|
+
background: ${e.theme.colors.input[e.$genre].background.hover};
|
|
129
|
+
border-color: ${e.theme.colors.input[e.$genre].border.hover};
|
|
130
|
+
color: ${e.theme.colors.input[e.$genre].color.hover};
|
|
131
|
+
}
|
|
132
|
+
${p.addOutlineChildren};
|
|
133
|
+
${e.$isOpen&&u.css`
|
|
134
|
+
background: ${e.theme.colors.input[e.$genre].background.rest};
|
|
135
|
+
border-color: ${e.theme.colors.input[e.$genre].border.rest};
|
|
136
|
+
color: ${e.theme.colors.input[e.$genre].color.rest};
|
|
137
|
+
outline: 2px solid ${e=>e.theme.states.focus};
|
|
138
|
+
`}
|
|
139
|
+
`};
|
|
140
|
+
`,S=u.css`
|
|
141
|
+
${e=>u.css`
|
|
142
|
+
padding: ${e.$isShowPlaceholder?`0px ${l.KEY_SIZE_DATA[e.$size].padding}px`:`0px ${l.KEY_SIZE_DATA[e.$size].padding}px 0px ${l.KEY_SIZE_DATA[e.$size].padding-2}px`};
|
|
143
|
+
height: ${l.KEY_SIZE_DATA[e.$size].height}px;
|
|
144
|
+
min-height: ${l.KEY_SIZE_DATA[e.$size].height}px;
|
|
145
|
+
max-height: ${l.KEY_SIZE_DATA[e.$size].height}px;
|
|
146
|
+
border-radius: ${l.KEY_SIZE_DATA[e.$size].radius}px;
|
|
147
|
+
`}
|
|
148
|
+
`,w=u.div`
|
|
149
|
+
resize: none;
|
|
150
|
+
overflow: hidden;
|
|
151
|
+
width: 100%;
|
|
152
|
+
border: 1px solid transparent;
|
|
153
|
+
|
|
154
|
+
white-space: nowrap;
|
|
155
|
+
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
gap: 0px;
|
|
159
|
+
|
|
160
|
+
${p.addDisabled};
|
|
161
|
+
${S};
|
|
162
|
+
${k};
|
|
163
|
+
${p.addTransition};
|
|
164
|
+
${r.addError};
|
|
165
|
+
`,E=u.css`
|
|
166
|
+
${e=>u.css`
|
|
167
|
+
right:${l.KEY_SIZE_DATA[e.size].padding}px;
|
|
168
|
+
`}
|
|
169
|
+
`,j=u(t.Button)`
|
|
170
|
+
position: absolute;
|
|
171
|
+
height: max-content !important;
|
|
172
|
+
${E};
|
|
173
|
+
`;var O=(e=>(e.DD="DD",e.MM="MM",e.YYYY="YYYY",e))(O||{});exports.DateDropdownDay=D,exports.DateDropdownDayOfWeek=b,exports.DateDropdownDays=Y,exports.DateDropdownList=$,exports.DateDropdownListParent=m,exports.DateInput=y,exports.DateInputButton=j,exports.DateInputWrapper=w,exports.DatePicker=c=>{var p,h,g;const{onChange:m}=c,x=u.useTheme(),[M,v]=a.useState(null),[k,S]=a.useState(i(c.dateDefault).utc()),[E,z]=a.useState({[O.DD]:null,[O.MM]:null,[O.YYYY]:null}),[N,A]=a.useState(null),[C,R]=a.useState(!1),I=a.useMemo(()=>{if(!c.mode||0===c.mode.length)return[O.DD,O.MM,O.YYYY];return new Set(c.mode).size!==c.mode.length?[O.DD,O.MM,O.YYYY]:c.mode},[c.mode]),W=a.useCallback(e=>{const t=I.indexOf(e);return t<I.length-1?I[t+1]:I[0]},[I]),P=a.useCallback(e=>{const t=I.indexOf(e);return t>0?I[t-1]:I[I.length-1]},[I]),T=a.useMemo(()=>{const e={MM:{nextSegment:W(O.MM),preSegment:P(O.MM),onNext:()=>A(W(O.MM)),onPrev:()=>A(P(O.MM)),isLast:I[I.length-1]===O.MM,isFirst:I[0]===O.MM,type:O.MM,value:E.MM,setValue:e=>z(t=>({...t,[O.MM]:e})),setActive:()=>A(O.MM),placeholder:c.locale.inputs.month},DD:{nextSegment:W(O.DD),preSegment:P(O.DD),isLast:I[I.length-1]===O.DD,isFirst:I[0]===O.DD,onNext:()=>A(W(O.DD)),onPrev:()=>A(P(O.DD)),type:O.DD,value:E.DD,setValue:e=>z(t=>({...t,[O.DD]:e})),setActive:()=>A(O.DD),placeholder:c.locale.inputs.day},YYYY:{nextSegment:W(O.YYYY),preSegment:P(O.YYYY),isLast:I[I.length-1]===O.YYYY,isFirst:I[0]===O.YYYY,onNext:()=>A(W(O.YYYY)),onPrev:()=>A(P(O.YYYY)),type:O.YYYY,value:E.YYYY,setValue:e=>z(t=>({...t,[O.YYYY]:e})),setActive:()=>A(O.YYYY),placeholder:c.locale.inputs.year}};return{sort:I.map(t=>t===O.DD?e.DD:t===O.MM?e.MM:t===O.YYYY?e.YYYY:null).filter(e=>null!==e),default:e}},[c.locale.inputs.day,c.locale.inputs.month,c.locale.inputs.year,W,P,I,E.DD,E.MM,E.YYYY]),V=a.useMemo(()=>["mo","tu","we","th","fr","sa","su"].map((e,t)=>{const o=c.locale.weeks.find(t=>t.value===e);return{index:t,label:(null==o?void 0:o.localeShort)??e.toUpperCase()}}),[c.locale.weeks]),_=a.useMemo(()=>{const e=i.utc(),t=(M??k).clone().startOf("month"),o=(M??k).clone().endOf("month"),s=[],n=c.dateMin?i.utc(c.dateMin):null,r=c.dateMax?i.utc(c.dateMax):null,l=t.isoWeekday()-1;if(l>0)for(let i=l;i>0;i--){const o=t.clone().subtract(i,"days");s.push({value:o.valueOf(),labelString:o.format("dd"),labelNumber:o.date(),dayOfWeek:o.isoWeekday(),isWeekend:6===o.isoWeekday()||7===o.isoWeekday(),weekOfMonth:Math.ceil((s.length+1)/7),isToday:o.isSame(e,"day"),isCurrentMonth:!1,isDisabled:o.isBefore(n,"day")||o.isAfter(r,"day")})}const a=t.clone();for(;a<=o;)s.push({value:a.valueOf(),labelString:a.format("dd"),labelNumber:a.date(),dayOfWeek:a.isoWeekday(),isWeekend:6===a.isoWeekday()||7===a.isoWeekday(),weekOfMonth:Math.ceil((s.length+1)/7),isToday:a.isSame(e,"day"),isCurrentMonth:!0,isDisabled:a.isBefore(n,"day")||a.isAfter(r,"day")}),a.add(1,"day");const u=7-o.isoWeekday();if(u>0)for(let i=1;i<=u;i++){const t=o.clone().add(i,"days").startOf("day");s.push({value:t.valueOf(),labelString:t.format("dd"),labelNumber:t.date(),dayOfWeek:t.isoWeekday(),isWeekend:6===t.isoWeekday()||7===t.isoWeekday(),weekOfMonth:Math.ceil((s.length+1)/7),isToday:t.isSame(e,"day"),isCurrentMonth:!1,isDisabled:t.isBefore(n,"day")||t.isAfter(r,"day")})}return s.sort((e,t)=>e.value-t.value),s},[M,k,c.dateMax,c.dateMin]),B=a.useMemo(()=>function(e){const t=Math.floor(e/7);return e%7>0?t+1:t}(_.length)+1,[_]),q=a.useMemo(()=>40+28*B+6*(B-1)+2*l.KEY_SIZE_DATA[c.size].padding,[c.size,B]),F=a.useMemo(()=>l.KEY_SIZE_DATA[c.size].radius,[c.size]),K=a.useMemo(()=>null!==M,[M]),L=a.useMemo(()=>{const e=(M??k).clone().add(1,"month").startOf("month");return!!c.dateMax&&e.isAfter(i.utc(c.dateMax),"month")},[M,c.dateMax,k]),Z=a.useMemo(()=>{const e=(M??k).clone().subtract(1,"month").startOf("month");return!!c.dateMin&&e.isBefore(i.utc(c.dateMin),"month")},[M,c.dateMin,k]),H=a.useRef(null),U=a.useRef(null),J=a.useRef(null),X=a.useMemo(()=>l.KEY_SIZE_DATA[c.size].padding,[c.size]),G=a.useCallback(()=>{var e;null==(e=c.onFocus)||e.call(c)},[c.onFocus]),Q=a.useCallback(()=>{var e;null==(e=c.onBlur)||e.call(c)},[c.onBlur]),ee=a.useCallback(()=>{A(null)},[]),{isOpen:te,refReference:oe,refFloating:se,floatingStyles:ne,close:re,toggle:le}=d.usePopover({placement:"bottom-start",offset:X,mode:"independence",isClickOutside:!0,refsExcludeClickOutside:[H,U],isDisabled:(null==c?void 0:c.isDisabled)||(null==c?void 0:c.isReadOnly),onFocus:G,onBlur:Q,onBlurReference:ee}),ie=a.useCallback(e=>{const t=i(e).utc();(null==M?void 0:M.isSame(t,"day"))||(v(t),m(t.valueOf()),z({[O.DD]:t.clone().date(),[O.MM]:t.clone().month()+1,[O.YYYY]:t.clone().year()}))},[M,m]),ae=a.useCallback(e=>{var t;const o=e.key,s=/^\d$/.test(o);if(s||["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter"].includes(o)||e.ctrlKey||e.metaKey){if(N&&T.default[N]){if(s){const t=o;if(N===O.DD){const e=null!==E.DD?E.DD.toString():"";let o;if(e.length>=2)o=t;else{const s=e+t,n=Number(s);o=n>31||0===n?t:s}const s=Number(o);if(s>31||0===s)return;T.default[N].setValue(s),2===o.length&&T.default[N].onNext()}else if(N===O.MM){const e=null!==E.MM?E.MM.toString():"";let o;if(e.length>=2)o=t;else{const s=e+t;o=Number(s)>12?t:s}const s=Number(o);if(s>12||0===s)return;T.default[N].setValue(s),(2===o.length||1===o.length&&s>1)&&T.default[N].onNext()}else if(N===O.YYYY){const e=null!==E.YYYY?E.YYYY.toString():"";let o;if(e.length>=4){if("0"===t)return;o=t}else o=e+t;const s=Number(o);T.default[N].setValue(s)}e.preventDefault(),e.stopPropagation()}if("Tab"===o&&(T.default[N].isLast?null==(t=null==J?void 0:J.current)||t.blur():(e.preventDefault(),T.default[N].onNext())),"Enter"===o&&(e.preventDefault(),e.stopPropagation()),"Backspace"===o||"Delete"===o){if(N===O.DD)if(null!==E.DD){const e=E.DD.toString();if(1===e.length)T.default[N].setValue(null);else{const t=e.slice(0,-1);T.default[N].setValue(Number(t))}}else T.default[N].onPrev();else if(N===O.MM)if(null!==E.MM){const e=E.MM.toString();if(1===e.length)T.default[N].setValue(null);else{const t=e.slice(0,-1);T.default[N].setValue(Number(t))}}else T.default[N].onPrev();else if(N===O.YYYY)if(null!==E.YYYY){const e=E.YYYY.toString();if(1===e.length)T.default[N].setValue(null);else{const t=e.slice(0,-1);T.default[N].setValue(Number(t))}}else T.default[N].onPrev();e.preventDefault(),e.stopPropagation()}"ArrowLeft"!==o&&"ArrowDown"!==o||(e.preventDefault(),T.default[N].onPrev()),"ArrowRight"!==o&&"ArrowUp"!==o||(e.preventDefault(),T.default[N].onNext())}}else e.preventDefault()},[N,E.DD,E.MM,E.YYYY,T.default]),ue=a.useCallback(()=>{const e=(M??k).clone().add(1,"month");ie(e.valueOf())},[M,ie,k]),de=a.useCallback(()=>{const e=(M??k).clone().subtract(1,"month");ie(e.valueOf())},[M,ie,k]);a.useEffect(()=>{S(i(c.dateDefault).utc())},[c.dateDefault]),a.useEffect(()=>{v(c.value||c.defaultValue?i(c.value??c.defaultValue).utc():null)},[c.value,c.defaultValue]),a.useEffect(()=>{if(null!==E.DD&&null!==E.MM&&null!==E.YYYY){const e=E.DD??NaN,t=E.MM??NaN,o=E.YYYY??NaN;if(!Number.isNaN(e)&&!Number.isNaN(t)&&!Number.isNaN(o)){const s=i.utc(`${e}.${t}.${o}`,"D.M.YYYY",!0).startOf("day");s.isValid()&&ie(s.valueOf())}}},[E.DD,E.MM,E.YYYY,ie]),a.useEffect(()=>{if(null!==E.DD&&null!==E.MM&&null!==E.YYYY){const e=E.DD??NaN,t=E.MM??NaN,o=E.YYYY??NaN;if(!Number.isNaN(e)&&!Number.isNaN(t)&&!Number.isNaN(o)){i.utc(`${e}.${t}.${o}`,"D.M.YYYY",!0).startOf("day").isValid()?R(!1):(m(null),R(!0))}}else R(!1)},[E.DD,E.MM,E.YYYY,m]);const ce=a.useRef(""),[pe,he]=a.useState(!1);a.useEffect(()=>{var e;N&&(null==(e=null==J?void 0:J.current)||e.focus())},[N]);const ge=a.useMemo(()=>!(pe||K||!c.labelPlaceholder||te||E.DD||E.MM||E.YYYY),[pe,K,te,c.labelPlaceholder,E.DD,E.MM,E.YYYY]);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(f,{$size:c.size,$genre:c.genre,$sx:c.sx,$isDisabled:null==c?void 0:c.isDisabled,$isMinWidth:null==c?void 0:c.isMinWidth,$radius:F,$parentListHeight:q,tabIndex:-1,children:e.jsxRuntimeExports.jsxs(w,{ref:oe,$genre:c.genre,$size:c.size,$isShowPlaceholder:ge,$isDisabled:null==c?void 0:c.isDisabled,$isReadOnly:null==c?void 0:c.isReadOnly,tabIndex:-1,$error:C?{isError:!0,size:(null==(p=null==c?void 0:c.error)?void 0:p.size)??c.size,...c.notValidDate}:c.error,$isOpen:te,onClick:()=>{A(O.DD)},children:[e.jsxRuntimeExports.jsx("input",{ref:J,type:"tel",inputMode:"numeric",tabIndex:0,disabled:(null==c?void 0:c.isDisabled)||(null==c?void 0:c.isReadOnly),style:{position:"absolute",left:-9999,opacity:0},onKeyDown:ae,onChange:e=>{const t=e.target.value,o=ce.current,s=t.length>o.length?t.slice(-1):null;ce.current=t,s&&/^\d$/.test(s)&&ae({key:s,preventDefault:()=>{},stopPropagation:()=>{}}),t.length<o.length&&ae({key:"Backspace",preventDefault:()=>{},stopPropagation:()=>{}})},onFocus:()=>{he(!0),N||A(O.DD)},onBlur:()=>{var e;he(!1),te||null==(e=c.onBlur)||e.call(c)}}),ge?e.jsxRuntimeExports.jsx(d.Typography,{sx:{default:{size:16,line:1,isNoUserSelect:!0}},sxStandard:e=>({default:{color:e.colors.input[c.genre].color.placeholder}}),children:c.labelPlaceholder}):T.sort.map((t,o)=>e.jsxRuntimeExports.jsxs(a.Fragment,{children:[e.jsxRuntimeExports.jsx(y,{$isHaveValue:!!t.value,$isActive:N===t.type,$genre:c.genre,$size:c.size,onClick:e=>{e.preventDefault(),e.stopPropagation(),(null==c?void 0:c.isDisabled)||(null==c?void 0:c.isReadOnly)||t.setActive()},children:null!=t.value?String(t.value).padStart(t.type===O.YYYY?1:2,"0"):t.placeholder||""}),o!==T.sort.length-1&&e.jsxRuntimeExports.jsx("span",{style:{width:"4px",pointerEvents:"none",textAlign:"center"},children:"."})]},t.type)),e.jsxRuntimeExports.jsx(j,{genre:c.genre,size:"small",isWidthAsHeight:!0,isFullSize:!0,isRadius:!0,isOnlyIcon:!0,icons:[{name:"Calendar",type:"id"}],isDisabled:(null==c?void 0:c.isDisabled)||(null==c?void 0:c.isReadOnly),onFocus:e=>{e.preventDefault(),e.stopPropagation(),A(null)},onClick:e=>{e.preventDefault(),e.stopPropagation(),le()}})]})}),e.jsxRuntimeExports.jsx(d.Popover,{sx:e=>({default:{background:e.colors.input[c.genre].background.rest,border:`solid 1px ${e.colors.input[c.genre].border.rest}`}}),size:c.size,genre:c.genre,isOpen:te,isShowAlwaysOutline:!0,floatingStyles:ne,ref:se,children:e.jsxRuntimeExports.jsxs($,{$isInputEffect:c.isInputEffect,$genre:c.genre,$size:c.size,children:[e.jsxRuntimeExports.jsxs(n.Stack,{sx:{default:{justifyContent:"space-between",alignItems:"center"}},children:[e.jsxRuntimeExports.jsx(t.Button,{type:"button",isRadius:!0,icons:[{name:"Arrow2",type:"id",turn:90}],isWidthAsHeight:!0,genre:c.genre,size:"small",onClick:()=>!Z&&de(),isHidden:Z}),e.jsxRuntimeExports.jsxs(n.Stack,{sx:{default:{gap:"8px"}},children:[e.jsxRuntimeExports.jsx(s.SelectMonth,{monthsLocale:c.locale.months,genre:c.genre,size:"small",value:(M??k).clone().startOf("month").utc().valueOf(),isOnClickOptionClose:!0,isStayValueAfterSelect:!0,isOnlyColorInSelectListOption:!0,isCenter:!0,isShortLabel:!0,refFloating:H,onChange:e=>{e&&ie(e)},dateMin:c.dateMin,dateMax:c.dateMax,sx:{default:{width:"60px"}}}),e.jsxRuntimeExports.jsx(s.SelectYear,{genre:c.genre,size:"small",refFloating:U,value:(M??k).clone().startOf("year").utc().valueOf(),onChange:e=>{e&&ie(e)},isOnClickOptionClose:!0,isStayValueAfterSelect:!0,isOnlyColorInSelectListOption:!0,isCenter:!0,dateMin:c.dateMin,dateMax:c.dateMax,sx:{default:{width:"60px"}}})]}),e.jsxRuntimeExports.jsx(t.Button,{type:"button",onClick:()=>!L&&ue(),isWidthAsHeight:!0,isRadius:!0,icons:[{name:"Arrow2",type:"id",turn:-90}],genre:c.genre,size:"small",isHidden:L})]}),e.jsxRuntimeExports.jsxs(Y,{$rows:B,children:[V.map((t,o)=>{var s;return e.jsxRuntimeExports.jsx(b,{tabIndex:-1,type:"button",$isToday:!1,$isWeekend:!1,$genre:c.genre,$size:c.size,$row:(null==(s=_[0])?void 0:s.weekOfMonth)-1,$column:o+1,children:t.label},`${t.label}-${o}`)}),_.map(t=>e.jsxRuntimeExports.jsxs(D,{type:"button",$isDisabled:t.isDisabled,$genre:c.genre,$size:c.size,$row:(null==t?void 0:t.weekOfMonth)+1,$column:t.dayOfWeek,onClick:()=>{t.isDisabled||(ie(t.value),c.isOnClickClose&&re())},tabIndex:t.isDisabled?-1:0,$isToday:t.isToday,$isWeekend:t.isWeekend,$isChoice:t.value===(null==M?void 0:M.valueOf()),$isCurrentMonth:t.isCurrentMonth,children:[!t.isDisabled&&e.jsxRuntimeExports.jsx(o.Ripple,{color:x.colors.date[c.genre].color.rest}),t.labelNumber]},t.value))]})]})}),C||(null==c?void 0:c.error)?e.jsxRuntimeExports.jsx(r.ErrorMessage,{...C?{isError:!0,size:(null==(h=null==c?void 0:c.error)?void 0:h.size)??c.size,...c.notValidDate}:c.error,size:(null==(g=null==c?void 0:c.error)?void 0:g.size)??c.size}):null]})},exports.DatePickerVariant=O,exports.DateWrapper=f,exports.addDateDropdownDaySize=x,exports.addDateInputButtonSize=E,exports.addDateInputWrapperSize=S;
|
|
174
|
+
//# sourceMappingURL=component.types-OWBOCmrk.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.types-OWBOCmrk.cjs","sources":["../src/components/date-picker/component.tsx","../src/components/date-picker/component.styles.ts","../src/components/date-picker/component.types.ts"],"sourcesContent":["import { Button } from '@local/components/button';\nimport { Ripple } from '@local/components/ripple';\nimport { SelectMonth, SelectYear } from '@local/components/select';\nimport { Stack } from '@local/components/stack';\nimport { ErrorMessage } from '@local/styles/error';\nimport { KEY_SIZE_DATA } from '@local/theme';\n\nimport moment, { Moment } from 'moment';\nimport { Fragment, KeyboardEvent, RefObject, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { Popover, usePopover } from '../popover';\nimport { Typography } from '../typography';\nimport {\n DateDayProps,\n DateDropdownDay,\n DateDropdownDayOfWeek,\n DateDropdownDays,\n DateDropdownList,\n DateInput,\n DateInputButton,\n DateInputWrapper,\n DatePickerMode,\n DatePickerProps,\n DatePickerVariant,\n DateWrapper,\n WeekItem,\n} from '.';\n\nfunction countSevens(number: number) {\n const divisor = 7;\n const count = Math.floor(number / divisor);\n const remainder = number % divisor;\n\n return remainder > 0 ? count + 1 : count;\n}\n\nexport const DatePicker = (props: DatePickerProps) => {\n const { onChange } = props;\n const theme = useTheme();\n\n const [valueMoment, setValueMoment] = useState<null | Moment>(null);\n const [dateDefaultMoment, setDateDefaultMoment] = useState<Moment>(moment(props.dateDefault).utc());\n\n const [input, setInput] = useState<Record<DatePickerVariant, number | null>>({\n [DatePickerVariant.DD]: null,\n [DatePickerVariant.MM]: null,\n [DatePickerVariant.YYYY]: null,\n });\n\n const [activeSegment, setActiveSegment] = useState<DatePickerVariant | null>(null);\n const [isError, setIsError] = useState(false);\n\n const mode: DatePickerMode = useMemo(() => {\n if (!props.mode || props.mode.length === 0) {\n return [DatePickerVariant.DD, DatePickerVariant.MM, DatePickerVariant.YYYY]; // дефолт\n }\n\n const hasDuplicates = new Set(props.mode).size !== props.mode.length;\n\n if (hasDuplicates) {\n return [DatePickerVariant.DD, DatePickerVariant.MM, DatePickerVariant.YYYY]; // дефолт при дублировании\n }\n\n return props.mode;\n }, [props.mode]);\n\n const getNextSegment = useCallback(\n (currentSegment: DatePickerVariant): DatePickerVariant | null => {\n const currentIndex = mode.indexOf(currentSegment);\n return currentIndex < mode.length - 1 ? mode[currentIndex + 1] : mode[0];\n },\n [mode],\n );\n\n const getPrevSegment = useCallback(\n (currentSegment: DatePickerVariant): DatePickerVariant | null => {\n const currentIndex = mode.indexOf(currentSegment);\n return currentIndex > 0 ? mode[currentIndex - 1] : mode[mode.length - 1];\n },\n [mode],\n );\n\n const dataDate = useMemo(() => {\n const result = {\n MM: {\n nextSegment: getNextSegment(DatePickerVariant.MM),\n preSegment: getPrevSegment(DatePickerVariant.MM),\n onNext: () => setActiveSegment(getNextSegment(DatePickerVariant.MM)),\n onPrev: () => setActiveSegment(getPrevSegment(DatePickerVariant.MM)),\n isLast: mode[mode.length - 1] === DatePickerVariant.MM,\n isFirst: mode[0] === DatePickerVariant.MM,\n type: DatePickerVariant.MM,\n value: input.MM,\n setValue: (value: number | null) => setInput((prevValue) => ({ ...prevValue, [DatePickerVariant.MM]: value })),\n setActive: () => setActiveSegment(DatePickerVariant.MM),\n placeholder: props.locale.inputs.month,\n },\n DD: {\n nextSegment: getNextSegment(DatePickerVariant.DD),\n preSegment: getPrevSegment(DatePickerVariant.DD),\n isLast: mode[mode.length - 1] === DatePickerVariant.DD,\n isFirst: mode[0] === DatePickerVariant.DD,\n onNext: () => setActiveSegment(getNextSegment(DatePickerVariant.DD)),\n onPrev: () => setActiveSegment(getPrevSegment(DatePickerVariant.DD)),\n type: DatePickerVariant.DD,\n value: input.DD,\n setValue: (value: number | null) => setInput((prevValue) => ({ ...prevValue, [DatePickerVariant.DD]: value })),\n setActive: () => setActiveSegment(DatePickerVariant.DD),\n placeholder: props.locale.inputs.day,\n },\n YYYY: {\n nextSegment: getNextSegment(DatePickerVariant.YYYY),\n preSegment: getPrevSegment(DatePickerVariant.YYYY),\n isLast: mode[mode.length - 1] === DatePickerVariant.YYYY,\n isFirst: mode[0] === DatePickerVariant.YYYY,\n onNext: () => setActiveSegment(getNextSegment(DatePickerVariant.YYYY)),\n onPrev: () => setActiveSegment(getPrevSegment(DatePickerVariant.YYYY)),\n type: DatePickerVariant.YYYY,\n value: input.YYYY,\n setValue: (value: number | null) =>\n setInput((prevValue) => ({ ...prevValue, [DatePickerVariant.YYYY]: value })),\n setActive: () => setActiveSegment(DatePickerVariant.YYYY),\n placeholder: props.locale.inputs.year,\n },\n };\n const resultSort = mode\n .map((e) => {\n if (e === DatePickerVariant.DD) return result.DD;\n if (e === DatePickerVariant.MM) return result.MM;\n if (e === DatePickerVariant.YYYY) return result.YYYY;\n return null;\n })\n .filter((e) => e !== null);\n return { sort: resultSort, default: result };\n }, [\n props.locale.inputs.day,\n props.locale.inputs.month,\n props.locale.inputs.year,\n getNextSegment,\n getPrevSegment,\n mode,\n input.DD,\n input.MM,\n input.YYYY,\n ]);\n const daysInWeek = useMemo(() => {\n const weekOrder: WeekItem['value'][] = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'];\n\n return weekOrder.map((key, index) => {\n const found = props.locale.weeks.find((w) => w.value === key);\n return {\n index,\n label: found?.localeShort ?? key.toUpperCase(),\n };\n });\n }, [props.locale.weeks]);\n const daysInMonth: DateDayProps[] = useMemo(() => {\n const today = moment.utc();\n const startOfMonth = (valueMoment ?? dateDefaultMoment).clone().startOf('month');\n const endOfMonth = (valueMoment ?? dateDefaultMoment).clone().endOf('month');\n const days = [];\n\n const dateMin = props.dateMin ? moment.utc(props.dateMin) : null;\n const dateMax = props.dateMax ? moment.utc(props.dateMax) : null;\n\n const daysToAddBefore = startOfMonth.isoWeekday() - 1;\n if (daysToAddBefore > 0) {\n for (let i = daysToAddBefore; i > 0; i--) {\n const day = startOfMonth.clone().subtract(i, 'days');\n days.push({\n value: day.valueOf(),\n labelString: day.format('dd'),\n labelNumber: day.date(),\n dayOfWeek: day.isoWeekday(),\n isWeekend: day.isoWeekday() === 6 || day.isoWeekday() === 7,\n weekOfMonth: Math.ceil((days.length + 1) / 7),\n isToday: day.isSame(today, 'day'),\n isCurrentMonth: false,\n isDisabled: day.isBefore(dateMin, 'day') || day.isAfter(dateMax, 'day'),\n });\n }\n }\n\n const currentDate = startOfMonth.clone();\n while (currentDate <= endOfMonth) {\n days.push({\n value: currentDate.valueOf(),\n labelString: currentDate.format('dd'),\n labelNumber: currentDate.date(),\n dayOfWeek: currentDate.isoWeekday(),\n isWeekend: currentDate.isoWeekday() === 6 || currentDate.isoWeekday() === 7,\n weekOfMonth: Math.ceil((days.length + 1) / 7),\n isToday: currentDate.isSame(today, 'day'),\n isCurrentMonth: true,\n isDisabled: currentDate.isBefore(dateMin, 'day') || currentDate.isAfter(dateMax, 'day'),\n });\n currentDate.add(1, 'day');\n }\n\n const daysToAddAfter = 7 - endOfMonth.isoWeekday();\n if (daysToAddAfter > 0) {\n for (let i = 1; i <= daysToAddAfter; i++) {\n const day = endOfMonth.clone().add(i, 'days').startOf('day');\n days.push({\n value: day.valueOf(),\n labelString: day.format('dd'),\n labelNumber: day.date(),\n dayOfWeek: day.isoWeekday(),\n isWeekend: day.isoWeekday() === 6 || day.isoWeekday() === 7,\n weekOfMonth: Math.ceil((days.length + 1) / 7),\n isToday: day.isSame(today, 'day'),\n isCurrentMonth: false,\n isDisabled: day.isBefore(dateMin, 'day') || day.isAfter(dateMax, 'day'),\n });\n }\n }\n\n days.sort((a, b) => a.value - b.value);\n return days;\n }, [valueMoment, dateDefaultMoment, props.dateMax, props.dateMin]);\n const rows = useMemo(() => countSevens(daysInMonth.length) + 1, [daysInMonth]);\n const height = useMemo(\n () => 40 + rows * 28 + (rows - 1) * 6 + KEY_SIZE_DATA[props.size].padding * 2,\n [props.size, rows],\n );\n const sizeRadius = useMemo(() => KEY_SIZE_DATA[props.size].radius, [props.size]);\n\n const isHasValue = useMemo(() => {\n return valueMoment !== null;\n }, [valueMoment]);\n\n const isBlockNextMonth = useMemo(() => {\n const nextMonth = (valueMoment ?? dateDefaultMoment).clone().add(1, 'month').startOf('month');\n\n const isBeforeEndDate = props.dateMax ? nextMonth.isAfter(moment.utc(props.dateMax), 'month') : false;\n return isBeforeEndDate;\n }, [valueMoment, props.dateMax, dateDefaultMoment]);\n\n const isBlockPrevMonth = useMemo(() => {\n const prevMonth = (valueMoment ?? dateDefaultMoment).clone().subtract(1, 'month').startOf('month');\n\n const isAfterStartDate = props.dateMin ? prevMonth.isBefore(moment.utc(props.dateMin), 'month') : false;\n return isAfterStartDate;\n }, [valueMoment, props.dateMin, dateDefaultMoment]);\n\n const refSelectMonth = useRef<HTMLElement>(null);\n const refSelectYear = useRef<HTMLElement>(null);\n const refHiddenInput = useRef<HTMLInputElement>(null);\n\n const sizePadding = useMemo(() => KEY_SIZE_DATA[props.size].padding, [props.size]);\n\n const onFocusPopover = useCallback(() => {\n props.onFocus?.();\n }, [props.onFocus]);\n const onBlurPopover = useCallback(() => {\n props.onBlur?.();\n }, [props.onBlur]);\n const onBlurReference = useCallback(() => {\n setActiveSegment(null);\n }, []);\n const { isOpen, refReference, refFloating, floatingStyles, close, toggle } = usePopover({\n placement: 'bottom-start',\n offset: sizePadding,\n mode: 'independence',\n isClickOutside: true,\n refsExcludeClickOutside: [refSelectMonth, refSelectYear],\n isDisabled: props?.isDisabled || props?.isReadOnly,\n onFocus: onFocusPopover,\n onBlur: onBlurPopover,\n onBlurReference: onBlurReference,\n });\n\n const onChangeDate = useCallback(\n (timestamp: number) => {\n const momentNewDate = moment(timestamp).utc();\n if (valueMoment?.isSame(momentNewDate, 'day')) return;\n setValueMoment(momentNewDate);\n onChange(momentNewDate.valueOf());\n\n setInput({\n [DatePickerVariant.DD]: momentNewDate.clone().date(),\n [DatePickerVariant.MM]: momentNewDate.clone().month() + 1,\n [DatePickerVariant.YYYY]: momentNewDate.clone().year(),\n });\n },\n [valueMoment, onChange],\n );\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLInputElement>) => {\n const key = e.key;\n\n const allowedKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Backspace', 'Delete', 'Tab', 'Enter'];\n\n const isDigit = /^\\d$/.test(key);\n const isAllowed = isDigit || allowedKeys.includes(key) || e.ctrlKey || e.metaKey;\n\n if (!isAllowed) {\n e.preventDefault();\n return;\n }\n\n if (activeSegment && dataDate.default[activeSegment]) {\n if (isDigit) {\n const digit = key;\n\n if (activeSegment === DatePickerVariant.DD) {\n const current = input.DD !== null ? input.DD.toString() : '';\n let nextValue: string;\n\n if (current.length >= 2) {\n // если уже два символа — заменяем полностью\n nextValue = digit;\n } else {\n // пробуем добавить цифру\n const potential = current + digit;\n const potentialParsed = Number(potential);\n\n // если при добавлении получится >31 или 0 — считаем, что ввод начинается заново\n if (potentialParsed > 31 || potentialParsed === 0) {\n nextValue = digit;\n } else {\n nextValue = potential;\n }\n }\n\n const parsed = Number(nextValue);\n if (parsed > 31 || parsed === 0) return;\n\n dataDate.default[activeSegment].setValue(parsed);\n if (nextValue.length === 2) {\n dataDate.default[activeSegment].onNext();\n }\n } else if (activeSegment === DatePickerVariant.MM) {\n const currentMonthStr = input.MM !== null ? input.MM.toString() : '';\n let nextValue: string;\n\n if (currentMonthStr.length >= 2) {\n nextValue = digit;\n } else {\n const potential = currentMonthStr + digit;\n const potentialParsed = Number(potential);\n\n if (potentialParsed > 12) {\n nextValue = digit;\n } else {\n nextValue = potential;\n }\n }\n\n const parsed = Number(nextValue);\n if (parsed > 12 || parsed === 0) return;\n\n dataDate.default[activeSegment].setValue(parsed);\n\n if (nextValue.length === 2 || (nextValue.length === 1 && parsed > 1)) {\n dataDate.default[activeSegment].onNext();\n }\n } else if (activeSegment === DatePickerVariant.YYYY) {\n const current = input.YYYY !== null ? input.YYYY.toString() : '';\n let nextValue: string;\n\n if (current.length >= 4) {\n if (digit === '0') return;\n nextValue = digit;\n } else {\n nextValue = current + digit;\n }\n\n const parsed = Number(nextValue);\n\n dataDate.default[activeSegment].setValue(parsed);\n }\n\n e.preventDefault();\n e.stopPropagation();\n }\n if (key === 'Tab') {\n if (!dataDate.default[activeSegment].isLast) {\n e.preventDefault();\n dataDate.default[activeSegment].onNext();\n } else {\n refHiddenInput?.current?.blur();\n }\n }\n if (key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n }\n if (key === 'Backspace' || key === 'Delete') {\n if (activeSegment === DatePickerVariant.DD) {\n if (input.DD !== null) {\n const current = input.DD.toString();\n if (current.length === 1) {\n dataDate.default[activeSegment].setValue(null);\n } else {\n const newValue = current.slice(0, -1);\n dataDate.default[activeSegment].setValue(Number(newValue));\n }\n } else {\n dataDate.default[activeSegment].onPrev();\n }\n } else if (activeSegment === DatePickerVariant.MM) {\n if (input.MM !== null) {\n const current = input.MM.toString();\n if (current.length === 1) {\n dataDate.default[activeSegment].setValue(null);\n } else {\n const newValue = current.slice(0, -1);\n dataDate.default[activeSegment].setValue(Number(newValue));\n }\n } else {\n dataDate.default[activeSegment].onPrev();\n }\n } else if (activeSegment === DatePickerVariant.YYYY) {\n if (input.YYYY !== null) {\n const current = input.YYYY.toString();\n if (current.length === 1) {\n dataDate.default[activeSegment].setValue(null);\n } else {\n const newValue = current.slice(0, -1);\n dataDate.default[activeSegment].setValue(Number(newValue));\n }\n } else {\n dataDate.default[activeSegment].onPrev();\n }\n }\n\n e.preventDefault();\n e.stopPropagation();\n }\n if (key === 'ArrowLeft' || key === 'ArrowDown') {\n e.preventDefault();\n dataDate.default[activeSegment].onPrev();\n }\n if (key === 'ArrowRight' || key === 'ArrowUp') {\n e.preventDefault();\n dataDate.default[activeSegment].onNext();\n }\n }\n },\n [activeSegment, input.DD, input.MM, input.YYYY, dataDate.default],\n );\n const onNextMonth = useCallback(() => {\n const newDate = (valueMoment ?? dateDefaultMoment).clone().add(1, 'month');\n onChangeDate(newDate.valueOf());\n }, [valueMoment, onChangeDate, dateDefaultMoment]);\n\n const onPrevMonth = useCallback(() => {\n const newDate = (valueMoment ?? dateDefaultMoment).clone().subtract(1, 'month');\n onChangeDate(newDate.valueOf());\n }, [valueMoment, onChangeDate, dateDefaultMoment]);\n\n useEffect(() => {\n setDateDefaultMoment(moment(props.dateDefault).utc());\n }, [props.dateDefault]);\n\n useEffect(() => {\n setValueMoment(props.value || props.defaultValue ? moment(props.value ?? props.defaultValue).utc() : null);\n }, [props.value, props.defaultValue]);\n\n useEffect(() => {\n if (input.DD !== null && input.MM !== null && input.YYYY !== null) {\n const day = input.DD ?? NaN;\n const month = input.MM ?? NaN;\n const year = input.YYYY ?? NaN;\n if (!Number.isNaN(day) && !Number.isNaN(month) && !Number.isNaN(year)) {\n const m = moment.utc(`${day}.${month}.${year}`, 'D.M.YYYY', true).startOf('day');\n if (m.isValid()) {\n onChangeDate(m.valueOf());\n }\n }\n }\n }, [input.DD, input.MM, input.YYYY, onChangeDate]);\n\n useEffect(() => {\n if (input.DD !== null && input.MM !== null && input.YYYY !== null) {\n const day = input.DD ?? NaN;\n const month = input.MM ?? NaN;\n const year = input.YYYY ?? NaN;\n if (!Number.isNaN(day) && !Number.isNaN(month) && !Number.isNaN(year)) {\n const m = moment.utc(`${day}.${month}.${year}`, 'D.M.YYYY', true).startOf('day');\n if (m.isValid()) {\n setIsError(false);\n } else {\n onChange(null);\n setIsError(true);\n }\n }\n } else {\n setIsError(false);\n }\n }, [input.DD, input.MM, input.YYYY, onChange]);\n\n const prevValueRef = useRef('');\n const [isInputFocused, setIsInputFocused] = useState(false);\n\n useEffect(() => {\n if (activeSegment) {\n refHiddenInput?.current?.focus();\n }\n }, [activeSegment]);\n\n const isShowPlaceholder = useMemo(() => {\n return !!(\n !isInputFocused &&\n !isHasValue &&\n props.labelPlaceholder &&\n !isOpen &&\n !input.DD &&\n !input.MM &&\n !input.YYYY\n );\n }, [isInputFocused, isHasValue, isOpen, props.labelPlaceholder, input.DD, input.MM, input.YYYY]);\n return (\n <>\n <DateWrapper\n $size={props.size}\n $genre={props.genre}\n $sx={props.sx}\n $isDisabled={props?.isDisabled}\n $isMinWidth={props?.isMinWidth}\n $radius={sizeRadius}\n $parentListHeight={height}\n tabIndex={-1}\n >\n <DateInputWrapper\n ref={refReference as RefObject<HTMLDivElement | null>}\n $genre={props.genre}\n $size={props.size}\n $isShowPlaceholder={isShowPlaceholder}\n $isDisabled={props?.isDisabled}\n $isReadOnly={props?.isReadOnly}\n tabIndex={-1}\n $error={\n isError\n ? {\n isError: true,\n size: props?.error?.size ?? props.size,\n ...props.notValidDate,\n }\n : props.error\n }\n $isOpen={isOpen}\n onClick={() => {\n setActiveSegment(DatePickerVariant.DD);\n }}\n >\n <input\n ref={refHiddenInput}\n type='tel'\n inputMode='numeric'\n tabIndex={0}\n disabled={props?.isDisabled || props?.isReadOnly}\n style={{ position: 'absolute', left: -9999, opacity: 0 }}\n onKeyDown={handleKeyDown}\n onChange={(e) => {\n const value = e.target.value;\n const prevValue = prevValueRef.current;\n\n const newChar = value.length > prevValue.length ? value.slice(-1) : null;\n\n prevValueRef.current = value;\n\n if (newChar && /^\\d$/.test(newChar)) {\n handleKeyDown({\n key: newChar,\n preventDefault: () => {},\n stopPropagation: () => {},\n } as unknown as KeyboardEvent<HTMLInputElement>);\n }\n\n if (value.length < prevValue.length) {\n handleKeyDown({\n key: 'Backspace',\n preventDefault: () => {},\n stopPropagation: () => {},\n } as unknown as KeyboardEvent<HTMLInputElement>);\n }\n\n // if (newChar === '\\n') {\n // close();\n // }\n }}\n onFocus={() => {\n setIsInputFocused(true);\n if (!activeSegment) setActiveSegment(DatePickerVariant.DD);\n }}\n onBlur={() => {\n setIsInputFocused(false);\n if (!isOpen) {\n props.onBlur?.();\n }\n }}\n />\n {isShowPlaceholder ? (\n <Typography\n sx={{ default: { size: 16, line: 1, isNoUserSelect: true } }}\n sxStandard={(theme) => ({\n default: {\n color: theme.colors.input[props.genre].color.placeholder,\n },\n })}\n >\n {props.labelPlaceholder}\n </Typography>\n ) : (\n dataDate.sort.map((date, index) => (\n <Fragment key={date.type}>\n <DateInput\n $isHaveValue={!!date.value}\n $isActive={activeSegment === date.type}\n $genre={props.genre}\n $size={props.size}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n if (props?.isDisabled || props?.isReadOnly) return;\n date.setActive();\n }}\n >\n {date.value != null\n ? String(date.value).padStart(date.type === DatePickerVariant.YYYY ? 1 : 2, '0')\n : date.placeholder || ''}\n </DateInput>\n {index !== dataDate.sort.length - 1 && (\n <span style={{ width: '4px', pointerEvents: 'none', textAlign: 'center' }}>.</span>\n )}\n </Fragment>\n ))\n )}\n <DateInputButton\n genre={props.genre}\n size='small'\n isWidthAsHeight\n isFullSize\n isRadius\n isOnlyIcon\n icons={[{ name: 'Calendar', type: 'id' }]}\n isDisabled={props?.isDisabled || props?.isReadOnly}\n onFocus={(e) => {\n e.preventDefault();\n e.stopPropagation();\n setActiveSegment(null);\n }}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n toggle();\n }}\n />\n </DateInputWrapper>\n </DateWrapper>\n <Popover\n sx={(theme) => ({\n default: {\n background: theme.colors.input[props.genre].background.rest,\n border: `solid 1px ${theme.colors.input[props.genre].border.rest}`,\n },\n })}\n size={props.size}\n genre={props.genre}\n isOpen={isOpen}\n isShowAlwaysOutline\n floatingStyles={floatingStyles}\n ref={refFloating}\n >\n <DateDropdownList $isInputEffect={props.isInputEffect} $genre={props.genre} $size={props.size}>\n <Stack\n sx={{\n default: {\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n }}\n >\n <Button\n type='button'\n isRadius\n icons={[\n {\n name: 'Arrow2',\n type: 'id',\n turn: 90,\n },\n ]}\n isWidthAsHeight\n genre={props.genre}\n size={'small'}\n onClick={() => !isBlockPrevMonth && onPrevMonth()}\n isHidden={isBlockPrevMonth}\n />\n <Stack sx={{ default: { gap: '8px' } }}>\n <SelectMonth\n monthsLocale={props.locale.months}\n genre={props.genre}\n size={'small'}\n value={(valueMoment ?? dateDefaultMoment).clone().startOf('month').utc().valueOf()}\n isOnClickOptionClose\n isStayValueAfterSelect\n isOnlyColorInSelectListOption\n isCenter\n isShortLabel\n refFloating={refSelectMonth}\n onChange={(timestamp: number | null) => {\n if (timestamp) onChangeDate(timestamp);\n }}\n dateMin={props.dateMin}\n dateMax={props.dateMax}\n sx={{ default: { width: '60px' } }}\n />\n <SelectYear\n genre={props.genre}\n size={'small'}\n refFloating={refSelectYear}\n value={(valueMoment ?? dateDefaultMoment).clone().startOf('year').utc().valueOf()}\n onChange={(timestamp: number | null) => {\n if (timestamp) onChangeDate(timestamp);\n }}\n isOnClickOptionClose\n isStayValueAfterSelect\n isOnlyColorInSelectListOption\n isCenter\n dateMin={props.dateMin}\n dateMax={props.dateMax}\n sx={{ default: { width: '60px' } }}\n />\n </Stack>\n <Button\n type='button'\n onClick={() => !isBlockNextMonth && onNextMonth()}\n isWidthAsHeight\n isRadius\n icons={[\n {\n name: 'Arrow2',\n type: 'id',\n turn: -90,\n },\n ]}\n genre={props.genre}\n size={'small'}\n isHidden={isBlockNextMonth}\n />\n </Stack>\n <DateDropdownDays $rows={rows}>\n {daysInWeek.map((e, index) => (\n <DateDropdownDayOfWeek\n tabIndex={-1}\n type='button'\n $isToday={false}\n $isWeekend={false}\n $genre={props.genre}\n $size={props.size}\n $row={daysInMonth[0]?.weekOfMonth - 1}\n $column={index + 1}\n key={`${e.label}-${index}`}\n >\n {e.label}\n </DateDropdownDayOfWeek>\n ))}\n {daysInMonth.map((day) => (\n <DateDropdownDay\n type='button'\n $isDisabled={day.isDisabled}\n $genre={props.genre}\n $size={props.size}\n $row={day?.weekOfMonth + 1}\n $column={day.dayOfWeek}\n key={day.value}\n onClick={() => {\n if (!day.isDisabled) {\n onChangeDate(day.value);\n if (props.isOnClickClose) {\n close();\n }\n }\n }}\n tabIndex={day.isDisabled ? -1 : 0}\n $isToday={day.isToday}\n $isWeekend={day.isWeekend}\n $isChoice={day.value === valueMoment?.valueOf()}\n $isCurrentMonth={day.isCurrentMonth}\n >\n {!day.isDisabled && <Ripple color={theme.colors.date[props.genre].color.rest} />}\n {day.labelNumber}\n </DateDropdownDay>\n ))}\n </DateDropdownDays>\n </DateDropdownList>\n </Popover>\n {isError || props?.error ? (\n <ErrorMessage\n {...(isError\n ? {\n isError: true,\n size: props?.error?.size ?? props.size,\n ...props.notValidDate,\n }\n : props.error)}\n size={props?.error?.size ?? props.size}\n />\n ) : null}\n </>\n );\n};\n","import { addInputIsInputEffect } from '@local/components/input';\nimport { getFontSizeStyles } from '@local/components/typography';\nimport {\n addDisabled,\n addNiceNumber,\n addOutline,\n addOutlineChildren,\n addRemoveOutline,\n addRemoveScrollbar,\n addTransition,\n} from '@local/styles/add';\nimport { addError } from '@local/styles/error';\nimport { addSX } from '@local/styles/sx';\nimport { KEY_SIZE_DATA } from '@local/theme/theme';\n\nimport { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\n\nimport { Button, ButtonProps } from '../button';\nimport { DateDropdownDayProps, DateDropdownListProps, DateInputProps, DateStyledListProps, DateWrapperProps } from '.';\n\nexport const DateWrapper = styled.div<DateWrapperProps>`\n width: 100%;\n position: relative;\n height: fit-content;\n ${(props) =>\n props.$isMinWidth &&\n css`\n width: min-content;\n `}\n ${addSX};\n ${addNiceNumber};\n`;\n\nexport const DateDropdownListParent = styled(motion.div)<DateStyledListProps>`\n ${addRemoveScrollbar};\n`;\n\nexport const DateDropdownList = styled.div<DateDropdownListProps>`\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n padding-top: 6px;\n transform: translateZ(0);\n justify-content: flex-start;\n gap: 10px;\n ${addInputIsInputEffect};\n`;\n\nexport const DateDropdownDays = styled.div<{ $rows: number }>`\n display: grid;\n column-gap: normal;\n row-gap: normal;\n gap: 6px;\n grid-template-columns: repeat(7, 28px);\n grid-template-rows: repeat(${(props) => props.$rows}, 28px);\n justify-content: space-between;\n`;\n\nexport const addDateDropdownDaySize = css<DateDropdownDayProps>`\n ${(props) =>\n props.$size &&\n css`\n border-radius: ${KEY_SIZE_DATA[props.$size].radius}px;\n ${(params) => getFontSizeStyles(12, 700, params.theme.font.family)};\n `};\n position: relative;\n overflow: hidden;\n isolation: isolate;\n user-select: none;\n background: ${(props) => props.theme.colors.date[props.$genre].background.rest};\n border-color: ${(props) => props.theme.colors.date[props.$genre].border.rest};\n color: ${(props) => props.theme.colors.date[props.$genre].color.rest};\n border: 1px solid transparent;\n grid-row: ${(props) => props.$row};\n grid-column: ${(props) => props.$column};\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n cursor: pointer;\n &:hover {\n ${(props) =>\n !props.$isDisabled &&\n css`\n background: ${props.theme.colors.date[props.$genre].background.hover};\n border-color: ${props.theme.colors.date[props.$genre].border.hover};\n color: ${props.theme.colors.date[props.$genre].color.hover};\n `}\n }\n ${addTransition};\n\n ${(props) =>\n props.$isWeekend &&\n css`\n background: ${props.theme.colors.date[props.$genre].background.weekend};\n border-color: ${props.theme.colors.date[props.$genre].border.weekend};\n color: ${props.theme.colors.date[props.$genre].color.weekend};\n `}\n ${(props) =>\n props.$isToday &&\n css`\n background: ${props.theme.colors.date[props.$genre].background.today};\n border-color: ${props.theme.colors.date[props.$genre].border.today};\n color: ${props.theme.colors.date[props.$genre].color.today};\n `}\n ${(props) =>\n props.$isChoice &&\n css`\n background: ${props.theme.colors.date[props.$genre].background.choice};\n border-color: ${props.theme.colors.date[props.$genre].border.choice};\n color: ${props.theme.colors.date[props.$genre].color.choice};\n `}\n ${(props) =>\n props.$isDisabled &&\n css`\n background: ${props.theme.colors.date[props.$genre].background.weekend};\n border-color: ${props.theme.colors.date[props.$genre].border.weekend};\n color: ${props.theme.colors.date[props.$genre].color.weekend};\n opacity: 0.5;\n `}\n ${(props) =>\n !props.$isCurrentMonth &&\n css`\n opacity: 0.5;\n `}\n ${(params) => getFontSizeStyles(12, 700, params.theme.font.family)};\n\n ${addOutline};\n`;\n\nexport const DateDropdownDay = styled.button<DateDropdownDayProps>`\n ${addDateDropdownDaySize}\n`;\nexport const DateDropdownDayOfWeek = styled.button<DateDropdownDayProps>`\n ${addDateDropdownDaySize}\n opacity: 1;\n background-color: transparent;\n`;\n\n/****************************************** Genre *************************************************/\nconst addDateInputGenre = css<DateInputProps>`\n background-color: ${(props) => (props.$isActive ? props.theme.palette.black10 : 'transparent')};\n\n ${(props) => getFontSizeStyles(16, props.$isBold ? 500 : 400, props.theme.font.family, props.theme.font.lineHeight)};\n ${(props) =>\n props.$isHaveValue\n ? css`\n color: ${props.theme.colors.input[props.$genre].color.rest};\n &:focus-visible {\n color: ${props.theme.colors.input[props.$genre].color.rest};\n }\n `\n : css`\n color: ${props.theme.colors.input[props.$genre].color.placeholder};\n `};\n`;\nconst addDateInputSize = css<DateInputProps>`\n border-radius: 4px;\n padding: 2px;\n min-width: 10px;\n`;\nexport const DateInput = styled.div<DateInputProps>`\n text-align: center;\n resize: none;\n overflow: hidden;\n border: 0px solid;\n background: transparent;\n margin: 0px !important;\n white-space: nowrap;\n ${addDateInputSize};\n ${addDateInputGenre};\n ${addRemoveOutline};\n`;\n\n/****************************************** Genre *************************************************/\nconst addDateInputWrapperGenre = css<DateInputProps>`\n ${(props) => css`\n background: ${props.theme.colors.input[props.$genre].background.rest};\n border-color: ${props.theme.colors.input[props.$genre].border.rest};\n color: ${props.theme.colors.input[props.$genre].color.rest};\n outline: 2px solid transparent;\n outline-offset: 1px;\n &:hover {\n background: ${props.theme.colors.input[props.$genre].background.hover};\n border-color: ${props.theme.colors.input[props.$genre].border.hover};\n color: ${props.theme.colors.input[props.$genre].color.hover};\n }\n ${addOutlineChildren};\n ${\n props.$isOpen &&\n css`\n background: ${props.theme.colors.input[props.$genre].background.rest};\n border-color: ${props.theme.colors.input[props.$genre].border.rest};\n color: ${props.theme.colors.input[props.$genre].color.rest};\n outline: 2px solid ${(props) => props.theme.states.focus};\n `\n }\n `};\n`;\n\n/****************************************** Size *************************************************/\nexport const addDateInputWrapperSize = css<DateInputProps>`\n ${(props) => css`\n padding: ${props.$isShowPlaceholder ? `0px ${KEY_SIZE_DATA[props.$size].padding}px` : `0px ${KEY_SIZE_DATA[props.$size].padding}px 0px ${KEY_SIZE_DATA[props.$size].padding - 2}px`};\n height: ${KEY_SIZE_DATA[props.$size].height}px;\n min-height: ${KEY_SIZE_DATA[props.$size].height}px;\n max-height: ${KEY_SIZE_DATA[props.$size].height}px;\n border-radius: ${KEY_SIZE_DATA[props.$size].radius}px;\n `}\n`;\n\nexport const DateInputWrapper = styled.div<DateInputProps>`\n resize: none;\n overflow: hidden;\n width: 100%;\n border: 1px solid transparent;\n\n white-space: nowrap;\n\n display: flex;\n align-items: center;\n gap: 0px;\n\n ${addDisabled};\n ${addDateInputWrapperSize};\n ${addDateInputWrapperGenre};\n ${addTransition};\n ${addError};\n`;\n\nexport const addDateInputButtonSize = css<ButtonProps>`\n ${(props) => css`\n right:${KEY_SIZE_DATA[props.size].padding}px;\n `}\n`;\nexport const DateInputButton = styled(Button)`\n position: absolute;\n height: max-content !important;\n ${addDateInputButtonSize};\n`;\n","import { InputStandardProps, StyledInputProps, StyledInputWrapperProps } from '@local/components/input';\nimport { addErrorProps, ErrorMessageProps } from '@local/styles/error';\nimport { addSXProps } from '@local/styles/sx';\nimport { IThemeGenreDate, IThemeSize } from '@local/theme';\nimport { AddDollarSign } from '@local/types';\n\nimport { SelectMonthProps } from '../select';\n\nexport type DatePickerMode = DatePickerVariant[];\nexport enum DatePickerVariant {\n DD = 'DD',\n MM = 'MM',\n YYYY = 'YYYY',\n}\n\nexport type CommonDatePickerProps = addErrorProps &\n addSXProps & {\n genre: TDateGenre;\n\n id?: string;\n\n isDisabled?: boolean;\n isBold?: boolean;\n isMinWidth?: boolean;\n isReadOnly?: boolean;\n\n isInputEffect?: InputStandardProps['isInputEffect'];\n\n isOnClickClose?: boolean;\n\n labelPlaceholder?: string;\n\n locale: {\n months: SelectMonthProps['monthsLocale'];\n weeks: WeekItem[];\n inputs: InputItem;\n };\n\n notValidDate?: Omit<ErrorMessageProps, 'size' | 'isError'>;\n\n mode?: DatePickerMode;\n\n name?: string;\n\n onBlur?: () => void;\n\n onChange: (timestamp: number | null) => void;\n\n onFocus?: () => void;\n\n size: IThemeSize;\n\n dateMax?: number;\n\n dateMin?: number;\n\n dateDefault: number;\n };\n\ntype ControlledValue = {\n value: number | null | undefined;\n\n defaultValue?: never;\n};\n\ntype UncontrolledValue = {\n defaultValue: number | null | undefined;\n\n value?: never;\n};\nexport type DatePickerProps = CommonDatePickerProps & (ControlledValue | UncontrolledValue);\n\nexport type TDateGenre = keyof IThemeGenreDate;\n\nexport interface DateDayProps {\n dayOfWeek: number;\n\n isCurrentMonth: boolean;\n\n isDisabled: boolean;\n\n isToday: boolean;\n\n isWeekend: boolean;\n\n labelNumber: number;\n\n labelString: string;\n\n value: number;\n\n weekOfMonth: number;\n}\n\nexport type DateWrapperProps = AddDollarSign<\n Pick<InputStandardProps, 'genre' | 'isDisabled'> & {\n parentListHeight: number;\n radius: number;\n isMinWidth?: boolean;\n }\n> &\n StyledInputWrapperProps;\n\nexport type DateInputProps = AddDollarSign<\n Pick<DatePickerProps, 'error' | 'genre' | 'size' | 'isBold' | 'isReadOnly' | 'isDisabled'> & {\n isOpen?: boolean;\n isActive?: boolean;\n isHaveValue?: boolean;\n isShowPlaceholder?: boolean;\n }\n>;\n\nexport type DateStyledOptionProps = AddDollarSign<{\n isSelectedItem?: boolean;\n isCheckboxProps?: boolean;\n}> &\n StyledInputProps;\n\nexport type DateStyledListProps = AddDollarSign<Pick<InputStandardProps, 'genre' | 'size'>>;\n\nexport type DateDropdownListProps = AddDollarSign<\n Pick<DatePickerProps, 'isInputEffect'> & Pick<DatePickerProps, 'genre' | 'size'>\n>;\n\nexport type DateDropdownDayProps = AddDollarSign<\n Pick<DatePickerProps, 'genre' | 'size'> &\n Pick<DateDayProps, 'isToday' | 'isWeekend'> & {\n row: number;\n column: number;\n isChoice?: boolean;\n isCurrentMonth?: boolean;\n isDisabled?: boolean;\n }\n>;\n\nexport type MonthItem = {\n localeLong: string;\n\n localeShort: string;\n\n value:\n | 'january'\n | 'february'\n | 'march'\n | 'april'\n | 'may'\n | 'june'\n | 'july'\n | 'august'\n | 'september'\n | 'october'\n | 'november'\n | 'december';\n};\nexport type WeekItem = {\n localeLong: string;\n\n localeShort: string;\n\n value: 'mo' | 'tu' | 'we' | 'th' | 'fr' | 'sa' | 'su';\n};\nexport type InputItem = {\n day: string;\n\n month: string;\n\n year: string;\n};\n"],"names":["DateWrapper","styled","div","props","$isMinWidth","css","addSX","addNiceNumber","DateDropdownListParent","motion","addRemoveScrollbar","DateDropdownList","addInputIsInputEffect","DateDropdownDays","$rows","addDateDropdownDaySize","$size","KEY_SIZE_DATA","radius","params","getFontSizeStyles","theme","font","family","colors","date","$genre","background","rest","border","color","$row","$column","$isDisabled","hover","addTransition","$isWeekend","weekend","$isToday","today","$isChoice","choice","$isCurrentMonth","addOutline","DateDropdownDay","button","DateDropdownDayOfWeek","addDateInputGenre","$isActive","palette","black10","$isBold","lineHeight","$isHaveValue","input","placeholder","addDateInputSize","DateInput","addRemoveOutline","addDateInputWrapperGenre","addOutlineChildren","$isOpen","states","focus","addDateInputWrapperSize","$isShowPlaceholder","padding","height","DateInputWrapper","addDisabled","addError","addDateInputButtonSize","size","DateInputButton","Button","DatePickerVariant","onChange","useTheme","valueMoment","setValueMoment","useState","dateDefaultMoment","setDateDefaultMoment","moment","dateDefault","utc","setInput","DD","MM","YYYY","activeSegment","setActiveSegment","isError","setIsError","mode","useMemo","length","Set","getNextSegment","useCallback","currentSegment","currentIndex","indexOf","getPrevSegment","dataDate","result","nextSegment","preSegment","onNext","onPrev","isLast","isFirst","type","value","setValue","prevValue","setActive","locale","inputs","month","day","year","sort","map","e","filter","default","daysInWeek","key","index","found","weeks","find","w","label","localeShort","toUpperCase","daysInMonth","startOfMonth","clone","startOf","endOfMonth","endOf","days","dateMin","dateMax","daysToAddBefore","isoWeekday","i","subtract","push","valueOf","labelString","format","labelNumber","dayOfWeek","isWeekend","weekOfMonth","Math","ceil","isToday","isSame","isCurrentMonth","isDisabled","isBefore","isAfter","currentDate","add","daysToAddAfter","a","b","rows","number","count","floor","countSevens","sizeRadius","isHasValue","isBlockNextMonth","nextMonth","isBlockPrevMonth","prevMonth","refSelectMonth","useRef","refSelectYear","refHiddenInput","sizePadding","onFocusPopover","_a","onFocus","call","onBlurPopover","onBlur","onBlurReference","isOpen","refReference","refFloating","floatingStyles","close","toggle","usePopover","placement","offset","isClickOutside","refsExcludeClickOutside","isReadOnly","onChangeDate","timestamp","momentNewDate","handleKeyDown","isDigit","test","includes","ctrlKey","metaKey","digit","current","toString","nextValue","potential","potentialParsed","Number","parsed","currentMonthStr","preventDefault","stopPropagation","blur","newValue","slice","onNextMonth","newDate","onPrevMonth","useEffect","defaultValue","NaN","isNaN","m","isValid","prevValueRef","isInputFocused","setIsInputFocused","isShowPlaceholder","labelPlaceholder","jsxs","Fragment","children","jsx","genre","$sx","sx","isMinWidth","$radius","$parentListHeight","tabIndex","ref","$isReadOnly","$error","error","notValidDate","onClick","inputMode","disabled","style","position","left","opacity","onKeyDown","target","newChar","Typography","line","isNoUserSelect","sxStandard","String","padStart","width","pointerEvents","textAlign","isWidthAsHeight","isFullSize","isRadius","isOnlyIcon","icons","name","Popover","isShowAlwaysOutline","$isInputEffect","isInputEffect","Stack","justifyContent","alignItems","turn","isHidden","gap","SelectMonth","monthsLocale","months","isOnClickOptionClose","isStayValueAfterSelect","isOnlyColorInSelectListOption","isCenter","isShortLabel","SelectYear","isOnClickClose","Ripple","ErrorMessage","_b","_c"],"mappings":"8kBAqCO,MChBMA,EAAcC,EAAOC,GAAA;;;;IAI7BC,GACDA,EAAMC,aACNC,EAAAA,GAAAA;;;IAGAC;IACAC;EAGSC,EAAyBP,EAAOQ,EAAAA,OAAOP,IAAG;IACnDQ;EAGSC,EAAmBV,EAAOC,GAAA;;;;;;;;;IASnCU;EAGSC,EAAmBZ,EAAOC,GAAA;;;;;;+BAMPC,GAAUA,EAAMW;;EAInCC,EAAyBV,EAAAA,GAAAA;IACjCF,GACDA,EAAMa,OACNX,EAAAA,GAAAA;uBACmBY,gBAAcd,EAAMa,OAAOE;QACzCC,GAAWC,EAAAA,kBAAkB,GAAI,IAAKD,EAAOE,MAAMC,KAAKC;;;;;;gBAMhDpB,GAAUA,EAAMkB,MAAMG,OAAOC,KAAKtB,EAAMuB,QAAQC,WAAWC;kBACzDzB,GAAUA,EAAMkB,MAAMG,OAAOC,KAAKtB,EAAMuB,QAAQG,OAAOD;WAC9DzB,GAAUA,EAAMkB,MAAMG,OAAOC,KAAKtB,EAAMuB,QAAQI,MAAMF;;cAEnDzB,GAAUA,EAAM4B;iBACb5B,GAAUA,EAAM6B;;;;;;;;MAQ3B7B,IACAA,EAAM8B,aACP5B,EAAAA,GAAAA;oBACcF,EAAMkB,MAAMG,OAAOC,KAAKtB,EAAMuB,QAAQC,WAAWO;sBAC/C/B,EAAMkB,MAAMG,OAAOC,KAAKtB,EAAMuB,QAAQG,OAAOK;eACpD/B,EAAMkB,MAAMG,OAAOC,KAAKtB,EAAMuB,QAAQI,MAAMI;;;IAGvDC;;IAEChC,GACDA,EAAMiC,YACN/B,EAAAA,GAAAA;oBACgBF,EAAMkB,MAAMG,OAAOC,KAAKtB,EAAMuB,QAAQC,WAAWU;sBAC/ClC,EAAMkB,M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|
-
import { c as Button } from "./component-
|
|
2
|
+
import { c as Button } from "./component-CmotrA_9.js";
|
|
3
3
|
import "./component.styles-B0L4jbOO.js";
|
|
4
4
|
import { R as Ripple } from "./component-vpCWcIhC.js";
|
|
5
|
-
import { c as SelectMonth, e as SelectYear } from "./component.styles-
|
|
5
|
+
import { c as SelectMonth, e as SelectYear } from "./component.styles-CQbSHrL_.js";
|
|
6
6
|
import { b as Stack } from "./component-jPZYT5iL.js";
|
|
7
|
-
import { b as ErrorMessage, a as addError } from "./style-
|
|
7
|
+
import { b as ErrorMessage, a as addError } from "./style-CQOBaUTO.js";
|
|
8
8
|
import { K as KEY_SIZE_DATA } from "./theme.global-DuEXPcSK.js";
|
|
9
9
|
import moment from "moment";
|
|
10
10
|
import { useState, useMemo, useCallback, useRef, useEffect, Fragment } from "react";
|
|
11
11
|
import styled, { useTheme, css } from "styled-components";
|
|
12
|
-
import { u as usePopover, j as Typography, P as Popover, g as getFontSizeStyles } from "./component-
|
|
13
|
-
import { d as addInputIsInputEffect } from "./component.styles-
|
|
14
|
-
import { j as addNiceNumber, a as addRemoveScrollbar, b as addTransition, f as addOutline, i as addRemoveOutline, g as addOutlineChildren } from "./style-
|
|
12
|
+
import { u as usePopover, j as Typography, P as Popover, g as getFontSizeStyles } from "./component-Bwu-fBEh.js";
|
|
13
|
+
import { d as addInputIsInputEffect } from "./component.styles-CMXsg9Uj.js";
|
|
14
|
+
import { j as addNiceNumber, a as addRemoveScrollbar, b as addTransition, f as addOutline, i as addRemoveOutline, g as addOutlineChildren, k as addDisabled } from "./style-BgcnmVAY.js";
|
|
15
15
|
import { a as addSX } from "./style-plT9Ah7t.js";
|
|
16
16
|
import { motion } from "framer-motion";
|
|
17
17
|
function countSevens(number) {
|
|
@@ -226,7 +226,7 @@ const DatePicker = (props) => {
|
|
|
226
226
|
mode: "independence",
|
|
227
227
|
isClickOutside: true,
|
|
228
228
|
refsExcludeClickOutside: [refSelectMonth, refSelectYear],
|
|
229
|
-
isDisabled: props == null ? void 0 : props.isDisabled,
|
|
229
|
+
isDisabled: (props == null ? void 0 : props.isDisabled) || (props == null ? void 0 : props.isReadOnly),
|
|
230
230
|
onFocus: onFocusPopover,
|
|
231
231
|
onBlur: onBlurPopover,
|
|
232
232
|
onBlurReference
|
|
@@ -420,6 +420,8 @@ const DatePicker = (props) => {
|
|
|
420
420
|
setIsError(true);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
+
} else {
|
|
424
|
+
setIsError(false);
|
|
423
425
|
}
|
|
424
426
|
}, [input.DD, input.MM, input.YYYY, onChange]);
|
|
425
427
|
const prevValueRef = useRef("");
|
|
@@ -430,6 +432,9 @@ const DatePicker = (props) => {
|
|
|
430
432
|
(_a2 = refHiddenInput == null ? void 0 : refHiddenInput.current) == null ? void 0 : _a2.focus();
|
|
431
433
|
}
|
|
432
434
|
}, [activeSegment]);
|
|
435
|
+
const isShowPlaceholder = useMemo(() => {
|
|
436
|
+
return !!(!isInputFocused && !isHasValue && props.labelPlaceholder && !isOpen && !input.DD && !input.MM && !input.YYYY);
|
|
437
|
+
}, [isInputFocused, isHasValue, isOpen, props.labelPlaceholder, input.DD, input.MM, input.YYYY]);
|
|
433
438
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
434
439
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
435
440
|
DateWrapper,
|
|
@@ -448,6 +453,9 @@ const DatePicker = (props) => {
|
|
|
448
453
|
ref: refReference,
|
|
449
454
|
$genre: props.genre,
|
|
450
455
|
$size: props.size,
|
|
456
|
+
$isShowPlaceholder: isShowPlaceholder,
|
|
457
|
+
$isDisabled: props == null ? void 0 : props.isDisabled,
|
|
458
|
+
$isReadOnly: props == null ? void 0 : props.isReadOnly,
|
|
451
459
|
tabIndex: -1,
|
|
452
460
|
$error: isError ? {
|
|
453
461
|
isError: true,
|
|
@@ -466,6 +474,7 @@ const DatePicker = (props) => {
|
|
|
466
474
|
type: "tel",
|
|
467
475
|
inputMode: "numeric",
|
|
468
476
|
tabIndex: 0,
|
|
477
|
+
disabled: (props == null ? void 0 : props.isDisabled) || (props == null ? void 0 : props.isReadOnly),
|
|
469
478
|
style: { position: "absolute", left: -9999, opacity: 0 },
|
|
470
479
|
onKeyDown: handleKeyDown,
|
|
471
480
|
onChange: (e) => {
|
|
@@ -505,7 +514,7 @@ const DatePicker = (props) => {
|
|
|
505
514
|
}
|
|
506
515
|
}
|
|
507
516
|
),
|
|
508
|
-
|
|
517
|
+
isShowPlaceholder ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
509
518
|
Typography,
|
|
510
519
|
{
|
|
511
520
|
sx: { default: { size: 16, line: 1, isNoUserSelect: true } },
|
|
@@ -527,6 +536,7 @@ const DatePicker = (props) => {
|
|
|
527
536
|
onClick: (e) => {
|
|
528
537
|
e.preventDefault();
|
|
529
538
|
e.stopPropagation();
|
|
539
|
+
if ((props == null ? void 0 : props.isDisabled) || (props == null ? void 0 : props.isReadOnly)) return;
|
|
530
540
|
date.setActive();
|
|
531
541
|
},
|
|
532
542
|
children: date.value != null ? String(date.value).padStart(date.type === DatePickerVariant.YYYY ? 1 : 2, "0") : date.placeholder || ""
|
|
@@ -544,6 +554,7 @@ const DatePicker = (props) => {
|
|
|
544
554
|
isRadius: true,
|
|
545
555
|
isOnlyIcon: true,
|
|
546
556
|
icons: [{ name: "Calendar", type: "id" }],
|
|
557
|
+
isDisabled: (props == null ? void 0 : props.isDisabled) || (props == null ? void 0 : props.isReadOnly),
|
|
547
558
|
onFocus: (e) => {
|
|
548
559
|
e.preventDefault();
|
|
549
560
|
e.stopPropagation();
|
|
@@ -887,7 +898,7 @@ const addDateInputWrapperGenre = css`
|
|
|
887
898
|
`;
|
|
888
899
|
const addDateInputWrapperSize = css`
|
|
889
900
|
${(props) => css`
|
|
890
|
-
padding: 0px ${KEY_SIZE_DATA[props.$size].padding}px;
|
|
901
|
+
padding: ${props.$isShowPlaceholder ? `0px ${KEY_SIZE_DATA[props.$size].padding}px` : `0px ${KEY_SIZE_DATA[props.$size].padding}px 0px ${KEY_SIZE_DATA[props.$size].padding - 2}px`};
|
|
891
902
|
height: ${KEY_SIZE_DATA[props.$size].height}px;
|
|
892
903
|
min-height: ${KEY_SIZE_DATA[props.$size].height}px;
|
|
893
904
|
max-height: ${KEY_SIZE_DATA[props.$size].height}px;
|
|
@@ -906,6 +917,7 @@ const DateInputWrapper = styled.div`
|
|
|
906
917
|
align-items: center;
|
|
907
918
|
gap: 0px;
|
|
908
919
|
|
|
920
|
+
${addDisabled};
|
|
909
921
|
${addDateInputWrapperSize};
|
|
910
922
|
${addDateInputWrapperGenre};
|
|
911
923
|
${addTransition};
|
|
@@ -943,4 +955,4 @@ export {
|
|
|
943
955
|
DateInputButton as l,
|
|
944
956
|
DatePickerVariant as m
|
|
945
957
|
};
|
|
946
|
-
//# sourceMappingURL=component.types-
|
|
958
|
+
//# sourceMappingURL=component.types-_k1S6r4E.js.map
|