@viswa-test/creative-workspace-ui-component 0.0.10 → 0.0.11

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react");exports.default=function(a){var n=a.value,l=a.onSet;a.id;var s=r.useRef(null);return t.jsxs("div",e.__assign({className:"date-input-wrapper",onClick:function(){var e;return null===(e=s.current)||void 0===e?void 0:e.showPicker()}},{children:[t.jsx("span",e.__assign({className:"placeholder",style:{color:"#6B7280"}},{children:n?"".concat(n.getDate()," / ").concat(n.getMonth()+1," / ").concat(n.getFullYear()):"--/--/----"})),t.jsx("input",{ref:s,type:"date",className:"date-input",value:n?n.toISOString().split("T")[0]:"",onChange:function(e){var t=e.target.value;l(t?new Date(t):null)}})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),t=require("react"),l=require("../styles/AssignLevelsDatePickerStyles.js");exports.default=function(n){var i=n.value,s=n.onSet,u=t.useRef(null);return r.jsxs("div",e.__assign({style:l.DATE_PICKER_STYLES.wrapper,onClick:function(){var e,r;return null===(r=null===(e=u.current)||void 0===e?void 0:e.showPicker)||void 0===r?void 0:r.call(e)}},{children:[r.jsx("span",e.__assign({style:l.DATE_PICKER_STYLES.placeholder},{children:i?i.toLocaleDateString("en-GB"):"--/--/----"})),r.jsx("input",{ref:u,type:"date",style:l.DATE_PICKER_STYLES.input,value:i?i.toISOString().split("T")[0]:"",onChange:function(e){var r=e.target.value;s(r?new Date(r):null)}})]}))};
2
2
  //# sourceMappingURL=AssignLevelsDatePicker.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.DATE_PICKER_STYLES={wrapper:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"140px",height:"32px",padding:"0 12px",border:"1px solid #D1D5DB",borderRadius:"8px",background:"#FFFFFF",cursor:"pointer",overflow:"hidden"},placeholder:{fontSize:"14px",fontWeight:500,color:"#6B7280",userSelect:"none",pointerEvents:"none"},input:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer"}};
2
+ //# sourceMappingURL=AssignLevelsDatePickerStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssignLevelsDatePickerStyles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"../../../_virtual/_tslib.js";import{jsxs as e,jsx as a}from"react/jsx-runtime";import{useRef as r}from"react";function n(n){var l=n.value,o=n.onSet;n.id;var i=r(null);return e("div",t({className:"date-input-wrapper",onClick:function(){var t;return null===(t=i.current)||void 0===t?void 0:t.showPicker()}},{children:[a("span",t({className:"placeholder",style:{color:"#6B7280"}},{children:l?"".concat(l.getDate()," / ").concat(l.getMonth()+1," / ").concat(l.getFullYear()):"--/--/----"})),a("input",{ref:i,type:"date",className:"date-input",value:l?l.toISOString().split("T")[0]:"",onChange:function(t){var e=t.target.value;o(e?new Date(e):null)}})]}))}export{n as default};
1
+ import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useRef as l}from"react";import{DATE_PICKER_STYLES as n}from"../styles/AssignLevelsDatePickerStyles.js";function i(i){var o=i.value,a=i.onSet,u=l(null);return t("div",e({style:n.wrapper,onClick:function(){var e,t;return null===(t=null===(e=u.current)||void 0===e?void 0:e.showPicker)||void 0===t?void 0:t.call(e)}},{children:[r("span",e({style:n.placeholder},{children:o?o.toLocaleDateString("en-GB"):"--/--/----"})),r("input",{ref:u,type:"date",style:n.input,value:o?o.toISOString().split("T")[0]:"",onChange:function(e){var t=e.target.value;a(t?new Date(t):null)}})]}))}export{i as default};
2
2
  //# sourceMappingURL=AssignLevelsDatePicker.js.map
@@ -0,0 +1,2 @@
1
+ var e={wrapper:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"140px",height:"32px",padding:"0 12px",border:"1px solid #D1D5DB",borderRadius:"8px",background:"#FFFFFF",cursor:"pointer",overflow:"hidden"},placeholder:{fontSize:"14px",fontWeight:500,color:"#6B7280",userSelect:"none",pointerEvents:"none"},input:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer"}};export{e as DATE_PICKER_STYLES};
2
+ //# sourceMappingURL=AssignLevelsDatePickerStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssignLevelsDatePickerStyles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare function AssignLevelDatePicker({ value, onSet, id, }: {
2
+ declare function AssignLevelDatePicker({ value, onSet, }: {
3
3
  value: Date | null;
4
4
  onSet: (val: Date | null) => void;
5
5
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AssignLevelsDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/AssignLevelsDatePicker.tsx"],"names":[],"mappings":";AAEA,iBAAS,qBAAqB,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,EAAE,GACH,EAAE;IACD,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAClC,EAAE,EAAE,MAAM,CAAC;CACZ,+BA0BA;AAED,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"AssignLevelsDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/AssignLevelsDatePicker.tsx"],"names":[],"mappings":";AAGA,iBAAS,qBAAqB,CAAC,EAC7B,KAAK,EACL,KAAK,GACN,EAAE;IACD,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAClC,EAAE,EAAE,MAAM,CAAC;CACZ,+BA0BA;AAED,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const DATE_PICKER_STYLES: Record<string, React.CSSProperties>;
2
+ //# sourceMappingURL=AssignLevelsDatePickerStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssignLevelsDatePickerStyles.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/styles/AssignLevelsDatePickerStyles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAgClE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viswa-test/creative-workspace-ui-component",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "author": "Viswa Koduru",
5
5
  "description": "",
6
6
  "license": "MIT",