freemium-ui 2.0.79 → 2.0.81
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/lib/index.cjs.js +48 -34
- package/lib/index.d.ts +4 -0
- package/lib/index.js +48 -34
- package/lib/package.json +1 -1
- package/package.json +1 -1
package/lib/index.cjs.js
CHANGED
|
@@ -4713,15 +4713,18 @@ onValueChange:e=>{if(s)return;const t=i.find((t=>t?.[r]===e));L(t),l?.(t??null)}
|
|
|
4713
4713
|
},e.createElement(am,{className:`SelectTrigger ${g??""}`.trim(),
|
|
4714
4714
|
"aria-label":o??"dropdown",disabled:u,id:a,$isErrored:!!w,"aria-invalid":!!w,
|
|
4715
4715
|
width:v,style:y},c||null!==b?A&&H?H(A):e.createElement(qp,{
|
|
4716
|
-
className
|
|
4717
|
-
}):e.createElement(Wp,null),e.createElement(om,{
|
|
4718
|
-
}
|
|
4719
|
-
|
|
4720
|
-
|
|
4716
|
+
className:`SelectValue ${g??""}`.trim(),placeholder:c
|
|
4717
|
+
}):e.createElement(Wp,null),e.createElement(om,{
|
|
4718
|
+
className:`SelectIcon ${g??""}`.trim()},e.createElement(no,{
|
|
4719
|
+
fill:n.colors.text.primary}))),e.createElement(Zp,{container:C
|
|
4720
|
+
},e.createElement(em,{className:`SelectContent ${g??""}`.trim(),
|
|
4721
|
+
position:"popper",side:"bottom",sideOffset:4,avoidCollisions:!0,
|
|
4722
|
+
$matchButtonWidth:E,..._
|
|
4721
4723
|
},z?e.createElement(jp,null,e.createElement(wm,null)):e.createElement(e.Fragment,null,e.createElement(nm,{
|
|
4722
|
-
className
|
|
4723
|
-
|
|
4724
|
-
|
|
4724
|
+
className:`SelectViewport ${g??""}`.trim()},D.map((t=>e.createElement(Kp,{
|
|
4725
|
+
key:t.key,className:`SelectGroup ${g??""}`.trim()
|
|
4726
|
+
},"default"!==t.key&&e.createElement(Qp,{className:`SelectLabel ${g??""}`.trim()
|
|
4727
|
+
},t.key,e.createElement(Jp,null)),t.items.map(((t,n)=>{
|
|
4725
4728
|
const o="string"==typeof t?t:t?.[r],a=t?.[r]??""
|
|
4726
4729
|
;return void 0!==a&&""!==a||console.warn("No value for item",{item:t,value:a
|
|
4727
4730
|
}),e.createElement(e.Fragment,null,m?m(t,{key:o,value:a??o,
|
|
@@ -13034,40 +13037,45 @@ defaultSelectedItem:n.find((e=>e.id===t.value))??null,style:t.style,
|
|
|
13034
13037
|
className:`${t.className??""} bp-custom-dropdown bp-custom-dropdown-${t.name??""}`.trim(),
|
|
13035
13038
|
onChange:e=>{t?.onChange?.({target:{value:e?.id}})}})}
|
|
13036
13039
|
return e.createElement(ab,{itemToString:()=>"",type:"button"})},eF=t=>{
|
|
13037
|
-
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,language:l,errorText:c,id:s,cancelButtonText:u="Cancel",updateButtonText:d="Update",disabled:h,displayFormat:f="YYYY-MM-DD",portalContainer:p,value:m,useTime:v,...
|
|
13040
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,language:l,errorText:c,id:s,cancelButtonText:u="Cancel",updateButtonText:d="Update",disabled:h,displayFormat:f="YYYY-MM-DD",portalContainer:p,value:m,useTime:v,dateToHilight:g,...y}=t,b=document.querySelector('div[role="dialog"].DialogContent'),w=cr(),C=e.useRef(m??null),[z,M]=e.useState(m??null),[x,E]=e.useState()
|
|
13038
13041
|
;return e.useEffect((()=>(window.addEventListener("popstate",(()=>{
|
|
13039
|
-
YN("DateRangePicker",{action:"Closing",useTime:v}),
|
|
13040
|
-
|
|
13042
|
+
YN("DateRangePicker",{action:"Closing",useTime:v}),E(!1),setTimeout((()=>{
|
|
13043
|
+
E(void 0)}),0)})),()=>{document.body.removeEventListener("popstate",(()=>{}))
|
|
13041
13044
|
})),[]),e.createElement(ZN,{
|
|
13042
13045
|
id:`${v?"datetime":"date"}-picker-container-${s??""}`.trim(),"aria-invalid":i,
|
|
13043
|
-
dir:
|
|
13046
|
+
dir:w.direction},a&&e.createElement(Do,{htmlFor:t.id,className:"input-label"
|
|
13044
13047
|
},a,a&&o&&e.createElement(Lo,null,"*")),e.createElement(XN,{$isErrored:i,
|
|
13045
13048
|
disabled:t.disabled}),e.createElement(CM,null,e.createElement(gN,{
|
|
13046
13049
|
canClearSelection:!0,closeOnSelection:!1,disabled:h,locale:l||"en-US",
|
|
13047
13050
|
maxDate:$N(new Date).add(10,"years").toDate(),
|
|
13048
13051
|
minDate:$N(new Date).subtract(100,"years").toDate(),fill:!0,
|
|
13049
13052
|
highlightCurrentDay:!0,inputProps:{placeholder:n||f,name:r,id:s,
|
|
13050
|
-
"aria-disabled":h},dayPickerProps:{disabled:h,dir:
|
|
13051
|
-
|
|
13053
|
+
"aria-disabled":h},dayPickerProps:{disabled:h,dir:w.direction,components:{...g?{
|
|
13054
|
+
Day:t=>{const n=e.useRef(null),r=$A(t.date,t.displayMonth,n),o={name:"day",
|
|
13055
|
+
type:"button",...r.buttonProps,
|
|
13056
|
+
className:r.buttonProps.className?.replace("rdp-day_today","")}
|
|
13057
|
+
;return $N(t.date).isSame($N(g),"day")&&(o.className=`${o.className||""} rdp-day_today`),
|
|
13058
|
+
e.createElement("button",{ref:n,...o})}}:{},Dropdown:t=>e.createElement(QN,{
|
|
13059
|
+
...t,disabled:h})}},showActionsBar:!1,
|
|
13052
13060
|
footerElement:u||d?e.createElement(qN,null,u&&e.createElement(xm,{
|
|
13053
|
-
variant:"secondary",disabled:h,onClick:()=>{
|
|
13054
|
-
|
|
13055
|
-
|
|
13061
|
+
variant:"secondary",disabled:h,onClick:()=>{M(m??null),E(!1),setTimeout((()=>{
|
|
13062
|
+
E(void 0)}),0)}},u),d&&e.createElement(xm,{disabled:(m??null)===z,onClick:()=>{
|
|
13063
|
+
y.onChange?.(z,!0),C.current=z,E(!1),setTimeout((()=>{E(void 0)}),0)}
|
|
13056
13064
|
},d)):void 0,popoverProps:{hasBackdrop:!0,canEscapeKeyClose:!0,minimal:!1,
|
|
13057
|
-
placement:"ltr"===
|
|
13058
|
-
onClosed:()=>{
|
|
13059
|
-
portalContainer:p??(
|
|
13065
|
+
placement:"ltr"===w.direction?"bottom-start":"bottom-end",usePortal:!0,
|
|
13066
|
+
onClosed:()=>{C.current!==z&&(y.onChange?.(z,!0),C.current=z)},
|
|
13067
|
+
portalContainer:p??(b||void 0),...void 0!==x?{isOpen:x}:{}},
|
|
13060
13068
|
parseDate:e=>e?$N(e).toDate():new Date,formatDate:e=>e?$N(e).format(f):"",...v?{
|
|
13061
13069
|
timePrecision:"minute",timePickerProps:{useAmPm:!0,showArrowButtons:!1},
|
|
13062
|
-
showTimezoneSelect:!1,disableTimezoneSelect:!0}:{},...
|
|
13063
|
-
value:
|
|
13064
|
-
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,disabled:s,cancelButtonText:u="Cancel",updateButtonText:d="Update",language:h,displayFormat:f="YYYY-MM-DD",portalContainer:p,value:m,useTime:v,...
|
|
13070
|
+
showTimezoneSelect:!1,disableTimezoneSelect:!0}:{},...y,onChange:e=>{M(e)},
|
|
13071
|
+
value:z??""})),i&&c&&e.createElement(lm,null,c))},tF=t=>{
|
|
13072
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,disabled:s,cancelButtonText:u="Cancel",updateButtonText:d="Update",language:h,displayFormat:f="YYYY-MM-DD",portalContainer:p,value:m,useTime:v,dateToHilight:g,...y}=t,b=document.querySelector('div[role="dialog"].DialogContent'),w=cr(),C=e.useRef(m??[null,null]),[z,M]=e.useState(m??[null,null]),[x,E]=e.useState()
|
|
13065
13073
|
;return e.useEffect((()=>(window.addEventListener("popstate",(()=>{
|
|
13066
|
-
YN("DateRangePicker",{action:"Closing",useTime:v}),
|
|
13067
|
-
|
|
13074
|
+
YN("DateRangePicker",{action:"Closing",useTime:v}),E(!1),setTimeout((()=>{
|
|
13075
|
+
E(void 0)}),0)})),()=>{document.body.removeEventListener("popstate",(()=>{}))
|
|
13068
13076
|
})),[]),e.createElement(ZN,{
|
|
13069
13077
|
id:`${v?"datetime":"date"}-range-picker-container-${c??""}`.trim(),
|
|
13070
|
-
"aria-invalid":i,dir:
|
|
13078
|
+
"aria-invalid":i,dir:w.direction},a&&e.createElement(Do,{htmlFor:t.id,
|
|
13071
13079
|
className:"input-label"
|
|
13072
13080
|
},a,a&&o&&e.createElement(Lo,null,"*")),e.createElement(XN,{
|
|
13073
13081
|
$inputLength:f.length-(v?1:0),$isErrored:i,disabled:t.disabled
|
|
@@ -13077,21 +13085,27 @@ minDate:$N(new Date).subtract(100,"years").toDate(),fill:!0,
|
|
|
13077
13085
|
highlightCurrentDay:!0,shortcuts:!1,startInputProps:{placeholder:n||f,name:r,
|
|
13078
13086
|
id:"start-date-picker-input","aria-disabled":s},endInputProps:{placeholder:n||f,
|
|
13079
13087
|
name:r,id:"end-date-picker-input","aria-disabled":s},dayPickerProps:{disabled:s,
|
|
13080
|
-
dir:
|
|
13088
|
+
dir:w.direction,components:{...g?{Day:t=>{
|
|
13089
|
+
const n=e.useRef(null),r=$A(t.date,t.displayMonth,n),o={name:"day",
|
|
13090
|
+
type:"button",...r.buttonProps,
|
|
13091
|
+
className:r.buttonProps.className?.replace("rdp-day_today","")}
|
|
13092
|
+
;return $N(t.date).isSame($N(g),"day")&&(o.className=`${o.className||""} rdp-day_today`),
|
|
13093
|
+
e.createElement("button",{ref:n,...o})}}:{},Dropdown:t=>e.createElement(QN,{
|
|
13094
|
+
...t,disabled:s})}},
|
|
13081
13095
|
footerElement:u||d?e.createElement(qN,null,u&&e.createElement(xm,{
|
|
13082
13096
|
variant:"secondary",disabled:s,onClick:()=>{
|
|
13083
|
-
|
|
13097
|
+
M(m??[null,null]),E(!1),setTimeout((()=>{E(void 0)}),0)}
|
|
13084
13098
|
},u),d&&e.createElement(xm,{
|
|
13085
|
-
disabled:(m??[null,null])?.[0]?.toISOString()===
|
|
13086
|
-
onClick:()=>{
|
|
13099
|
+
disabled:(m??[null,null])?.[0]?.toISOString()===z?.[0]?.toISOString()&&(m??[null,null])?.[1]?.toISOString()===z?.[1]?.toISOString(),
|
|
13100
|
+
onClick:()=>{y.onChange?.(z),C.current=z,E(!1),setTimeout((()=>{E(void 0)}),0)}
|
|
13087
13101
|
},d)):void 0,popoverProps:{hasBackdrop:!0,canEscapeKeyClose:!0,minimal:!1,
|
|
13088
|
-
placement:"ltr"===
|
|
13102
|
+
placement:"ltr"===w.direction?"bottom-start":"bottom-end",usePortal:!0,
|
|
13089
13103
|
onClosed:()=>{
|
|
13090
|
-
|
|
13091
|
-
|
|
13104
|
+
C.current?.[0]?.toISOString()===z?.[0]?.toISOString()&&C.current?.[1]?.toISOString()===z?.[1]?.toISOString()||(y.onChange?.(z),
|
|
13105
|
+
C.current=z)},portalContainer:p??(b||void 0),...void 0!==x?{isOpen:x}:{}},
|
|
13092
13106
|
parseDate:e=>e?$N(e).toDate():new Date,formatDate:e=>e?$N(e).format(f):"",...v?{
|
|
13093
13107
|
timePrecision:"minute",timePickerProps:{useAmPm:!0,showArrowButtons:!1}}:{},
|
|
13094
|
-
...
|
|
13108
|
+
...y,onChange:e=>{M(e)},value:z})),i&&l&&e.createElement(lm,null,l))},nF=[{
|
|
13095
13109
|
id:"AM",name:"AM"},{id:"PM",name:"PM"
|
|
13096
13110
|
}],rF="Popover",[oF,aF]=i(rF,[bh]),iF=bh(),[lF,cF]=oF(rF),sF=e.forwardRef(((t,n)=>{
|
|
13097
13111
|
const{__scopePopover:r,...o}=t,i=cF("PopoverTrigger",r),l=iF(r),c=s(n,i.triggerRef),u=e.createElement(b.button,a({
|
package/lib/index.d.ts
CHANGED
|
@@ -1003,6 +1003,10 @@ type DefaultProps = {
|
|
|
1003
1003
|
label?: string;
|
|
1004
1004
|
language?: string;
|
|
1005
1005
|
placeholder?: string;
|
|
1006
|
+
/**
|
|
1007
|
+
* Today's date according to the user's timezone in the YYYY-MM-DD format
|
|
1008
|
+
*/
|
|
1009
|
+
dateToHilight?: string;
|
|
1006
1010
|
/**
|
|
1007
1011
|
* Whether disabled select
|
|
1008
1012
|
*/
|
package/lib/index.js
CHANGED
|
@@ -4733,15 +4733,18 @@ onValueChange:e=>{if(s)return;const t=i.find((t=>t?.[r]===e));L(t),l?.(t??null)}
|
|
|
4733
4733
|
},t.createElement(_m,{className:`SelectTrigger ${g??""}`.trim(),
|
|
4734
4734
|
"aria-label":o??"dropdown",disabled:u,id:a,$isErrored:!!w,"aria-invalid":!!w,
|
|
4735
4735
|
width:v,style:y},c||null!==b?A&&H?H(A):t.createElement(gm,{
|
|
4736
|
-
className
|
|
4737
|
-
}):t.createElement(fm,null),t.createElement(Sm,{
|
|
4738
|
-
}
|
|
4739
|
-
|
|
4740
|
-
|
|
4736
|
+
className:`SelectValue ${g??""}`.trim(),placeholder:c
|
|
4737
|
+
}):t.createElement(fm,null),t.createElement(Sm,{
|
|
4738
|
+
className:`SelectIcon ${g??""}`.trim()},t.createElement(Mo,{
|
|
4739
|
+
fill:n.colors.text.primary}))),t.createElement(ym,{container:C
|
|
4740
|
+
},t.createElement(zm,{className:`SelectContent ${g??""}`.trim(),
|
|
4741
|
+
position:"popper",side:"bottom",sideOffset:4,avoidCollisions:!0,
|
|
4742
|
+
$matchButtonWidth:E,..._
|
|
4741
4743
|
},z?t.createElement(dm,null,t.createElement(Bm,null)):t.createElement(t.Fragment,null,t.createElement(xm,{
|
|
4742
|
-
className
|
|
4743
|
-
|
|
4744
|
-
|
|
4744
|
+
className:`SelectViewport ${g??""}`.trim()},D.map((e=>t.createElement(vm,{
|
|
4745
|
+
key:e.key,className:`SelectGroup ${g??""}`.trim()
|
|
4746
|
+
},"default"!==e.key&&t.createElement(Cm,{className:`SelectLabel ${g??""}`.trim()
|
|
4747
|
+
},e.key,t.createElement(wm,null)),e.items.map(((e,n)=>{
|
|
4745
4748
|
const o="string"==typeof e?e:e?.[r],a=e?.[r]??""
|
|
4746
4749
|
;return void 0!==a&&""!==a||console.warn("No value for item",{item:e,value:a
|
|
4747
4750
|
}),t.createElement(t.Fragment,null,m?m(e,{key:o,value:a??o,
|
|
@@ -13104,42 +13107,47 @@ defaultSelectedItem:n.find((t=>t.id===e.value))??null,style:e.style,
|
|
|
13104
13107
|
className:`${e.className??""} bp-custom-dropdown bp-custom-dropdown-${e.name??""}`.trim(),
|
|
13105
13108
|
onChange:t=>{e?.onChange?.({target:{value:t?.id}})}})}
|
|
13106
13109
|
return t.createElement(Vb,{itemToString:()=>"",type:"button"})},DF=e=>{
|
|
13107
|
-
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,language:l,errorText:c,id:s,cancelButtonText:u="Cancel",updateButtonText:d="Update",disabled:h,displayFormat:p="YYYY-MM-DD",portalContainer:f,value:m,useTime:v,...
|
|
13110
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,language:l,errorText:c,id:s,cancelButtonText:u="Cancel",updateButtonText:d="Update",disabled:h,displayFormat:p="YYYY-MM-DD",portalContainer:f,value:m,useTime:v,dateToHilight:g,...y}=e,b=document.querySelector('div[role="dialog"].DialogContent'),w=Hr(),C=t.useRef(m??null),[z,M]=t.useState(m??null),[x,E]=t.useState()
|
|
13108
13111
|
;return t.useEffect((()=>(window.addEventListener("popstate",(()=>{
|
|
13109
|
-
wF("DateRangePicker",{action:"Closing",useTime:v}),
|
|
13110
|
-
|
|
13112
|
+
wF("DateRangePicker",{action:"Closing",useTime:v}),E(!1),setTimeout((()=>{
|
|
13113
|
+
E(void 0)}),0)})),()=>{document.body.removeEventListener("popstate",(()=>{}))
|
|
13111
13114
|
})),[]),t.createElement(EF,{
|
|
13112
13115
|
id:`${v?"datetime":"date"}-picker-container-${s??""}`.trim(),"aria-invalid":i,
|
|
13113
|
-
dir:
|
|
13116
|
+
dir:w.direction},a&&t.createElement(Zo,{htmlFor:e.id,className:"input-label"
|
|
13114
13117
|
},a,a&&o&&t.createElement(Jo,null,"*")),t.createElement(SF,{$isErrored:i,
|
|
13115
13118
|
disabled:e.disabled}),t.createElement(ZM,null,t.createElement(WN,{
|
|
13116
13119
|
canClearSelection:!0,closeOnSelection:!1,disabled:h,locale:l||"en-US",
|
|
13117
13120
|
maxDate:vF(new Date).add(10,"years").toDate(),
|
|
13118
13121
|
minDate:vF(new Date).subtract(100,"years").toDate(),fill:!0,
|
|
13119
13122
|
highlightCurrentDay:!0,inputProps:{placeholder:n||p,name:r,id:s,
|
|
13120
|
-
"aria-disabled":h},dayPickerProps:{disabled:h,dir:
|
|
13121
|
-
|
|
13123
|
+
"aria-disabled":h},dayPickerProps:{disabled:h,dir:w.direction,components:{...g?{
|
|
13124
|
+
Day:e=>{const n=t.useRef(null),r=vL(e.date,e.displayMonth,n),o={name:"day",
|
|
13125
|
+
type:"button",...r.buttonProps,
|
|
13126
|
+
className:r.buttonProps.className?.replace("rdp-day_today","")}
|
|
13127
|
+
;return vF(e.date).isSame(vF(g),"day")&&(o.className=`${o.className||""} rdp-day_today`),
|
|
13128
|
+
t.createElement("button",{ref:n,...o})}}:{},Dropdown:e=>t.createElement(HF,{
|
|
13129
|
+
...e,disabled:h})}},showActionsBar:!1,
|
|
13122
13130
|
footerElement:u||d?t.createElement(xF,null,u&&t.createElement(Gm,{
|
|
13123
|
-
variant:"secondary",disabled:h,onClick:()=>{
|
|
13124
|
-
|
|
13125
|
-
|
|
13131
|
+
variant:"secondary",disabled:h,onClick:()=>{M(m??null),E(!1),setTimeout((()=>{
|
|
13132
|
+
E(void 0)}),0)}},u),d&&t.createElement(Gm,{disabled:(m??null)===z,onClick:()=>{
|
|
13133
|
+
y.onChange?.(z,!0),C.current=z,E(!1),setTimeout((()=>{E(void 0)}),0)}
|
|
13126
13134
|
},d)):void 0,popoverProps:{hasBackdrop:!0,canEscapeKeyClose:!0,minimal:!1,
|
|
13127
|
-
placement:"ltr"===
|
|
13128
|
-
onClosed:()=>{
|
|
13129
|
-
portalContainer:f??(
|
|
13135
|
+
placement:"ltr"===w.direction?"bottom-start":"bottom-end",usePortal:!0,
|
|
13136
|
+
onClosed:()=>{C.current!==z&&(y.onChange?.(z,!0),C.current=z)},
|
|
13137
|
+
portalContainer:f??(b||void 0),...void 0!==x?{isOpen:x}:{}},
|
|
13130
13138
|
parseDate:e=>e?vF(e).toDate():new Date,formatDate:e=>e?vF(e).format(p):"",...v?{
|
|
13131
13139
|
timePrecision:"minute",timePickerProps:{useAmPm:!0,showArrowButtons:!1},
|
|
13132
|
-
showTimezoneSelect:!1,disableTimezoneSelect:!0}:{},...
|
|
13133
|
-
value:
|
|
13140
|
+
showTimezoneSelect:!1,disableTimezoneSelect:!0}:{},...y,onChange:e=>{M(e)},
|
|
13141
|
+
value:z??""})),i&&c&&t.createElement(Dm,null,c))},AF=e=>{
|
|
13134
13142
|
const{displayFormat:n="YYYY-MM-DD hh:mm A",...r}=e;return t.createElement(DF,{
|
|
13135
13143
|
...r,displayFormat:n,useTime:!0})},LF=e=>{
|
|
13136
|
-
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,disabled:s,cancelButtonText:u="Cancel",updateButtonText:d="Update",language:h,displayFormat:p="YYYY-MM-DD",portalContainer:f,value:m,useTime:v,...
|
|
13144
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,disabled:s,cancelButtonText:u="Cancel",updateButtonText:d="Update",language:h,displayFormat:p="YYYY-MM-DD",portalContainer:f,value:m,useTime:v,dateToHilight:g,...y}=e,b=document.querySelector('div[role="dialog"].DialogContent'),w=Hr(),C=t.useRef(m??[null,null]),[z,M]=t.useState(m??[null,null]),[x,E]=t.useState()
|
|
13137
13145
|
;return t.useEffect((()=>(window.addEventListener("popstate",(()=>{
|
|
13138
|
-
wF("DateRangePicker",{action:"Closing",useTime:v}),
|
|
13139
|
-
|
|
13146
|
+
wF("DateRangePicker",{action:"Closing",useTime:v}),E(!1),setTimeout((()=>{
|
|
13147
|
+
E(void 0)}),0)})),()=>{document.body.removeEventListener("popstate",(()=>{}))
|
|
13140
13148
|
})),[]),t.createElement(EF,{
|
|
13141
13149
|
id:`${v?"datetime":"date"}-range-picker-container-${c??""}`.trim(),
|
|
13142
|
-
"aria-invalid":i,dir:
|
|
13150
|
+
"aria-invalid":i,dir:w.direction},a&&t.createElement(Zo,{htmlFor:e.id,
|
|
13143
13151
|
className:"input-label"
|
|
13144
13152
|
},a,a&&o&&t.createElement(Jo,null,"*")),t.createElement(SF,{
|
|
13145
13153
|
$inputLength:p.length-(v?1:0),$isErrored:i,disabled:e.disabled
|
|
@@ -13149,21 +13157,27 @@ minDate:vF(new Date).subtract(100,"years").toDate(),fill:!0,
|
|
|
13149
13157
|
highlightCurrentDay:!0,shortcuts:!1,startInputProps:{placeholder:n||p,name:r,
|
|
13150
13158
|
id:"start-date-picker-input","aria-disabled":s},endInputProps:{placeholder:n||p,
|
|
13151
13159
|
name:r,id:"end-date-picker-input","aria-disabled":s},dayPickerProps:{disabled:s,
|
|
13152
|
-
dir:
|
|
13160
|
+
dir:w.direction,components:{...g?{Day:e=>{
|
|
13161
|
+
const n=t.useRef(null),r=vL(e.date,e.displayMonth,n),o={name:"day",
|
|
13162
|
+
type:"button",...r.buttonProps,
|
|
13163
|
+
className:r.buttonProps.className?.replace("rdp-day_today","")}
|
|
13164
|
+
;return vF(e.date).isSame(vF(g),"day")&&(o.className=`${o.className||""} rdp-day_today`),
|
|
13165
|
+
t.createElement("button",{ref:n,...o})}}:{},Dropdown:e=>t.createElement(HF,{
|
|
13166
|
+
...e,disabled:s})}},
|
|
13153
13167
|
footerElement:u||d?t.createElement(xF,null,u&&t.createElement(Gm,{
|
|
13154
13168
|
variant:"secondary",disabled:s,onClick:()=>{
|
|
13155
|
-
|
|
13169
|
+
M(m??[null,null]),E(!1),setTimeout((()=>{E(void 0)}),0)}
|
|
13156
13170
|
},u),d&&t.createElement(Gm,{
|
|
13157
|
-
disabled:(m??[null,null])?.[0]?.toISOString()===
|
|
13158
|
-
onClick:()=>{
|
|
13171
|
+
disabled:(m??[null,null])?.[0]?.toISOString()===z?.[0]?.toISOString()&&(m??[null,null])?.[1]?.toISOString()===z?.[1]?.toISOString(),
|
|
13172
|
+
onClick:()=>{y.onChange?.(z),C.current=z,E(!1),setTimeout((()=>{E(void 0)}),0)}
|
|
13159
13173
|
},d)):void 0,popoverProps:{hasBackdrop:!0,canEscapeKeyClose:!0,minimal:!1,
|
|
13160
|
-
placement:"ltr"===
|
|
13174
|
+
placement:"ltr"===w.direction?"bottom-start":"bottom-end",usePortal:!0,
|
|
13161
13175
|
onClosed:()=>{
|
|
13162
|
-
|
|
13163
|
-
|
|
13176
|
+
C.current?.[0]?.toISOString()===z?.[0]?.toISOString()&&C.current?.[1]?.toISOString()===z?.[1]?.toISOString()||(y.onChange?.(z),
|
|
13177
|
+
C.current=z)},portalContainer:f??(b||void 0),...void 0!==x?{isOpen:x}:{}},
|
|
13164
13178
|
parseDate:e=>e?vF(e).toDate():new Date,formatDate:e=>e?vF(e).format(p):"",...v?{
|
|
13165
13179
|
timePrecision:"minute",timePickerProps:{useAmPm:!0,showArrowButtons:!1}}:{},
|
|
13166
|
-
...
|
|
13180
|
+
...y,onChange:e=>{M(e)},value:z})),i&&l&&t.createElement(Dm,null,l))},VF=e=>{
|
|
13167
13181
|
const{displayFormat:n="YYYY-MM-DD hh:mm A",...r}=e;return t.createElement(LF,{
|
|
13168
13182
|
...r,displayFormat:n,useTime:!0})},kF=[{id:"AM",name:"AM"},{id:"PM",name:"PM"
|
|
13169
13183
|
}],TF=e=>{
|
package/lib/package.json
CHANGED