freemium-ui 1.0.180 → 1.0.185

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.esm.js CHANGED
@@ -1029,7 +1029,7 @@ object-assign
1029
1029
  border-radius: 4px;
1030
1030
  padding: 8px;
1031
1031
  cursor: pointer;
1032
- `,Wh=Hh((({items:t,downshift:{isOpen:n,getMenuProps:r,getItemProps:a,selectedItem:o,inputValue:c,highlightedIndex:i,itemToString:s},overrideStyles:l={},itemComponent:h,type:p,filterKey:d,isMenuLoading:u,anchorRef:m,popoverRef:v})=>{let f=t;if(p===xh.INPUT&&("string"==typeof o&&o!==c||"object"==typeof o&&o&&o[d]&&o[d]!==c)&&("development"!==process.env.NODE_ENV||"string"==typeof t[0]||d||console.error("The 'items' you provided is of type Object, provide \n 'filterKey' prop to <Dropdown/> to specify which key has to be searched for."),d&&"object"==typeof t[0]&&(f=Rh(t,c,{keys:[d]})),"string"==typeof t[0]&&(f=Rh(t,c))),0===f.length)return null;v.current&&m.current&&Mh(m.current.getBoundingClientRect(),v.current.getBoundingClientRect());return e.createElement(e.Fragment,null,e.createElement(vc,{initialOffset:"-20px",timeout:200,in:n,unmountOnExit:!0},(t=>e.createElement("div",{style:{width:"100%",zIndex:1e3,...t},id:"heloo"},e.createElement(Bh,Object.assign({},r({onClick:e=>{e.stopPropagation()}}),{overrideStyles:l}),u?e.createElement("div",{className:"loader-wrapper"},e.createElement(Pl,null)):e.createElement(e.Fragment,null,f.map(((t,n)=>{const r=f.indexOf(o)===n;return e.createElement($h,Object.assign({},a({item:t,key:n,disabled:t.disabled}),{key:n,isSelectedIndex:r,canHighlight:i===n,disabled:t.disabled}),e.createElement(No.Flex,{justifyContent:"space-between",alignItems:"center"},e.createElement(No.Box,{width:"90%",style:{wordBreak:"break-word"}},h?h(t):s(t)),r?e.createElement(er,{glyph:"check",size:12,viewBox:"0 0 8 8"}):null))}))))))))})),Uh=Et.div`
1032
+ `,Wh=Hh((({items:t,downshift:{isOpen:n,getMenuProps:r,getItemProps:a,selectedItem:o,inputValue:c,highlightedIndex:i,itemToString:s},overrideStyles:l={},itemComponent:h,type:p,filterKey:d,isMenuLoading:u,anchorRef:m,popoverRef:v})=>{let f=t;if(console.log("Dropdown",{allItems:f,selectedItem:o,inputValue:c,items:t,filterKey:d}),p===xh.INPUT&&(null===o||"string"==typeof o&&o!==c||"object"==typeof o&&o&&o[d]&&o[d]!==c)&&("development"!==process.env.NODE_ENV||"string"==typeof t[0]||d||console.error("The 'items' you provided is of type Object, provide \n 'filterKey' prop to <Dropdown/> to specify which key has to be searched for."),d&&"object"==typeof t[0]&&(f=Rh(t,c,{keys:[d]})),"string"==typeof t[0]&&(f=Rh(t,c))),0===f.length)return null;v.current&&m.current&&Mh(m.current.getBoundingClientRect(),v.current.getBoundingClientRect());return e.createElement(e.Fragment,null,e.createElement(vc,{initialOffset:"-20px",timeout:200,in:n,unmountOnExit:!0},(t=>e.createElement("div",{style:{width:"100%",zIndex:1e3},id:"heloo"},e.createElement(Bh,Object.assign({},r({onClick:e=>{e.stopPropagation()}}),{overrideStyles:l}),u?e.createElement("div",{className:"loader-wrapper"},e.createElement(Pl,null)):e.createElement(e.Fragment,null,f.map(((t,n)=>{const r=f.indexOf(o)===n;return e.createElement($h,Object.assign({},a({item:t,key:n,disabled:t.disabled}),{key:n,isSelectedIndex:r,canHighlight:i===n,disabled:t.disabled}),e.createElement(No.Flex,{justifyContent:"space-between",alignItems:"center"},e.createElement(No.Box,{width:"90%",style:{wordBreak:"break-word"}},h?h(t):s(t)),r?e.createElement(er,{glyph:"check",size:12,viewBox:"0 0 8 8"}):null))}))))))))})),Uh=Et.div`
1033
1033
  ${({isOpen:e,isErrored:t,disabled:n,theme:{palette:r,colors:a}})=>`\n position: relative;\n width: 100%;\n box-sizing: border-box;\n border-radius: 5px;\n border: 1px solid ${t?a.border.error:a.border.primary};\n background: white;\n appearance: none;\n padding: 4px 12px;\n display: flex;\n align-items: center;\n\n input {\n flex-grow: 1;\n font-size: 14px;\n font-weight: 500;\n letter-spacing: 0px;\n min-height: 24px;\n background-color: #fff;\n min-width: 100px;\n box-sizing: border-box;\n border: none;\n overflow: hidden;\n padding : 0;\n margin : 2px;\n ::placeholder,\n ::-webkit-input-placeholder {\n color: ${r.S300}\n }\n :-ms-input-placeholder {\n color: ${r.S300}\n }\n \n }\n ${e&&!t?`border: none;\n box-shadow: 0 0 0 2px ${a.pseudo.focus}; \n transition: box-shadow 0.3s ease-in-out;`:""}\n \n \n\n\n .dropdown-status {\n transition: all ease-in 0.2s;\n pointer-events: ${n?"none":"all"};\n transform: ${e?"rotate(180deg)":"rotate(0deg)"};\n }\n `}
