forstok-ui-lib 8.10.8 → 8.10.9
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.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/date/index.tsx +3 -0
- package/src/components/date/ref.tsx +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -766,6 +766,7 @@ type TDate$1 = {
|
|
|
766
766
|
showTimeInput?: boolean;
|
|
767
767
|
showTimeSelect?: boolean;
|
|
768
768
|
timeIntervals?: number;
|
|
769
|
+
timeFormat?: string;
|
|
769
770
|
minDate?: any;
|
|
770
771
|
"data-qa-id"?: string;
|
|
771
772
|
"data-tip"?: string;
|
|
@@ -792,6 +793,7 @@ type TDate = {
|
|
|
792
793
|
showTimeInput?: boolean;
|
|
793
794
|
showTimeSelect?: boolean;
|
|
794
795
|
timeIntervals?: number;
|
|
796
|
+
timeFormat?: string;
|
|
795
797
|
placeholderText?: string;
|
|
796
798
|
portalId?: string;
|
|
797
799
|
isIcon?: boolean;
|
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=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,isError:x=!1,showTimeInput:m=!1,showTimeSelect:u=!1,timeIntervals:v,allowEmpty:
|
|
4803
|
+
`,Ua=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,isError:x=!1,showTimeInput:m=!1,showTimeSelect:u=!1,timeIntervals:v,timeFormat:w,allowEmpty:f=!1}=t,F=b(t,["dateFormat","name","evChange","isField","saveFormat","showFormat","evChangeCustom","value","isForceUpdate","setForceUpdate","minDate","isError","showTimeInput","showTimeSelect","timeIntervals","timeFormat","allowEmpty"]);const[D,E]=r.useState(C||(f?null:new Date)),B=e=>{E(e),o&&o(a,e),l&&c&&c(a,e?A.default(e).format(s):e)};return r.useEffect((()=>{if(p){const e=C||(f?null:new Date);E(e),g&&g(!1)}}),[p,g,C,f]),e.jsxs(Ya,Object.assign({$isError:x},F["data-qa-id"]&&{"data-qa-id":F["data-qa-id"]},{children:[e.jsx(y.default,Object.assign({selected:D,name:a,portalId:"popup-portal",dateFormat:n,onChange:B,showTimeInput:m,showTimeSelect:u},v&&{timeIntervals:v},w&&{timeFormat:w},{onKeyDown:e=>e.preventDefault(),ref:i},h&&{minDate:h})),f&&D?e.jsx(Va,{onClick:()=>B(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]}))})),Ra=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,showTimeSelect:v=!1,timeIntervals:w,timeFormat:f,allowEmpty:F=!1,placeholderText:D,portalId:E,isIcon:B,disabled:j,minDate:k}=t,O=b(t,["dateFormat","name","evChange","isField","saveFormat","showFormat","evChangeCustom","value","reset","setReset","isForceUpdate","setForceUpdate","isError","showTimeInput","showTimeSelect","timeIntervals","timeFormat","allowEmpty","placeholderText","portalId","isIcon","disabled","minDate"]),[M,L]=r.useState(void 0!==C?C:F?null:new Date),z=e=>{L(e),o&&o(a,e),l&&c&&c(a,e?A.default(e).format(s):e)};return r.useEffect((()=>{if(p&&(L(null),g&&g(!1)),h){const e=C||(F?null:new Date);L(e),x&&x(!1)}}),[h,x,C,F,p,g]),e.jsxs(Ya,Object.assign({$isError:m},O["data-tip"]&&{"data-tip":O["data-tip"],"data-place":O["data-place"],"data-type":O["data-type"]},O["data-qa-id"]&&{"data-qa-id":O["data-qa-id"]},{children:[B&&e.jsx(yn,{$name:"calendar",$width:"20px"}),e.jsx(y.default,Object.assign({selected:M,name:a,dateFormat:n,onChange:z,showTimeInput:u,showTimeSelect:v},w&&{timeIntervals:w},f&&{timeFormat:f},{onKeyDown:e=>e.preventDefault(),placeholderText:D,ref:i},j&&{disabled:!0},E&&{portalId:E},k&&{minDate:k})),F&&M?e.jsx(Va,{onClick:()=>z(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=m.default.div`
|
|
4804
4804
|
display: grid;
|
|
4805
4805
|
`,Za=m.default.div`
|
|
4806
4806
|
display: grid;
|