@raystack/apsara 0.20.0 → 0.20.2

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 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../calendar/date-picker.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOlE,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,aAAa,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,IAAI,CAAC;CACd;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAY,EACZ,UAAyB,EACzB,WAA0B,EAC1B,cAAc,EACd,aAAa,EACb,KAAkB,EAClB,QAAmB,GACpB,EAAE,eAAe,2CAmIjB"}
1
+ {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../calendar/date-picker.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOlE,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,aAAa,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,IAAI,CAAC;CACd;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAY,EACZ,UAAyB,EACzB,WAA0B,EAC1B,cAAc,EACd,aAAa,EACb,KAAkB,EAClB,QAAmB,GACpB,EAAE,eAAe,2CAyIjB"}
package/dist/index.cjs CHANGED
@@ -2839,10 +2839,10 @@ var SunIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
2839
2839
  }));
2840
2840
  });
2841
2841
 
2842
- function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
2842
+ function r$1(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r$1(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx$1(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r$1(e))&&(n&&(n+=" "),n+=t);return n}
2843
2843
 
2844
2844
  const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
2845
- const cx = clsx;
2845
+ const cx = clsx$1;
2846
2846
  const cva = (base, config)=>{
2847
2847
  return (props)=>{
2848
2848
  var ref;
@@ -4382,7 +4382,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
4382
4382
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4383
4383
  PERFORMANCE OF THIS SOFTWARE.
4384
4384
  ***************************************************************************** */
4385
- /* global Reflect, Promise */
4385
+ /* global Reflect, Promise, SuppressedError, Symbol */
4386
4386
 
4387
4387
 
4388
4388
  var __assign = function() {
@@ -4416,7 +4416,12 @@ function __spreadArray(to, from, pack) {
4416
4416
  }
4417
4417
  }
4418
4418
  return to.concat(ar || Array.prototype.slice.call(from));
4419
- }
4419
+ }
4420
+
4421
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
4422
+ var e = new Error(message);
4423
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
4424
+ };
4420
4425
 
4421
4426
  var zeroRightClassName = 'right-scroll-bar-position';
4422
4427
  var fullWidthClassName = 'width-before-scroll-bar';
@@ -22463,8 +22468,10 @@ const $a093c7e1ec25a057$export$7c6e2c02157bb7d2 = $a093c7e1ec25a057$export$e9003
22463
22468
 
22464
22469
  var styles$8 = {"trigger":"tooltip-module_trigger__-ySkn","content":"tooltip-module_content__SeE6X"};
22465
22470
 
22466
- const Tooltip = ({ children, message, disabled, side = "right", }) => {
22467
- return disabled ? (children) : (jsxRuntimeExports.jsx($a093c7e1ec25a057$export$2881499e37b75b9a, { children: jsxRuntimeExports.jsxs($a093c7e1ec25a057$export$be92b6f5f03c0fe9, { disableHoverableContent: false, children: [jsxRuntimeExports.jsx($a093c7e1ec25a057$export$41fb9f06171c75f4, { asChild: true, children: jsxRuntimeExports.jsx("div", { className: styles$8.trigger, children: children }) }), jsxRuntimeExports.jsx($a093c7e1ec25a057$export$602eac185826482c, { children: jsxRuntimeExports.jsx($a093c7e1ec25a057$export$7c6e2c02157bb7d2, { side: side, sideOffset: 5, className: styles$8.content, children: typeof message === "string" ? jsxRuntimeExports.jsx(Text, { children: message }) : message }) })] }) }));
22471
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
22472
+
22473
+ const Tooltip = ({ children, message, disabled, side = "right", classes, }) => {
22474
+ return disabled ? (children) : (jsxRuntimeExports.jsx($a093c7e1ec25a057$export$2881499e37b75b9a, { children: jsxRuntimeExports.jsxs($a093c7e1ec25a057$export$be92b6f5f03c0fe9, { disableHoverableContent: false, children: [jsxRuntimeExports.jsx($a093c7e1ec25a057$export$41fb9f06171c75f4, { asChild: true, children: jsxRuntimeExports.jsx("div", { className: clsx(styles$8.trigger, classes?.trigger ?? ""), children: children }) }), jsxRuntimeExports.jsx($a093c7e1ec25a057$export$602eac185826482c, { children: jsxRuntimeExports.jsx($a093c7e1ec25a057$export$7c6e2c02157bb7d2, { side: side, sideOffset: 5, className: clsx(styles$8.content, classes?.content ?? ""), children: typeof message === "string" ? jsxRuntimeExports.jsx(Text, { children: message }) : message }) })] }) }));
22468
22475
  };
22469
22476
 
22470
22477
  const $b3bbe2732c13b576$export$bea8ebba691c5813 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
@@ -28163,6 +28170,10 @@ function DatePicker({ side = "top", dateFormat = "DD/MM/YYYY", placeholder = "DD
28163
28170
  const textFieldRef = React.useRef(null);
28164
28171
  const contentRef = React.useRef(null);
28165
28172
  const isInputFieldFocused = React.useRef(false);
28173
+ const calendarValRef = React.useRef(value);
28174
+ React.useEffect(() => {
28175
+ calendarValRef.current = calendarVal;
28176
+ }, [calendarVal]);
28166
28177
  function isElementOutside(el) {
28167
28178
  return !isDropdownOpenRef.current && // Month and Year dropdown from Date picker
28168
28179
  !textFieldRef.current?.contains(el) && // TextField
@@ -28175,12 +28186,12 @@ function DatePicker({ side = "top", dateFormat = "DD/MM/YYYY", placeholder = "DD
28175
28186
  }, []);
28176
28187
  function registerEventListeners() {
28177
28188
  isInputFieldFocused.current = true;
28178
- document.addEventListener('mouseup', handleMouseDown, true);
28189
+ document.addEventListener('mouseup', handleMouseDown);
28179
28190
  }
28180
28191
  function removeEventListeners() {
28181
28192
  isInputFieldFocused.current = false;
28182
28193
  setShowCalendar(false);
28183
- const updatedVal = dayjs(calendarVal).format(dateFormat);
28194
+ const updatedVal = dayjs(calendarValRef.current).format(dateFormat);
28184
28195
  if (textFieldRef.current)
28185
28196
  textFieldRef.current.value = updatedVal;
28186
28197
  if (inputState === undefined)
@@ -28190,6 +28201,7 @@ function DatePicker({ side = "top", dateFormat = "DD/MM/YYYY", placeholder = "DD
28190
28201
  const handleSelect = (day) => {
28191
28202
  onSelect(day);
28192
28203
  setCalendarVal(day);
28204
+ calendarValRef.current = day;
28193
28205
  setInputState(undefined);
28194
28206
  removeEventListeners();
28195
28207
  };