forstok-ui-lib 8.10.4 → 8.10.5

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/dist/index.js CHANGED
@@ -4800,7 +4800,7 @@ function O(e,t){if(!1===e||null==e)throw new Error(t)}function M(e,t){if(!e){"un
4800
4800
  border: 1px solid var(--ck-clr-ln);
4801
4801
  border-radius: var(--ter-rd);
4802
4802
  `}
4803
- `,Ua=({value:t="",onChange:r,minTime:i})=>e.jsx("input",{type:"time",value:t,min:i?A.default(i).format("HH:mm"):void 0,onChange:e=>null==r?void 0:r(e.target.value)}),Ra=r.forwardRef(((t,i)=>{var{dateFormat:n="MMM dd, yyyy",name:a,evChange:o,isField:l,saveFormat:s,showFormat:d,evChangeCustom:c,value:C,isForceUpdate:p,setForceUpdate:g,minDate:h,minTime:x,isError:m=!1,showTimeInput:u=!1,allowEmpty:v=!1}=t,f=b(t,["dateFormat","name","evChange","isField","saveFormat","showFormat","evChangeCustom","value","isForceUpdate","setForceUpdate","minDate","minTime","isError","showTimeInput","allowEmpty"]);const[w,F]=r.useState(C||(v?null:new Date)),D=e=>{F(e),o&&o(a,e),l&&c&&c(a,e?A.default(e).format(s):e)};return r.useEffect((()=>{if(p){const e=C||(v?null:new Date);F(e),g&&g(!1)}}),[p,g,C,v]),e.jsxs(Ya,Object.assign({$isError:m},f["data-qa-id"]&&{"data-qa-id":f["data-qa-id"]},{children:[e.jsx(y.default,Object.assign({selected:w,name:a,portalId:"popup-portal",dateFormat:n,onChange:D,showTimeInput:u,onKeyDown:e=>e.preventDefault(),ref:i},h&&{minDate:h},{customTimeInput:u&&x?e.jsx(Ua,{minTime:x}):void 0})),v&&w?e.jsx(Va,{onClick:()=>D(null),title:"clear",children:e.jsx("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})})}):null]}))})),Ga=r.forwardRef(((t,i)=>{const{dateFormat:n="MMM dd, yyyy",name:a,evChange:o,isField:l,saveFormat:s,showFormat:d,evChangeCustom:c,value:C,reset:p,setReset:g,isForceUpdate:h,setForceUpdate:x,isError:m=!1,showTimeInput:u=!1,allowEmpty:v=!1,placeholderText:f,portalId:w,isIcon:F,disabled:D,minDate:E,minTime:B}=t,j=b(t,["dateFormat","name","evChange","isField","saveFormat","showFormat","evChangeCustom","value","reset","setReset","isForceUpdate","setForceUpdate","isError","showTimeInput","allowEmpty","placeholderText","portalId","isIcon","disabled","minDate","minTime"]),[k,O]=r.useState(void 0!==C?C:v?null:new Date),M=e=>{O(e),o&&o(a,e),l&&c&&c(a,e?A.default(e).format(s):e)};return r.useEffect((()=>{if(p&&(O(null),g&&g(!1)),h){const e=C||(v?null:new Date);O(e),x&&x(!1)}}),[h,x,C,v,p,g]),e.jsxs(Ya,Object.assign({$isError:m},j["data-tip"]&&{"data-tip":j["data-tip"],"data-place":j["data-place"],"data-type":j["data-type"]},j["data-qa-id"]&&{"data-qa-id":j["data-qa-id"]},{children:[F&&e.jsx(yn,{$name:"calendar",$width:"20px"}),e.jsx(y.default,Object.assign({selected:k,name:a,dateFormat:n,onChange:M,showTimeInput:u,onKeyDown:e=>e.preventDefault(),placeholderText:f,ref:i},D&&{disabled:!0},w&&{portalId:w},E&&{minDate:E},{customTimeInput:u&&B?e.jsx(Ua,{minTime:B}):void 0})),v&&k?e.jsx(Va,{onClick:()=>M(null),title:"clear",children:e.jsx("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})})}):null]}))})),Za=m.default.div`
4803
+ `,Ua=({value:t="",onChange:r,minTime:i})=>{const n=i?A.default(i).format("HH:mm"):void 0;return e.jsx("input",{type:"time",value:t,min:n,onFocus:()=>{!t&&n&&(null==r||r(n))},onChange:e=>null==r?void 0:r(e.target.value)})},Ra=r.forwardRef(((t,i)=>{var{dateFormat:n="MMM dd, yyyy",name:a,evChange:o,isField:l,saveFormat:s,showFormat:d,evChangeCustom:c,value:C,isForceUpdate:p,setForceUpdate:g,minDate:h,minTime:x,isError:m=!1,showTimeInput:u=!1,allowEmpty:v=!1}=t,f=b(t,["dateFormat","name","evChange","isField","saveFormat","showFormat","evChangeCustom","value","isForceUpdate","setForceUpdate","minDate","minTime","isError","showTimeInput","allowEmpty"]);const[w,F]=r.useState(C||(v?null:new Date)),D=e=>{F(e),o&&o(a,e),l&&c&&c(a,e?A.default(e).format(s):e)};return r.useEffect((()=>{if(p){const e=C||(v?null:new Date);F(e),g&&g(!1)}}),[p,g,C,v]),e.jsxs(Ya,Object.assign({$isError:m},f["data-qa-id"]&&{"data-qa-id":f["data-qa-id"]},{children:[e.jsx(y.default,Object.assign({selected:w,name:a,portalId:"popup-portal",dateFormat:n,onChange:D,showTimeInput:u,onKeyDown:e=>e.preventDefault(),ref:i},h&&{minDate:h},{customTimeInput:u&&x?e.jsx(Ua,{minTime:x}):void 0})),v&&w?e.jsx(Va,{onClick:()=>D(null),title:"clear",children:e.jsx("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})})}):null]}))})),Ga=r.forwardRef(((t,i)=>{const{dateFormat:n="MMM dd, yyyy",name:a,evChange:o,isField:l,saveFormat:s,showFormat:d,evChangeCustom:c,value:C,reset:p,setReset:g,isForceUpdate:h,setForceUpdate:x,isError:m=!1,showTimeInput:u=!1,allowEmpty:v=!1,placeholderText:f,portalId:w,isIcon:F,disabled:D,minDate:E,minTime:B}=t,j=b(t,["dateFormat","name","evChange","isField","saveFormat","showFormat","evChangeCustom","value","reset","setReset","isForceUpdate","setForceUpdate","isError","showTimeInput","allowEmpty","placeholderText","portalId","isIcon","disabled","minDate","minTime"]),[k,O]=r.useState(void 0!==C?C:v?null:new Date),M=e=>{O(e),o&&o(a,e),l&&c&&c(a,e?A.default(e).format(s):e)};return r.useEffect((()=>{if(p&&(O(null),g&&g(!1)),h){const e=C||(v?null:new Date);O(e),x&&x(!1)}}),[h,x,C,v,p,g]),e.jsxs(Ya,Object.assign({$isError:m},j["data-tip"]&&{"data-tip":j["data-tip"],"data-place":j["data-place"],"data-type":j["data-type"]},j["data-qa-id"]&&{"data-qa-id":j["data-qa-id"]},{children:[F&&e.jsx(yn,{$name:"calendar",$width:"20px"}),e.jsx(y.default,Object.assign({selected:k,name:a,dateFormat:n,onChange:M,showTimeInput:u,onKeyDown:e=>e.preventDefault(),placeholderText:f,ref:i},D&&{disabled:!0},w&&{portalId:w},E&&{minDate:E},{customTimeInput:u&&B?e.jsx(Ua,{minTime:B}):void 0})),v&&k?e.jsx(Va,{onClick:()=>M(null),title:"clear",children:e.jsx("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})})}):null]}))})),Za=m.default.div`
4804
4804
  display: grid;
4805
4805
  `,Ka=m.default.div`
4806
4806
  display: grid;