framepexls-ui-lib 0.1.27 → 0.1.29

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.
@@ -376,12 +376,13 @@ function DateTimeField({
376
376
  }
377
377
  );
378
378
  const isReadOnly = !htmlOnChange;
379
+ const showOpenBtn = !inputProps.disabled && !(clearable && !!(value != null ? value : ""));
379
380
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: anchorRef, className: "relative", children: [
380
381
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
381
382
  import_Input.default,
382
383
  {
383
384
  leftSlot: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CalendarIcon, {}),
384
- rightSlot: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
385
+ rightSlot: showOpenBtn ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
385
386
  import_Button.default,
386
387
  {
387
388
  unstyled: true,
@@ -394,7 +395,7 @@ function DateTimeField({
394
395
  title: "Abrir selector",
395
396
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { viewBox: "0 0 24 24", className: "h-4.5 w-4.5", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M8 10h8M8 14h5" }) })
396
397
  }
397
- ),
398
+ ) : void 0,
398
399
  value: display,
399
400
  onClick: openPopover,
400
401
  clearable,
@@ -343,12 +343,13 @@ function DateTimeField({
343
343
  }
344
344
  );
345
345
  const isReadOnly = !htmlOnChange;
346
+ const showOpenBtn = !inputProps.disabled && !(clearable && !!(value != null ? value : ""));
346
347
  return /* @__PURE__ */ jsxs("div", { ref: anchorRef, className: "relative", children: [
347
348
  /* @__PURE__ */ jsx(
348
349
  Input,
349
350
  {
350
351
  leftSlot: /* @__PURE__ */ jsx(CalendarIcon, {}),
351
- rightSlot: /* @__PURE__ */ jsx(
352
+ rightSlot: showOpenBtn ? /* @__PURE__ */ jsx(
352
353
  Button,
353
354
  {
354
355
  unstyled: true,
@@ -361,7 +362,7 @@ function DateTimeField({
361
362
  title: "Abrir selector",
362
363
  children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-4.5 w-4.5", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx("path", { d: "M8 10h8M8 14h5" }) })
363
364
  }
364
- ),
365
+ ) : void 0,
365
366
  value: display,
366
367
  onClick: openPopover,
367
368
  clearable,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framepexls-ui-lib",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "Componentes UI de Framepexls para React/Next.",