1034
1034
  `,Kh=e.forwardRef(((t,n)=>{const{downshift:{getInputProps:r,toggleMenu:a,isOpen:o},name:c,isErrored:i,disabled:s,placeholder:l="Enter input to get suggestions"}=t;return e.createElement(Uh,{isErrored:i,isOpen:o,ref:n,disabled:s},e.createElement("input",Object.assign({},r({"data-testid":c}),{disabled:s,placeholder:l,onClick:a})),e.createElement("div",{className:"dropdown-status",onClick:s?()=>{}:a},e.createElement(er,{size:"8",viewBox:"0 0 8 8",glyph:"chevron-down"})))})),Gh=Hh(Kh),qh=Et.div`
1035
1035
  display: block;
@@ -1100,6 +1100,9 @@ PERFORMANCE OF THIS SOFTWARE.
1100
1100
  font-size: ${({theme:{typography:{body:e}}})=>e.errorText.fontSize};
1101
1101
  color: ${({theme:{colors:{errorText:e}}})=>e.primary};
1102
1102
  }
1103
+ .bp3-timepicker.bp3-disabled .bp3-timepicker-input-row {
1104
+ background-color: unset;
1105
+ }
1103
1106
  .bp3-popover-content {
1104
1107
  z-index: 1000;
1105
1108
  }
@@ -1178,12 +1181,14 @@ PERFORMANCE OF THIS SOFTWARE.
1178
1181
  }
1179
1182
  }
1180
1183
  .bp3-timepicker-input-row {
1181
- border: 1px solid #f5f5f5;
1184
+ /* border: 1px solid #f5f5f5; */
1185
+ border: 1px solid
1186
+ ${({isErrored:e,theme:{colors:{border:t,components:{input:n}}}})=>e?t.error:n.primary.borderColor};
1182
1187
  border-radius: 4px;
1183
1188
  box-shadow: none;
1184
1189
  input:focus {
1185
1190
  outline: none;
1186
- box-shadow: rgb(44 92 197) 0px 0px 0px 2px;
1191
+ box-shadow: ${({isErrored:e})=>e?"none":"rgb(44 92 197) 0px 0px 0px 2px"};
1187
1192
  }
1188
1193
  }
1189
1194
  .bp3-html-select {
@@ -1210,6 +1215,9 @@ PERFORMANCE OF THIS SOFTWARE.
1210
1215
  .bp3-timepicker {
1211
1216
  display: flex;
1212
1217
  align-items: center;
1218
+ :nth-child(2) {
1219
+ margin-top: 8px;
1220
+ }
1213
1221
  }
1214
1222
  .bp3-datepicker-timepicker-wrapper {
1215
1223
  flex-direction: row;
@@ -1231,7 +1239,7 @@ PERFORMANCE OF THIS SOFTWARE.
1231
1239
  font-size: 12px;
1232
1240
  }
1233
1241
  }
