freemium-ui 2.0.66 → 2.0.68
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 +44 -43
- package/lib/index.js +45 -44
- package/lib/package.json +1 -1
- package/package.json +1 -1
package/lib/index.cjs.js
CHANGED
|
@@ -17234,73 +17234,74 @@ e.preventDefault(),a?.("button",e)},"aria-label":i},i)),u&&e.createElement(Yy,{
|
|
|
17234
17234
|
asChild:!0},e.createElement(xm,{variant:"primary","aria-disabled":s,disabled:s,
|
|
17235
17235
|
onClick:e=>{e.preventDefault(),o?.(e)},"aria-label":u},u))))))
|
|
17236
17236
|
},exports.CrossIcon=ro,exports.DatePicker=t=>{
|
|
17237
|
-
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,language:l,errorText:c,id:s,
|
|
17237
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,language:l,errorText:c,id:s,todayButtonText:u="Today",clearButtonText:d="Clear",disabled:h,displayFormat:p="YYYY-MM-DD",portalContainer:f,...m}=t,v=document.querySelector('div[role="dialog"].DialogContent'),g=cr()
|
|
17238
17238
|
;return e.createElement(WN,{id:`date-picker-container-${s??""}`.trim(),
|
|
17239
|
-
"aria-invalid":i,dir:
|
|
17239
|
+
"aria-invalid":i,dir:g.direction},a&&e.createElement(Do,{htmlFor:t.id,
|
|
17240
17240
|
className:"input-label"
|
|
17241
17241
|
},a,a&&o&&e.createElement(Ao,null,"*")),e.createElement(GN,{$isErrored:i,
|
|
17242
17242
|
disabled:t.disabled}),e.createElement(vN,{canClearSelection:!0,
|
|
17243
|
-
closeOnSelection:!1,disabled:
|
|
17243
|
+
closeOnSelection:!1,disabled:h,todayButtonText:u,clearButtonText:d,
|
|
17244
17244
|
locale:l||"en",maxDate:FN(new Date).add(10,"years").toDate(),fill:!0,
|
|
17245
|
-
highlightCurrentDay:!0,inputProps:{placeholder:n||
|
|
17246
|
-
"aria-disabled":
|
|
17247
|
-
Dropdown:t=>e.createElement(qN,{...t,disabled:
|
|
17248
|
-
popoverProps:{minimal:!1,
|
|
17249
|
-
placement:"ltr"===
|
|
17250
|
-
portalContainer:
|
|
17251
|
-
formatDate:e=>e?FN(e).format(
|
|
17245
|
+
highlightCurrentDay:!0,inputProps:{placeholder:n||p,name:r,id:s,
|
|
17246
|
+
"aria-disabled":h},dayPickerProps:{disabled:h,dir:g.direction,components:{
|
|
17247
|
+
Dropdown:t=>e.createElement(qN,{...t,disabled:h})}},showActionsBar:!0,
|
|
17248
|
+
popoverProps:{hasBackdrop:!0,minimal:!1,
|
|
17249
|
+
placement:"ltr"===g.direction?"bottom-start":"bottom-end",usePortal:!0,
|
|
17250
|
+
portalContainer:f??(v||void 0)},parseDate:e=>e?FN(e).toDate():new Date,
|
|
17251
|
+
formatDate:e=>e?FN(e).format(p):"",...m}),i&&c&&e.createElement(lm,null,c))
|
|
17252
17252
|
},exports.DateRangePicker=t=>{
|
|
17253
|
-
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,disabled:s,clearButtonText:u="Clear",language:d,displayFormat:h="YYYY-MM-DD",...
|
|
17253
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,disabled:s,clearButtonText:u="Clear",language:d,displayFormat:h="YYYY-MM-DD",portalContainer:p,...f}=t,m=cr(),v=document.querySelector('div[role="dialog"].DialogContent')
|
|
17254
17254
|
;return e.createElement(WN,{id:`date-picker-container-${c??""}`.trim(),
|
|
17255
|
-
"aria-invalid":i,dir:
|
|
17255
|
+
"aria-invalid":i,dir:m.direction},a&&e.createElement(Do,{htmlFor:t.id,
|
|
17256
17256
|
className:"input-label"
|
|
17257
17257
|
},a,a&&o&&e.createElement(Ao,null,"*")),e.createElement(GN,{$isErrored:i,
|
|
17258
17258
|
disabled:t.disabled}),e.createElement(PN,{closeOnSelection:!1,disabled:s,
|
|
17259
17259
|
locale:d||"en",maxDate:FN(new Date).add(10,"years").toDate(),fill:!0,
|
|
17260
17260
|
highlightCurrentDay:!0,shortcuts:!1,startInputProps:{placeholder:n||h,name:r,
|
|
17261
17261
|
id:`start-${c}`,"aria-disabled":s},endInputProps:{placeholder:n||h,name:r,
|
|
17262
|
-
id:`end-${c}`,"aria-disabled":s},dayPickerProps:{disabled:s,dir:
|
|
17262
|
+
id:`end-${c}`,"aria-disabled":s},dayPickerProps:{disabled:s,dir:m.direction,
|
|
17263
17263
|
components:{Dropdown:t=>e.createElement(qN,{...t,disabled:s})}},
|
|
17264
17264
|
footerElement:e.createElement(YN,null,e.createElement(UN,{onClick:()=>{
|
|
17265
|
-
|
|
17266
|
-
placement:"ltr"===
|
|
17267
|
-
parseDate:e=>e?FN(e).toDate():new Date,
|
|
17268
|
-
}),i&&l&&e.createElement(lm,null,l))
|
|
17269
|
-
|
|
17265
|
+
f.onChange?.([null,null])}},u)),popoverProps:{hasBackdrop:!0,minimal:!1,
|
|
17266
|
+
placement:"ltr"===m.direction?"bottom-start":"bottom-end",usePortal:!0,
|
|
17267
|
+
portalContainer:p??(v||void 0)},parseDate:e=>e?FN(e).toDate():new Date,
|
|
17268
|
+
formatDate:e=>e?FN(e).format(h):"",...f}),i&&l&&e.createElement(lm,null,l))
|
|
17269
|
+
},exports.DateTimePicker=t=>{
|
|
17270
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,todayButtonText:s="Today",clearButtonText:u="Clear",language:d,disabled:h,displayFormat:p="YYYY-MM-DD hh:mm A",portalContainer:f,...m}=t,v=document.querySelector('div[role="dialog"].DialogContent'),g=cr()
|
|
17270
17271
|
;return e.createElement(WN,{id:`datetime-picker-container-${c??""}`.trim(),
|
|
17271
|
-
"aria-invalid":i,dir:
|
|
17272
|
+
"aria-invalid":i,dir:g.direction},a&&e.createElement(Do,{htmlFor:t.id,
|
|
17272
17273
|
className:"input-label"
|
|
17273
17274
|
},a,a&&o&&e.createElement(Ao,null,"*")),e.createElement(GN,{$isErrored:i,
|
|
17274
17275
|
disabled:t.disabled}),e.createElement(vN,{canClearSelection:!0,
|
|
17275
|
-
closeOnSelection:!1,disabled:
|
|
17276
|
+
closeOnSelection:!1,disabled:h,locale:d||"en",todayButtonText:s,
|
|
17276
17277
|
clearButtonText:u,maxDate:FN(new Date).add(10,"years").toDate(),
|
|
17277
17278
|
minDate:FN(new Date).subtract(100,"years").toDate(),fill:!0,
|
|
17278
|
-
highlightCurrentDay:!0,inputProps:{placeholder:n||
|
|
17279
|
-
"aria-disabled":
|
|
17280
|
-
Dropdown:t=>e.createElement(qN,{...t,disabled:
|
|
17279
|
+
highlightCurrentDay:!0,inputProps:{placeholder:n||p,name:r,id:c,
|
|
17280
|
+
"aria-disabled":h},dayPickerProps:{disabled:h,dir:g.direction,components:{
|
|
17281
|
+
Dropdown:t=>e.createElement(qN,{...t,disabled:h})}},showActionsBar:!0,
|
|
17281
17282
|
timePrecision:"minute",timePickerProps:{useAmPm:!0,showArrowButtons:!1},
|
|
17282
|
-
showTimezoneSelect:!1,disableTimezoneSelect:!0,popoverProps:{
|
|
17283
|
-
placement:"ltr"===
|
|
17284
|
-
portalContainer:
|
|
17285
|
-
formatDate:e=>e?FN(e).format(
|
|
17286
|
-
},exports.DateTimeRangePicker=t=>{
|
|
17287
|
-
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,clearButtonText:s="Clear",language:u,disabled:d,displayFormat:h="YYYY-MM-DD hh:mm A",...
|
|
17283
|
+
showTimezoneSelect:!1,disableTimezoneSelect:!0,popoverProps:{hasBackdrop:!0,
|
|
17284
|
+
minimal:!1,placement:"ltr"===g.direction?"bottom-start":"bottom-end",
|
|
17285
|
+
usePortal:!0,portalContainer:f??(v||void 0)},
|
|
17286
|
+
parseDate:e=>e?FN(e).toDate():new Date,formatDate:e=>e?FN(e).format(p):"",...m
|
|
17287
|
+
}),i&&l&&e.createElement(lm,null,l))},exports.DateTimeRangePicker=t=>{
|
|
17288
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,clearButtonText:s="Clear",language:u,disabled:d,displayFormat:h="YYYY-MM-DD hh:mm A",portalContainer:p,...f}=t,m=cr(),v=document.querySelector('div[role="dialog"].DialogContent')
|
|
17288
17289
|
;return e.createElement(WN,{id:`date-picker-container-${c??""}`.trim(),
|
|
17289
|
-
"aria-invalid":i,dir:
|
|
17290
|
+
"aria-invalid":i,dir:m.direction},a&&e.createElement(Do,{htmlFor:t.id,
|
|
17290
17291
|
className:"input-label"
|
|
17291
17292
|
},a,a&&o&&e.createElement(Ao,null,"*")),e.createElement(GN,{$isErrored:i,
|
|
17292
17293
|
disabled:t.disabled}),e.createElement(PN,{closeOnSelection:!1,disabled:d,
|
|
17293
17294
|
locale:u||"en",maxDate:FN(new Date).add(10,"years").toDate(),fill:!0,
|
|
17294
17295
|
highlightCurrentDay:!0,shortcuts:!1,startInputProps:{placeholder:n||h,name:r,
|
|
17295
17296
|
id:`start-${c}`,"aria-disabled":d},endInputProps:{placeholder:n||h,name:r,
|
|
17296
|
-
id:`end-${c}`,"aria-disabled":d},dayPickerProps:{disabled:d,dir:
|
|
17297
|
+
id:`end-${c}`,"aria-disabled":d},dayPickerProps:{disabled:d,dir:m.direction,
|
|
17297
17298
|
components:{Dropdown:t=>e.createElement(qN,{...t,disabled:d})}},
|
|
17298
17299
|
timePrecision:"minute",timePickerProps:{useAmPm:!0,showArrowButtons:!1},
|
|
17299
17300
|
footerElement:e.createElement(YN,null,e.createElement(UN,{onClick:()=>{
|
|
17300
|
-
|
|
17301
|
-
placement:"ltr"===
|
|
17302
|
-
parseDate:e=>e?FN(e).toDate():new Date,
|
|
17303
|
-
}),i&&l&&e.createElement(lm,null,l))
|
|
17301
|
+
f.onChange?.([null,null])}},s)),popoverProps:{hasBackdrop:!0,minimal:!1,
|
|
17302
|
+
placement:"ltr"===m.direction?"bottom-start":"bottom-end",usePortal:!0,
|
|
17303
|
+
portalContainer:p??(v||void 0)},parseDate:e=>e?FN(e).toDate():new Date,
|
|
17304
|
+
formatDate:e=>e?FN(e).format(h):"",...f}),i&&l&&e.createElement(lm,null,l))
|
|
17304
17305
|
},exports.Drawer=({isOpen:t,children:n,hideDismissIcon:r,customClass:o="",size:a="default",isFullHeight:i=!0,placement:l="right",clickOutToClose:c=!1,onDismiss:s})=>{
|
|
17305
17306
|
const u=cr(),d="rtl"===u.direction?"right"===l?"left":"right":l
|
|
17306
17307
|
;return e.createElement(rb,{open:t,onOpenChange:e=>{e||s?.()}
|
|
@@ -17504,31 +17505,31 @@ const{isRequired:n,label:r,isErrored:o,errorText:a,id:i,disabled:l,precision:c="
|
|
|
17504
17505
|
},r&&e.createElement(Do,{htmlFor:t.id,className:"input-label"
|
|
17505
17506
|
},r,r&&n&&e.createElement(Ao,null,"*")),e.createElement(BN,null,e.createElement(jN,{
|
|
17506
17507
|
className:"time-picker-input picker-hours",type:"number",
|
|
17507
|
-
placeholder:s?"hh":"HH",disabled:l,dir:h.direction,min:0,max:s?12:23,
|
|
17508
|
+
placeholder:s?"hh":"HH",disabled:l,dir:h.direction,min:s?1:0,max:s?12:23,
|
|
17508
17509
|
value:u?FN(new Date(u)).format(s?"hh":"HH"):"",onChange:e=>{
|
|
17509
|
-
const t=Number(e.target.value);if(s&&(t<
|
|
17510
|
+
const t=Number(e.target.value);if(s&&(t<1||t>12))return
|
|
17510
17511
|
;if(!s&&(t<0||t>23))return
|
|
17511
|
-
;const n=FN(new Date(u)).hour(s&&"PM"===
|
|
17512
|
-
;d?.(
|
|
17512
|
+
;const n=u?FN(new Date(u)):FN(),r=n.hour(s&&"PM"===n.format("A")?t+12:t)
|
|
17513
|
+
;d?.(r.toISOString())},isErrored:o,"aria-invalid":o,errorText:a
|
|
17513
17514
|
}),e.createElement("span",null,":"),e.createElement(jN,{
|
|
17514
17515
|
className:"time-picker-input picker-minutes",type:"number",placeholder:"mm",
|
|
17515
17516
|
disabled:l,dir:h.direction,min:0,max:59,value:u?FN(new Date(u)).format("mm"):"",
|
|
17516
17517
|
onChange:e=>{const t=Number(e.target.value);if(t<0||t>59)return
|
|
17517
|
-
;const n=FN(new Date(u)).minute(t);d?.(n.toISOString())},isErrored:o,
|
|
17518
|
+
;const n=(u?FN(new Date(u)):FN()).minute(t);d?.(n.toISOString())},isErrored:o,
|
|
17518
17519
|
"aria-invalid":o,errorText:a
|
|
17519
17520
|
}),("millisecond"===c||"second"===c)&&e.createElement(e.Fragment,null,e.createElement("span",null,":"),e.createElement(jN,{
|
|
17520
17521
|
className:"time-picker-input picker-seconds",type:"number",placeholder:"ss",
|
|
17521
17522
|
disabled:l,dir:h.direction,min:0,max:59,value:u?FN(new Date(u)).format("ss"):"",
|
|
17522
17523
|
onChange:e=>{const t=Number(e.target.value);if(t<0||t>59)return
|
|
17523
|
-
;const n=FN(new Date(u)).second(t);d?.(n.toISOString())},isErrored:o,
|
|
17524
|
+
;const n=(u?FN(new Date(u)):FN()).second(t);d?.(n.toISOString())},isErrored:o,
|
|
17524
17525
|
"aria-invalid":o,errorText:a
|
|
17525
17526
|
})),"millisecond"===c&&e.createElement(e.Fragment,null,e.createElement("span",null,":"),e.createElement(jN,{
|
|
17526
17527
|
className:"time-picker-input picker-milliseconds",type:"number",
|
|
17527
17528
|
placeholder:"SSS",disabled:l,dir:h.direction,min:0,max:999,
|
|
17528
17529
|
value:u?FN(new Date(u)).format("SSS"):"",onChange:e=>{
|
|
17529
17530
|
const t=Number(e.target.value);if(t<0||t>999)return
|
|
17530
|
-
;const n=FN(new Date(u)).millisecond(t);d?.(n.toISOString())},
|
|
17531
|
-
"aria-invalid":o,errorText:a})),s&&e.createElement(ab,{
|
|
17531
|
+
;const n=(u?FN(new Date(u)):FN()).millisecond(t);d?.(n.toISOString())},
|
|
17532
|
+
isErrored:o,"aria-invalid":o,errorText:a})),s&&e.createElement(ab,{
|
|
17532
17533
|
itemToString:e=>e?.name??"",placeholder:"--",style:{marginLeft:"4px"},
|
|
17533
17534
|
showTick:!1,defaultSelectedItem:u?ZN.find((e=>e.id===FN(u).format("A"))):null,
|
|
17534
17535
|
width:"65px",itemIdentifier:"id",items:ZN,onChange:e=>{
|
package/lib/index.js
CHANGED
|
@@ -13605,104 +13605,105 @@ defaultSelectedItem:n.find((t=>t.id===e.value))??null,style:e.style,
|
|
|
13605
13605
|
className:`${e.className??""} bp-custom-dropdown bp-custom-dropdown-${e.name??""}`.trim(),
|
|
13606
13606
|
onChange:t=>{e?.onChange?.({target:{value:t?.id}})}})}
|
|
13607
13607
|
return t.createElement(kb,{itemToString:()=>"",type:"button"})},EF=e=>{
|
|
13608
|
-
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,language:l,errorText:c,id:s,
|
|
13608
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,language:l,errorText:c,id:s,todayButtonText:u="Today",clearButtonText:d="Clear",disabled:h,displayFormat:p="YYYY-MM-DD",portalContainer:f,...m}=e,v=document.querySelector('div[role="dialog"].DialogContent'),g=Hr()
|
|
13609
13609
|
;return t.createElement(CF,{id:`date-picker-container-${s??""}`.trim(),
|
|
13610
|
-
"aria-invalid":i,dir:
|
|
13610
|
+
"aria-invalid":i,dir:g.direction},a&&t.createElement(Zo,{htmlFor:e.id,
|
|
13611
13611
|
className:"input-label"
|
|
13612
13612
|
},a,a&&o&&t.createElement(Jo,null,"*")),t.createElement(zF,{$isErrored:i,
|
|
13613
13613
|
disabled:e.disabled}),t.createElement(YN,{canClearSelection:!0,
|
|
13614
|
-
closeOnSelection:!1,disabled:
|
|
13614
|
+
closeOnSelection:!1,disabled:h,todayButtonText:u,clearButtonText:d,
|
|
13615
13615
|
locale:l||"en",maxDate:mF(new Date).add(10,"years").toDate(),fill:!0,
|
|
13616
|
-
highlightCurrentDay:!0,inputProps:{placeholder:n||
|
|
13617
|
-
"aria-disabled":
|
|
13618
|
-
Dropdown:e=>t.createElement(xF,{...e,disabled:
|
|
13619
|
-
popoverProps:{minimal:!1,
|
|
13620
|
-
placement:"ltr"===
|
|
13621
|
-
portalContainer:
|
|
13622
|
-
formatDate:e=>e?mF(e).format(
|
|
13616
|
+
highlightCurrentDay:!0,inputProps:{placeholder:n||p,name:r,id:s,
|
|
13617
|
+
"aria-disabled":h},dayPickerProps:{disabled:h,dir:g.direction,components:{
|
|
13618
|
+
Dropdown:e=>t.createElement(xF,{...e,disabled:h})}},showActionsBar:!0,
|
|
13619
|
+
popoverProps:{hasBackdrop:!0,minimal:!1,
|
|
13620
|
+
placement:"ltr"===g.direction?"bottom-start":"bottom-end",usePortal:!0,
|
|
13621
|
+
portalContainer:f??(v||void 0)},parseDate:e=>e?mF(e).toDate():new Date,
|
|
13622
|
+
formatDate:e=>e?mF(e).format(p):"",...m}),i&&c&&t.createElement(Dm,null,c))
|
|
13623
13623
|
},SF=e=>{
|
|
13624
|
-
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,todayButtonText:s="Today",clearButtonText:u="Clear",language:d,
|
|
13624
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,todayButtonText:s="Today",clearButtonText:u="Clear",language:d,disabled:h,displayFormat:p="YYYY-MM-DD hh:mm A",portalContainer:f,...m}=e,v=document.querySelector('div[role="dialog"].DialogContent'),g=Hr()
|
|
13625
13625
|
;return t.createElement(CF,{id:`datetime-picker-container-${c??""}`.trim(),
|
|
13626
|
-
"aria-invalid":i,dir:
|
|
13626
|
+
"aria-invalid":i,dir:g.direction},a&&t.createElement(Zo,{htmlFor:e.id,
|
|
13627
13627
|
className:"input-label"
|
|
13628
13628
|
},a,a&&o&&t.createElement(Jo,null,"*")),t.createElement(zF,{$isErrored:i,
|
|
13629
13629
|
disabled:e.disabled}),t.createElement(YN,{canClearSelection:!0,
|
|
13630
|
-
closeOnSelection:!1,disabled:
|
|
13630
|
+
closeOnSelection:!1,disabled:h,locale:d||"en",todayButtonText:s,
|
|
13631
13631
|
clearButtonText:u,maxDate:mF(new Date).add(10,"years").toDate(),
|
|
13632
13632
|
minDate:mF(new Date).subtract(100,"years").toDate(),fill:!0,
|
|
13633
|
-
highlightCurrentDay:!0,inputProps:{placeholder:n||
|
|
13634
|
-
"aria-disabled":
|
|
13635
|
-
Dropdown:e=>t.createElement(xF,{...e,disabled:
|
|
13633
|
+
highlightCurrentDay:!0,inputProps:{placeholder:n||p,name:r,id:c,
|
|
13634
|
+
"aria-disabled":h},dayPickerProps:{disabled:h,dir:g.direction,components:{
|
|
13635
|
+
Dropdown:e=>t.createElement(xF,{...e,disabled:h})}},showActionsBar:!0,
|
|
13636
13636
|
timePrecision:"minute",timePickerProps:{useAmPm:!0,showArrowButtons:!1},
|
|
13637
|
-
showTimezoneSelect:!1,disableTimezoneSelect:!0,popoverProps:{
|
|
13638
|
-
placement:"ltr"===
|
|
13639
|
-
portalContainer:
|
|
13640
|
-
formatDate:e=>e?mF(e).format(
|
|
13641
|
-
},_F=e=>{
|
|
13642
|
-
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,disabled:s,clearButtonText:u="Clear",language:d,displayFormat:h="YYYY-MM-DD",...
|
|
13637
|
+
showTimezoneSelect:!1,disableTimezoneSelect:!0,popoverProps:{hasBackdrop:!0,
|
|
13638
|
+
minimal:!1,placement:"ltr"===g.direction?"bottom-start":"bottom-end",
|
|
13639
|
+
usePortal:!0,portalContainer:f??(v||void 0)},
|
|
13640
|
+
parseDate:e=>e?mF(e).toDate():new Date,formatDate:e=>e?mF(e).format(p):"",...m
|
|
13641
|
+
}),i&&l&&t.createElement(Dm,null,l))},_F=e=>{
|
|
13642
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,disabled:s,clearButtonText:u="Clear",language:d,displayFormat:h="YYYY-MM-DD",portalContainer:p,...f}=e,m=Hr(),v=document.querySelector('div[role="dialog"].DialogContent')
|
|
13643
13643
|
;return t.createElement(CF,{id:`date-picker-container-${c??""}`.trim(),
|
|
13644
|
-
"aria-invalid":i,dir:
|
|
13644
|
+
"aria-invalid":i,dir:m.direction},a&&t.createElement(Zo,{htmlFor:e.id,
|
|
13645
13645
|
className:"input-label"
|
|
13646
13646
|
},a,a&&o&&t.createElement(Jo,null,"*")),t.createElement(zF,{$isErrored:i,
|
|
13647
13647
|
disabled:e.disabled}),t.createElement(dF,{closeOnSelection:!1,disabled:s,
|
|
13648
13648
|
locale:d||"en",maxDate:mF(new Date).add(10,"years").toDate(),fill:!0,
|
|
13649
13649
|
highlightCurrentDay:!0,shortcuts:!1,startInputProps:{placeholder:n||h,name:r,
|
|
13650
13650
|
id:`start-${c}`,"aria-disabled":s},endInputProps:{placeholder:n||h,name:r,
|
|
13651
|
-
id:`end-${c}`,"aria-disabled":s},dayPickerProps:{disabled:s,dir:
|
|
13651
|
+
id:`end-${c}`,"aria-disabled":s},dayPickerProps:{disabled:s,dir:m.direction,
|
|
13652
13652
|
components:{Dropdown:e=>t.createElement(xF,{...e,disabled:s})}},
|
|
13653
13653
|
footerElement:t.createElement(wF,null,t.createElement(bF,{onClick:()=>{
|
|
13654
|
-
|
|
13655
|
-
placement:"ltr"===
|
|
13656
|
-
parseDate:e=>e?mF(e).toDate():new Date,
|
|
13657
|
-
}),i&&l&&t.createElement(Dm,null,l))
|
|
13658
|
-
|
|
13654
|
+
f.onChange?.([null,null])}},u)),popoverProps:{hasBackdrop:!0,minimal:!1,
|
|
13655
|
+
placement:"ltr"===m.direction?"bottom-start":"bottom-end",usePortal:!0,
|
|
13656
|
+
portalContainer:p??(v||void 0)},parseDate:e=>e?mF(e).toDate():new Date,
|
|
13657
|
+
formatDate:e=>e?mF(e).format(h):"",...f}),i&&l&&t.createElement(Dm,null,l))
|
|
13658
|
+
},HF=e=>{
|
|
13659
|
+
const{placeholder:n,name:r,isRequired:o,label:a,isErrored:i,errorText:l,id:c,clearButtonText:s="Clear",language:u,disabled:d,displayFormat:h="YYYY-MM-DD hh:mm A",portalContainer:p,...f}=e,m=Hr(),v=document.querySelector('div[role="dialog"].DialogContent')
|
|
13659
13660
|
;return t.createElement(CF,{id:`date-picker-container-${c??""}`.trim(),
|
|
13660
|
-
"aria-invalid":i,dir:
|
|
13661
|
+
"aria-invalid":i,dir:m.direction},a&&t.createElement(Zo,{htmlFor:e.id,
|
|
13661
13662
|
className:"input-label"
|
|
13662
13663
|
},a,a&&o&&t.createElement(Jo,null,"*")),t.createElement(zF,{$isErrored:i,
|
|
13663
13664
|
disabled:e.disabled}),t.createElement(dF,{closeOnSelection:!1,disabled:d,
|
|
13664
13665
|
locale:u||"en",maxDate:mF(new Date).add(10,"years").toDate(),fill:!0,
|
|
13665
13666
|
highlightCurrentDay:!0,shortcuts:!1,startInputProps:{placeholder:n||h,name:r,
|
|
13666
13667
|
id:`start-${c}`,"aria-disabled":d},endInputProps:{placeholder:n||h,name:r,
|
|
13667
|
-
id:`end-${c}`,"aria-disabled":d},dayPickerProps:{disabled:d,dir:
|
|
13668
|
+
id:`end-${c}`,"aria-disabled":d},dayPickerProps:{disabled:d,dir:m.direction,
|
|
13668
13669
|
components:{Dropdown:e=>t.createElement(xF,{...e,disabled:d})}},
|
|
13669
13670
|
timePrecision:"minute",timePickerProps:{useAmPm:!0,showArrowButtons:!1},
|
|
13670
13671
|
footerElement:t.createElement(wF,null,t.createElement(bF,{onClick:()=>{
|
|
13671
|
-
|
|
13672
|
-
placement:"ltr"===
|
|
13673
|
-
parseDate:e=>e?mF(e).toDate():new Date,
|
|
13674
|
-
}),i&&l&&t.createElement(Dm,null,l))
|
|
13675
|
-
}],AF=e=>{
|
|
13672
|
+
f.onChange?.([null,null])}},s)),popoverProps:{hasBackdrop:!0,minimal:!1,
|
|
13673
|
+
placement:"ltr"===m.direction?"bottom-start":"bottom-end",usePortal:!0,
|
|
13674
|
+
portalContainer:p??(v||void 0)},parseDate:e=>e?mF(e).toDate():new Date,
|
|
13675
|
+
formatDate:e=>e?mF(e).format(h):"",...f}),i&&l&&t.createElement(Dm,null,l))
|
|
13676
|
+
},DF=[{id:"AM",name:"AM"},{id:"PM",name:"PM"}],AF=e=>{
|
|
13676
13677
|
const{isRequired:n,label:r,isErrored:o,errorText:a,id:i,disabled:l,precision:c="minute",useAmPm:s,value:u="",onChange:d}=e,h=Hr()
|
|
13677
13678
|
;return t.createElement(vF,{id:`datetime-picker-container-${i??""}`.trim()
|
|
13678
13679
|
},r&&t.createElement(Zo,{htmlFor:e.id,className:"input-label"
|
|
13679
13680
|
},r,r&&n&&t.createElement(Jo,null,"*")),t.createElement(gF,null,t.createElement(yF,{
|
|
13680
13681
|
className:"time-picker-input picker-hours",type:"number",
|
|
13681
|
-
placeholder:s?"hh":"HH",disabled:l,dir:h.direction,min:0,max:s?12:23,
|
|
13682
|
+
placeholder:s?"hh":"HH",disabled:l,dir:h.direction,min:s?1:0,max:s?12:23,
|
|
13682
13683
|
value:u?mF(new Date(u)).format(s?"hh":"HH"):"",onChange:e=>{
|
|
13683
|
-
const t=Number(e.target.value);if(s&&(t<
|
|
13684
|
+
const t=Number(e.target.value);if(s&&(t<1||t>12))return
|
|
13684
13685
|
;if(!s&&(t<0||t>23))return
|
|
13685
|
-
;const n=mF(new Date(u)).hour(s&&"PM"===
|
|
13686
|
-
;d?.(
|
|
13686
|
+
;const n=u?mF(new Date(u)):mF(),r=n.hour(s&&"PM"===n.format("A")?t+12:t)
|
|
13687
|
+
;d?.(r.toISOString())},isErrored:o,"aria-invalid":o,errorText:a
|
|
13687
13688
|
}),t.createElement("span",null,":"),t.createElement(yF,{
|
|
13688
13689
|
className:"time-picker-input picker-minutes",type:"number",placeholder:"mm",
|
|
13689
13690
|
disabled:l,dir:h.direction,min:0,max:59,value:u?mF(new Date(u)).format("mm"):"",
|
|
13690
13691
|
onChange:e=>{const t=Number(e.target.value);if(t<0||t>59)return
|
|
13691
|
-
;const n=mF(new Date(u)).minute(t);d?.(n.toISOString())},isErrored:o,
|
|
13692
|
+
;const n=(u?mF(new Date(u)):mF()).minute(t);d?.(n.toISOString())},isErrored:o,
|
|
13692
13693
|
"aria-invalid":o,errorText:a
|
|
13693
13694
|
}),("millisecond"===c||"second"===c)&&t.createElement(t.Fragment,null,t.createElement("span",null,":"),t.createElement(yF,{
|
|
13694
13695
|
className:"time-picker-input picker-seconds",type:"number",placeholder:"ss",
|
|
13695
13696
|
disabled:l,dir:h.direction,min:0,max:59,value:u?mF(new Date(u)).format("ss"):"",
|
|
13696
13697
|
onChange:e=>{const t=Number(e.target.value);if(t<0||t>59)return
|
|
13697
|
-
;const n=mF(new Date(u)).second(t);d?.(n.toISOString())},isErrored:o,
|
|
13698
|
+
;const n=(u?mF(new Date(u)):mF()).second(t);d?.(n.toISOString())},isErrored:o,
|
|
13698
13699
|
"aria-invalid":o,errorText:a
|
|
13699
13700
|
})),"millisecond"===c&&t.createElement(t.Fragment,null,t.createElement("span",null,":"),t.createElement(yF,{
|
|
13700
13701
|
className:"time-picker-input picker-milliseconds",type:"number",
|
|
13701
13702
|
placeholder:"SSS",disabled:l,dir:h.direction,min:0,max:999,
|
|
13702
13703
|
value:u?mF(new Date(u)).format("SSS"):"",onChange:e=>{
|
|
13703
13704
|
const t=Number(e.target.value);if(t<0||t>999)return
|
|
13704
|
-
;const n=mF(new Date(u)).millisecond(t);d?.(n.toISOString())},
|
|
13705
|
-
"aria-invalid":o,errorText:a})),s&&t.createElement(kb,{
|
|
13705
|
+
;const n=(u?mF(new Date(u)):mF()).millisecond(t);d?.(n.toISOString())},
|
|
13706
|
+
isErrored:o,"aria-invalid":o,errorText:a})),s&&t.createElement(kb,{
|
|
13706
13707
|
itemToString:e=>e?.name??"",placeholder:"--",style:{marginLeft:"4px"},
|
|
13707
13708
|
showTick:!1,defaultSelectedItem:u?DF.find((e=>e.id===mF(u).format("A"))):null,
|
|
13708
13709
|
width:"65px",itemIdentifier:"id",items:DF,onChange:e=>{
|
package/lib/package.json
CHANGED