@jenesei-software/jenesei-kit-react 1.3.21 → 1.3.23
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-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-DC6wk9OC.cjs → component-1kuvOkUa.cjs} +2 -2
- package/build/{component-DC6wk9OC.cjs.map → component-1kuvOkUa.cjs.map} +1 -1
- package/build/{component-CqQpLjWf.js → component-31qgF6V7.js} +2 -2
- package/build/{component-CqQpLjWf.js.map → component-31qgF6V7.js.map} +1 -1
- package/build/{component-CZPL9hGj.cjs → component-BF_RC9Ej.cjs} +2 -2
- package/build/{component-CZPL9hGj.cjs.map → component-BF_RC9Ej.cjs.map} +1 -1
- package/build/{component-DgtdqEgO.cjs → component-BXCFqCtK.cjs} +2 -2
- package/build/{component-DgtdqEgO.cjs.map → component-BXCFqCtK.cjs.map} +1 -1
- package/build/{component-DvuH4WLo.cjs → component-BXhibaBj.cjs} +2 -2
- package/build/{component-DvuH4WLo.cjs.map → component-BXhibaBj.cjs.map} +1 -1
- package/build/{component-C9TJVTRc.js → component-BnJWTOR7.js} +6 -6
- package/build/{component-C9TJVTRc.js.map → component-BnJWTOR7.js.map} +1 -1
- package/build/{component-PvY4ZuKa.cjs → component-Bv6UuRlj.cjs} +2 -2
- package/build/{component-PvY4ZuKa.cjs.map → component-Bv6UuRlj.cjs.map} +1 -1
- package/build/{component-CWIsglCv.js → component-C0Cy_U1j.js} +3 -3
- package/build/{component-CWIsglCv.js.map → component-C0Cy_U1j.js.map} +1 -1
- package/build/{component-DAMiuCOk.js → component-C7Nffvkz.js} +2 -2
- package/build/{component-DAMiuCOk.js.map → component-C7Nffvkz.js.map} +1 -1
- package/build/{component-VZLVznEM.cjs → component-CDa4aHfO.cjs} +2 -2
- package/build/{component-VZLVznEM.cjs.map → component-CDa4aHfO.cjs.map} +1 -1
- package/build/{component-Dt1QKoQc.cjs → component-CYmkHAmE.cjs} +2 -2
- package/build/{component-Dt1QKoQc.cjs.map → component-CYmkHAmE.cjs.map} +1 -1
- package/build/{component-CeZFnxeP.js → component-CaJK3Oq8.js} +2 -2
- package/build/{component-CeZFnxeP.js.map → component-CaJK3Oq8.js.map} +1 -1
- package/build/{component-C7SV3z2B.js → component-D4hkx75Z.js} +2 -2
- package/build/{component-C7SV3z2B.js.map → component-D4hkx75Z.js.map} +1 -1
- package/build/{component-B--Ljzf8.js → component-DHj3MVyO.js} +2 -2
- package/build/{component-B--Ljzf8.js.map → component-DHj3MVyO.js.map} +1 -1
- package/build/{component-CS7C3l76.js → component-DLEbIbn9.js} +3 -3
- package/build/{component-CS7C3l76.js.map → component-DLEbIbn9.js.map} +1 -1
- package/build/{component-O7HvTkOa.js → component-DwFwB6Zz.js} +2 -2
- package/build/{component-O7HvTkOa.js.map → component-DwFwB6Zz.js.map} +1 -1
- package/build/{component-Bq9jd15r.cjs → component-GiB9SJbH.cjs} +2 -2
- package/build/{component-Bq9jd15r.cjs.map → component-GiB9SJbH.cjs.map} +1 -1
- package/build/{component-SobV8wHk.cjs → component-JIJwPwrc.cjs} +2 -2
- package/build/{component-SobV8wHk.cjs.map → component-JIJwPwrc.cjs.map} +1 -1
- package/build/{component-HpOulBAQ.js → component-JQMDepCj.js} +2 -2
- package/build/{component-HpOulBAQ.js.map → component-JQMDepCj.js.map} +1 -1
- package/build/{component-C3BrgaVs.js → component-RXfJR8yQ.js} +3 -3
- package/build/{component-C3BrgaVs.js.map → component-RXfJR8yQ.js.map} +1 -1
- package/build/component-accordion.cjs.js +1 -1
- package/build/component-accordion.es.js +2 -2
- package/build/component-button-group.cjs.js +1 -1
- package/build/component-button-group.es.js +2 -2
- 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 +2 -2
- package/build/component-checkbox.cjs.js +1 -1
- package/build/component-checkbox.es.js +2 -2
- package/build/component-date-picker.cjs.js +1 -1
- package/build/component-date-picker.es.js +2 -2
- 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 +2 -2
- package/build/component-image-slider.cjs.js +1 -1
- package/build/component-image-slider.es.js +2 -2
- package/build/component-image.cjs.js +1 -1
- package/build/component-image.es.js +2 -2
- package/build/component-input-otp.cjs.js +1 -1
- package/build/component-input-otp.es.js +2 -2
- package/build/component-input.cjs.js +1 -1
- package/build/component-input.es.js +2 -2
- package/build/{component-iyi7lqrB.cjs → component-jH7YXK4X.cjs} +2 -2
- package/build/{component-iyi7lqrB.cjs.map → component-jH7YXK4X.cjs.map} +1 -1
- package/build/component-map.cjs.js +1 -1
- package/build/component-map.es.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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.d.ts +2 -0
- package/build/component-typography.es.js +1 -1
- package/build/{component-DBZIl6Pf.cjs → component-ySx7l0Xg.cjs} +2 -2
- package/build/{component-DBZIl6Pf.cjs.map → component-ySx7l0Xg.cjs.map} +1 -1
- package/build/{component.components-NP2aSgyb.js → component.components-DKDMKKNb.js} +2 -2
- package/build/{component.components-NP2aSgyb.js.map → component.components-DKDMKKNb.js.map} +1 -1
- package/build/{component.components-Cck7T25y.cjs → component.components-DzoKT5j9.cjs} +2 -2
- package/build/{component.components-Cck7T25y.cjs.map → component.components-DzoKT5j9.cjs.map} +1 -1
- package/build/{component.constants-3UuU_a__.js → component.constants-BMz7bhlw.js} +2 -2
- package/build/{component.constants-3UuU_a__.js.map → component.constants-BMz7bhlw.js.map} +1 -1
- package/build/{component.constants-B0mODNks.js → component.constants-Bgm_xB87.js} +5 -5
- package/build/{component.constants-B0mODNks.js.map → component.constants-Bgm_xB87.js.map} +1 -1
- package/build/{component.constants-vNAPiC5p.cjs → component.constants-C0oGZ1iR.cjs} +2 -2
- package/build/{component.constants-vNAPiC5p.cjs.map → component.constants-C0oGZ1iR.cjs.map} +1 -1
- package/build/{component.constants-CoFHa30V.cjs → component.constants-DZyqQi6L.cjs} +2 -2
- package/build/{component.constants-CoFHa30V.cjs.map → component.constants-DZyqQi6L.cjs.map} +1 -1
- package/build/{component.types-Cysm3D4v.js → component.types-D_tW7ArD.js} +2 -2
- package/build/{component.types-Cysm3D4v.js.map → component.types-D_tW7ArD.js.map} +1 -1
- package/build/{component.types-BRZsYWlH.cjs → component.types-ZmH2V3qe.cjs} +2 -2
- package/build/{component.types-BRZsYWlH.cjs.map → component.types-ZmH2V3qe.cjs.map} +1 -1
- package/build/consts.cjs.js +1 -1
- package/build/consts.es.js +1 -1
- package/build/context-app.cjs.js +1 -1
- package/build/context-app.es.js +2 -2
- package/build/context-dialog.cjs.js +1 -1
- package/build/context-dialog.es.js +2 -2
- package/build/context-sonner.cjs.js +1 -1
- package/build/context-sonner.es.js +2 -2
- package/build/{context.constants-BVl2x1gR.js → context.constants-AVloP24q.js} +8 -17
- package/build/context.constants-AVloP24q.js.map +1 -0
- package/build/{context.constants-D-s5XvZX.js → context.constants-CZykW9B3.js} +2 -2
- package/build/{context.constants-D-s5XvZX.js.map → context.constants-CZykW9B3.js.map} +1 -1
- package/build/{context.constants-YhrMPIvq.cjs → context.constants-wfD246Ww.cjs} +34 -45
- package/build/context.constants-wfD246Ww.cjs.map +1 -0
- package/build/{context.constants-BgXWD3zz.cjs → context.constants-wztrdG5Q.cjs} +2 -2
- package/build/{context.constants-BgXWD3zz.cjs.map → context.constants-wztrdG5Q.cjs.map} +1 -1
- package/build/{context.hooks-DjwMqRSt.js → context.hooks-BsMIDkb3.js} +2 -2
- package/build/{context.hooks-DjwMqRSt.js.map → context.hooks-BsMIDkb3.js.map} +1 -1
- package/build/{context.hooks-KS9z3sac.js → context.hooks-CQXyg8Md.js} +2 -2
- package/build/{context.hooks-KS9z3sac.js.map → context.hooks-CQXyg8Md.js.map} +1 -1
- package/build/{context.hooks-Dkb5yK8Z.cjs → context.hooks-CXSsHfiI.cjs} +2 -2
- package/build/{context.hooks-Dkb5yK8Z.cjs.map → context.hooks-CXSsHfiI.cjs.map} +1 -1
- package/build/{context.hooks-fo2TeZoK.js → context.hooks-D0OtRPb7.js} +2 -2
- package/build/{context.hooks-fo2TeZoK.js.map → context.hooks-D0OtRPb7.js.map} +1 -1
- package/build/{context.hooks-B16qxQQY.cjs → context.hooks-DDtUqE34.cjs} +2 -2
- package/build/{context.hooks-B16qxQQY.cjs.map → context.hooks-DDtUqE34.cjs.map} +1 -1
- package/build/{context.hooks-99wJ8TBG.cjs → context.hooks-L-OO9FIg.cjs} +2 -2
- package/build/{context.hooks-99wJ8TBG.cjs.map → context.hooks-L-OO9FIg.cjs.map} +1 -1
- package/build/index.cjs.js +1 -1
- package/build/index.d.ts +6 -0
- package/build/index.es.js +29 -28
- package/build/{style-RL73t3JD.js → style-BfuEu91g.js} +14 -8
- package/build/style-BfuEu91g.js.map +1 -0
- package/build/{style-Df37KnoJ.cjs → style-Drq-Q1Im.cjs} +12 -8
- package/build/style-Drq-Q1Im.cjs.map +1 -0
- package/build/style-add.cjs.js +1 -1
- package/build/style-add.d.ts +4 -0
- package/build/style-add.es.js +9 -8
- package/build/style-error.cjs.js +1 -1
- package/build/style-error.es.js +1 -1
- package/build/style-theme.cjs.js +1 -1
- package/build/style-theme.es.js +1 -1
- package/build/{use-BI2JJFUm.js → use-B4ELG6B3.js} +5 -5
- package/build/{use-BI2JJFUm.js.map → use-B4ELG6B3.js.map} +1 -1
- package/build/{use-CtF6jyms.cjs → use-fcNoM5UL.cjs} +2 -2
- package/build/{use-CtF6jyms.cjs.map → use-fcNoM5UL.cjs.map} +1 -1
- package/package.json +1 -1
- package/build/context.constants-BVl2x1gR.js.map +0 -1
- package/build/context.constants-YhrMPIvq.cjs.map +0 -1
- package/build/style-Df37KnoJ.cjs.map +0 -1
- package/build/style-RL73t3JD.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("./context.constants-YhrMPIvq.cjs");require("./component.styles-Dpg-__rn.cjs");const l=require("./component-CLqcB5mM.cjs"),n=require("./component-5Utdcc2G.cjs"),s=require("moment"),i=require("react"),a=require("styled-components");var o=(e=>(e.DD="DD",e.MM="MM",e.YYYY="YYYY",e))(o||{});exports.DatePicker=u=>{var r,d,c,f;const{onChange:p}=u,m=a.useTheme(),[h,D]=i.useState(null),[Y,x]=i.useState(s(u.dateDefault).utc()),[v,g]=i.useState({[o.DD]:null,[o.MM]:null,[o.YYYY]:null}),M=i.useMemo(()=>null!==v[o.DD]||null!==v[o.MM]||null!==v[o.YYYY],[v]),y=i.useCallback(()=>{g({[o.DD]:null,[o.MM]:null,[o.YYYY]:null})},[]),[b,k]=i.useState(null),[O,$]=i.useState(!1),j=i.useMemo(()=>{if(!u.mode||0===u.mode.length)return[o.DD,o.MM,o.YYYY];return new Set(u.mode).size!==u.mode.length?[o.DD,o.MM,o.YYYY]:u.mode},[u.mode]),S=i.useCallback(e=>{const t=j.indexOf(e);return t<j.length-1?j[t+1]:j[0]},[j]),w=i.useCallback(e=>{const t=j.indexOf(e);return t>0?j[t-1]:j[j.length-1]},[j]),R=i.useMemo(()=>{const e={MM:{nextSegment:S(o.MM),preSegment:w(o.MM),onNext:()=>k(S(o.MM)),onPrev:()=>k(w(o.MM)),isLast:j[j.length-1]===o.MM,isFirst:j[0]===o.MM,type:o.MM,value:v.MM,setValue:e=>g(t=>({...t,[o.MM]:e})),setActive:()=>k(o.MM),placeholder:u.locale.inputs.month},DD:{nextSegment:S(o.DD),preSegment:w(o.DD),isLast:j[j.length-1]===o.DD,isFirst:j[0]===o.DD,onNext:()=>k(S(o.DD)),onPrev:()=>k(w(o.DD)),type:o.DD,value:v.DD,setValue:e=>g(t=>({...t,[o.DD]:e})),setActive:()=>k(o.DD),placeholder:u.locale.inputs.day},YYYY:{nextSegment:S(o.YYYY),preSegment:w(o.YYYY),isLast:j[j.length-1]===o.YYYY,isFirst:j[0]===o.YYYY,onNext:()=>k(S(o.YYYY)),onPrev:()=>k(w(o.YYYY)),type:o.YYYY,value:v.YYYY,setValue:e=>g(t=>({...t,[o.YYYY]:e})),setActive:()=>k(o.YYYY),placeholder:u.locale.inputs.year}};return{sort:j.map(t=>t===o.DD?e.DD:t===o.MM?e.MM:t===o.YYYY?e.YYYY:null).filter(e=>null!==e),default:e}},[u.locale.inputs.day,u.locale.inputs.month,u.locale.inputs.year,S,w,j,v.DD,v.MM,v.YYYY]),E=i.useMemo(()=>["mo","tu","we","th","fr","sa","su"].map((e,t)=>{const l=u.locale.weeks.find(t=>t.value===e);return{index:t,label:(null==l?void 0:l.localeShort)??e.toUpperCase()}}),[u.locale.weeks]),z=i.useMemo(()=>{const e=s.utc(),t=(h??Y).clone().startOf("month"),l=(h??Y).clone().endOf("month"),n=[],i=u.dateMin?s.utc(u.dateMin):null,a=u.dateMax?s.utc(u.dateMax):null,o=t.isoWeekday()-1;if(o>0)for(let s=o;s>0;s--){const l=t.clone().subtract(s,"days");n.push({value:l.valueOf(),labelString:l.format("dd"),labelNumber:l.date(),dayOfWeek:l.isoWeekday(),isWeekend:6===l.isoWeekday()||7===l.isoWeekday(),weekOfMonth:Math.ceil((n.length+1)/7),isToday:l.isSame(e,"day"),isCurrentMonth:!1,isDisabled:l.isBefore(i,"day")||l.isAfter(a,"day")})}const r=t.clone();for(;r<=l;)n.push({value:r.valueOf(),labelString:r.format("dd"),labelNumber:r.date(),dayOfWeek:r.isoWeekday(),isWeekend:6===r.isoWeekday()||7===r.isoWeekday(),weekOfMonth:Math.ceil((n.length+1)/7),isToday:r.isSame(e,"day"),isCurrentMonth:!0,isDisabled:r.isBefore(i,"day")||r.isAfter(a,"day")}),r.add(1,"day");const d=7-l.isoWeekday();if(d>0)for(let s=1;s<=d;s++){const t=l.clone().add(s,"days").startOf("day");n.push({value:t.valueOf(),labelString:t.format("dd"),labelNumber:t.date(),dayOfWeek:t.isoWeekday(),isWeekend:6===t.isoWeekday()||7===t.isoWeekday(),weekOfMonth:Math.ceil((n.length+1)/7),isToday:t.isSame(e,"day"),isCurrentMonth:!1,isDisabled:t.isBefore(i,"day")||t.isAfter(a,"day")})}return n.sort((e,t)=>e.value-t.value),n},[h,Y,u.dateMax,u.dateMin]),C=i.useMemo(()=>function(e){const t=Math.floor(e/7);return e%7>0?t+1:t}(z.length)+1,[z]),N=i.useMemo(()=>40+28*C+6*(C-1)+2*t.KEY_SIZE_DATA[u.size].padding,[u.size,C]),A=i.useMemo(()=>t.KEY_SIZE_DATA[u.size].radius,[u.size]),W=i.useMemo(()=>t.KEY_SIZE_DATA[u.size].padding,[u.size]),V=i.useMemo(()=>null!==h,[h]),P=i.useMemo(()=>{const e=(h??Y).clone().add(1,"month").startOf("month");return!!u.dateMax&&e.isAfter(s.utc(u.dateMax),"month")},[h,u.dateMax,Y]),B=i.useMemo(()=>{const e=(h??Y).clone().subtract(1,"month").startOf("month");return!!u.dateMin&&e.isBefore(s.utc(u.dateMin),"month")},[h,u.dateMin,Y]),[I,F]=i.useState(!1),T=i.useRef(""),L=i.useRef(null),q=i.useRef(null),H=i.useRef(null),K=i.useCallback(()=>{var e;null==(e=u.onFocus)||e.call(u)},[u.onFocus]),_=i.useCallback(()=>{var e;null==(e=u.onBlur)||e.call(u)},[u.onBlur]),U=i.useCallback(()=>{k(null)},[]),{isOpen:Z,refReference:G,refFloating:J,floatingStyles:Q,close:X,toggle:ee}=t.usePopover({placement:"bottom-start",offset:W,mode:"independence",isClickOutside:!0,refsExcludeClickOutside:[L,q],isDisabled:(null==u?void 0:u.isDisabled)||(null==u?void 0:u.isReadOnly),onFocus:K,onBlur:_,onBlurReference:U}),te=i.useMemo(()=>!(I||V||!u.labelPlaceholder||Z||M||b),[I,V,Z,u.labelPlaceholder,M,b]),le=i.useCallback(e=>{const t=s(e).utc();(null==h?void 0:h.isSame(t,"day"))||(D(t),p(t.valueOf()),g({[o.DD]:t.clone().date(),[o.MM]:t.clone().month()+1,[o.YYYY]:t.clone().year()}))},[h,p]),ne=i.useCallback(e=>{var t;const l=e.key,n=/^\d$/.test(l);if(n||["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter"].includes(l)||e.ctrlKey||e.metaKey){if(b&&R.default[b]){if(n){!function(e,t,l,n){var s;const i=e,a=t,u=(null==(s=l[a])?void 0:s.toString())??"",r=e=>"0"===e,d=e=>Number(e);if(a===o.DD){if(u.length>=2){const e=d(i);if(0===e||e>31)return;return void n.default[a].setValue(e)}if(1===u.length&&r(u)){const e=d(i);if(0===e||e>31)return;return n.default[a].setValue(e),void n.default[a].onNext()}const e=u+i,t=d(e);if(t>31){const e=d(i);if(0===e||e>31)return;return n.default[a].setValue(e),void n.default[a].onNext()}const l=0===t?i:e,s=d(l);if(0===s||s>31)return;n.default[a].setValue(s),2===l.length&&n.default[a].onNext()}else if(a===o.MM){if(u.length>=2){const e=d(i);if(0===e||e>12)return;return void n.default[a].setValue(e)}if(1===u.length&&r(u)){const e=d(i);if(0===e||e>12)return;return n.default[a].setValue(e),void n.default[a].onNext()}const e=u+i,t=d(e),l=0===t||t>12?i:e,s=d(l);if(0===s||s>12)return;n.default[a].setValue(s),(2===l.length||1===l.length&&s>1)&&n.default[a].onNext()}else if(a===o.YYYY){if(u.length>=4){if("0"===i)return;return void n.default[a].setValue(d(i))}const e=(u+i).slice(-4);n.default[a].setValue(d(e))}}(l,b,v,R),e.preventDefault(),e.stopPropagation()}if("Tab"===l&&(R.default[b].isLast?null==(t=null==H?void 0:H.current)||t.blur():(e.preventDefault(),R.default[b].onNext())),"Enter"===l&&(e.preventDefault(),e.stopPropagation()),"Backspace"===l||"Delete"===l){if(b===o.DD)if(null!==v.DD){const e=v.DD.toString();if(1===e.length)R.default[b].setValue(null);else{const t=e.slice(0,-1);R.default[b].setValue(Number(t))}}else R.default[b].onPrev();else if(b===o.MM)if(null!==v.MM){const e=v.MM.toString();if(1===e.length)R.default[b].setValue(null);else{const t=e.slice(0,-1);R.default[b].setValue(Number(t))}}else R.default[b].onPrev();else if(b===o.YYYY)if(null!==v.YYYY){const e=v.YYYY.toString();if(1===e.length)R.default[b].setValue(null);else{const t=e.slice(0,-1);R.default[b].setValue(Number(t))}}else R.default[b].onPrev();e.preventDefault(),e.stopPropagation()}"ArrowLeft"!==l&&"ArrowDown"!==l||(e.preventDefault(),R.default[b].onPrev()),"ArrowRight"!==l&&"ArrowUp"!==l||(e.preventDefault(),R.default[b].onNext())}}else e.preventDefault()},[b,v,R.default,R]),se=i.useCallback(()=>{const e=(h??Y).clone().add(1,"month");le(e.valueOf())},[h,le,Y]),ie=i.useCallback(()=>{const e=(h??Y).clone().subtract(1,"month");le(e.valueOf())},[h,le,Y]);i.useEffect(()=>{x(s(u.dateDefault).utc())},[u.dateDefault]),i.useEffect(()=>{D(u.value||u.defaultValue?s(u.value??u.defaultValue).utc():null),u.value&&g({[o.DD]:s(u.value).utc().date(),[o.MM]:s(u.value).utc().month()+1,[o.YYYY]:s(u.value).utc().year()})},[u.value,u.defaultValue]);const ae=i.useCallback((e,t,l,n)=>{const i=e.DD??NaN,a=e.MM??NaN,u=e.YYYY??NaN,r=null!==e[o.DD]||null!==e[o.MM]||null!==e[o.YYYY];if(Number.isNaN(i)||Number.isNaN(a)||Number.isNaN(u))null==n||n(r);else{const e=s.utc(`${i}.${a}.${u}`,"D.M.YYYY",!0).startOf("day");e.isValid()?null==t||t(e.valueOf()):null==l||l()}},[]);return i.useEffect(()=>{ae(v,e=>{le(e),$(!1)},()=>{p(null),$(!0)},e=>{e||$(!1)})},[ae,le,p,v]),i.useEffect(()=>{Z||I||!M||b||ae(v,()=>{},()=>{p(null),y(),$(!1)},()=>{p(null),y(),$(!1)})},[ae,y,v,Z,I,p,M,b]),i.useEffect(()=>{var e;b&&(null==(e=null==H?void 0:H.current)||e.focus())},[b]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(t.DateWrapper,{$size:u.size,$genre:u.genre,$sx:u.sx,$isDisabled:null==u?void 0:u.isDisabled,$isMinWidth:null==u?void 0:u.isMinWidth,$radius:A,$parentListHeight:N,tabIndex:-1,children:e.jsxRuntimeExports.jsxs(t.DateInputWrapper,{ref:G,$genre:u.genre,$size:u.size,$isShowPlaceholder:te,$isDisabled:null==u?void 0:u.isDisabled,$isReadOnly:null==u?void 0:u.isReadOnly,$isDisabledOutline:null==u?void 0:u.isDisabledOutline,$isOutlineBoxShadow:null==u?void 0:u.isOutlineBoxShadow,tabIndex:-1,$error:O?{isError:!0,size:(null==(r=null==u?void 0:u.error)?void 0:r.size)??u.size,...u.notValidDate}:u.error,$isOpen:Z||!!b,onClick:()=>{b||(null==u?void 0:u.isReadOnly)||k(o.DD)},children:[e.jsxRuntimeExports.jsx("input",{name:u.name,id:u.id,ref:H,type:"tel",inputMode:"numeric",tabIndex:0,disabled:(null==u?void 0:u.isDisabled)||(null==u?void 0:u.isReadOnly),style:{position:"absolute",left:"-100dvw",top:0,width:"100%",height:"100%",opacity:0,border:"none",background:"transparent"},onKeyDown:ne,onChange:e=>{const t=e.target.value,l=T.current,n=t.length>l.length?t.slice(-1):null;T.current=t,n&&/^\d$/.test(n)&&ne({key:n,preventDefault:()=>{},stopPropagation:()=>{}}),t.length<l.length&&ne({key:"Backspace",preventDefault:()=>{},stopPropagation:()=>{}})},onFocus:()=>{F(!0),b||k(o.DD)},onBlur:()=>{var e;F(!1),Z||null==(e=u.onBlur)||e.call(u)}}),te?e.jsxRuntimeExports.jsx(t.Typography,{sx:{default:{size:16,line:1,isNoUserSelect:!0}},sxStandard:e=>({default:{color:e.colors.input[u.genre].color.placeholder}}),children:u.labelPlaceholder}):R.sort.map((l,n)=>{var s,a,r,d;return e.jsxRuntimeExports.jsxs(i.Fragment,{children:[e.jsxRuntimeExports.jsx(t.DateInput,{$isHaveValue:!!l.value,$isActive:b===l.type,$genre:u.genre,$size:u.size,$font:{size:(null==(s=u.font)?void 0:s.size)??16,weight:(null==(a=u.font)?void 0:a.weight)??(u.isBold?500:400),family:(null==(r=u.font)?void 0:r.family)??m.font.family,height:(null==(d=u.font)?void 0:d.height)??m.font.lineHeight},onClick:e=>{e.preventDefault(),e.stopPropagation(),(null==u?void 0:u.isDisabled)||(null==u?void 0:u.isReadOnly)||l.setActive()},children:null!=l.value?String(l.value).padStart(l.type===o.YYYY?1:2,"0"):l.placeholder||""}),n!==R.sort.length-1&&e.jsxRuntimeExports.jsx("span",{style:{width:"4px",pointerEvents:"none",textAlign:"center"},children:"."})]},l.type)}),e.jsxRuntimeExports.jsx(t.DateInputButton,{genre:u.genre,size:"small",isWidthAsHeight:!0,isFullSize:!0,isRadius:!0,isOnlyIcon:!0,icons:[{name:"Calendar",type:"id"}],isDisabled:(null==u?void 0:u.isDisabled)||(null==u?void 0:u.isReadOnly),onFocus:e=>{e.preventDefault(),e.stopPropagation(),k(null)},onClick:e=>{e.preventDefault(),e.stopPropagation(),ee()}})]})}),e.jsxRuntimeExports.jsx(t.Popover,{sx:e=>({default:{background:e.colors.input[u.genre].background.rest,border:`solid 1px ${e.colors.input[u.genre].border.rest}`}}),size:u.size,genre:u.genre,isOpen:Z,isShowAlwaysOutline:!0,floatingStyles:Q,ref:J,children:e.jsxRuntimeExports.jsxs(t.DateDropdownList,{$isInputEffect:u.isInputEffect,$genre:u.genre,$size:u.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:u.genre,size:"small",onClick:()=>!B&&ie(),isHidden:B}),e.jsxRuntimeExports.jsxs(n.Stack,{sx:{default:{gap:"8px"}},children:[e.jsxRuntimeExports.jsx(t.SelectMonth,{monthsLocale:u.locale.months,genre:u.genre,size:"small",value:(h??Y).clone().startOf("month").utc().valueOf(),isOnClickOptionClose:!0,isStayValueAfterSelect:!0,isOnlyColorInSelectListOption:!0,isCenter:!0,isShortLabel:!0,refFloating:L,onChange:e=>{e&&le(e)},dateMin:u.dateMin,dateMax:u.dateMax,sx:{default:{width:"60px"}}}),e.jsxRuntimeExports.jsx(t.SelectYear,{genre:u.genre,size:"small",refFloating:q,value:(h??Y).clone().startOf("year").utc().valueOf(),onChange:e=>{e&&le(e)},isOnClickOptionClose:!0,isStayValueAfterSelect:!0,isOnlyColorInSelectListOption:!0,isCenter:!0,dateMin:u.dateMin,dateMax:u.dateMax,sx:{default:{width:"60px"}}})]}),e.jsxRuntimeExports.jsx(t.Button,{type:"button",onClick:()=>!P&&se(),isWidthAsHeight:!0,isRadius:!0,icons:[{name:"Arrow2",type:"id",turn:-90}],genre:u.genre,size:"small",isHidden:P})]}),e.jsxRuntimeExports.jsxs(t.DateDropdownDays,{$rows:C,children:[E.map((l,n)=>{var s,i;return e.jsxRuntimeExports.jsx(t.DateDropdownDayOfWeek,{$font:{size:12,weight:700,family:(null==(s=u.font)?void 0:s.family)??m.font.family},tabIndex:-1,type:"button",$isToday:!1,$isWeekend:!1,$genre:u.genre,$size:u.size,$row:(null==(i=z[0])?void 0:i.weekOfMonth)-1,$column:n+1,children:l.label},`${l.label}-${n}`)}),z.map(n=>{var s;return e.jsxRuntimeExports.jsxs(t.DateDropdownDay,{$font:{size:12,weight:700,family:(null==(s=u.font)?void 0:s.family)??m.font.family},type:"button",$isDisabled:n.isDisabled,$isDisabledOutline:n.isDisabled??u.isDisabledOutline,$isOutlineBoxShadow:u.isOutlineBoxShadow,$isReadOnly:u.isReadOnly,$genre:u.genre,$size:u.size,$row:(null==n?void 0:n.weekOfMonth)+1,$column:n.dayOfWeek,onClick:()=>{n.isDisabled||(le(n.value),u.isOnClickClose&&X())},tabIndex:n.isDisabled?-1:0,$isToday:n.isToday,$isWeekend:n.isWeekend,$isChoice:n.value===(null==h?void 0:h.valueOf()),$isCurrentMonth:n.isCurrentMonth,children:[!n.isDisabled&&e.jsxRuntimeExports.jsx(l.Ripple,{color:m.colors.date[u.genre].color.rest}),n.labelNumber]},n.value)})]})]})}),O||(null==u?void 0:u.error)?e.jsxRuntimeExports.jsx(t.ErrorMessage,{...O?{isError:!0,size:(null==(d=null==u?void 0:u.error)?void 0:d.size)??u.size,...u.notValidDate}:u.error,size:(null==(c=null==u?void 0:u.error)?void 0:c.size)??u.size,font:{size:12,weight:400,family:(null==(f=u.font)?void 0:f.family)??m.font.family}}):null]})},exports.DatePickerVariant=o;
|
|
2
|
-
//# sourceMappingURL=component.types-
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("./context.constants-wfD246Ww.cjs");require("./component.styles-Dpg-__rn.cjs");const l=require("./component-CLqcB5mM.cjs"),n=require("./component-5Utdcc2G.cjs"),s=require("moment"),i=require("react"),a=require("styled-components");var o=(e=>(e.DD="DD",e.MM="MM",e.YYYY="YYYY",e))(o||{});exports.DatePicker=u=>{var r,d,c,f;const{onChange:p}=u,m=a.useTheme(),[h,D]=i.useState(null),[Y,x]=i.useState(s(u.dateDefault).utc()),[v,g]=i.useState({[o.DD]:null,[o.MM]:null,[o.YYYY]:null}),M=i.useMemo(()=>null!==v[o.DD]||null!==v[o.MM]||null!==v[o.YYYY],[v]),y=i.useCallback(()=>{g({[o.DD]:null,[o.MM]:null,[o.YYYY]:null})},[]),[b,k]=i.useState(null),[O,$]=i.useState(!1),j=i.useMemo(()=>{if(!u.mode||0===u.mode.length)return[o.DD,o.MM,o.YYYY];return new Set(u.mode).size!==u.mode.length?[o.DD,o.MM,o.YYYY]:u.mode},[u.mode]),S=i.useCallback(e=>{const t=j.indexOf(e);return t<j.length-1?j[t+1]:j[0]},[j]),w=i.useCallback(e=>{const t=j.indexOf(e);return t>0?j[t-1]:j[j.length-1]},[j]),R=i.useMemo(()=>{const e={MM:{nextSegment:S(o.MM),preSegment:w(o.MM),onNext:()=>k(S(o.MM)),onPrev:()=>k(w(o.MM)),isLast:j[j.length-1]===o.MM,isFirst:j[0]===o.MM,type:o.MM,value:v.MM,setValue:e=>g(t=>({...t,[o.MM]:e})),setActive:()=>k(o.MM),placeholder:u.locale.inputs.month},DD:{nextSegment:S(o.DD),preSegment:w(o.DD),isLast:j[j.length-1]===o.DD,isFirst:j[0]===o.DD,onNext:()=>k(S(o.DD)),onPrev:()=>k(w(o.DD)),type:o.DD,value:v.DD,setValue:e=>g(t=>({...t,[o.DD]:e})),setActive:()=>k(o.DD),placeholder:u.locale.inputs.day},YYYY:{nextSegment:S(o.YYYY),preSegment:w(o.YYYY),isLast:j[j.length-1]===o.YYYY,isFirst:j[0]===o.YYYY,onNext:()=>k(S(o.YYYY)),onPrev:()=>k(w(o.YYYY)),type:o.YYYY,value:v.YYYY,setValue:e=>g(t=>({...t,[o.YYYY]:e})),setActive:()=>k(o.YYYY),placeholder:u.locale.inputs.year}};return{sort:j.map(t=>t===o.DD?e.DD:t===o.MM?e.MM:t===o.YYYY?e.YYYY:null).filter(e=>null!==e),default:e}},[u.locale.inputs.day,u.locale.inputs.month,u.locale.inputs.year,S,w,j,v.DD,v.MM,v.YYYY]),E=i.useMemo(()=>["mo","tu","we","th","fr","sa","su"].map((e,t)=>{const l=u.locale.weeks.find(t=>t.value===e);return{index:t,label:(null==l?void 0:l.localeShort)??e.toUpperCase()}}),[u.locale.weeks]),z=i.useMemo(()=>{const e=s.utc(),t=(h??Y).clone().startOf("month"),l=(h??Y).clone().endOf("month"),n=[],i=u.dateMin?s.utc(u.dateMin):null,a=u.dateMax?s.utc(u.dateMax):null,o=t.isoWeekday()-1;if(o>0)for(let s=o;s>0;s--){const l=t.clone().subtract(s,"days");n.push({value:l.valueOf(),labelString:l.format("dd"),labelNumber:l.date(),dayOfWeek:l.isoWeekday(),isWeekend:6===l.isoWeekday()||7===l.isoWeekday(),weekOfMonth:Math.ceil((n.length+1)/7),isToday:l.isSame(e,"day"),isCurrentMonth:!1,isDisabled:l.isBefore(i,"day")||l.isAfter(a,"day")})}const r=t.clone();for(;r<=l;)n.push({value:r.valueOf(),labelString:r.format("dd"),labelNumber:r.date(),dayOfWeek:r.isoWeekday(),isWeekend:6===r.isoWeekday()||7===r.isoWeekday(),weekOfMonth:Math.ceil((n.length+1)/7),isToday:r.isSame(e,"day"),isCurrentMonth:!0,isDisabled:r.isBefore(i,"day")||r.isAfter(a,"day")}),r.add(1,"day");const d=7-l.isoWeekday();if(d>0)for(let s=1;s<=d;s++){const t=l.clone().add(s,"days").startOf("day");n.push({value:t.valueOf(),labelString:t.format("dd"),labelNumber:t.date(),dayOfWeek:t.isoWeekday(),isWeekend:6===t.isoWeekday()||7===t.isoWeekday(),weekOfMonth:Math.ceil((n.length+1)/7),isToday:t.isSame(e,"day"),isCurrentMonth:!1,isDisabled:t.isBefore(i,"day")||t.isAfter(a,"day")})}return n.sort((e,t)=>e.value-t.value),n},[h,Y,u.dateMax,u.dateMin]),C=i.useMemo(()=>function(e){const t=Math.floor(e/7);return e%7>0?t+1:t}(z.length)+1,[z]),N=i.useMemo(()=>40+28*C+6*(C-1)+2*t.KEY_SIZE_DATA[u.size].padding,[u.size,C]),A=i.useMemo(()=>t.KEY_SIZE_DATA[u.size].radius,[u.size]),W=i.useMemo(()=>t.KEY_SIZE_DATA[u.size].padding,[u.size]),V=i.useMemo(()=>null!==h,[h]),P=i.useMemo(()=>{const e=(h??Y).clone().add(1,"month").startOf("month");return!!u.dateMax&&e.isAfter(s.utc(u.dateMax),"month")},[h,u.dateMax,Y]),B=i.useMemo(()=>{const e=(h??Y).clone().subtract(1,"month").startOf("month");return!!u.dateMin&&e.isBefore(s.utc(u.dateMin),"month")},[h,u.dateMin,Y]),[I,F]=i.useState(!1),T=i.useRef(""),L=i.useRef(null),q=i.useRef(null),H=i.useRef(null),K=i.useCallback(()=>{var e;null==(e=u.onFocus)||e.call(u)},[u.onFocus]),_=i.useCallback(()=>{var e;null==(e=u.onBlur)||e.call(u)},[u.onBlur]),U=i.useCallback(()=>{k(null)},[]),{isOpen:Z,refReference:G,refFloating:J,floatingStyles:Q,close:X,toggle:ee}=t.usePopover({placement:"bottom-start",offset:W,mode:"independence",isClickOutside:!0,refsExcludeClickOutside:[L,q],isDisabled:(null==u?void 0:u.isDisabled)||(null==u?void 0:u.isReadOnly),onFocus:K,onBlur:_,onBlurReference:U}),te=i.useMemo(()=>!(I||V||!u.labelPlaceholder||Z||M||b),[I,V,Z,u.labelPlaceholder,M,b]),le=i.useCallback(e=>{const t=s(e).utc();(null==h?void 0:h.isSame(t,"day"))||(D(t),p(t.valueOf()),g({[o.DD]:t.clone().date(),[o.MM]:t.clone().month()+1,[o.YYYY]:t.clone().year()}))},[h,p]),ne=i.useCallback(e=>{var t;const l=e.key,n=/^\d$/.test(l);if(n||["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter"].includes(l)||e.ctrlKey||e.metaKey){if(b&&R.default[b]){if(n){!function(e,t,l,n){var s;const i=e,a=t,u=(null==(s=l[a])?void 0:s.toString())??"",r=e=>"0"===e,d=e=>Number(e);if(a===o.DD){if(u.length>=2){const e=d(i);if(0===e||e>31)return;return void n.default[a].setValue(e)}if(1===u.length&&r(u)){const e=d(i);if(0===e||e>31)return;return n.default[a].setValue(e),void n.default[a].onNext()}const e=u+i,t=d(e);if(t>31){const e=d(i);if(0===e||e>31)return;return n.default[a].setValue(e),void n.default[a].onNext()}const l=0===t?i:e,s=d(l);if(0===s||s>31)return;n.default[a].setValue(s),2===l.length&&n.default[a].onNext()}else if(a===o.MM){if(u.length>=2){const e=d(i);if(0===e||e>12)return;return void n.default[a].setValue(e)}if(1===u.length&&r(u)){const e=d(i);if(0===e||e>12)return;return n.default[a].setValue(e),void n.default[a].onNext()}const e=u+i,t=d(e),l=0===t||t>12?i:e,s=d(l);if(0===s||s>12)return;n.default[a].setValue(s),(2===l.length||1===l.length&&s>1)&&n.default[a].onNext()}else if(a===o.YYYY){if(u.length>=4){if("0"===i)return;return void n.default[a].setValue(d(i))}const e=(u+i).slice(-4);n.default[a].setValue(d(e))}}(l,b,v,R),e.preventDefault(),e.stopPropagation()}if("Tab"===l&&(R.default[b].isLast?null==(t=null==H?void 0:H.current)||t.blur():(e.preventDefault(),R.default[b].onNext())),"Enter"===l&&(e.preventDefault(),e.stopPropagation()),"Backspace"===l||"Delete"===l){if(b===o.DD)if(null!==v.DD){const e=v.DD.toString();if(1===e.length)R.default[b].setValue(null);else{const t=e.slice(0,-1);R.default[b].setValue(Number(t))}}else R.default[b].onPrev();else if(b===o.MM)if(null!==v.MM){const e=v.MM.toString();if(1===e.length)R.default[b].setValue(null);else{const t=e.slice(0,-1);R.default[b].setValue(Number(t))}}else R.default[b].onPrev();else if(b===o.YYYY)if(null!==v.YYYY){const e=v.YYYY.toString();if(1===e.length)R.default[b].setValue(null);else{const t=e.slice(0,-1);R.default[b].setValue(Number(t))}}else R.default[b].onPrev();e.preventDefault(),e.stopPropagation()}"ArrowLeft"!==l&&"ArrowDown"!==l||(e.preventDefault(),R.default[b].onPrev()),"ArrowRight"!==l&&"ArrowUp"!==l||(e.preventDefault(),R.default[b].onNext())}}else e.preventDefault()},[b,v,R.default,R]),se=i.useCallback(()=>{const e=(h??Y).clone().add(1,"month");le(e.valueOf())},[h,le,Y]),ie=i.useCallback(()=>{const e=(h??Y).clone().subtract(1,"month");le(e.valueOf())},[h,le,Y]);i.useEffect(()=>{x(s(u.dateDefault).utc())},[u.dateDefault]),i.useEffect(()=>{D(u.value||u.defaultValue?s(u.value??u.defaultValue).utc():null),u.value&&g({[o.DD]:s(u.value).utc().date(),[o.MM]:s(u.value).utc().month()+1,[o.YYYY]:s(u.value).utc().year()})},[u.value,u.defaultValue]);const ae=i.useCallback((e,t,l,n)=>{const i=e.DD??NaN,a=e.MM??NaN,u=e.YYYY??NaN,r=null!==e[o.DD]||null!==e[o.MM]||null!==e[o.YYYY];if(Number.isNaN(i)||Number.isNaN(a)||Number.isNaN(u))null==n||n(r);else{const e=s.utc(`${i}.${a}.${u}`,"D.M.YYYY",!0).startOf("day");e.isValid()?null==t||t(e.valueOf()):null==l||l()}},[]);return i.useEffect(()=>{ae(v,e=>{le(e),$(!1)},()=>{p(null),$(!0)},e=>{e||$(!1)})},[ae,le,p,v]),i.useEffect(()=>{Z||I||!M||b||ae(v,()=>{},()=>{p(null),y(),$(!1)},()=>{p(null),y(),$(!1)})},[ae,y,v,Z,I,p,M,b]),i.useEffect(()=>{var e;b&&(null==(e=null==H?void 0:H.current)||e.focus())},[b]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(t.DateWrapper,{$size:u.size,$genre:u.genre,$sx:u.sx,$isDisabled:null==u?void 0:u.isDisabled,$isMinWidth:null==u?void 0:u.isMinWidth,$radius:A,$parentListHeight:N,tabIndex:-1,children:e.jsxRuntimeExports.jsxs(t.DateInputWrapper,{ref:G,$genre:u.genre,$size:u.size,$isShowPlaceholder:te,$isDisabled:null==u?void 0:u.isDisabled,$isReadOnly:null==u?void 0:u.isReadOnly,$isDisabledOutline:null==u?void 0:u.isDisabledOutline,$isOutlineBoxShadow:null==u?void 0:u.isOutlineBoxShadow,tabIndex:-1,$error:O?{isError:!0,size:(null==(r=null==u?void 0:u.error)?void 0:r.size)??u.size,...u.notValidDate}:u.error,$isOpen:Z||!!b,onClick:()=>{b||(null==u?void 0:u.isReadOnly)||k(o.DD)},children:[e.jsxRuntimeExports.jsx("input",{name:u.name,id:u.id,ref:H,type:"tel",inputMode:"numeric",tabIndex:0,disabled:(null==u?void 0:u.isDisabled)||(null==u?void 0:u.isReadOnly),style:{position:"absolute",left:"-100dvw",top:0,width:"100%",height:"100%",opacity:0,border:"none",background:"transparent"},onKeyDown:ne,onChange:e=>{const t=e.target.value,l=T.current,n=t.length>l.length?t.slice(-1):null;T.current=t,n&&/^\d$/.test(n)&&ne({key:n,preventDefault:()=>{},stopPropagation:()=>{}}),t.length<l.length&&ne({key:"Backspace",preventDefault:()=>{},stopPropagation:()=>{}})},onFocus:()=>{F(!0),b||k(o.DD)},onBlur:()=>{var e;F(!1),Z||null==(e=u.onBlur)||e.call(u)}}),te?e.jsxRuntimeExports.jsx(t.Typography,{sx:{default:{size:16,line:1,isNoUserSelect:!0}},sxStandard:e=>({default:{color:e.colors.input[u.genre].color.placeholder}}),children:u.labelPlaceholder}):R.sort.map((l,n)=>{var s,a,r,d;return e.jsxRuntimeExports.jsxs(i.Fragment,{children:[e.jsxRuntimeExports.jsx(t.DateInput,{$isHaveValue:!!l.value,$isActive:b===l.type,$genre:u.genre,$size:u.size,$font:{size:(null==(s=u.font)?void 0:s.size)??16,weight:(null==(a=u.font)?void 0:a.weight)??(u.isBold?500:400),family:(null==(r=u.font)?void 0:r.family)??m.font.family,height:(null==(d=u.font)?void 0:d.height)??m.font.lineHeight},onClick:e=>{e.preventDefault(),e.stopPropagation(),(null==u?void 0:u.isDisabled)||(null==u?void 0:u.isReadOnly)||l.setActive()},children:null!=l.value?String(l.value).padStart(l.type===o.YYYY?1:2,"0"):l.placeholder||""}),n!==R.sort.length-1&&e.jsxRuntimeExports.jsx("span",{style:{width:"4px",pointerEvents:"none",textAlign:"center"},children:"."})]},l.type)}),e.jsxRuntimeExports.jsx(t.DateInputButton,{genre:u.genre,size:"small",isWidthAsHeight:!0,isFullSize:!0,isRadius:!0,isOnlyIcon:!0,icons:[{name:"Calendar",type:"id"}],isDisabled:(null==u?void 0:u.isDisabled)||(null==u?void 0:u.isReadOnly),onFocus:e=>{e.preventDefault(),e.stopPropagation(),k(null)},onClick:e=>{e.preventDefault(),e.stopPropagation(),ee()}})]})}),e.jsxRuntimeExports.jsx(t.Popover,{sx:e=>({default:{background:e.colors.input[u.genre].background.rest,border:`solid 1px ${e.colors.input[u.genre].border.rest}`}}),size:u.size,genre:u.genre,isOpen:Z,isShowAlwaysOutline:!0,floatingStyles:Q,ref:J,children:e.jsxRuntimeExports.jsxs(t.DateDropdownList,{$isInputEffect:u.isInputEffect,$genre:u.genre,$size:u.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:u.genre,size:"small",onClick:()=>!B&&ie(),isHidden:B}),e.jsxRuntimeExports.jsxs(n.Stack,{sx:{default:{gap:"8px"}},children:[e.jsxRuntimeExports.jsx(t.SelectMonth,{monthsLocale:u.locale.months,genre:u.genre,size:"small",value:(h??Y).clone().startOf("month").utc().valueOf(),isOnClickOptionClose:!0,isStayValueAfterSelect:!0,isOnlyColorInSelectListOption:!0,isCenter:!0,isShortLabel:!0,refFloating:L,onChange:e=>{e&&le(e)},dateMin:u.dateMin,dateMax:u.dateMax,sx:{default:{width:"60px"}}}),e.jsxRuntimeExports.jsx(t.SelectYear,{genre:u.genre,size:"small",refFloating:q,value:(h??Y).clone().startOf("year").utc().valueOf(),onChange:e=>{e&&le(e)},isOnClickOptionClose:!0,isStayValueAfterSelect:!0,isOnlyColorInSelectListOption:!0,isCenter:!0,dateMin:u.dateMin,dateMax:u.dateMax,sx:{default:{width:"60px"}}})]}),e.jsxRuntimeExports.jsx(t.Button,{type:"button",onClick:()=>!P&&se(),isWidthAsHeight:!0,isRadius:!0,icons:[{name:"Arrow2",type:"id",turn:-90}],genre:u.genre,size:"small",isHidden:P})]}),e.jsxRuntimeExports.jsxs(t.DateDropdownDays,{$rows:C,children:[E.map((l,n)=>{var s,i;return e.jsxRuntimeExports.jsx(t.DateDropdownDayOfWeek,{$font:{size:12,weight:700,family:(null==(s=u.font)?void 0:s.family)??m.font.family},tabIndex:-1,type:"button",$isToday:!1,$isWeekend:!1,$genre:u.genre,$size:u.size,$row:(null==(i=z[0])?void 0:i.weekOfMonth)-1,$column:n+1,children:l.label},`${l.label}-${n}`)}),z.map(n=>{var s;return e.jsxRuntimeExports.jsxs(t.DateDropdownDay,{$font:{size:12,weight:700,family:(null==(s=u.font)?void 0:s.family)??m.font.family},type:"button",$isDisabled:n.isDisabled,$isDisabledOutline:n.isDisabled??u.isDisabledOutline,$isOutlineBoxShadow:u.isOutlineBoxShadow,$isReadOnly:u.isReadOnly,$genre:u.genre,$size:u.size,$row:(null==n?void 0:n.weekOfMonth)+1,$column:n.dayOfWeek,onClick:()=>{n.isDisabled||(le(n.value),u.isOnClickClose&&X())},tabIndex:n.isDisabled?-1:0,$isToday:n.isToday,$isWeekend:n.isWeekend,$isChoice:n.value===(null==h?void 0:h.valueOf()),$isCurrentMonth:n.isCurrentMonth,children:[!n.isDisabled&&e.jsxRuntimeExports.jsx(l.Ripple,{color:m.colors.date[u.genre].color.rest}),n.labelNumber]},n.value)})]})]})}),O||(null==u?void 0:u.error)?e.jsxRuntimeExports.jsx(t.ErrorMessage,{...O?{isError:!0,size:(null==(d=null==u?void 0:u.error)?void 0:d.size)??u.size,...u.notValidDate}:u.error,size:(null==(c=null==u?void 0:u.error)?void 0:c.size)??u.size,font:{size:12,weight:400,family:(null==(f=u.font)?void 0:f.family)??m.font.family}}):null]})},exports.DatePickerVariant=o;
|
|
2
|
+
//# sourceMappingURL=component.types-ZmH2V3qe.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.types-BRZsYWlH.cjs","sources":["../src/components/date-picker/component.types.ts","../src/components/date-picker/component.tsx"],"sourcesContent":["import { InputStandardProps, StyledInputProps, StyledInputWrapperProps } from '@local/components/input';\nimport { addFontProps, addOutlineProps, addOutlinePropsDollar } from '@local/styles/add';\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 addFontProps &\n addOutlineProps & {\n genre: TDateGenre;\n\n id?: string;\n\n isDisabled?: boolean;\n isBold?: boolean;\n isMinWidth?: 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' | 'isDisabledOutline' | 'isOutlineBoxShadow' | 'isDisabled' | 'font'> & {\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' | 'font'> &\n Pick<DateDayProps, 'isToday' | 'isWeekend'> & {\n row: number;\n column: number;\n isChoice?: boolean;\n isCurrentMonth?: boolean;\n isDisabled?: boolean;\n }\n> &\n addOutlinePropsDollar;\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","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 isHasInput = useMemo(() => {\n return (\n input[DatePickerVariant.DD] !== null ||\n input[DatePickerVariant.MM] !== null ||\n input[DatePickerVariant.YYYY] !== null\n );\n }, [input]);\n const onClearInput = useCallback(() => {\n setInput({\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\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\n const sizeRadius = useMemo(() => KEY_SIZE_DATA[props.size].radius, [props.size]);\n const sizePadding = useMemo(() => KEY_SIZE_DATA[props.size].padding, [props.size]);\n\n const isHasValue = useMemo(() => {\n return valueMoment !== null;\n }, [valueMoment]);\n const isBlockNextMonth = useMemo(() => {\n const nextMonth = (valueMoment ?? dateDefaultMoment).clone().add(1, 'month').startOf('month');\n const isBeforeEndDate = props.dateMax ? nextMonth.isAfter(moment.utc(props.dateMax), 'month') : false;\n return isBeforeEndDate;\n }, [valueMoment, props.dateMax, dateDefaultMoment]);\n const isBlockPrevMonth = useMemo(() => {\n const prevMonth = (valueMoment ?? dateDefaultMoment).clone().subtract(1, 'month').startOf('month');\n const isAfterStartDate = props.dateMin ? prevMonth.isBefore(moment.utc(props.dateMin), 'month') : false;\n return isAfterStartDate;\n }, [valueMoment, props.dateMin, dateDefaultMoment]);\n\n const [isInputFocused, setIsInputFocused] = useState(false);\n\n const refPrevValue = useRef('');\n const refSelectMonth = useRef<HTMLElement>(null);\n const refSelectYear = useRef<HTMLElement>(null);\n const refHiddenInput = useRef<HTMLInputElement>(null);\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 isShowPlaceholder = useMemo(() => {\n return !!(!isInputFocused && !isHasValue && props.labelPlaceholder && !isOpen && !isHasInput && !activeSegment);\n }, [isInputFocused, isHasValue, isOpen, props.labelPlaceholder, isHasInput, activeSegment]);\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 handleDigitKey(digit, activeSegment, input, dataDate);\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, dataDate.default, dataDate],\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 if (props.value) {\n setInput({\n [DatePickerVariant.DD]: moment(props.value).utc().date(),\n [DatePickerVariant.MM]: moment(props.value).utc().month() + 1,\n [DatePickerVariant.YYYY]: moment(props.value).utc().year(),\n });\n }\n }, [props.value, props.defaultValue]);\n\n const getValidateInput = useCallback(\n (\n input: Record<DatePickerVariant, number | null>,\n onSuccess?: (value: number) => void,\n onFailure?: () => void,\n onNan?: (isHasInput: boolean) => void,\n ) => {\n const day = input.DD ?? NaN;\n const month = input.MM ?? NaN;\n const year = input.YYYY ?? NaN;\n const isHasInput =\n input[DatePickerVariant.DD] !== null ||\n input[DatePickerVariant.MM] !== null ||\n input[DatePickerVariant.YYYY] !== null;\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 onSuccess?.(m.valueOf());\n } else {\n onFailure?.();\n }\n } else {\n onNan?.(isHasInput);\n }\n },\n [],\n );\n\n useEffect(() => {\n getValidateInput(\n input,\n (value) => {\n onChangeDate(value);\n setIsError(false);\n },\n () => {\n onChange(null);\n setIsError(true);\n },\n (isHasInput) => {\n if (!isHasInput) {\n setIsError(false);\n }\n },\n );\n }, [getValidateInput, onChangeDate, onChange, input]);\n\n useEffect(() => {\n if (!isOpen && !isInputFocused && isHasInput && !activeSegment)\n getValidateInput(\n input,\n () => {},\n () => {\n onChange(null);\n onClearInput();\n setIsError(false);\n },\n () => {\n onChange(null);\n onClearInput();\n setIsError(false);\n },\n );\n }, [getValidateInput, onClearInput, input, isOpen, isInputFocused, onChange, isHasInput, activeSegment]);\n\n useEffect(() => {\n if (activeSegment) {\n refHiddenInput?.current?.focus();\n }\n }, [activeSegment]);\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 $isDisabledOutline={props?.isDisabledOutline}\n $isOutlineBoxShadow={props?.isOutlineBoxShadow}\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 || !!activeSegment}\n onClick={() => {\n if (!activeSegment && !props?.isReadOnly) setActiveSegment(DatePickerVariant.DD);\n }}\n >\n <input\n name={props.name}\n id={props.id}\n ref={refHiddenInput}\n type='tel'\n inputMode='numeric'\n tabIndex={0}\n disabled={props?.isDisabled || props?.isReadOnly}\n style={{\n position: 'absolute',\n left: '-100dvw',\n top: 0,\n // left: 0,\n width: '100%',\n height: '100%',\n opacity: 0,\n border: 'none',\n background: 'transparent',\n }}\n onKeyDown={handleKeyDown}\n onChange={(e) => {\n const value = e.target.value;\n const prevValue = refPrevValue.current;\n\n const newChar = value.length > prevValue.length ? value.slice(-1) : null;\n\n refPrevValue.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\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 $font={{\n size: props.font?.size ?? 16,\n weight: props.font?.weight ?? (props.isBold ? 500 : 400),\n family: props.font?.family ?? theme.font.family,\n height: props.font?.height ?? theme.font.lineHeight,\n }}\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 $font={{\n size: 12,\n weight: 700,\n family: props.font?.family ?? theme.font.family,\n }}\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 $font={{\n size: 12,\n weight: 700,\n family: props.font?.family ?? theme.font.family,\n }}\n type='button'\n $isDisabled={day.isDisabled}\n $isDisabledOutline={day.isDisabled ?? props.isDisabledOutline}\n $isOutlineBoxShadow={props.isOutlineBoxShadow}\n $isReadOnly={props.isReadOnly}\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 font={{\n size: 12,\n weight: 400,\n family: props.font?.family ?? theme.font.family,\n }}\n />\n ) : null}\n </>\n );\n};\nfunction handleDigitKey(\n key: string,\n activeSegment: DatePickerVariant,\n input: Record<DatePickerVariant, number | null>,\n dataDate: { default: Record<DatePickerVariant, { setValue: (value: number) => void; onNext: () => void }> },\n) {\n const digit = key; // '0'..'9'\n const seg = activeSegment;\n const current = input[seg]?.toString() ?? ''; // Преобразуем number в string для работы\n\n // Вспомогательная проверка\n const isZero = (s: string) => s === '0';\n const toNum = (s: string) => Number(s);\n\n if (seg === DatePickerVariant.DD) {\n // Дни: максимум 31, ноль недопустим как самостоятельное значение\n if (current.length >= 2) {\n // уже два символа — начинаем ввод заново\n const parsed = toNum(digit);\n if (parsed === 0 || parsed > 31) return;\n dataDate.default[seg].setValue(parsed);\n return;\n }\n\n // special-case: если было '0' и пользователь ввёл не '0' — НЕ подставляем '0' перед цифрой,\n // сохраняем single-digit и считаем ввод завершённым (переходим).\n if (current.length === 1 && isZero(current)) {\n const parsed = toNum(digit);\n if (parsed === 0 || parsed > 31) return;\n dataDate.default[seg].setValue(parsed); // сохраняем число, а не строку\n dataDate.default[seg].onNext();\n return;\n }\n\n // обычный путь: добавляем цифру и решаем — перезаписать или дополнить\n const potential = current + digit;\n const potentialParsed = toNum(potential);\n\n // ИСПРАВЛЕНИЕ: если потенциальное значение больше 31, используем только новую цифру и переходим дальше\n if (potentialParsed > 31) {\n const parsed = toNum(digit);\n if (parsed === 0 || parsed > 31) return;\n dataDate.default[seg].setValue(parsed);\n dataDate.default[seg].onNext(); // Переходим к следующему сегменту\n return;\n }\n\n // Если потенциальное значение равно 0, используем только новую цифру\n const nextValue = potentialParsed === 0 ? digit : potential;\n const parsed = toNum(nextValue);\n if (parsed === 0 || parsed > 31) return;\n dataDate.default[seg].setValue(parsed);\n if (nextValue.length === 2) dataDate.default[seg].onNext();\n } else if (seg === DatePickerVariant.MM) {\n // Месяцы: максимум 12, ноль недопустим как самостоятельное значение\n if (current.length >= 2) {\n const parsed = toNum(digit);\n if (parsed === 0 || parsed > 12) return;\n dataDate.default[seg].setValue(parsed);\n return;\n }\n\n if (current.length === 1 && isZero(current)) {\n const parsed = toNum(digit);\n if (parsed === 0 || parsed > 12) return;\n dataDate.default[seg].setValue(parsed); // сохраняем число, а не строку\n dataDate.default[seg].onNext();\n return;\n }\n\n const potential = current + digit;\n const potentialParsed = toNum(potential);\n const nextValue = potentialParsed === 0 || potentialParsed > 12 ? digit : potential;\n\n const parsed = toNum(nextValue);\n if (parsed === 0 || parsed > 12) return;\n dataDate.default[seg].setValue(parsed);\n if (nextValue.length === 2 || (nextValue.length === 1 && parsed > 1)) {\n dataDate.default[seg].onNext();\n }\n } else if (seg === DatePickerVariant.YYYY) {\n // Год: накапливаем до 4 цифр. Если уже 4 — начинаем заново (как раньше)\n if (current.length >= 4) {\n if (digit === '0') return;\n dataDate.default[seg].setValue(toNum(digit));\n return;\n }\n\n const nextValue = (current + digit).slice(-4);\n dataDate.default[seg].setValue(toNum(nextValue));\n }\n}\n"],"names":["DatePickerVariant","props","onChange","theme","useTheme","valueMoment","setValueMoment","useState","dateDefaultMoment","setDateDefaultMoment","moment","dateDefault","utc","input","setInput","DD","MM","YYYY","isHasInput","useMemo","onClearInput","useCallback","activeSegment","setActiveSegment","isError","setIsError","mode","length","Set","size","getNextSegment","currentSegment","currentIndex","indexOf","getPrevSegment","dataDate","result","nextSegment","preSegment","onNext","onPrev","isLast","isFirst","type","value","setValue","prevValue","setActive","placeholder","locale","inputs","month","day","year","sort","map","e","filter","default","daysInWeek","key","index","found","weeks","find","w","label","localeShort","toUpperCase","daysInMonth","today","startOfMonth","clone","startOf","endOfMonth","endOf","days","dateMin","dateMax","daysToAddBefore","isoWeekday","i","subtract","push","valueOf","labelString","format","labelNumber","date","dayOfWeek","isWeekend","weekOfMonth","Math","ceil","isToday","isSame","isCurrentMonth","isDisabled","isBefore","isAfter","currentDate","add","daysToAddAfter","a","b","rows","number","count","floor","countSevens","height","KEY_SIZE_DATA","padding","sizeRadius","radius","sizePadding","isHasValue","isBlockNextMonth","nextMonth","isBlockPrevMonth","prevMonth","isInputFocused","setIsInputFocused","refPrevValue","useRef","refSelectMonth","refSelectYear","refHiddenInput","onFocusPopover","_a","onFocus","call","onBlurPopover","onBlur","onBlurReference","isOpen","refReference","refFloating","floatingStyles","close","toggle","usePopover","placement","offset","isClickOutside","refsExcludeClickOutside","isReadOnly","isShowPlaceholder","labelPlaceholder","onChangeDate","timestamp","momentNewDate","handleKeyDown","isDigit","test","includes","ctrlKey","metaKey","digit","seg","current","toString","isZero","s","toNum","Number","parsed","potential","potentialParsed","nextValue","slice","handleDigitKey","preventDefault","stopPropagation","blur","newValue","onNextMonth","newDate","onPrevMonth","useEffect","defaultValue","getValidateInput","onSuccess","onFailure","onNan","NaN","isNaN","m","isValid","focus","jsxs","Fragment","children","jsx","DateWrapper","$size","$genre","genre","$sx","sx","$isDisabled","$isMinWidth","isMinWidth","$radius","$parentListHeight","tabIndex","DateInputWrapper","ref","$isShowPlaceholder","$isReadOnly","$isDisabledOutline","isDisabledOutline","$isOutlineBoxShadow","isOutlineBoxShadow","$error","error","notValidDate","$isOpen","onClick","name","id","inputMode","disabled","style","position","left","top","width","opacity","border","background","onKeyDown","target","newChar","Typography","line","isNoUserSelect","sxStandard","color","colors","DateInput","$isHaveValue","$isActive","$font","font","weight","_b","isBold","family","_c","_d","lineHeight","String","padStart","pointerEvents","textAlign","DateInputButton","isWidthAsHeight","isFullSize","isRadius","isOnlyIcon","icons","Popover","rest","isShowAlwaysOutline","DateDropdownList","$isInputEffect","isInputEffect","Stack","justifyContent","alignItems","Button","turn","isHidden","gap","SelectMonth","monthsLocale","months","isOnClickOptionClose","isStayValueAfterSelect","isOnlyColorInSelectListOption","isCenter","isShortLabel","SelectYear","DateDropdownDays","$rows","DateDropdownDayOfWeek","$isToday","$isWeekend","$row","$column","DateDropdownDay","isOnClickClose","$isChoice","$isCurrentMonth","Ripple","ErrorMessage"],"mappings":"4SAUO,IAAKA,GAAAA,IACVA,EAAA,GAAK,KACLA,EAAA,GAAK,KACLA,EAAA,KAAO,OAHGA,IAAAA,GAAA,CAAA,sBC2BeC,gBACzB,MAAMC,SAAEA,GA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AA,EAAAA,EAAOsN,OACjBtB,EAAAA,kBAAAA,IAACuG,EAAAA,aAAA,IACMhR,EACD,CACEA,SAAS,EACTK,MAAM,OAAAyN,EAAA,MAAArP,OAAA,EAAAA,EAAOsN,YAAP,EAAA+B,EAAczN,OAAQ5B,EAAM4B,QAC/B5B,EAAMuN,cAEXvN,EAAMsN,MACV1L,MAAM,OAAA4N,EAAA,MAAAxP,OAAA,EAAAA,EAAOsN,YAAP,EAAAkC,EAAc5N,OAAQ5B,EAAM4B,KAClCuN,KAAM,CACJvN,KAAM,GACNwN,OAAQ,IACRG,QAAQ,OAAAE,EAAAzP,EAAMmP,WAAN,EAAAM,EAAYF,SAAUrP,EAAMiP,KAAKI,UAG3C"}
|
|
1
|
+
{"version":3,"file":"component.types-ZmH2V3qe.cjs","sources":["../src/components/date-picker/component.types.ts","../src/components/date-picker/component.tsx"],"sourcesContent":["import { InputStandardProps, StyledInputProps, StyledInputWrapperProps } from '@local/components/input';\nimport { addFontProps, addOutlineProps, addOutlinePropsDollar } from '@local/styles/add';\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 addFontProps &\n addOutlineProps & {\n genre: TDateGenre;\n\n id?: string;\n\n isDisabled?: boolean;\n isBold?: boolean;\n isMinWidth?: 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' | 'isDisabledOutline' | 'isOutlineBoxShadow' | 'isDisabled' | 'font'> & {\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' | 'font'> &\n Pick<DateDayProps, 'isToday' | 'isWeekend'> & {\n row: number;\n column: number;\n isChoice?: boolean;\n isCurrentMonth?: boolean;\n isDisabled?: boolean;\n }\n> &\n addOutlinePropsDollar;\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","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 isHasInput = useMemo(() => {\n return (\n input[DatePickerVariant.DD] !== null ||\n input[DatePickerVariant.MM] !== null ||\n input[DatePickerVariant.YYYY] !== null\n );\n }, [input]);\n const onClearInput = useCallback(() => {\n setInput({\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\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\n const sizeRadius = useMemo(() => KEY_SIZE_DATA[props.size].radius, [props.size]);\n const sizePadding = useMemo(() => KEY_SIZE_DATA[props.size].padding, [props.size]);\n\n const isHasValue = useMemo(() => {\n return valueMoment !== null;\n }, [valueMoment]);\n const isBlockNextMonth = useMemo(() => {\n const nextMonth = (valueMoment ?? dateDefaultMoment).clone().add(1, 'month').startOf('month');\n const isBeforeEndDate = props.dateMax ? nextMonth.isAfter(moment.utc(props.dateMax), 'month') : false;\n return isBeforeEndDate;\n }, [valueMoment, props.dateMax, dateDefaultMoment]);\n const isBlockPrevMonth = useMemo(() => {\n const prevMonth = (valueMoment ?? dateDefaultMoment).clone().subtract(1, 'month').startOf('month');\n const isAfterStartDate = props.dateMin ? prevMonth.isBefore(moment.utc(props.dateMin), 'month') : false;\n return isAfterStartDate;\n }, [valueMoment, props.dateMin, dateDefaultMoment]);\n\n const [isInputFocused, setIsInputFocused] = useState(false);\n\n const refPrevValue = useRef('');\n const refSelectMonth = useRef<HTMLElement>(null);\n const refSelectYear = useRef<HTMLElement>(null);\n const refHiddenInput = useRef<HTMLInputElement>(null);\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 isShowPlaceholder = useMemo(() => {\n return !!(!isInputFocused && !isHasValue && props.labelPlaceholder && !isOpen && !isHasInput && !activeSegment);\n }, [isInputFocused, isHasValue, isOpen, props.labelPlaceholder, isHasInput, activeSegment]);\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 handleDigitKey(digit, activeSegment, input, dataDate);\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, dataDate.default, dataDate],\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 if (props.value) {\n setInput({\n [DatePickerVariant.DD]: moment(props.value).utc().date(),\n [DatePickerVariant.MM]: moment(props.value).utc().month() + 1,\n [DatePickerVariant.YYYY]: moment(props.value).utc().year(),\n });\n }\n }, [props.value, props.defaultValue]);\n\n const getValidateInput = useCallback(\n (\n input: Record<DatePickerVariant, number | null>,\n onSuccess?: (value: number) => void,\n onFailure?: () => void,\n onNan?: (isHasInput: boolean) => void,\n ) => {\n const day = input.DD ?? NaN;\n const month = input.MM ?? NaN;\n const year = input.YYYY ?? NaN;\n const isHasInput =\n input[DatePickerVariant.DD] !== null ||\n input[DatePickerVariant.MM] !== null ||\n input[DatePickerVariant.YYYY] !== null;\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 onSuccess?.(m.valueOf());\n } else {\n onFailure?.();\n }\n } else {\n onNan?.(isHasInput);\n }\n },\n [],\n );\n\n useEffect(() => {\n getValidateInput(\n input,\n (value) => {\n onChangeDate(value);\n setIsError(false);\n },\n () => {\n onChange(null);\n setIsError(true);\n },\n (isHasInput) => {\n if (!isHasInput) {\n setIsError(false);\n }\n },\n );\n }, [getValidateInput, onChangeDate, onChange, input]);\n\n useEffect(() => {\n if (!isOpen && !isInputFocused && isHasInput && !activeSegment)\n getValidateInput(\n input,\n () => {},\n () => {\n onChange(null);\n onClearInput();\n setIsError(false);\n },\n () => {\n onChange(null);\n onClearInput();\n setIsError(false);\n },\n );\n }, [getValidateInput, onClearInput, input, isOpen, isInputFocused, onChange, isHasInput, activeSegment]);\n\n useEffect(() => {\n if (activeSegment) {\n refHiddenInput?.current?.focus();\n }\n }, [activeSegment]);\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 $isDisabledOutline={props?.isDisabledOutline}\n $isOutlineBoxShadow={props?.isOutlineBoxShadow}\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 || !!activeSegment}\n onClick={() => {\n if (!activeSegment && !props?.isReadOnly) setActiveSegment(DatePickerVariant.DD);\n }}\n >\n <input\n name={props.name}\n id={props.id}\n ref={refHiddenInput}\n type='tel'\n inputMode='numeric'\n tabIndex={0}\n disabled={props?.isDisabled || props?.isReadOnly}\n style={{\n position: 'absolute',\n left: '-100dvw',\n top: 0,\n // left: 0,\n width: '100%',\n height: '100%',\n opacity: 0,\n border: 'none',\n background: 'transparent',\n }}\n onKeyDown={handleKeyDown}\n onChange={(e) => {\n const value = e.target.value;\n const prevValue = refPrevValue.current;\n\n const newChar = value.length > prevValue.length ? value.slice(-1) : null;\n\n refPrevValue.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\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 $font={{\n size: props.font?.size ?? 16,\n weight: props.font?.weight ?? (props.isBold ? 500 : 400),\n family: props.font?.family ?? theme.font.family,\n height: props.font?.height ?? theme.font.lineHeight,\n }}\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 $font={{\n size: 12,\n weight: 700,\n family: props.font?.family ?? theme.font.family,\n }}\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 $font={{\n size: 12,\n weight: 700,\n family: props.font?.family ?? theme.font.family,\n }}\n type='button'\n $isDisabled={day.isDisabled}\n $isDisabledOutline={day.isDisabled ?? props.isDisabledOutline}\n $isOutlineBoxShadow={props.isOutlineBoxShadow}\n $isReadOnly={props.isReadOnly}\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 font={{\n size: 12,\n weight: 400,\n family: props.font?.family ?? theme.font.family,\n }}\n />\n ) : null}\n </>\n );\n};\nfunction handleDigitKey(\n key: string,\n activeSegment: DatePickerVariant,\n input: Record<DatePickerVariant, number | null>,\n dataDate: { default: Record<DatePickerVariant, { setValue: (value: number) => void; onNext: () => void }> },\n) {\n const digit = key; // '0'..'9'\n const seg = activeSegment;\n const current = input[seg]?.toString() ?? ''; // Преобразуем number в string для работы\n\n // Вспомогательная проверка\n const isZero = (s: string) => s === '0';\n const toNum = (s: string) => Number(s);\n\n if (seg === DatePickerVariant.DD) {\n // Дни: максимум 31, ноль недопустим как самостоятельное значение\n if (current.length >= 2) {\n // уже два символа — начинаем ввод заново\n const parsed = toNum(digit);\n if (parsed === 0 || parsed > 31) return;\n dataDate.default[seg].setValue(parsed);\n return;\n }\n\n // special-case: если было '0' и пользователь ввёл не '0' — НЕ подставляем '0' перед цифрой,\n // сохраняем single-digit и считаем ввод завершённым (переходим).\n if (current.length === 1 && isZero(current)) {\n const parsed = toNum(digit);\n if (parsed === 0 || parsed > 31) return;\n dataDate.default[seg].setValue(parsed); // сохраняем число, а не строку\n dataDate.default[seg].onNext();\n return;\n }\n\n // обычный путь: добавляем цифру и решаем — перезаписать или дополнить\n const potential = current + digit;\n const potentialParsed = toNum(potential);\n\n // ИСПРАВЛЕНИЕ: если потенциальное значение больше 31, используем только новую цифру и переходим дальше\n if (potentialParsed > 31) {\n const parsed = toNum(digit);\n if (parsed === 0 || parsed > 31) return;\n dataDate.default[seg].setValue(parsed);\n dataDate.default[seg].onNext(); // Переходим к следующему сегменту\n return;\n }\n\n // Если потенциальное значение равно 0, используем только новую цифру\n const nextValue = potentialParsed === 0 ? digit : potential;\n const parsed = toNum(nextValue);\n if (parsed === 0 || parsed > 31) return;\n dataDate.default[seg].setValue(parsed);\n if (nextValue.length === 2) dataDate.default[seg].onNext();\n } else if (seg === DatePickerVariant.MM) {\n // Месяцы: максимум 12, ноль недопустим как самостоятельное значение\n if (current.length >= 2) {\n const parsed = toNum(digit);\n if (parsed === 0 || parsed > 12) return;\n dataDate.default[seg].setValue(parsed);\n return;\n }\n\n if (current.length === 1 && isZero(current)) {\n const parsed = toNum(digit);\n if (parsed === 0 || parsed > 12) return;\n dataDate.default[seg].setValue(parsed); // сохраняем число, а не строку\n dataDate.default[seg].onNext();\n return;\n }\n\n const potential = current + digit;\n const potentialParsed = toNum(potential);\n const nextValue = potentialParsed === 0 || potentialParsed > 12 ? digit : potential;\n\n const parsed = toNum(nextValue);\n if (parsed === 0 || parsed > 12) return;\n dataDate.default[seg].setValue(parsed);\n if (nextValue.length === 2 || (nextValue.length === 1 && parsed > 1)) {\n dataDate.default[seg].onNext();\n }\n } else if (seg === DatePickerVariant.YYYY) {\n // Год: накапливаем до 4 цифр. Если уже 4 — начинаем заново (как раньше)\n if (current.length >= 4) {\n if (digit === '0') return;\n dataDate.default[seg].setValue(toNum(digit));\n return;\n }\n\n const nextValue = (current + digit).slice(-4);\n dataDate.default[seg].setValue(toNum(nextValue));\n }\n}\n"],"names":["DatePickerVariant","props","onChange","theme","useTheme","valueMoment","setValueMoment","useState","dateDefaultMoment","setDateDefaultMoment","moment","dateDefault","utc","input","setInput","DD","MM","YYYY","isHasInput","useMemo","onClearInput","useCallback","activeSegment","setActiveSegment","isError","setIsError","mode","length","Set","size","getNextSegment","currentSegment","currentIndex","indexOf","getPrevSegment","dataDate","result","nextSegment","preSegment","onNext","onPrev","isLast","isFirst","type","value","setValue","prevValue","setActive","placeholder","locale","inputs","month","day","year","sort","map","e","filter","default","daysInWeek","key","index","found","weeks","find","w","label","localeShort","toUpperCase","daysInMonth","today","startOfMonth","clone","startOf","endOfMonth","endOf","days","dateMin","dateMax","daysToAddBefore","isoWeekday","i","subtract","push","valueOf","labelString","format","labelNumber","date","dayOfWeek","isWeekend","weekOfMonth","Math","ceil","isToday","isSame","isCurrentMonth","isDisabled","isBefore","isAfter","currentDate","add","daysToAddAfter","a","b","rows","number","count","floor","countSevens","height","KEY_SIZE_DATA","padding","sizeRadius","radius","sizePadding","isHasValue","isBlockNextMonth","nextMonth","isBlockPrevMonth","prevMonth","isInputFocused","setIsInputFocused","refPrevValue","useRef","refSelectMonth","refSelectYear","refHiddenInput","onFocusPopover","_a","onFocus","call","onBlurPopover","onBlur","onBlurReference","isOpen","refReference","refFloating","floatingStyles","close","toggle","usePopover","placement","offset","isClickOutside","refsExcludeClickOutside","isReadOnly","isShowPlaceholder","labelPlaceholder","onChangeDate","timestamp","momentNewDate","handleKeyDown","isDigit","test","includes","ctrlKey","metaKey","digit","seg","current","toString","isZero","s","toNum","Number","parsed","potential","potentialParsed","nextValue","slice","handleDigitKey","preventDefault","stopPropagation","blur","newValue","onNextMonth","newDate","onPrevMonth","useEffect","defaultValue","getValidateInput","onSuccess","onFailure","onNan","NaN","isNaN","m","isValid","focus","jsxs","Fragment","children","jsx","DateWrapper","$size","$genre","genre","$sx","sx","$isDisabled","$isMinWidth","isMinWidth","$radius","$parentListHeight","tabIndex","DateInputWrapper","ref","$isShowPlaceholder","$isReadOnly","$isDisabledOutline","isDisabledOutline","$isOutlineBoxShadow","isOutlineBoxShadow","$error","error","notValidDate","$isOpen","onClick","name","id","inputMode","disabled","style","position","left","top","width","opacity","border","background","onKeyDown","target","newChar","Typography","line","isNoUserSelect","sxStandard","color","colors","DateInput","$isHaveValue","$isActive","$font","font","weight","_b","isBold","family","_c","_d","lineHeight","String","padStart","pointerEvents","textAlign","DateInputButton","isWidthAsHeight","isFullSize","isRadius","isOnlyIcon","icons","Popover","rest","isShowAlwaysOutline","DateDropdownList","$isInputEffect","isInputEffect","Stack","justifyContent","alignItems","Button","turn","isHidden","gap","SelectMonth","monthsLocale","months","isOnClickOptionClose","isStayValueAfterSelect","isOnlyColorInSelectListOption","isCenter","isShortLabel","SelectYear","DateDropdownDays","$rows","DateDropdownDayOfWeek","$isToday","$isWeekend","$row","$column","DateDropdownDay","isOnClickClose","$isChoice","$isCurrentMonth","Ripple","ErrorMessage"],"mappings":"4SAUO,IAAKA,GAAAA,IACVA,EAAA,GAAK,KACLA,EAAA,GAAK,KACLA,EAAA,KAAO,OAHGA,IAAAA,GAAA,CAAA,sBC2BeC,gBACzB,MAAMC,SAAEA,GAAaD,EACfE,EAAQC,EAAAA,YAEPC,EAAaC,GAAkBC,EAAAA,SAAwB,OACvDC,EAAmBC,GAAwBF,EAAAA,SAAiBG,EAAOT,EAAMU,aAAaC,QAEtFC,EAAOC,GAAYP,WAAmD,CAC3E,CAACP,EAAkBe,IAAK,KACxB,CAACf,EAAkBgB,IAAK,KACxB,CAAChB,EAAkBiB,MAAO,OAGtBC,EAAaC,EAAAA,QAAQ,IAES,OAAhCN,EAAMb,EAAkBe,KACQ,OAAhCF,EAAMb,EAAkBgB,KACU,OAAlCH,EAAMb,EAAkBiB,MAEzB,CAACJ,IACEO,EAAeC,EAAAA,YAAY,KAC/BP,EAAS,CACP,CAACd,EAAkBe,IAAK,KACxB,CAACf,EAAkBgB,IAAK,KACxB,CAAChB,EAAkBiB,MAAO,QAE3B,KACIK,EAAeC,GAAoBhB,EAAAA,SAAmC,OACtEiB,EAASC,GAAclB,EAAAA,UAAS,GAEjCmB,EAAuBP,EAAAA,QAAQ,KACnC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EAAMkN,kBAC5CC,oBAAqBnN,EAAMoN,mBAC3BJ,YAAahN,EAAMiJ,WACnBkD,OAAQnM,EAAMoM,MACdF,MAAOlM,EAAM4B,KACboQ,YAAM7O,WAAKuC,aAAc,EACzBuM,QAAS9O,EAAIqC,UAEbiI,QAAS,KACFtK,EAAI6C,aACPoD,GAAajG,EAAIR,OACb3C,EAAMmS,gBACRzJ,MAINkE,SAAUzJ,EAAI6C,YAAa,EAAK,EAChC8L,SAAU3O,EAAI0C,QACdkM,WAAY5O,EAAIsC,UAChB2M,UAAWjP,EAAIR,SAAU,MAAAvC,OAAA,EAAAA,EAAa+E,WACtCkN,gBAAiBlP,EAAI4C,eAEpBgG,SAAA,EAAC5I,EAAI6C,cAAcgG,kBAAAA,IAACsG,EAAAA,OAAA,CAAOzD,MAAO3O,EAAM4O,OAAOvJ,KAAKvF,EAAMoM,OAAOyC,MAAMyB,OACvEnN,EAAImC,cAhBAnC,EAAIR,iBAsBlBpB,IAAW,MAAAvB,OAAA,EAAAA,EAAOsN,OACjBtB,EAAAA,kBAAAA,IAACuG,EAAAA,aAAA,IACMhR,EACD,CACEA,SAAS,EACTK,MAAM,OAAAyN,EAAA,MAAArP,OAAA,EAAAA,EAAOsN,YAAP,EAAA+B,EAAczN,OAAQ5B,EAAM4B,QAC/B5B,EAAMuN,cAEXvN,EAAMsN,MACV1L,MAAM,OAAA4N,EAAA,MAAAxP,OAAA,EAAAA,EAAOsN,YAAP,EAAAkC,EAAc5N,OAAQ5B,EAAM4B,KAClCuN,KAAM,CACJvN,KAAM,GACNwN,OAAQ,IACRG,QAAQ,OAAAE,EAAAzP,EAAMmP,WAAN,EAAAM,EAAYF,SAAUrP,EAAMiP,KAAKI,UAG3C"}
|
package/build/consts.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./functions.cjs.js"),a={eng:{value:"eng",label:"English",placeholder:"English",search:"English, eng"},rus:{value:"rus",label:"Русский",placeholder:"Русский",search:"Русский, rus"}},o={jenesei_id:{value:"jenesei_id",label:"Jenesei ID",placeholder:"Jenesei ID",search:"Jenesei ID"}},r=e.transformObjectToArray(a),l=e.transformObjectValuesToKeys(a),t=e.transformObjectToArray(o),s=e.transformObjectValuesToKeys(o),n=["image/*",".jpeg",".jpg",".png",".webp","avif"].join(",");exports.LIBRARY_VERSION="1.3.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./functions.cjs.js"),a={eng:{value:"eng",label:"English",placeholder:"English",search:"English, eng"},rus:{value:"rus",label:"Русский",placeholder:"Русский",search:"Русский, rus"}},o={jenesei_id:{value:"jenesei_id",label:"Jenesei ID",placeholder:"Jenesei ID",search:"Jenesei ID"}},r=e.transformObjectToArray(a),l=e.transformObjectValuesToKeys(a),t=e.transformObjectToArray(o),s=e.transformObjectValuesToKeys(o),n=["image/*",".jpeg",".jpg",".png",".webp","avif"].join(",");exports.LIBRARY_VERSION="1.3.23",exports.LIST_IMAGE_SUPPORTED_FORMAT=["image/jpeg","image/jpg","image/png","image/webp","image/avif"],exports.LIST_IMAGE_SUPPORTED_FORMAT_FOR_INPUT=n,exports.LIST_KEY_LANGUAGE=l,exports.LIST_KEY_SERVICE=s,exports.LIST_LANGUAGE=r,exports.LIST_MAP_THEME=[{name:"Light CARTO",url:"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",attribution:'© <a href="https://carto.com/">CARTO</a>'},{name:"Dark CARTO",url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© <a href="https://carto.com/">CARTO</a>'},{name:"OpenStreetMap",url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'},{name:"World Topo MapCluster",url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",attribution:"Tiles © Esri — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community"},{name:"Esri World Imagery",url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",attribution:"Tiles © Esri — Source: Esri, Earthstar Geographics"}],exports.LIST_SERVICE=t,exports.LOCALE_INPUT={day:"ДД",month:"ММ",year:"ГГГГ"},exports.LOCALE_MONTHS=[{localeLong:"Январь",localeShort:"Янв",value:"january"},{localeLong:"February",localeShort:"Feb",value:"february"},{localeLong:"March",localeShort:"Mar",value:"march"},{localeLong:"April",localeShort:"Apr",value:"april"},{localeLong:"May",localeShort:"May",value:"may"},{localeLong:"June",localeShort:"Jun",value:"june"},{localeLong:"July",localeShort:"Jul",value:"july"},{localeLong:"August",localeShort:"Aug",value:"august"},{localeLong:"September",localeShort:"Sep",value:"september"},{localeLong:"October",localeShort:"Oct",value:"october"},{localeLong:"November",localeShort:"Nov",value:"november"},{localeLong:"December",localeShort:"Dec",value:"december"}],exports.LOCALE_WEEKS=[{localeLong:"Monday",localeShort:"Пн",value:"mo"},{localeLong:"Tuesday",localeShort:"Tue",value:"tu"},{localeLong:"Wednesday",localeShort:"Wed",value:"we"},{localeLong:"Thursday",localeShort:"Thu",value:"th"},{localeLong:"Friday",localeShort:"Fri",value:"fr"},{localeLong:"Saturday",localeShort:"Sat",value:"sa"},{localeLong:"Sunday",localeShort:"Sun",value:"su"}],exports.LOREM_IPSUM_TEXT="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",exports.OBJECT_LANGUAGE=a,exports.OBJECT_SERVICE=o;
|
|
2
2
|
//# sourceMappingURL=consts.cjs.js.map
|
package/build/consts.es.js
CHANGED
|
@@ -159,7 +159,7 @@ const LIST_MAP_THEME = [
|
|
|
159
159
|
const LIST_IMAGE_SUPPORTED_FORMAT = ["image/jpeg", "image/jpg", "image/png", "image/webp", "image/avif"];
|
|
160
160
|
const LIST_IMAGE_SUPPORTED_FORMAT_FOR_INPUT = ["image/*", ".jpeg", ".jpg", ".png", ".webp", "avif"].join(",");
|
|
161
161
|
const LOREM_IPSUM_TEXT = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
|
|
162
|
-
const LIBRARY_VERSION = "1.3.
|
|
162
|
+
const LIBRARY_VERSION = "1.3.23";
|
|
163
163
|
export {
|
|
164
164
|
LIBRARY_VERSION,
|
|
165
165
|
LIST_IMAGE_SUPPORTED_FORMAT,
|
package/build/context-app.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context.constants-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context.constants-wfD246Ww.cjs"),r=require("./context.hooks-CXSsHfiI.cjs");exports.AppContext=e.AppContext,exports.ProviderApp=e.ProviderApp,exports.ProviderAppOutlet=e.ProviderAppOutlet,exports.ProviderAppOutletChildren=e.ProviderAppOutletChildren,exports.ProviderAppOutletFooter=e.ProviderAppOutletFooter,exports.ProviderAppOutletHeader=e.ProviderAppOutletHeader,exports.ProviderAppOutletLeftAside=e.ProviderAppOutletLeftAside,exports.ProviderAppOutletNav=e.ProviderAppOutletNav,exports.ProviderAppOutletNotification=e.ProviderAppOutletNotification,exports.ProviderAppOutletRightAside=e.ProviderAppOutletRightAside,exports.ProviderAppWrapper=e.ProviderAppWrapper,exports.useBgColor=e.useBgColor,exports.useBgImage=e.useBgImage,exports.useDescription=e.useDescription,exports.useStatusBarColor=e.useStatusBarColor,exports.useApp=r.useApp;
|
|
2
2
|
//# sourceMappingURL=context-app.cjs.js.map
|
package/build/context-app.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aU, aV, a$, b0, b3, b2, b5, b4, b1, b6, a_, aW, aY, aZ, aX } from "./context.constants-
|
|
2
|
-
import { u } from "./context.hooks-
|
|
1
|
+
import { aU, aV, a$, b0, b3, b2, b5, b4, b1, b6, a_, aW, aY, aZ, aX } from "./context.constants-AVloP24q.js";
|
|
2
|
+
import { u } from "./context.hooks-CQXyg8Md.js";
|
|
3
3
|
export {
|
|
4
4
|
aU as AppContext,
|
|
5
5
|
aV as ProviderApp,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./context.constants-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./context.constants-wztrdG5Q.cjs"),E=require("./context.hooks-DDtUqE34.cjs");exports.DEFAULT_PROVIDER_DIALOG_DURATION_ELEMENT=D.DEFAULT_PROVIDER_DIALOG_DURATION_ELEMENT,exports.DEFAULT_PROVIDER_DIALOG_DURATION_LAYOUT=D.DEFAULT_PROVIDER_DIALOG_DURATION_LAYOUT,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_BACKGROUND=D.DEFAULT_PROVIDER_DIALOG_ELEMENT_BACKGROUND,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_BORDER_RADIUS=D.DEFAULT_PROVIDER_DIALOG_ELEMENT_BORDER_RADIUS,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_HEIGHT=D.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_HEIGHT,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_WIDTH=D.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_WIDTH,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_PADDING=D.DEFAULT_PROVIDER_DIALOG_ELEMENT_PADDING,exports.DialogContent=D.DialogContent,exports.DialogContext=D.DialogContext,exports.DialogElementWrapper=D.DialogElementWrapper,exports.DialogLayout=D.DialogLayout,exports.ProviderDialog=D.ProviderDialog,exports.useDialog=E.useDialog,exports.useDialogs=E.useDialogs;
|
|
2
2
|
//# sourceMappingURL=context-dialog.cjs.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d, e, j, h, f, g, i, c, D, b, a, P } from "./context.constants-
|
|
2
|
-
import { a as a2, u } from "./context.hooks-
|
|
1
|
+
import { d, e, j, h, f, g, i, c, D, b, a, P } from "./context.constants-CZykW9B3.js";
|
|
2
|
+
import { a as a2, u } from "./context.hooks-D0OtRPb7.js";
|
|
3
3
|
export {
|
|
4
4
|
d as DEFAULT_PROVIDER_DIALOG_DURATION_ELEMENT,
|
|
5
5
|
e as DEFAULT_PROVIDER_DIALOG_DURATION_LAYOUT,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context.constants-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context.constants-wfD246Ww.cjs"),n=require("./context.hooks-L-OO9FIg.cjs");exports.DEFAULT_PROVIDER_SONNER_BUTTON=e.DEFAULT_PROVIDER_SONNER_BUTTON,exports.DEFAULT_PROVIDER_SONNER_DURATION=e.DEFAULT_PROVIDER_SONNER_DURATION,exports.DEFAULT_PROVIDER_SONNER_GENRE=e.DEFAULT_PROVIDER_SONNER_GENRE,exports.DEFAULT_PROVIDER_SONNER_MARGIN_BOTTOM=e.DEFAULT_PROVIDER_SONNER_MARGIN_BOTTOM,exports.DEFAULT_PROVIDER_SONNER_SCALE=e.DEFAULT_PROVIDER_SONNER_SCALE,exports.DEFAULT_PROVIDER_SONNER_Y=e.DEFAULT_PROVIDER_SONNER_Y,exports.DEFAULT_PROVIDER_SONNER_Z_INDEX=e.DEFAULT_PROVIDER_SONNER_Z_INDEX,exports.ProviderSonner=e.ProviderSonner,exports.SonnerButtonWrapper=e.SonnerButtonWrapper,exports.SonnerContent=e.SonnerContent,exports.SonnerContentDescription=e.SonnerContentDescription,exports.SonnerContentTitle=e.SonnerContentTitle,exports.SonnerContext=e.SonnerContext,exports.SonnerElementWrapper=e.SonnerElementWrapper,exports.SonnerIcon=e.SonnerIcon,exports.SonnerLayout=e.SonnerLayout,exports.useSonner=n.useSonner;
|
|
2
2
|
//# sourceMappingURL=context-sonner.cjs.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bm, bj, bk, bl, bh, bi, bg, b8, bf, bb, be, bd, b7, ba, bc, b9 } from "./context.constants-
|
|
2
|
-
import { u } from "./context.hooks-
|
|
1
|
+
import { bm, bj, bk, bl, bh, bi, bg, b8, bf, bb, be, bd, b7, ba, bc, b9 } from "./context.constants-AVloP24q.js";
|
|
2
|
+
import { u } from "./context.hooks-BsMIDkb3.js";
|
|
3
3
|
export {
|
|
4
4
|
bm as DEFAULT_PROVIDER_SONNER_BUTTON,
|
|
5
5
|
bj as DEFAULT_PROVIDER_SONNER_DURATION,
|
|
@@ -3,7 +3,7 @@ import { d as addRippleDefault } from "./component.styles-B0L4jbOO.js";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import React__default, { useMemo, useState, useEffect, useRef, useLayoutEffect, useCallback, memo, createContext } from "react";
|
|
5
5
|
import styled, { useTheme, createGlobalStyle, keyframes, css, styled as styled$1 } from "styled-components";
|
|
6
|
-
import {
|
|
6
|
+
import { g as addColorTransition, b as addTransition, f as addFontSizeTransition, h as addOutline, c as addFont, j as addAlwaysOutline, m as addDisabled, d as addTransitionWithoutSize, i as addOutlineChildren, k as addRemoveOutline, l as addNiceNumber, a as addRemoveScrollbar, e as addGridTransition } from "./style-BfuEu91g.js";
|
|
7
7
|
import { a as addSX } from "./style-plT9Ah7t.js";
|
|
8
8
|
import { getContrastYIQ } from "./functions.es.js";
|
|
9
9
|
import { b as Stack, c as StackMotion } from "./component-DEZX8aBs.js";
|
|
@@ -20,7 +20,7 @@ import { LIBRARY_VERSION, LIST_LANGUAGE, LIST_MAP_THEME } from "./consts.es.js";
|
|
|
20
20
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
21
21
|
import moment from "moment";
|
|
22
22
|
import { R as Ripple } from "./component-DHM9pbab.js";
|
|
23
|
-
import "./context.constants-
|
|
23
|
+
import "./context.constants-CZykW9B3.js";
|
|
24
24
|
import { v4 } from "uuid";
|
|
25
25
|
import "react-leaflet";
|
|
26
26
|
import "leaflet.markercluster";
|
|
@@ -1740,9 +1740,7 @@ function toStyledCSS(value) {
|
|
|
1740
1740
|
${value.weight && css`
|
|
1741
1741
|
font-weight: ${value.weight};
|
|
1742
1742
|
`};
|
|
1743
|
-
${value.height
|
|
1744
|
-
line-height: ${value.height}px;
|
|
1745
|
-
`};
|
|
1743
|
+
line-height: ${(props) => value.height ?? props.theme.font.lineHeight};
|
|
1746
1744
|
${value.color && css`
|
|
1747
1745
|
color: ${JeneseiPalette[value.color]};
|
|
1748
1746
|
`};
|
|
@@ -1774,7 +1772,6 @@ function toStyledCSS(value) {
|
|
|
1774
1772
|
`};
|
|
1775
1773
|
${"variant" in value && value.variant ? value.variant === "h1" ? css`
|
|
1776
1774
|
font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.default}px;
|
|
1777
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
1778
1775
|
margin: 0;
|
|
1779
1776
|
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
1780
1777
|
font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.tablet}px;
|
|
@@ -1785,7 +1782,6 @@ function toStyledCSS(value) {
|
|
|
1785
1782
|
}
|
|
1786
1783
|
` : value.variant === "h2" ? css`
|
|
1787
1784
|
font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.default}px;
|
|
1788
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
1789
1785
|
margin: 0;
|
|
1790
1786
|
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
1791
1787
|
font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.tablet}px;
|
|
@@ -1796,7 +1792,6 @@ function toStyledCSS(value) {
|
|
|
1796
1792
|
}
|
|
1797
1793
|
` : value.variant === "h3" ? css`
|
|
1798
1794
|
font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.default}px;
|
|
1799
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
1800
1795
|
margin: 0;
|
|
1801
1796
|
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
1802
1797
|
font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.tablet}px;
|
|
@@ -1807,7 +1802,6 @@ function toStyledCSS(value) {
|
|
|
1807
1802
|
}
|
|
1808
1803
|
` : value.variant === "h4" ? css`
|
|
1809
1804
|
font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.default}px;
|
|
1810
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
1811
1805
|
margin: 0;
|
|
1812
1806
|
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
1813
1807
|
font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.tablet}px;
|
|
@@ -1818,7 +1812,6 @@ function toStyledCSS(value) {
|
|
|
1818
1812
|
}
|
|
1819
1813
|
` : value.variant === "h5" ? css`
|
|
1820
1814
|
font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.default}px;
|
|
1821
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
1822
1815
|
margin: 0;
|
|
1823
1816
|
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
1824
1817
|
font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.tablet}px;
|
|
@@ -1829,7 +1822,6 @@ function toStyledCSS(value) {
|
|
|
1829
1822
|
}
|
|
1830
1823
|
` : value.variant === "h6" ? css`
|
|
1831
1824
|
font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.default}px;
|
|
1832
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
1833
1825
|
margin: 0;
|
|
1834
1826
|
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
1835
1827
|
font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.tablet}px;
|
|
@@ -1840,7 +1832,6 @@ function toStyledCSS(value) {
|
|
|
1840
1832
|
}
|
|
1841
1833
|
` : value.variant === "h7" ? css`
|
|
1842
1834
|
font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.default}px;
|
|
1843
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
1844
1835
|
margin: 0;
|
|
1845
1836
|
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
1846
1837
|
font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.tablet}px;
|
|
@@ -1851,7 +1842,6 @@ function toStyledCSS(value) {
|
|
|
1851
1842
|
}
|
|
1852
1843
|
` : value.variant === "h8" ? css`
|
|
1853
1844
|
font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.default}px;
|
|
1854
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
1855
1845
|
margin: 0;
|
|
1856
1846
|
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
1857
1847
|
font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.tablet}px;
|
|
@@ -1862,7 +1852,6 @@ function toStyledCSS(value) {
|
|
|
1862
1852
|
}
|
|
1863
1853
|
` : value.variant === "h9" ? css`
|
|
1864
1854
|
font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.default}px;
|
|
1865
|
-
line-height: ${(props) => props.theme.font.lineHeight};
|
|
1866
1855
|
margin: 0;
|
|
1867
1856
|
@media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
|
|
1868
1857
|
font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.tablet}px;
|
|
@@ -1902,7 +1891,7 @@ const TypographyCSS = css`
|
|
|
1902
1891
|
overflow: visible;
|
|
1903
1892
|
text-overflow: ellipsis;
|
|
1904
1893
|
overflow-wrap: anywhere;
|
|
1905
|
-
|
|
1894
|
+
${addFontSizeTransition};
|
|
1906
1895
|
${addSXTypography};
|
|
1907
1896
|
${addSX}
|
|
1908
1897
|
`;
|
|
@@ -4117,6 +4106,7 @@ const TypographyWithRef = (props) => {
|
|
|
4117
4106
|
style: props.style,
|
|
4118
4107
|
className: props.className,
|
|
4119
4108
|
$sx: props.sxStandard,
|
|
4109
|
+
$isTransitionFontSize: props.isTransitionFontSize,
|
|
4120
4110
|
$isDisabledOutline: props.isDisabledOutline,
|
|
4121
4111
|
$isOutlineBoxShadow: props.isOutlineBoxShadow,
|
|
4122
4112
|
$isReadOnly: props.isReadOnly,
|
|
@@ -4131,7 +4121,8 @@ const TypographyWithRef = (props) => {
|
|
|
4131
4121
|
props.onClick,
|
|
4132
4122
|
props.isDisabledOutline,
|
|
4133
4123
|
props.isOutlineBoxShadow,
|
|
4134
|
-
props.isReadOnly
|
|
4124
|
+
props.isReadOnly,
|
|
4125
|
+
props.isTransitionFontSize
|
|
4135
4126
|
]
|
|
4136
4127
|
);
|
|
4137
4128
|
const screenSX = useMemo(() => {
|
|
@@ -8553,4 +8544,4 @@ export {
|
|
|
8553
8544
|
addDateInputWrapperSize as y,
|
|
8554
8545
|
DateInputWrapper as z
|
|
8555
8546
|
};
|
|
8556
|
-
//# sourceMappingURL=context.constants-
|
|
8547
|
+
//# sourceMappingURL=context.constants-AVloP24q.js.map
|