1234
- `,Vv=t=>{const{placeholder:n,isErrored:r,isRequired:a,errorText:o,name:c,label:i,id:s,disabled:l,displayFormat:h="YYYY-MM-DD hh:mm A",...p}=t;return e.createElement(Hv,{isErrored:r,id:`datetime-picker-container-${s||""}`},i&&e.createElement("label",null,i,a&&e.createElement("span",{className:"isRequired"},"*")),e.createElement(wv,Object.assign({canClearSelection:!0,closeOnSelection:!1,todayButtonText:"",showActionsBar:!0,timePrecision:"minute",fill:!0,timePickerProps:{useAmPm:!0},inputProps:{placeholder:n||h,name:c,id:s,disabled:l},popoverProps:{minimal:!0,placement:"bottom-start",usePortal:!1}},p,{parseDate:e=>e?np(e).toDate():new Date,formatDate:e=>np(e).format(h)})),r&&o&&e.createElement("span",{className:"error"},o))},Cv=t=>{const{placeholder:n,name:r,isRequired:a,label:o,isErrored:c,errorText:i,id:s,monthYearLocation:l="start",disabled:h,displayFormat:p="YYYY-MM-DD",...d}=t;return e.createElement(Hv,{isErrored:c,id:`date-picker-container-${s||""}`},o&&e.createElement("label",null,o,a&&e.createElement("span",{className:"isRequired"},"*")),e.createElement(wv,Object.assign({canClearSelection:!0,closeOnSelection:!0,fill:!0,inputProps:{placeholder:n||p,name:r,id:s,disabled:h},dayPickerProps:{},popoverProps:{minimal:!0,placement:"bottom-start",usePortal:!1},parseDate:e=>np(e).toDate(),formatDate:e=>np(e).format(p)},d)),c&&i&&e.createElement("span",{className:"error"},i))},kv=t=>{const{placeholder:n,name:r,label:a,id:o,disabled:c,errorText:i,isErrored:s,isRequired:l,...h}=t;return e.createElement(Hv,{isErrored:s,id:`time-picker-container-${o||""}`},a&&e.createElement("label",null,a,l&&e.createElement("span",{className:"isRequired"},"*")),e.createElement(zv,Object.assign({precision:"minute",useAmPm:!0},h)),s&&i&&e.createElement("span",{className:"error"},i))},Lv=s(((t,n)=>e.createElement(Ev,{checked:t.checked},e.createElement("label",null,e.createElement("input",{ref:n,type:"radio",name:t.name,value:t.value,checked:t.checked,onClick:t.onChange}),e.createElement("div",{className:"radio"}),e.createElement("div",null,t.children))))),Ev=Et.div`
1242
+ `,Vv=t=>{const{placeholder:n,isErrored:r,isRequired:a,errorText:o,name:c,label:i,id:s,disabled:l,displayFormat:h="YYYY-MM-DD hh:mm A",...p}=t;return e.createElement(Hv,{isErrored:r,id:`datetime-picker-container-${s||""}`},i&&e.createElement("label",null,i,a&&e.createElement("span",{className:"isRequired"},"*")),e.createElement(wv,Object.assign({canClearSelection:!0,closeOnSelection:!1,todayButtonText:"",disabled:l,showActionsBar:!0,timePrecision:"minute",fill:!0,timePickerProps:{useAmPm:!0},inputProps:{placeholder:n||h,name:c,id:s,disabled:l},popoverProps:{minimal:!0,placement:"bottom-start",usePortal:!1},parseDate:e=>e?np(e).toDate():new Date,formatDate:e=>np(e).format(h)},p)),r&&o&&e.createElement("span",{className:"error"},o))},Cv=t=>{const{placeholder:n,name:r,isRequired:a,label:o,isErrored:c,errorText:i,id:s,monthYearLocation:l="start",disabled:h,displayFormat:p="YYYY-MM-DD",...d}=t;return e.createElement(Hv,{isErrored:c,id:`date-picker-container-${s||""}`},o&&e.createElement("label",null,o,a&&e.createElement("span",{className:"isRequired"},"*")),e.createElement(wv,Object.assign({canClearSelection:!0,closeOnSelection:!0,disabled:h,fill:!0,inputProps:{placeholder:n||p,name:r,id:s,disabled:h},dayPickerProps:{},popoverProps:{minimal:!0,placement:"bottom-start",usePortal:!1},parseDate:e=>np(e).toDate(),formatDate:e=>np(e).format(p)},d)),c&&i&&e.createElement("span",{className:"error"},i))},kv=t=>{const{placeholder:n,name:r,label:a,id:o,disabled:c,errorText:i,isErrored:s,isRequired:l,...h}=t;return e.createElement(Hv,{isErrored:s,id:`time-picker-container-${o||""}`},a&&e.createElement("label",null,a,l&&e.createElement("span",{className:"isRequired"},"*")),e.createElement(zv,Object.assign({precision:"minute",useAmPm:!0,disabled:c},h)),s&&i&&e.createElement("span",{className:"error"},i))},Lv=s(((t,n)=>e.createElement(Ev,{checked:t.checked},e.createElement("label",null,e.createElement("input",{ref:n,type:"radio",name:t.name,value:t.value,checked:t.checked,onClick:t.onChange}),e.createElement("div",{className:"radio"}),e.createElement("div",null,t.children))))),Ev=Et.div`
1235
1243
  ${({theme:{colors:{components:{radio:e},pseudo:t},typography:{body:n}},checked:r})=>`\n input {\n clip: rect(0,0,0,0);\n position : absolute;\n &:focus {\n & ~ .radio {\n box-shadow: ${t.focus} 0px 0px 0px 3px;\n border-color : transparent;\n }\n }\n }\n label {\n display: flex;\n align-items: center;\n user-select: none;\n }\n .radio {\n background-color: $fff;\n border: 1px solid;\n border-color: ${r?e.backgroundColor:e.borderColor};\n transition: background-color ease-in 0.2s;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n position: relative;\n margin-right: 16px; \n &:before { \n left: 2px;\n top: 2px;\n content: '';\n position: absolute;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n transition : all ease-in 0.2s;\n background-color: ${r?e.backgroundColor:"#fff"};\n }\n }\n font-size : ${n.label.fontSize};\n font-weight : ${n.label.fontWeight};\n &:hover {\n .radio {\n border-color : ${r?e.backgroundColor:e.hoverBorderColor}!important;\n \n box-shadow: ${t.hover} 0px 0px 0px 5px!important;\n }\n }\n`}
