You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
5.2 KiB

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("react-date-object");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=d(e),p=d(r);function a(){return(a=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var d=arguments[r];for(var t in d)Object.prototype.hasOwnProperty.call(d,t)&&(e[t]=d[t])}return e}).apply(this,arguments)}function i(e,r){if(null==e)return{};var d,t,p=function(e,r){if(null==e)return{};var d,t,p={},a=Object.keys(e);for(t=0;t<a.length;t++)d=a[t],r.indexOf(d)>=0||(p[d]=e[d]);return p}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)d=a[t],r.indexOf(d)>=0||Object.prototype.propertyIsEnumerable.call(e,d)&&(p[d]=e[d])}return p}function l(e){return Array.isArray(e)}var o=["state","setState","position","registerListener","calendarProps","datePickerProps","handleChange","nodes","Calendar","DatePicker","handlePropsChange","handleFocusedDate"];!function(e,r){void 0===r&&(r={});var d=r.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],p=document.createElement("style");p.type="text/css","top"===d&&t.firstChild?t.insertBefore(p,t.firstChild):t.appendChild(p),p.styleSheet?p.styleSheet.cssText=e:p.appendChild(document.createTextNode(e))}}(".rmdp-header-plugin{background-color:#0074d9;color:#fff;display:grid}.rmdp-header-plugin div{display:flex;flex-direction:column;justify-content:center}.rmdp-header-plugin .rmdp-hp-dd{font-size:50px;font-weight:500}.rmdp-header-plugin.small.bottom .rmdp-hp-dd,.rmdp-header-plugin.small.top .rmdp-hp-dd{font-size:28px}.rmdp-header-plugin.top{border-radius:5px 5px 0 0}.rmdp-header-plugin.bottom{border-radius:0 0 5px 5px}.rmdp-header-plugin.left{border-radius:5px 0 0 5px}.rmdp-header-plugin.right{border-radius:0 5px 5px 0}.rmdp-header-plugin.bottom.big,.rmdp-header-plugin.top.big{height:200px}.rmdp-header-plugin.left.big,.rmdp-header-plugin.right.big{width:225px}.rmdp-header-plugin.bottom.medium,.rmdp-header-plugin.top.medium{height:150px}.rmdp-header-plugin.left.medium,.rmdp-header-plugin.right.medium{width:150px}.rmdp-header-plugin.bottom.small,.rmdp-header-plugin.top.small{height:90px}.rmdp-header-plugin.left.small,.rmdp-header-plugin.right.small{width:110px}.green .rmdp-header-plugin{background-color:#3d9970}.purple .rmdp-header-plugin{background-color:#9c27b0}.red .rmdp-header-plugin{background-color:#ea0034}.teal .rmdp-header-plugin{background-color:#009688}.yellow .rmdp-header-plugin{background-color:#f7da37}.rmdp-header-plugin.no-border-top-left-radius{border-top-left-radius:0}.rmdp-header-plugin.no-border-bottom-left-radius{border-bottom-left-radius:0}.rmdp-header-plugin.no-border-top-right-radius{border-top-right-radius:0}.rmdp-header-plugin.no-border-bottom-right-radius{border-bottom-right-radius:0}.rmdp-header-plugin.no-border-radius{border-radius:0}@media (max-height:400px),(max-width:400px){.rmdp-header-plugin.bottom.big,.rmdp-header-plugin.top.big{height:100px}.rmdp-header-plugin.left.big,.rmdp-header-plugin.right.big{width:125px}.rmdp-header-plugin.bottom.medium,.rmdp-header-plugin.top.medium{height:75px}.rmdp-header-plugin.left.medium,.rmdp-header-plugin.right.medium{width:75px}.rmdp-header-plugin.bottom.small,.rmdp-header-plugin.top.small{height:55px}.rmdp-header-plugin.left.small,.rmdp-header-plugin.right.small{width:55px}.rmdp-header-plugin.big.bottom .rmdp-hp-dd,.rmdp-header-plugin.big.top .rmdp-hp-dd,.rmdp-header-plugin.small.left .rmdp-hp-dd,.rmdp-header-plugin.small.right .rmdp-hp-dd{font-size:30px}.rmdp-header-plugin.medium.bottom .rmdp-hp-dd,.rmdp-header-plugin.medium.top .rmdp-hp-dd{font-size:20px}.rmdp-header-plugin.medium.bottom .rmdp-hp-dddd,.rmdp-header-plugin.medium.bottom .rmdp-hp-my,.rmdp-header-plugin.medium.top .rmdp-hp-dddd,.rmdp-header-plugin.medium.top .rmdp-hp-my{font-size:14px}.rmdp-header-plugin.small.bottom .rmdp-hp-dd,.rmdp-header-plugin.small.top .rmdp-hp-dd{font-size:18px}.rmdp-header-plugin.small .rmdp-hp-dddd,.rmdp-header-plugin.small .rmdp-hp-my{font-size:12px}}");var n=["state","position","size","nodes","calendar","locale","className"];exports.default=function(e){var r,d,m=e.state,u=e.position,h=e.size,s=void 0===h?"big":h,g=e.nodes,c=e.calendar,f=void 0===c?m.calendar:c,b=e.locale,x=void 0===b?m.locale:b,y=e.className,v=void 0===y?"":y,w=i(e,n);r=!m.selectedDate||m.multiple||m.range||l(m.selectedDate)?l(m.selectedDate)?m.focused||(d=m.selectedDate)[d.length-1]:new p.default:m.selectedDate,r=new p.default(r).set({calendar:f,locale:x});var P=["rmdp-header-plugin",u,s];return g[u]?P.push("no-border-radius"):["left","right"].includes(u)&&(g.top&&P.push("no-border-top-".concat(u,"-radius")),g.bottom&&P.push("no-border-bottom-".concat(u,"-radius"))),t.default.createElement("div",a({className:"".concat(P.join(" ")," ").concat(v)},function(e){return e.state,e.setState,e.position,e.registerListener,e.calendarProps,e.datePickerProps,e.handleChange,e.nodes,e.Calendar,e.DatePicker,e.handlePropsChange,e.handleFocusedDate,i(e,o)}(w)),t.default.createElement("div",{className:"rmdp-hp-dddd"},r.format("dddd")),t.default.createElement("div",{className:"rmdp-hp-dd"},r.format("DD")),t.default.createElement("div",{className:"rmdp-hp-my"},r.format("MMM YYYY")))};