najm-kit 2.11.18 → 2.11.20

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.11.19 - 2026-09-06
4
+
5
+ - Made native calendar month and year dropdowns follow the resolved Najm light
6
+ or dark theme instead of opening with the browser's light color scheme.
7
+ - Added pointer cursors to interactive calendar days while retaining the
8
+ not-allowed cursor for disabled dates.
9
+
3
10
  ## 2.11.18 - 2026-09-06
4
11
 
5
12
  - Added a resolved-state render-prop form of `NSidebar.footer`, matching the
package/dist/index.d.ts CHANGED
@@ -846,6 +846,7 @@ interface NConfirmDialogProps {
846
846
  declare function NConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, variant, loading, children, icon, }: NConfirmDialogProps): React__default.JSX.Element;
847
847
 
848
848
  interface NDeleteDialogContentProps {
849
+ title?: ReactNode;
849
850
  itemName: string;
850
851
  itemType?: string;
851
852
  icon?: NIconSource;
@@ -866,7 +867,7 @@ interface NDeleteDialogProps extends Omit<NDeleteDialogContentProps, "className"
866
867
  onConfirm?: () => void | Promise<void>;
867
868
  onCancel?: () => void | Promise<void>;
868
869
  }
869
- declare function NDeleteDialogContent({ itemName, itemType, icon: Icon, warningText, className, }: NDeleteDialogContentProps): React$1.JSX.Element;
870
+ declare function NDeleteDialogContent({ title, itemName, itemType, icon: Icon, warningText, className, }: NDeleteDialogContentProps): React$1.JSX.Element;
870
871
  declare function NDeleteDialog({ open, title, description, itemName, itemType, icon, warningText, confirmText, cancelText, loading, zIndex, className, contentClassName, onOpenChange, onConfirm, onCancel, }: NDeleteDialogProps): React$1.JSX.Element;
871
872
 
872
873
  declare function NPortalScopeProvider({ className, children }: {
package/dist/index.mjs CHANGED
@@ -2233,6 +2233,7 @@ function NConfirmDialog({
2233
2233
  ] }) });
2234
2234
  }
2235
2235
  function NDeleteDialogContent({
2236
+ title = "Delete",
2236
2237
  itemName,
2237
2238
  itemType,
2238
2239
  icon: Icon2 = "trash-2",
@@ -2242,10 +2243,10 @@ function NDeleteDialogContent({
2242
2243
  return /* @__PURE__ */ jsx("form", { id: "najm-delete-form", onSubmit: (e) => e.preventDefault(), children: /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center text-center", className), children: [
2243
2244
  /* @__PURE__ */ jsx("div", { className: "mb-6 flex size-16 items-center justify-center rounded-[20px] bg-destructive/10 text-destructive dark:bg-[#5a1822] dark:text-white", children: /* @__PURE__ */ jsx(NIcon, { icon: Icon2, className: "size-7" }) }),
2244
2245
  /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2245
- /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold leading-none text-card-foreground dark:text-white", children: "Delete" }),
2246
+ /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold leading-none text-card-foreground dark:text-white", children: title }),
2246
2247
  /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
2247
2248
  /* @__PURE__ */ jsx("p", { className: "text-sm font-medium leading-5 text-muted-foreground dark:text-[#aab4c2]", children: warningText }),
2248
- /* @__PURE__ */ jsxs("p", { className: "max-w-[280px] truncate text-sm font-bold leading-5 text-card-foreground dark:text-white", children: [
2249
+ /* @__PURE__ */ jsxs("p", { className: "mx-auto max-w-[280px] break-words text-center text-sm font-bold leading-5 text-card-foreground dark:text-white", children: [
2249
2250
  '"',
2250
2251
  itemName,
2251
2252
  '"',
@@ -2296,6 +2297,7 @@ function NDeleteDialog({
2296
2297
  /* @__PURE__ */ jsx(
2297
2298
  NDeleteDialogContent,
2298
2299
  {
2300
+ title,
2299
2301
  itemName,
2300
2302
  itemType,
2301
2303
  icon,
@@ -2312,7 +2314,7 @@ function NDeleteDialog({
2312
2314
  variant: "outline",
2313
2315
  onClick: onCancel,
2314
2316
  disabled: loading,
2315
- className: "h-10 w-full rounded-[10px] border border-border bg-secondary text-sm font-bold text-secondary-foreground shadow-none hover:bg-secondary/80 hover:text-secondary-foreground dark:border-0 dark:bg-[#3e4a5d] dark:text-white dark:hover:bg-[#4b586c] dark:hover:text-white",
2317
+ className: "h-10 w-full rounded-[10px] border border-destructive bg-transparent text-sm font-bold text-card-foreground shadow-none hover:bg-transparent hover:text-card-foreground dark:border-destructive dark:bg-transparent dark:text-white dark:hover:bg-transparent dark:hover:text-white",
2316
2318
  children: cancelText
2317
2319
  }
2318
2320
  ),
@@ -4801,6 +4803,7 @@ var SwitchInput = ({ value, onChange, label = "", helper, className = "", varian
4801
4803
  ] });
4802
4804
  function Calendar(props) {
4803
4805
  const { className, classNames, mode = "single", ...rest } = props;
4806
+ const themeMode = useNajmThemeMode();
4804
4807
  return /* @__PURE__ */ jsx(
4805
4808
  DayPicker,
4806
4809
  {
@@ -4812,7 +4815,10 @@ function Calendar(props) {
4812
4815
  caption_label: "text-sm font-medium",
4813
4816
  dropdowns: "relative inline-flex items-center gap-2",
4814
4817
  dropdown_root: "relative inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-sm font-medium text-foreground hover:bg-accent",
4815
- dropdown: "absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0",
4818
+ dropdown: cn(
4819
+ "absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0",
4820
+ themeMode === "dark" ? "scheme-dark" : "scheme-light"
4821
+ ),
4816
4822
  nav: "flex items-center gap-1",
4817
4823
  button_previous: cn(buttonVariants({ variant: "ghost", size: "icon" }), "size-7 bg-transparent p-0 opacity-50 hover:opacity-100 absolute left-1"),
4818
4824
  button_next: cn(buttonVariants({ variant: "ghost", size: "icon" }), "size-7 bg-transparent p-0 opacity-50 hover:opacity-100 absolute right-1"),
@@ -4821,7 +4827,7 @@ function Calendar(props) {
4821
4827
  weekday: "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
4822
4828
  week: "flex w-full mt-2",
4823
4829
  day: "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent",
4824
- day_button: "size-8 p-0 font-normal aria-selected:bg-primary aria-selected:text-primary-foreground",
4830
+ day_button: "size-8 cursor-pointer p-0 font-normal aria-selected:bg-primary aria-selected:text-primary-foreground disabled:cursor-not-allowed",
4825
4831
  selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground rounded-md",
4826
4832
  today: "bg-accent text-accent-foreground rounded-md",
4827
4833
  outside: "text-muted-foreground opacity-50",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najm-kit",
3
- "version": "2.11.18",
3
+ "version": "2.11.20",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Reusable React UI component package for Najm framework",