1236
1244
  `,Sv=Dt(Lv,{checked:!1}),_v=d({groupValue:null,groupDisabled:!1,updateGroupValue:null}),Av=Et.div`
1237
1245
  ${({theme:{colors:{components:{checkbox:e,input:t},pseudo:n}},disabled:r,checked:a})=>`\n flex-grow : 1;\n flex-basis : 0;\n margin-right : 12px;\n margin-top: 12px;\n label {\n cursor : ${r?"disabled":"pointer"};\n opacity : ${r?.6:1};\n white-space:nowrap;\n padding : 8px;\n padding-left : 16px;\n font-size : 14px;\n border : 1px solid red;\n border-radius : 4px;\n display:flex;\n align-items:center;\n justify-content : left;\n user-select:none;\n border: 1px solid;\n border-color: ${a?e.backgroundColor:t.primary.borderColor};\n text-shadow: ${a?"0 0 0 #000, 0 0 .45px #000":"none"};\n .hollow {\n background-color: ${a?e.backgroundColor:"#fff"};\n border: ${a?"none":"1px solid"};\n border-color: ${a?e.backgroundColor:e.borderColor};\n min-width: 16px;\n min-height: 16px;\n max-width: 16px;\n max-height: 16px;\n border-radius: 50%;\n margin-right : 8px;\n display : flex;\n align-items : center;\n justify-content : center;\n }\n &:focus-within {\n box-shadow: ${n.focus} 0px 0px 0px 2px;\n border-color : transparent;\n }\n input {\n position : absolute;\n clip : rect(0px 0px 0px 0px);\n }\n &:hover {\n ${r?"":`border-color : ${a?e.backgroundColor:t.primary.hoverBorderColor}!important`};\n box-shadow: ${r?"unset":`${n.hover} 0px 0px 0px 5px!important`}; \n }\n}\n`}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "1.0.180",
3
+ "version": "1.0.185",
4
4
  "description": "React Ui Components for Freemium Apps",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.esm.js",