@algorithm-shift/design-system 1.2.61 → 1.2.62
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 +9 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27958,6 +27958,10 @@ function DatePicker({ className, style, ...props }) {
|
|
|
27958
27958
|
const handleChange = (e) => {
|
|
27959
27959
|
props.onChange?.(e);
|
|
27960
27960
|
};
|
|
27961
|
+
const toDateInputValue = (value) => {
|
|
27962
|
+
if (!value) return "";
|
|
27963
|
+
return new Date(value).toISOString().split("T")[0];
|
|
27964
|
+
};
|
|
27961
27965
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
27962
27966
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
27963
27967
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Calendar, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
@@ -27970,7 +27974,7 @@ function DatePicker({ className, style, ...props }) {
|
|
|
27970
27974
|
onChange: handleChange,
|
|
27971
27975
|
disabled: isDisabled || !isEditable,
|
|
27972
27976
|
name: props.name,
|
|
27973
|
-
value: props.value
|
|
27977
|
+
value: toDateInputValue(props.value),
|
|
27974
27978
|
className: cn(
|
|
27975
27979
|
className,
|
|
27976
27980
|
props.errorMessage ? "border-red-500" : "",
|
|
@@ -28843,12 +28847,11 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
|
28843
28847
|
}
|
|
28844
28848
|
)
|
|
28845
28849
|
] });
|
|
28846
|
-
const forceMobile = canvasMode === "mobile" || canvasMode === "tablet";
|
|
28847
|
-
const forceDesktop = canvasMode === "desktop";
|
|
28850
|
+
const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
|
|
28851
|
+
const forceDesktop = canvasMode ? canvasMode === "desktop" : void 0;
|
|
28848
28852
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className, style, children: [
|
|
28849
|
-
forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
|
|
28850
|
-
forceMobile && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: renderMobileMenu() }),
|
|
28851
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "md:hidden", children: renderMobileMenu() })
|
|
28853
|
+
forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
|
|
28854
|
+
forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: renderMobileMenu() }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex md:hidden", children: renderMobileMenu() })
|
|
28852
28855
|
] });
|
|
28853
28856
|
};
|
|
28854
28857
|
var Tabs_default = Tabs;
|