@kreativa/ui 0.1.7 → 0.1.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.js CHANGED
@@ -236,23 +236,23 @@ function Modal({ isOpen, onClose, title, children, maxWidth = "xl" }) {
236
236
  const modalContent = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
237
237
  "div",
238
238
  {
239
- className: "fixed inset-0 bg-black/50 backdrop-blur-sm z-50 overflow-y-auto",
239
+ className: "fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",
240
240
  onClick: (e) => {
241
241
  if (e.target === e.currentTarget) {
242
242
  onClose();
243
243
  }
244
244
  },
245
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "min-h-full flex items-center justify-center p-8", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
245
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
246
246
  "div",
247
247
  {
248
- className: `bg-white rounded-2xl shadow-2xl w-full ${maxWidthClasses[maxWidth]} p-6 my-8`,
248
+ className: `bg-white rounded-2xl shadow-2xl w-full ${maxWidthClasses[maxWidth]} max-h-[95vh] flex flex-col`,
249
249
  onClick: (e) => e.stopPropagation(),
250
250
  children: [
251
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "text-xl font-bold text-gray-800 mb-6", children: title }),
252
- children
251
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-shrink-0 px-6 pt-6 pb-4 border-b", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "text-xl font-bold text-gray-800", children: title }) }),
252
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children })
253
253
  ]
254
254
  }
255
- ) })
255
+ )
256
256
  }
257
257
  );
258
258
  return (0, import_react_dom.createPortal)(modalContent, document.body);
@@ -618,14 +618,14 @@ function Select({
618
618
  return values.includes(option.value);
619
619
  };
620
620
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { ref: containerRef, className: `relative ${className}`, children: [
621
- label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: label }),
621
+ label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: label }),
622
622
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
623
623
  "div",
624
624
  {
625
625
  className: `
626
- relative w-full px-4 py-3 rounded-xl border bg-white
626
+ relative w-full px-3 py-2 rounded-lg border bg-white
627
627
  ${disabled ? "bg-gray-100 cursor-not-allowed" : "cursor-pointer"}
628
- ${error ? "border-red-300" : isOpen ? "border-primary-500 ring-2 ring-primary-100" : "border-gray-200"}
628
+ ${error ? "border-red-500" : isOpen ? "border-primary-500 ring-2 ring-primary-500" : "border-gray-300"}
629
629
  transition-all
630
630
  `,
631
631
  onClick: () => {
@@ -665,11 +665,11 @@ function Select({
665
665
  }
666
666
  ),
667
667
  error && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mt-1 text-xs text-red-600", children: error }),
668
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "absolute z-50 w-full mt-1 bg-white border border-gray-200 rounded-xl shadow-lg max-h-60 overflow-auto", children: filteredOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-4 py-3 text-sm text-gray-500", children: "No options found" }) : filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
668
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-auto", children: filteredOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-3 py-2 text-sm text-gray-500", children: "Inga alternativ hittades" }) : filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
669
669
  "div",
670
670
  {
671
671
  className: `
672
- px-4 py-3 text-sm cursor-pointer flex items-center gap-2
672
+ px-3 py-2 text-sm cursor-pointer flex items-center gap-2
673
673
  ${option.disabled ? "text-gray-400 cursor-not-allowed" : "text-gray-800"}
674
674
  ${highlightedIndex === index ? "bg-primary-50" : "hover:bg-gray-50"}
675
675
  ${isSelected(option) ? "bg-primary-50 font-medium" : ""}