@proprioo/salatim 23.3.0 → 23.4.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## Changelog
2
2
 
3
+ **23.4.1**
4
+
5
+ * Fix: gmap props should override other props
6
+
7
+ **23.4.0**
8
+
9
+ * Feat: adjust mobile header background and cross colors in Modal component
10
+
3
11
  **23.3.0**
4
12
 
5
13
  * Feat: add minLength and maxLength props to Input component
package/lib/index.js CHANGED
@@ -192,7 +192,7 @@
192
192
  :-webkit-autofill:active {
193
193
  box-shadow: 0 0 0 ${oe(40)} white inset;
194
194
  }
195
- `;var Ne;exports.InputType=void 0,(Ne=exports.InputType||(exports.InputType={})).EMAIL="email",Ne.NUMBER="number",Ne.PASSWORD="password",Ne.TEL="tel",Ne.TEXT="text";const je=t.forwardRef(((e,r)=>{const{dataTest:n,disabled:o,focused:a,gmap:i,id:l,inputElement:s,max:d,maxLength:c,min:f,minLength:p,name:h,required:y=!1,style:g,type:b,value:m,handleBlur:v,handleFocus:$,handleOnChange:w}=e;return u.default.createElement(t.Fragment,null,s?t.createElement(s,Object.assign({},e)):u.default.createElement(Te,Object.assign({autoComplete:"off","data-test":n||`input-${b}`,value:null===m?"":m},Object.assign(Object.assign({disabled:o,id:l,max:d,maxLength:c,min:f,minLength:p,name:h,ref:r,required:y,type:b},i),a&&{style:g}),{onBlur:v,onChange:e=>w(e),onFocus:$})))}));var Fe;exports.InputColors=void 0,(Fe=exports.InputColors||(exports.InputColors={})).ORANGE="orange",Fe.GREEN="green",Fe.BLUE="blue",Fe.PINK="pink";const Re=c.default.fieldset`
195
+ `;var Ne;exports.InputType=void 0,(Ne=exports.InputType||(exports.InputType={})).EMAIL="email",Ne.NUMBER="number",Ne.PASSWORD="password",Ne.TEL="tel",Ne.TEXT="text";const je=t.forwardRef(((e,r)=>{const{dataTest:n,disabled:o,focused:a,gmap:i,id:l,inputElement:s,max:d,maxLength:c,min:f,minLength:p,name:h,required:y=!1,style:g,type:b,value:m,handleBlur:v,handleFocus:$,handleOnChange:w}=e;return u.default.createElement(t.Fragment,null,s?t.createElement(s,Object.assign({},e)):u.default.createElement(Te,Object.assign({autoComplete:"off","data-test":n||`input-${b}`,value:null===m?"":m},Object.assign({disabled:o,id:l,max:d,maxLength:c,min:f,minLength:p,name:h,ref:r,required:y,type:b},a&&{style:g}),{onBlur:v,onChange:e=>w(e),onFocus:$},i)))}));var Fe;exports.InputColors=void 0,(Fe=exports.InputColors||(exports.InputColors={})).ORANGE="orange",Fe.GREEN="green",Fe.BLUE="blue",Fe.PINK="pink";const Re=c.default.fieldset`
196
196
  position: absolute;
197
197
  top: 0;
198
198
  left: 0;
