@spscommerce/ds-react 8.53.25 → 8.53.27
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.js +3 -3
- package/lib/index.umd.cjs +1 -1
- package/package.json +12 -12
package/lib/index.js
CHANGED
|
@@ -11939,7 +11939,7 @@ Bn.indexOf("en-US24") === -1 && Fe.defineLocale("en-US24", {
|
|
|
11939
11939
|
}
|
|
11940
11940
|
});
|
|
11941
11941
|
Bn.indexOf("en-PH") === -1 && (Fe.defineLocale("en-PH", {
|
|
11942
|
-
parentLocale: "en-
|
|
11942
|
+
parentLocale: "en-gb"
|
|
11943
11943
|
}), Fe.updateLocale("en-PH", {
|
|
11944
11944
|
longDateFormat: {
|
|
11945
11945
|
LT: "h:mm A",
|
|
@@ -11947,7 +11947,7 @@ Bn.indexOf("en-PH") === -1 && (Fe.defineLocale("en-PH", {
|
|
|
11947
11947
|
}
|
|
11948
11948
|
}));
|
|
11949
11949
|
Bn.indexOf("en-IN") === -1 && (Fe.defineLocale("en-IN", {
|
|
11950
|
-
parentLocale: "en-
|
|
11950
|
+
parentLocale: "en-gb"
|
|
11951
11951
|
}), Fe.updateLocale("en-IN", {
|
|
11952
11952
|
longDateFormat: {
|
|
11953
11953
|
LT: "h:mm A",
|
|
@@ -11963,7 +11963,7 @@ Bn.indexOf("en-SG") === -1 && (Fe.defineLocale("en-SG", {
|
|
|
11963
11963
|
}
|
|
11964
11964
|
}));
|
|
11965
11965
|
Bn.indexOf("en-HK") === -1 && Fe.defineLocale("en-HK", {
|
|
11966
|
-
parentLocale: "en-
|
|
11966
|
+
parentLocale: "en-gb"
|
|
11967
11967
|
});
|
|
11968
11968
|
Fe.locale(cy);
|
|
11969
11969
|
function vo() {
|
package/lib/index.umd.cjs
CHANGED
|
@@ -1152,7 +1152,7 @@ Valid keys: `+JSON.stringify(Object.keys(E),null," "));var Q=U(X,ee,te,ne,W+"."
|
|
|
1152
1152
|
</>
|
|
1153
1153
|
)
|
|
1154
1154
|
}
|
|
1155
|
-
`}}}},Dy=pn.default||pn;function Ny(){return new Array(7).fill(null)}function vd(e){const t=Dy({year:e.year,month:e.month-1,date:1}),n=t.weekday(),o=t.daysInMonth(),a=Math.ceil((o+n)/7),s=a*7,i=new Array(a).fill(!0).map(Ny);t.subtract(n,"days");for(let l=0;l<s;l+=1){const c=i[Math.floor(l/7)],d=l%7;c[d]=Object.freeze({year:t.year(),month:t.month()+1,date:t.date()}),d===6&&Object.freeze(c),t.add(1,"day")}return i}function yd(e){const[t,n]=r.useState(()=>vd(e));return r.useEffect(()=>{n(vd(e))},[e]),t}function Ed(e){const[t,n]=r.useState(()=>j.toMoment(e));return r.useEffect(()=>n(j.toMoment(e)),[e]),t}function Xo(e){const t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}function _t(e,t,n){const o={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[`${e} Tage`,`${e} Tagen`],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[`${e} Monate`,`${e} Monaten`],y:["ein Jahr","einem Jahr"],yy:[`${e} Jahre`,`${e} Jahren`]};return t?o[n][0]:o[n][1]}function Iy(e){e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:_t,mm:"%d Minuten",h:_t,hh:"%d Stunden",d:_t,dd:_t,w:_t,ww:"%d Wochen",M:_t,MM:_t,y:_t,yy:_t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}function xy(e){e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:Xo,week:{dow:0,doy:4}})}function ky(e){e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:Xo})}function My(e){e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:Xo,week:{dow:1,doy:4}})}function Ly(e){e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:Xo,week:{dow:1,doy:4}})}function _y(e){const t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(o,a){return o?a.includes("-MMM-")?n[o.month()]:t[o.month()]:t},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay(){return`[hoy a la${this.hours()!==1?"s":""}] LT`},nextDay(){return`[mañana a la${this.hours()!==1?"s":""}] LT`},nextWeek(){return`dddd [a la${this.hours()!==1?"s":""}] LT`},lastDay(){return`[ayer a la${this.hours()!==1?"s":""}] LT`},lastWeek(){return`[el] dddd [pasado a la${this.hours()!==1?"s":""}] LT`},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}function Py(e){e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(t,n){switch(n){case"D":return t+(t===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return t+(t===1?"er":"e");case"w":case"W":return t+(t===1?"re":"e")}},week:{dow:1,doy:4}})}function By(e){e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(t,n){switch(n){default:case"M":case"Q":case"D":case"DDD":case"d":return t+(t===1?"er":"e");case"w":case"W":return t+(t===1?"re":"e")}}})}function Oy(e){e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay(){return`[Oggi a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`},nextDay(){return`[Domani a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`},nextWeek(){return`dddd [a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`},lastDay(){return`[Ieri a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`},lastWeek(){return this.day()===0?`[La scorsa] dddd [a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`:`[Lo scorso] dddd [a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}function Ry(e){const t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(o,a){return o?a.includes("-MMM-")?n[o.month()]:t[o.month()]:t},monthsParseExact:!0,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal(o){return o+(o===1||o===8||o>=20?"ste":"de")},week:{dow:1,doy:4}})}function Fy(e){e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour(t,n){return t===12&&(t=0),n==="凌晨"||n==="早上"||n==="上午"?t:n==="下午"||n==="晚上"?t+12:t>=11?t:t+12},meridiem(t,n){const o=t*100+n;return o<600?"凌晨":o<900?"早上":o<1130?"上午":o<1230?"中午":o<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek(t){return t.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek(t){return this.week()!==t.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(t,n){switch(n){case"d":case"D":case"DDD":return`${t}日`;case"M":return`${t}月`;case"w":case"W":return`${t}周`;default:return String(t)}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}function Ay(e){e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour(t,n){return t===12&&(t=0),n==="凌晨"||n==="早上"||n==="上午"?t:n==="中午"?t>=11?t:t+12:n==="下午"||n==="晚上"?t+12:t},meridiem(t,n){const o=t*100+n;return o<600?"凌晨":o<900?"早上":o<1130?"上午":o<1230?"中午":o<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(t,n){switch(n){case"d":case"D":case"DDD":return`${t}日`;case"M":return`${t}月`;case"w":case"W":return`${t}週`;default:return String(t)}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}function $y(e){const t=e.locale();Iy(e),xy(e),ky(e),My(e),Ly(e),_y(e),Py(e),By(e),Oy(e),Ry(e),Fy(e),Ay(e),e.locale(t)}$y(xe);const Vy=xe.locale(),Nn=xe.locales();Nn.indexOf("en-US")===-1&&xe.defineLocale("en-US",{parentLocale:"en",longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY @ LT",LLLL:"dddd MMMM D, YYYY @ LT"}}),Nn.indexOf("en-US24")===-1&&xe.defineLocale("en-US24",{parentLocale:"en-US",longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss"}}),Nn.indexOf("en-PH")===-1&&(xe.defineLocale("en-PH",{parentLocale:"en-GB"}),xe.updateLocale("en-PH",{longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A"}})),Nn.indexOf("en-IN")===-1&&(xe.defineLocale("en-IN",{parentLocale:"en-GB"}),xe.updateLocale("en-IN",{longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",ll:"D-MMM-YYYY"}})),Nn.indexOf("en-SG")===-1&&(xe.defineLocale("en-SG",{parentLocale:"en-IN"}),xe.updateLocale("en-SG",{longDateFormat:{ll:"D MMM YYYY"}})),Nn.indexOf("en-HK")===-1&&xe.defineLocale("en-HK",{parentLocale:"en-GB"}),xe.locale(Vy);function Zo(){return typeof window>"u"?"en-US":window.navigator.languages?.[0]||window.navigator.language||"en-US"}function Td(e){if(typeof Intl>"u"||typeof Intl.DateTimeFormat!="function")return!1;try{const t=e??Zo();return new Intl.DateTimeFormat(t,{hour:"numeric"}).resolvedOptions().hour12===!1}catch{return!1}}function wd(e){const t=e??Zo();return xe().locale(t).locale()}function Ky(e){if(!e)return"en";const t=e.toLowerCase().replace(/_/g,"-"),n=xe.locales();if(n.includes(t))return t;const o=t.split("-")[0];return n.includes(o)?o:"en"}const Cd=r.createContext(void 0);function Hy({currentUser:e,locale:t,children:n}){const o=r.useMemo(()=>({currentUser:e,locale:t}),[e,t]);return r.createElement(Cd.Provider,{value:o},n)}function Wy(){const[e,t]=r.useState(Se.i18n.isInitialized?Se.i18n.language:void 0);return r.useEffect(()=>{const n=()=>t(Se.i18n.language);return Se.i18n.on("initialized",n),Se.i18n.on("languageChanged",n),()=>{Se.i18n.off("initialized",n),Se.i18n.off("languageChanged",n)}},[]),e}function io(e){const t=r.useContext(Cd),n=Wy();return e?.preferences?.locale||e?.acting_entity?.user_info?.preferences?.locale||t?.locale||t?.currentUser?.preferences?.locale||t?.currentUser?.acting_entity?.user_info?.preferences?.locale||(n?Ky(n):void 0)||Zo()}const Gy=pn.default||pn,Ue="sps-datepicker__calendar";function lo({maxDate:e,selectedDate:t,selectedRange:n}){const o=n?j.nullifyInvalidDate(n[0])||j.nullifyInvalidDate(n[1]):null;return j.nullifyInvalidDate(t)||o||j.nullifyInvalidDate(e)||j.create()}function Qo(e){const{children:t,className:n,isOpen:o,maxDate:a,minDate:s,currentUser:i,onNewSelection:l,selectedDate:c,selectedRange:d,selectedPreset:m,showTwoMonths:u=!1,"data-testid":p,...f}=e,{t:g}=Se.useWoodlandLanguage(),b=io(i),v=r.useMemo(()=>wd(b),[b]),y=r.useMemo(()=>Gy.localeData(v).weekdaysShort(),[v]),[h,I]=r.useState(()=>lo(e)),[C,D]=r.useState(j.nextMonth({...h,date:15})),L=r.useMemo(()=>j.create(),[]);r.useEffect(()=>{if(d&&d[0]&&d[1]&&d[0].month!==h.month&&d[0].month!==C.month&&d[1].month!==h.month&&d[1].month!==C.month){const N=lo(e);I(N),D(j.nextMonth({month:N.month,date:15,year:N.year}))}else if(d&&d[0]&&!d[1]&&d[0].month!==h.month&&d[0].month!==C.month){const N=lo(e);I(N),D(j.nextMonth({month:N.month,date:15,year:N.year}))}else if(d&&!d[0]&&d[1]&&d[1].month!==h.month&&d[1].month!==C.month){const N=lo(e);I(N),D(j.nextMonth({month:N.month,date:15,year:N.year}))}else{const N=lo(e);I(N),D(j.nextMonth({month:N.month,date:15,year:N.year}))}},[c,d,a,o]);const F=Ed(h),O=yd(h),_=Ed(C),R=yd(C),[H,Z]=r.useState();function V(){I(j.prevMonth({...h,date:15})),u&&D(j.prevMonth({...C,date:15}))}function w(){I(j.nextMonth({...h,date:15})),u&&D(j.nextMonth({...C,date:15}))}function $(N){N.target&&N.target.classList.contains(`${Ue}-day`)?u&&N.target.classList.contains(`${C.month}`)?Z({...C,date:Number(N.target.textContent)}):Z({...h,date:Number(N.target.textContent)}):(!N.target||!N.target.classList.contains(`${Ue}-row`))&&Z(void 0)}function B(N,E=!1){const k=`${Ue}-day`;return K(`${Ue}-cell`,N&&h&&N.month===h.month&&!E&&k,u&&N.month===C.month&&E&&k,j.isSameDate(L,N)&&`${k}--current-day`,(j.isSameDate(N,c)&&j.isInRange(N,[s,a])!==!1||d&&j.isSameDate(N,d[0])||j.isInRange(N,d))&&`${k}--selected`,j.isInRange(N,[s,a])===!1&&`${k}--disabled`,d&&d[1]&&j.isSameDate(N,d[0])&&!j.isSameDate(N,d[1])&&`${k}--selection-start`,j.isInRange(N,d,!1)&&`${k}--selection-middle`,d&&j.isSameDate(N,d[1])&&!j.isSameDate(N,d[0])&&`${k}--selection-end`,d&&d[0]&&!d[1]&&(!s&&!a||j.isInRange(H,[s,a]))&&j.isInRange(N,[d[0],H],!1)&&`${k}--pending-selection`,m&&m==="After"&&d&&d[0]&&d[1]===null&&(!s&&!a||j.isInRange(N,[d[0],a]))&&j.isInRange(N,[d[0],{month:12,date:31,year:3e3}],!1)&&`${k}--selected`,m&&m==="Before"&&d&&d[0]===null&&d[1]&&(!s&&!a||j.isInRange(N,[s,d[1]]))&&j.isInRange(N,[{month:1,date:1,year:1900},d[1]])&&`${k}--selected`)}function M(N){N&&h&&N.month===h.month&&j.isInRange(N,[s,a])!==!1&&l(N),N&&u&&C&&N.month===C.month&&j.isInRange(N,[s,a])!==!1&&l(N)}const q=K(Ue,n);return h?r.createElement(r.Fragment,null,r.createElement("div",{"data-testid":`${p}`,className:q,...f,onMouseOver:$},r.createElement("div",{className:`${Ue}-head`},r.createElement("button",{"data-testid":`${p}_prev_month`,type:"button",tabIndex:-1,disabled:j.isSameMonth(h,s),title:g("datepicker.calendar.prevMonth",{defaultValue:"View Previous Month"}),className:"sps-datepicker__button sps-datepicker__button-previous-month",onClick:V},r.createElement("i",{className:"sps-icon sps-icon-chevron-left"})),r.createElement("span",{className:`${Ue}-head-label`},r.createElement("span",{className:`${Ue}-head-label-month`},F?F.clone().locale(v).format("MMMM"):""),r.createElement("span",{className:`${Ue}-head-label-year`},h.year)),!u&&r.createElement("button",{type:"button","data-testid":`${p}_next_month`,tabIndex:-1,disabled:j.isSameMonth(h,a),title:g("datepicker.calendar.nextMonth",{defaultValue:"View Next Month"}),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:w},r.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),r.createElement("div",{className:`${Ue}-body`},r.createElement("div",{className:"sps-datepicker__calendar-row"},y.map(N=>r.createElement("div",{key:N,className:"sps-datepicker__calendar-header-cell"},N))),O.map((N,E)=>r.createElement("div",{key:E,className:"sps-datepicker__calendar-row"},N.map((k,z)=>r.createElement("div",{key:z,className:B(k),onClick:()=>M(k),"data-testid":`${p}_${j.toString(k)}`},k?k.date:"")))))),u&&r.createElement("div",{"data-testid":`${p}`,className:q,...f,onMouseOver:$},r.createElement("div",{className:`${Ue}-head`},r.createElement("span",{className:`${Ue}-head-label`},r.createElement("span",{className:`${Ue}-head-label-month`},_?_.clone().locale(v).format("MMMM"):""),r.createElement("span",{className:`${Ue}-head-label-year`},C.year)),r.createElement("button",{type:"button","data-testid":`${p}_next_month`,tabIndex:-1,disabled:j.isSameMonth(C,a),title:g("datepicker.calendar.nextMonth",{defaultValue:"View Next Month"}),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:w},r.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),r.createElement("div",{className:`${Ue}-body`},r.createElement("div",{className:"sps-datepicker__calendar-row"},y.map(N=>r.createElement("div",{key:N,className:"sps-datepicker__calendar-header-cell"},N))),R.map((N,E)=>r.createElement("div",{key:E,className:"sps-datepicker__calendar-row"},N.map((k,z)=>r.createElement("div",{key:z,className:K(B(k,!0),`${C.month.toString()}`),onClick:()=>M(k),"data-testid":`${p}_${j.toString(k)}`},k?k.date:""))))))):r.createElement(r.Fragment,null)}Object.assign(Qo,{displayName:"SpsDatepickerCalendar"});const Dd="sps-datepicker__popup",er=r.forwardRef(({attachTo:e,children:t,className:n,isOpen:o,...a},s)=>{const i=s||r.useRef(null),l=gn("sps-datepicker-popup-portal"),c=r.useContext(rt),[d]=o?Sn(i,e,A.Position.BOTTOM_LEFT,{altPosition:$r(A.Position.BOTTOM_LEFT),...c}):[{}],m=K(Dd,"z-stratum-dropdown",o&&`${Dd}--open`,n);return l(r.createElement("div",{...a,className:m,ref:i,style:d},t))});Object.assign(er,{displayName:"SpsDatepickerPopup"});const zy={currentUser:"any",disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDate>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newDate: SimpleDate) => void",value:"SimpleDate",format:"string",showTwoMonths:"boolean",autoCloseOnSelect:"boolean"},Nd="sps-datepicker";function ts({children:e,className:t,currentUser:n,disabled:o,formMeta:a,id:s,maxDate:i,minDate:l,onChange:c,value:d,format:m,showTwoMonths:u,autoCloseOnSelect:p=!0,"data-testid":f,...g}){const{wrapperId:b,controlId:v}=Ge(s,a),y=r.useRef(null),h=r.useRef(null),I=r.useRef(null),[C,D]=r.useState(j.toString(d,m)),{showPopup:L,doShowPopup:F,doHidePopup:O}=bn(y,h);function _(B){a&&(a.setValue(B),a.markAsDirty()),c&&c(B)}function R(B){_(B),D(j.toString(B,m)),I&&I.current&&I.current.focus(),p&&O()}function H(B){D(B.target.value);const M=j.createFrom(B.target.value,m);_(M)}function Z(){O(),D(""),_()}function V(B){switch(B.key){case"Tab":O();break;case"Backspace":B.target.selectionStart===0&&d&&!Array.isArray(d)&&Z();break}}const w=K(Nd,"sps-text-input",L&&`${Nd}--open`,t),$=r.useRef(!1);return r.useEffect(()=>{$.current?d?j.isValid(d)&&D(j.toString(d,m)):Z():$.current=!0},[d,m]),r.createElement(r.Fragment,null,r.createElement(Le,{id:b,className:w,formMeta:a,inputRef:I,focusInputOnClick:!0,ref:y},r.createElement("div",{className:K("sps-form-control",o&&"disabled")},r.createElement("i",{className:K("sps-text-input__icon","sps-icon","sps-icon-calendar-blank")}),r.createElement("input",{type:"text",ref:I,className:"sps-text-input__input",id:v,placeholder:m?.toUpperCase()||mn,onChange:H,onClick:F,onFocus:F,onKeyDown:V,value:C,disabled:o,"data-testid":`${f}_date_input`,...g}),d&&!o&&r.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:Z}))),r.createElement(er,{isOpen:L,attachTo:y,ref:h},r.createElement(Qo,{"data-testid":`${f}_calendar`,selectedDate:d,onNewSelection:R,minDate:l,maxDate:i,showTwoMonths:u,currentUser:n})))}Object.assign(ts,{props:zy,displayName:"SpsDatepicker"});const Id={basic:{label:"Basic",examples:{basic:{react:S.code`
|
|
1155
|
+
`}}}},Dy=pn.default||pn;function Ny(){return new Array(7).fill(null)}function vd(e){const t=Dy({year:e.year,month:e.month-1,date:1}),n=t.weekday(),o=t.daysInMonth(),a=Math.ceil((o+n)/7),s=a*7,i=new Array(a).fill(!0).map(Ny);t.subtract(n,"days");for(let l=0;l<s;l+=1){const c=i[Math.floor(l/7)],d=l%7;c[d]=Object.freeze({year:t.year(),month:t.month()+1,date:t.date()}),d===6&&Object.freeze(c),t.add(1,"day")}return i}function yd(e){const[t,n]=r.useState(()=>vd(e));return r.useEffect(()=>{n(vd(e))},[e]),t}function Ed(e){const[t,n]=r.useState(()=>j.toMoment(e));return r.useEffect(()=>n(j.toMoment(e)),[e]),t}function Xo(e){const t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}function _t(e,t,n){const o={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[`${e} Tage`,`${e} Tagen`],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[`${e} Monate`,`${e} Monaten`],y:["ein Jahr","einem Jahr"],yy:[`${e} Jahre`,`${e} Jahren`]};return t?o[n][0]:o[n][1]}function Iy(e){e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:_t,mm:"%d Minuten",h:_t,hh:"%d Stunden",d:_t,dd:_t,w:_t,ww:"%d Wochen",M:_t,MM:_t,y:_t,yy:_t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}function xy(e){e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:Xo,week:{dow:0,doy:4}})}function ky(e){e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:Xo})}function My(e){e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:Xo,week:{dow:1,doy:4}})}function Ly(e){e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:Xo,week:{dow:1,doy:4}})}function _y(e){const t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(o,a){return o?a.includes("-MMM-")?n[o.month()]:t[o.month()]:t},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay(){return`[hoy a la${this.hours()!==1?"s":""}] LT`},nextDay(){return`[mañana a la${this.hours()!==1?"s":""}] LT`},nextWeek(){return`dddd [a la${this.hours()!==1?"s":""}] LT`},lastDay(){return`[ayer a la${this.hours()!==1?"s":""}] LT`},lastWeek(){return`[el] dddd [pasado a la${this.hours()!==1?"s":""}] LT`},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}function Py(e){e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(t,n){switch(n){case"D":return t+(t===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return t+(t===1?"er":"e");case"w":case"W":return t+(t===1?"re":"e")}},week:{dow:1,doy:4}})}function By(e){e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(t,n){switch(n){default:case"M":case"Q":case"D":case"DDD":case"d":return t+(t===1?"er":"e");case"w":case"W":return t+(t===1?"re":"e")}}})}function Oy(e){e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay(){return`[Oggi a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`},nextDay(){return`[Domani a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`},nextWeek(){return`dddd [a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`},lastDay(){return`[Ieri a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`},lastWeek(){return this.day()===0?`[La scorsa] dddd [a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`:`[Lo scorso] dddd [a${this.hours()>1?"lle ":this.hours()===0?" ":"ll'"}]LT`},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}function Ry(e){const t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(o,a){return o?a.includes("-MMM-")?n[o.month()]:t[o.month()]:t},monthsParseExact:!0,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal(o){return o+(o===1||o===8||o>=20?"ste":"de")},week:{dow:1,doy:4}})}function Fy(e){e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour(t,n){return t===12&&(t=0),n==="凌晨"||n==="早上"||n==="上午"?t:n==="下午"||n==="晚上"?t+12:t>=11?t:t+12},meridiem(t,n){const o=t*100+n;return o<600?"凌晨":o<900?"早上":o<1130?"上午":o<1230?"中午":o<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek(t){return t.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek(t){return this.week()!==t.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(t,n){switch(n){case"d":case"D":case"DDD":return`${t}日`;case"M":return`${t}月`;case"w":case"W":return`${t}周`;default:return String(t)}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}function Ay(e){e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour(t,n){return t===12&&(t=0),n==="凌晨"||n==="早上"||n==="上午"?t:n==="中午"?t>=11?t:t+12:n==="下午"||n==="晚上"?t+12:t},meridiem(t,n){const o=t*100+n;return o<600?"凌晨":o<900?"早上":o<1130?"上午":o<1230?"中午":o<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(t,n){switch(n){case"d":case"D":case"DDD":return`${t}日`;case"M":return`${t}月`;case"w":case"W":return`${t}週`;default:return String(t)}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}function $y(e){const t=e.locale();Iy(e),xy(e),ky(e),My(e),Ly(e),_y(e),Py(e),By(e),Oy(e),Ry(e),Fy(e),Ay(e),e.locale(t)}$y(xe);const Vy=xe.locale(),Nn=xe.locales();Nn.indexOf("en-US")===-1&&xe.defineLocale("en-US",{parentLocale:"en",longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY @ LT",LLLL:"dddd MMMM D, YYYY @ LT"}}),Nn.indexOf("en-US24")===-1&&xe.defineLocale("en-US24",{parentLocale:"en-US",longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss"}}),Nn.indexOf("en-PH")===-1&&(xe.defineLocale("en-PH",{parentLocale:"en-gb"}),xe.updateLocale("en-PH",{longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A"}})),Nn.indexOf("en-IN")===-1&&(xe.defineLocale("en-IN",{parentLocale:"en-gb"}),xe.updateLocale("en-IN",{longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",ll:"D-MMM-YYYY"}})),Nn.indexOf("en-SG")===-1&&(xe.defineLocale("en-SG",{parentLocale:"en-IN"}),xe.updateLocale("en-SG",{longDateFormat:{ll:"D MMM YYYY"}})),Nn.indexOf("en-HK")===-1&&xe.defineLocale("en-HK",{parentLocale:"en-gb"}),xe.locale(Vy);function Zo(){return typeof window>"u"?"en-US":window.navigator.languages?.[0]||window.navigator.language||"en-US"}function Td(e){if(typeof Intl>"u"||typeof Intl.DateTimeFormat!="function")return!1;try{const t=e??Zo();return new Intl.DateTimeFormat(t,{hour:"numeric"}).resolvedOptions().hour12===!1}catch{return!1}}function wd(e){const t=e??Zo();return xe().locale(t).locale()}function Ky(e){if(!e)return"en";const t=e.toLowerCase().replace(/_/g,"-"),n=xe.locales();if(n.includes(t))return t;const o=t.split("-")[0];return n.includes(o)?o:"en"}const Cd=r.createContext(void 0);function Hy({currentUser:e,locale:t,children:n}){const o=r.useMemo(()=>({currentUser:e,locale:t}),[e,t]);return r.createElement(Cd.Provider,{value:o},n)}function Wy(){const[e,t]=r.useState(Se.i18n.isInitialized?Se.i18n.language:void 0);return r.useEffect(()=>{const n=()=>t(Se.i18n.language);return Se.i18n.on("initialized",n),Se.i18n.on("languageChanged",n),()=>{Se.i18n.off("initialized",n),Se.i18n.off("languageChanged",n)}},[]),e}function io(e){const t=r.useContext(Cd),n=Wy();return e?.preferences?.locale||e?.acting_entity?.user_info?.preferences?.locale||t?.locale||t?.currentUser?.preferences?.locale||t?.currentUser?.acting_entity?.user_info?.preferences?.locale||(n?Ky(n):void 0)||Zo()}const Gy=pn.default||pn,Ue="sps-datepicker__calendar";function lo({maxDate:e,selectedDate:t,selectedRange:n}){const o=n?j.nullifyInvalidDate(n[0])||j.nullifyInvalidDate(n[1]):null;return j.nullifyInvalidDate(t)||o||j.nullifyInvalidDate(e)||j.create()}function Qo(e){const{children:t,className:n,isOpen:o,maxDate:a,minDate:s,currentUser:i,onNewSelection:l,selectedDate:c,selectedRange:d,selectedPreset:m,showTwoMonths:u=!1,"data-testid":p,...f}=e,{t:g}=Se.useWoodlandLanguage(),b=io(i),v=r.useMemo(()=>wd(b),[b]),y=r.useMemo(()=>Gy.localeData(v).weekdaysShort(),[v]),[h,I]=r.useState(()=>lo(e)),[C,D]=r.useState(j.nextMonth({...h,date:15})),L=r.useMemo(()=>j.create(),[]);r.useEffect(()=>{if(d&&d[0]&&d[1]&&d[0].month!==h.month&&d[0].month!==C.month&&d[1].month!==h.month&&d[1].month!==C.month){const N=lo(e);I(N),D(j.nextMonth({month:N.month,date:15,year:N.year}))}else if(d&&d[0]&&!d[1]&&d[0].month!==h.month&&d[0].month!==C.month){const N=lo(e);I(N),D(j.nextMonth({month:N.month,date:15,year:N.year}))}else if(d&&!d[0]&&d[1]&&d[1].month!==h.month&&d[1].month!==C.month){const N=lo(e);I(N),D(j.nextMonth({month:N.month,date:15,year:N.year}))}else{const N=lo(e);I(N),D(j.nextMonth({month:N.month,date:15,year:N.year}))}},[c,d,a,o]);const F=Ed(h),O=yd(h),_=Ed(C),R=yd(C),[H,Z]=r.useState();function V(){I(j.prevMonth({...h,date:15})),u&&D(j.prevMonth({...C,date:15}))}function w(){I(j.nextMonth({...h,date:15})),u&&D(j.nextMonth({...C,date:15}))}function $(N){N.target&&N.target.classList.contains(`${Ue}-day`)?u&&N.target.classList.contains(`${C.month}`)?Z({...C,date:Number(N.target.textContent)}):Z({...h,date:Number(N.target.textContent)}):(!N.target||!N.target.classList.contains(`${Ue}-row`))&&Z(void 0)}function B(N,E=!1){const k=`${Ue}-day`;return K(`${Ue}-cell`,N&&h&&N.month===h.month&&!E&&k,u&&N.month===C.month&&E&&k,j.isSameDate(L,N)&&`${k}--current-day`,(j.isSameDate(N,c)&&j.isInRange(N,[s,a])!==!1||d&&j.isSameDate(N,d[0])||j.isInRange(N,d))&&`${k}--selected`,j.isInRange(N,[s,a])===!1&&`${k}--disabled`,d&&d[1]&&j.isSameDate(N,d[0])&&!j.isSameDate(N,d[1])&&`${k}--selection-start`,j.isInRange(N,d,!1)&&`${k}--selection-middle`,d&&j.isSameDate(N,d[1])&&!j.isSameDate(N,d[0])&&`${k}--selection-end`,d&&d[0]&&!d[1]&&(!s&&!a||j.isInRange(H,[s,a]))&&j.isInRange(N,[d[0],H],!1)&&`${k}--pending-selection`,m&&m==="After"&&d&&d[0]&&d[1]===null&&(!s&&!a||j.isInRange(N,[d[0],a]))&&j.isInRange(N,[d[0],{month:12,date:31,year:3e3}],!1)&&`${k}--selected`,m&&m==="Before"&&d&&d[0]===null&&d[1]&&(!s&&!a||j.isInRange(N,[s,d[1]]))&&j.isInRange(N,[{month:1,date:1,year:1900},d[1]])&&`${k}--selected`)}function M(N){N&&h&&N.month===h.month&&j.isInRange(N,[s,a])!==!1&&l(N),N&&u&&C&&N.month===C.month&&j.isInRange(N,[s,a])!==!1&&l(N)}const q=K(Ue,n);return h?r.createElement(r.Fragment,null,r.createElement("div",{"data-testid":`${p}`,className:q,...f,onMouseOver:$},r.createElement("div",{className:`${Ue}-head`},r.createElement("button",{"data-testid":`${p}_prev_month`,type:"button",tabIndex:-1,disabled:j.isSameMonth(h,s),title:g("datepicker.calendar.prevMonth",{defaultValue:"View Previous Month"}),className:"sps-datepicker__button sps-datepicker__button-previous-month",onClick:V},r.createElement("i",{className:"sps-icon sps-icon-chevron-left"})),r.createElement("span",{className:`${Ue}-head-label`},r.createElement("span",{className:`${Ue}-head-label-month`},F?F.clone().locale(v).format("MMMM"):""),r.createElement("span",{className:`${Ue}-head-label-year`},h.year)),!u&&r.createElement("button",{type:"button","data-testid":`${p}_next_month`,tabIndex:-1,disabled:j.isSameMonth(h,a),title:g("datepicker.calendar.nextMonth",{defaultValue:"View Next Month"}),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:w},r.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),r.createElement("div",{className:`${Ue}-body`},r.createElement("div",{className:"sps-datepicker__calendar-row"},y.map(N=>r.createElement("div",{key:N,className:"sps-datepicker__calendar-header-cell"},N))),O.map((N,E)=>r.createElement("div",{key:E,className:"sps-datepicker__calendar-row"},N.map((k,z)=>r.createElement("div",{key:z,className:B(k),onClick:()=>M(k),"data-testid":`${p}_${j.toString(k)}`},k?k.date:"")))))),u&&r.createElement("div",{"data-testid":`${p}`,className:q,...f,onMouseOver:$},r.createElement("div",{className:`${Ue}-head`},r.createElement("span",{className:`${Ue}-head-label`},r.createElement("span",{className:`${Ue}-head-label-month`},_?_.clone().locale(v).format("MMMM"):""),r.createElement("span",{className:`${Ue}-head-label-year`},C.year)),r.createElement("button",{type:"button","data-testid":`${p}_next_month`,tabIndex:-1,disabled:j.isSameMonth(C,a),title:g("datepicker.calendar.nextMonth",{defaultValue:"View Next Month"}),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:w},r.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),r.createElement("div",{className:`${Ue}-body`},r.createElement("div",{className:"sps-datepicker__calendar-row"},y.map(N=>r.createElement("div",{key:N,className:"sps-datepicker__calendar-header-cell"},N))),R.map((N,E)=>r.createElement("div",{key:E,className:"sps-datepicker__calendar-row"},N.map((k,z)=>r.createElement("div",{key:z,className:K(B(k,!0),`${C.month.toString()}`),onClick:()=>M(k),"data-testid":`${p}_${j.toString(k)}`},k?k.date:""))))))):r.createElement(r.Fragment,null)}Object.assign(Qo,{displayName:"SpsDatepickerCalendar"});const Dd="sps-datepicker__popup",er=r.forwardRef(({attachTo:e,children:t,className:n,isOpen:o,...a},s)=>{const i=s||r.useRef(null),l=gn("sps-datepicker-popup-portal"),c=r.useContext(rt),[d]=o?Sn(i,e,A.Position.BOTTOM_LEFT,{altPosition:$r(A.Position.BOTTOM_LEFT),...c}):[{}],m=K(Dd,"z-stratum-dropdown",o&&`${Dd}--open`,n);return l(r.createElement("div",{...a,className:m,ref:i,style:d},t))});Object.assign(er,{displayName:"SpsDatepickerPopup"});const zy={currentUser:"any",disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDate>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newDate: SimpleDate) => void",value:"SimpleDate",format:"string",showTwoMonths:"boolean",autoCloseOnSelect:"boolean"},Nd="sps-datepicker";function ts({children:e,className:t,currentUser:n,disabled:o,formMeta:a,id:s,maxDate:i,minDate:l,onChange:c,value:d,format:m,showTwoMonths:u,autoCloseOnSelect:p=!0,"data-testid":f,...g}){const{wrapperId:b,controlId:v}=Ge(s,a),y=r.useRef(null),h=r.useRef(null),I=r.useRef(null),[C,D]=r.useState(j.toString(d,m)),{showPopup:L,doShowPopup:F,doHidePopup:O}=bn(y,h);function _(B){a&&(a.setValue(B),a.markAsDirty()),c&&c(B)}function R(B){_(B),D(j.toString(B,m)),I&&I.current&&I.current.focus(),p&&O()}function H(B){D(B.target.value);const M=j.createFrom(B.target.value,m);_(M)}function Z(){O(),D(""),_()}function V(B){switch(B.key){case"Tab":O();break;case"Backspace":B.target.selectionStart===0&&d&&!Array.isArray(d)&&Z();break}}const w=K(Nd,"sps-text-input",L&&`${Nd}--open`,t),$=r.useRef(!1);return r.useEffect(()=>{$.current?d?j.isValid(d)&&D(j.toString(d,m)):Z():$.current=!0},[d,m]),r.createElement(r.Fragment,null,r.createElement(Le,{id:b,className:w,formMeta:a,inputRef:I,focusInputOnClick:!0,ref:y},r.createElement("div",{className:K("sps-form-control",o&&"disabled")},r.createElement("i",{className:K("sps-text-input__icon","sps-icon","sps-icon-calendar-blank")}),r.createElement("input",{type:"text",ref:I,className:"sps-text-input__input",id:v,placeholder:m?.toUpperCase()||mn,onChange:H,onClick:F,onFocus:F,onKeyDown:V,value:C,disabled:o,"data-testid":`${f}_date_input`,...g}),d&&!o&&r.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:Z}))),r.createElement(er,{isOpen:L,attachTo:y,ref:h},r.createElement(Qo,{"data-testid":`${f}_calendar`,selectedDate:d,onNewSelection:R,minDate:l,maxDate:i,showTwoMonths:u,currentUser:n})))}Object.assign(ts,{props:zy,displayName:"SpsDatepicker"});const Id={basic:{label:"Basic",examples:{basic:{react:S.code`
|
|
1156
1156
|
import {
|
|
1157
1157
|
useSpsForm,
|
|
1158
1158
|
SpsLabel,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/ds-react",
|
|
3
3
|
"description": "SPS Design System React components",
|
|
4
|
-
"version": "8.53.
|
|
4
|
+
"version": "8.53.27",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/spscommerce/woodland/tree/main/packages/@spscommerce/ds-react",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"moment-timezone": "^0.6.0",
|
|
47
47
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
48
48
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"@sps-woodland/illustrations": "8.53.
|
|
50
|
-
"@spscommerce/ds-colors": "8.53.
|
|
51
|
-
"@spscommerce/ds-shared": "8.53.
|
|
52
|
-
"@spscommerce/i18n": "8.53.
|
|
53
|
-
"@spscommerce/positioning": "8.53.
|
|
49
|
+
"@sps-woodland/illustrations": "8.53.27",
|
|
50
|
+
"@spscommerce/ds-colors": "8.53.27",
|
|
51
|
+
"@spscommerce/ds-shared": "8.53.27",
|
|
52
|
+
"@spscommerce/i18n": "8.53.27",
|
|
53
|
+
"@spscommerce/positioning": "8.53.27"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@react-stately/collections": "3.12.10",
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"raf-stub": "3.0.0",
|
|
71
71
|
"react": "16.14.0",
|
|
72
72
|
"react-dom": "16.14.0",
|
|
73
|
-
"@sps-woodland/illustrations": "8.53.
|
|
74
|
-
"@spscommerce/ds-colors": "8.53.
|
|
75
|
-
"@spscommerce/ds-shared": "8.53.
|
|
76
|
-
"@spscommerce/i18n": "8.53.
|
|
77
|
-
"@spscommerce/positioning": "8.53.
|
|
78
|
-
"test": "8.53.
|
|
73
|
+
"@sps-woodland/illustrations": "8.53.27",
|
|
74
|
+
"@spscommerce/ds-colors": "8.53.27",
|
|
75
|
+
"@spscommerce/ds-shared": "8.53.27",
|
|
76
|
+
"@spscommerce/i18n": "8.53.27",
|
|
77
|
+
"@spscommerce/positioning": "8.53.27",
|
|
78
|
+
"test": "8.53.27"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "pnpm run build:js && pnpm run build:types",
|