@algorithm-shift/design-system 1.2.971 → 1.2.973

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.mjs CHANGED
@@ -27241,9 +27241,18 @@ var CheckboxInput = ({ className, style, ...props }) => {
27241
27241
  const isEditable = props.isEditable ?? true;
27242
27242
  const isDisabled = props.isDisabled ?? false;
27243
27243
  const text = props.text ? props.text : "Subscribe";
27244
+ const formatValue = (value) => {
27245
+ if (typeof value === "boolean") {
27246
+ return value;
27247
+ }
27248
+ if (value === "true" || value === "1") {
27249
+ return true;
27250
+ }
27251
+ return false;
27252
+ };
27244
27253
  useEffect9(() => {
27245
27254
  if (props.value) {
27246
- handleChange(props.value);
27255
+ handleChange(formatValue(props.value));
27247
27256
  }
27248
27257
  }, []);
27249
27258
  const handleChange = (value) => {
@@ -27255,7 +27264,7 @@ var CheckboxInput = ({ className, style, ...props }) => {
27255
27264
  Checkbox,
27256
27265
  {
27257
27266
  id: props.name || "checkbox",
27258
- checked: !!props.value,
27267
+ checked: formatValue(props.value),
27259
27268
  onCheckedChange: handleChange,
27260
27269
  disabled: !isEditable || isDisabled
27261
27270
  }
@@ -27822,7 +27831,7 @@ function useLazyDropdown(config) {
27822
27831
  if (term) params[configRef.current.dataLabel ? `${configRef.current.dataLabel}[ilike]` : "search[ilike]"] = term;
27823
27832
  const { baseUrl, shouldAbort, params: urlParams } = extractAndEnforceUrlParams(
27824
27833
  configRef.current.apiUrl,
27825
- configRef.current.enforceStrictQueryParams ?? false
27834
+ !!configRef.current.enforceStrictQueryParams
27826
27835
  );
27827
27836
  if (shouldAbort) {
27828
27837
  setLoading(false);
@@ -27896,7 +27905,7 @@ function useLazyDropdown(config) {
27896
27905
  }
27897
27906
  const { baseUrl, shouldAbort, params: urlParams } = extractAndEnforceUrlParams(
27898
27907
  configRef.current.apiUrl,
27899
- configRef.current.enforceStrictQueryParams ?? false
27908
+ !!configRef.current.enforceStrictQueryParams
27900
27909
  );
27901
27910
  if (shouldAbort) {
27902
27911
  setLoading(false);
@@ -28795,8 +28804,7 @@ function DateTimePicker({
28795
28804
  return;
28796
28805
  }
28797
28806
  const clickedDate = new Date(next);
28798
- const selectedYearDate = new Date(year, clickedDate.getMonth(), clickedDate.getDate());
28799
- updateDateTime(selectedYearDate);
28807
+ updateDateTime(clickedDate);
28800
28808
  };
28801
28809
  const updateTimeInDate = (h, m) => {
28802
28810
  if (!date) {
@@ -28846,9 +28854,9 @@ function DateTimePicker({
28846
28854
  const displayValue = React6.useMemo(() => {
28847
28855
  if (!date) return "";
28848
28856
  try {
28849
- if (mode === "date") return format(date, "yyyy-MM-dd");
28857
+ if (mode === "date") return format(date, "dd-MM-yyyy");
28850
28858
  if (mode === "time") return format(date, "hh:mm aa");
28851
- return format(date, "yyyy-MM-dd hh:mm aa");
28859
+ return format(date, "dd-MM-yyyy hh:mm aa");
28852
28860
  } catch {
28853
28861
  return "";
28854
28862
  }
@@ -28885,8 +28893,21 @@ function DateTimePicker({
28885
28893
  },
28886
28894
  disabled: isInputDisabled,
28887
28895
  children: [
28888
- displayValue || placeholder,
28889
- /* @__PURE__ */ jsx45(Calendar1, { className: "absolute right-2 top-2" })
28896
+ /* @__PURE__ */ jsx45(Calendar1, { className: "absolute left-2 top-2" }),
28897
+ /* @__PURE__ */ jsx45("span", { className: "ml-5", children: displayValue || placeholder }),
28898
+ displayValue && /* @__PURE__ */ jsx45(
28899
+ SquareX,
28900
+ {
28901
+ className: "absolute right-2 top-2 cursor-pointer",
28902
+ role: "presentation",
28903
+ style: { pointerEvents: "auto" },
28904
+ onClick: (e) => {
28905
+ e.stopPropagation();
28906
+ setDate(void 0);
28907
+ emitChange(void 0);
28908
+ }
28909
+ }
28910
+ )
28890
28911
  ]
28891
28912
  }
28892
28913
  ) }),
@@ -30890,7 +30911,7 @@ function Navbar({
30890
30911
  list = [],
30891
30912
  profileMenu = [],
30892
30913
  userName = "Guest User",
30893
- isBuilder = true,
30914
+ isBuilder = false,
30894
30915
  source,
30895
30916
  navList
30896
30917
  }) {