@@ -2174,27 +2174,39 @@ function Ow(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,
2174
2174
  `:void 0}
2175
2175
  `,qI=({fill:e})=>u.default.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M22.4001 10.8892L21.111 9.6001L16.0001 14.711L10.8892 9.6001L9.6001 10.8892L14.711 16.0001L9.6001 21.111L10.8892 22.4001L16.0001 17.2892L21.111 22.4001L22.4001 21.111L17.2892 16.0001L22.4001 10.8892Z",fill:e})),YI=({isWrapped:e,text:t,backgroundColor:r="rgba(255, 255, 255, 0.85)",loaderHeight:n="100%"})=>u.default.createElement(AI,{isWrapped:e,backgroundColor:r,loaderHeight:n,"data-test":"loader"},u.default.createElement(TI,{isWrapped:e},u.default.createElement(II,null),t&&u.default.createElement(NI,{dangerouslySetInnerHTML:{__html:t}}))),ZI=c.default.div`
2176
2176
  position: absolute;
2177
- z-index: 1;
2178
2177
  top: ${oe(8)};
2179
2178
  right: ${oe(8)};
2180
2179
  width: ${oe(32)};
2180
+ z-index: 1;
2181
2181
  height: ${oe(32)};
2182
2182
 
2183
- @media (min-width: ${m.small}px) {
2184
- top: ${oe(12)};
2185
- right: ${oe(12)};
2186
- }
2187
-
2188
2183
  svg {
2189
2184
  width: 100%;
2190
2185
  height: 100%;
2191
- }
2192
2186
 
2193
- &:hover {
2194
- svg,
2195
2187
  path {
2188
+ fill: ${({hasTitle:e})=>e?"white":ne.dark.base40};
2189
+ }
2190
+ }
2191
+
2192
+ :hover {
2193
+ svg {
2196
2194
  cursor: pointer;
2197
- fill: ${ne.dark.base80};
2195
+
2196
+ path {
2197
+ fill: ${ne.dark.base80};
2198
+ }
2199
+ }
2200
+ }
2201
+
2202
+ @media (min-width: ${m.small}px) {
2203
+ top: ${oe(12)};
2204
+ right: ${oe(12)};
2205
+
2206
+ svg {
2207
+ path {
2208
+ fill: ${ne.dark.base40};
2209
+ }
2198
2210
  }
2199
2211
  }
2200
2212
  `,JI=n.keyframes`
@@ -2275,7 +2287,7 @@ function Ow(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,
2275
2287
  top: 0;
2276
2288
  left: 0;
2277
2289
  right: 0;
2278
- background: ${ne.green.base80};
2290
+ background: ${ne.green.base};
2279
2291
  padding: ${oe(16)} ${oe(8)};
2280
2292
  color: white;
2281
2293
 
@@ -2318,7 +2330,7 @@ function Ow(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,
2318
2330
  @media (min-width: ${m.small}px) {
2319
2331
  text-align: left;
2320
2332
  }
2321
- `,aT=({closeModal:e,children:r,title:n,text:o,icon:i,isAlternative:l=!1,isFullScreen:s,noPadding:d,fade:c,isLoading:f})=>{const p=t.useRef(null),[h,y]=t.useState(0),g=t=>{"Escape"===t.key&&e()};return jD(p,(t=>{e()})),t.useLayoutEffect((()=>{const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}),[]),t.useLayoutEffect((()=>{const e=document.getElementById("modal");if(e){const t=e.scrollHeight;y(t)}return()=>y(0)}),[f]),t.useEffect((()=>(document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g))),[]),a.createPortal(u.default.createElement(VI,{fade:c},u.default.createElement(QI,{id:"modal",ref:p,fade:c,isFullScreen:s,noPadding:d},f&&u.default.createElement(YI,{loaderHeight:`${h.toString()}px`}),u.default.createElement(ZI,{onClick:e,"data-test":"close-modal-icon"},u.default.createElement(qI,{fill:ne.dark.base40})),n&&u.default.createElement(eT,null,n),(i||n||o)&&u.default.createElement(tT,null,i&&u.default.createElement(rT,{"data-test":"modal-icon"},i),n&&u.default.createElement(nT,{isAlternative:l,"data-test":"modal-title",dangerouslySetInnerHTML:{__html:n}}),o&&u.default.createElement(oT,{"data-test":"modal-text",dangerouslySetInnerHTML:{__html:o}})),u.default.createElement("div",null,r))),(null===document||void 0===document?void 0:document.body)||null)};var iT,lT;exports.PanelColorsTypes=void 0,(iT=exports.PanelColorsTypes||(exports.PanelColorsTypes={})).PRIMARY="primary",iT.SECONDARY="secondary",iT.GREEN="green",iT.RED="red",iT.BLUE="blue",iT.ORANGE="orange",iT.YELLOW="yellow",exports.PanelOrientation=void 0,(lT=exports.PanelOrientation||(exports.PanelOrientation={})).HORIZONTAL="horizontal",lT.VERTICAL="vertical";const sT={blue:{background:ne.blue.base5,border:ne.blue.base},red:{background:ne.red.base5,border:ne.red.base},green:{background:ne.green.base5,border:ne.green.base},orange:{background:ne.orange.base5,border:ne.orange.base},secondary:{background:ne.background,border:ne.green.base},primary:{background:ne.background,border:ne.dark.base},yellow:{background:ne.yellow.base5,border:ne.yellow.base}},uT=c.default.div`
2333
+ `,aT=({closeModal:e,children:r,title:n,text:o,icon:i,isAlternative:l=!1,isFullScreen:s,noPadding:d,fade:c,isLoading:f})=>{const p=t.useRef(null),[h,y]=t.useState(0),g=t=>{"Escape"===t.key&&e()};return jD(p,(t=>{e()})),t.useLayoutEffect((()=>{const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}),[]),t.useLayoutEffect((()=>{const e=document.getElementById("modal");if(e){const t=e.scrollHeight;y(t)}return()=>y(0)}),[f]),t.useEffect((()=>(document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g))),[]),a.createPortal(u.default.createElement(VI,{fade:c},u.default.createElement(QI,{id:"modal",ref:p,fade:c,isFullScreen:s,noPadding:d},f&&u.default.createElement(YI,{loaderHeight:`${h.toString()}px`}),u.default.createElement(ZI,{"data-test":"close-modal-icon",hasTitle:!!n,onClick:e},u.default.createElement(qI,null)),n&&u.default.createElement(eT,null,n),(i||n||o)&&u.default.createElement(tT,null,i&&u.default.createElement(rT,{"data-test":"modal-icon"},i),n&&u.default.createElement(nT,{isAlternative:l,"data-test":"modal-title",dangerouslySetInnerHTML:{__html:n}}),o&&u.default.createElement(oT,{"data-test":"modal-text",dangerouslySetInnerHTML:{__html:o}})),u.default.createElement("div",null,r))),(null===document||void 0===document?void 0:document.body)||null)};var iT,lT;exports.PanelColorsTypes=void 0,(iT=exports.PanelColorsTypes||(exports.PanelColorsTypes={})).PRIMARY="primary",iT.SECONDARY="secondary",iT.GREEN="green",iT.RED="red",iT.BLUE="blue",iT.ORANGE="orange",iT.YELLOW="yellow",exports.PanelOrientation=void 0,(lT=exports.PanelOrientation||(exports.PanelOrientation={})).HORIZONTAL="horizontal",lT.VERTICAL="vertical";const sT={blue:{background:ne.blue.base5,border:ne.blue.base},red:{background:ne.red.base5,border:ne.red.base},green:{background:ne.green.base5,border:ne.green.base},orange:{background:ne.orange.base5,border:ne.orange.base},secondary:{background:ne.background,border:ne.green.base},primary:{background:ne.background,border:ne.dark.base},yellow:{background:ne.yellow.base5,border:ne.yellow.base}},uT=c.default.div`
2322
2334
  ${({color:e})=>n.css`
2323
2335
  background-color: ${sT[e].background};
2324
2336
  border-color: ${sT[e].border};