najm-kit 2.6.4 → 2.7.0

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.
@@ -381,8 +381,14 @@ declare function buildPaginationLabels(t: NajmTranslate, prefix?: string): NTabl
381
381
 
382
382
  interface NajmUIProviderProps extends Omit<NajmPreferencesProviderProps, "children"> {
383
383
  children: React$1.ReactNode;
384
- /** The design config handed to `NajmDesignProvider`. */
385
- design: NajmDesignConfig;
384
+ /**
385
+ * The design config handed to `NajmDesignProvider`.
386
+ *
387
+ * Optional, and deliberately so: an application with no runtime theme editor
388
+ * has nothing to put here, and requiring it was the only reason such an
389
+ * application still had to author a provider file just to hold a constant.
390
+ */
391
+ design?: NajmDesignConfig;
386
392
  /** Forwarded to `NajmDesignProvider`. */
387
393
  className?: string;
388
394
  /**
@@ -0,0 +1,51 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Translations } from 'najm-i18n';
3
+ import { NajmNextUIProviderProps } from './next.js';
4
+ import 'react';
5
+ import '../NajmUIProvider-BsCoDjHH.js';
6
+
7
+ /** Branding shown by the kit's chrome. Purely presentational values. */
8
+ interface NajmAppBranding {
9
+ appName?: string;
10
+ logoExpanded?: string | null;
11
+ logoCollapsed?: string | null;
12
+ }
13
+ interface NajmAppProviderProps extends Omit<NajmNextUIProviderProps, 't'> {
14
+ /**
15
+ * Catalog for `najm-i18n`. Supplying it mounts an `I18nProvider` and derives
16
+ * the pagination labels from it, so `t` is not a prop here — the provider
17
+ * already has the translator and passing one in would be a second source of
18
+ * truth.
19
+ */
20
+ translations?: Translations;
21
+ initialLanguage?: string;
22
+ defaultLanguage?: string;
23
+ /**
24
+ * Where the chosen language is POSTed, as `{ language }`. Defaults to
25
+ * `/api/ui-language`.
26
+ *
27
+ * Unlike theme and time zone, this deliberately does *not* refresh the
28
+ * router: `najm-i18n` swaps catalogs reactively on the client, and a refresh
29
+ * would discard that work to re-render the same strings from the server.
30
+ */
31
+ languageEndpoint?: string;
32
+ branding?: NajmAppBranding;
33
+ }
34
+ /**
35
+ * The whole UI provider stack for a Najm application, as one component.
36
+ *
37
+ * Language, theme, time zone, design, branding and `NTable` defaults — the
38
+ * concerns that were previously a per-project folder of wrapper files, each one
39
+ * existing only to read the context the one above it published.
40
+ *
41
+ * Auth and react-query are deliberately *not* here. They are not UI concerns,
42
+ * they would drag `najm-auth` and `@tanstack/react-query` into this package,
43
+ * and an application that wants different query policy should not have to fork
44
+ * a provider to get it. Mount them above this, from their own packages.
45
+ *
46
+ * Design is optional. Applications that resolve a design config at runtime — a
47
+ * theme editor — compute it above and pass it down; everything else omits it.
48
+ */
49
+ declare function NajmAppProvider({ translations, initialLanguage, defaultLanguage, languageEndpoint, ...props }: NajmAppProviderProps): react_jsx_runtime.JSX.Element;
50
+
51
+ export { type NajmAppBranding, NajmAppProvider, type NajmAppProviderProps };
@@ -0,0 +1,70 @@
1
+ 'use client';
2
+ import { NBrandingProvider } from '../chunk-IGUQGT3G.mjs';
3
+ import { NajmNextUIProvider } from '../chunk-4MRUJ2ZO.mjs';
4
+ import '../chunk-7F65QM43.mjs';
5
+ import '../chunk-YBM5CTE6.mjs';
6
+ import * as React from 'react';
7
+ import { I18nProvider, useTranslation } from 'najm-i18n/react';
8
+ import { jsx } from 'react/jsx-runtime';
9
+
10
+ var DEFAULT_LANGUAGE_ENDPOINT = "/api/ui-language";
11
+ function NajmAppUI({ children, branding, ...props }) {
12
+ const { t } = useTranslation();
13
+ return /* @__PURE__ */ jsx(NajmNextUIProvider, { t, ...props, children: /* @__PURE__ */ jsx(
14
+ NBrandingProvider,
15
+ {
16
+ appName: branding?.appName,
17
+ logoExpanded: branding?.logoExpanded,
18
+ logoCollapsed: branding?.logoCollapsed,
19
+ children
20
+ }
21
+ ) });
22
+ }
23
+ function NajmAppNoI18n({ children, branding, ...props }) {
24
+ return /* @__PURE__ */ jsx(NajmNextUIProvider, { ...props, children: /* @__PURE__ */ jsx(
25
+ NBrandingProvider,
26
+ {
27
+ appName: branding?.appName,
28
+ logoExpanded: branding?.logoExpanded,
29
+ logoCollapsed: branding?.logoCollapsed,
30
+ children
31
+ }
32
+ ) });
33
+ }
34
+ function NajmAppProvider({
35
+ translations,
36
+ initialLanguage,
37
+ defaultLanguage,
38
+ languageEndpoint = DEFAULT_LANGUAGE_ENDPOINT,
39
+ ...props
40
+ }) {
41
+ const persistLanguage = React.useCallback(
42
+ async (language) => {
43
+ const response = await fetch(languageEndpoint, {
44
+ method: "POST",
45
+ headers: { "Content-Type": "application/json" },
46
+ credentials: "same-origin",
47
+ body: JSON.stringify({ language })
48
+ });
49
+ if (!response.ok) {
50
+ throw new Error(
51
+ `Failed to persist language to ${languageEndpoint}: ${response.status}`
52
+ );
53
+ }
54
+ },
55
+ [languageEndpoint]
56
+ );
57
+ if (!translations) return /* @__PURE__ */ jsx(NajmAppNoI18n, { ...props });
58
+ return /* @__PURE__ */ jsx(
59
+ I18nProvider,
60
+ {
61
+ translations,
62
+ initialLanguage: initialLanguage ?? defaultLanguage ?? "en",
63
+ defaultLanguage,
64
+ onLanguageChange: persistLanguage,
65
+ children: /* @__PURE__ */ jsx(NajmAppUI, { ...props })
66
+ }
67
+ );
68
+ }
69
+
70
+ export { NajmAppProvider };
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React__default from 'react';
3
- import { N as NajmUIProviderProps } from '../NajmUIProvider-x4chK0io.js';
3
+ import { N as NajmUIProviderProps } from '../NajmUIProvider-BsCoDjHH.js';
4
4
 
5
5
  interface NextLinkAdapterProps extends Record<string, any> {
6
6
  href: string;
@@ -1,72 +1,3 @@
1
- import { NajmUIProvider } from '../chunk-JZJCQBOH.mjs';
1
+ export { NajmNextUIProvider, NextLinkAdapter, useNextNavigationAdapter } from '../chunk-4MRUJ2ZO.mjs';
2
+ import '../chunk-7F65QM43.mjs';
2
3
  import '../chunk-YBM5CTE6.mjs';
3
- import React from 'react';
4
- import { useRouter } from 'next/navigation';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- function NextLinkAdapter({ children, ...props }) {
8
- return React.createElement("a", props, children);
9
- }
10
- function useNextNavigationAdapter() {
11
- return {
12
- pathname: typeof window !== "undefined" ? window.location.pathname : "",
13
- push: (path) => {
14
- if (typeof window !== "undefined") {
15
- window.history.pushState(null, "", path);
16
- }
17
- },
18
- replace: (path) => {
19
- if (typeof window !== "undefined") {
20
- window.history.replaceState(null, "", path);
21
- }
22
- }
23
- };
24
- }
25
- var DEFAULT_THEME_ENDPOINT = "/api/ui-theme";
26
- var DEFAULT_TIME_ZONE_ENDPOINT = "/api/ui-timezone";
27
- async function postPreference(endpoint, body) {
28
- const response = await fetch(endpoint, {
29
- method: "POST",
30
- headers: { "Content-Type": "application/json" },
31
- credentials: "same-origin",
32
- body: JSON.stringify(body)
33
- });
34
- if (!response.ok) {
35
- throw new Error(
36
- `Failed to persist preference to ${endpoint}: ${response.status}`
37
- );
38
- }
39
- }
40
- function NajmNextUIProvider({
41
- endpoints,
42
- refreshOnChange = true,
43
- ...props
44
- }) {
45
- const router = useRouter();
46
- const themeEndpoint = endpoints?.theme ?? DEFAULT_THEME_ENDPOINT;
47
- const timeZoneEndpoint = endpoints?.timeZone ?? DEFAULT_TIME_ZONE_ENDPOINT;
48
- const onThemeChange = React.useCallback(
49
- async (theme) => {
50
- await postPreference(themeEndpoint, { theme });
51
- if (refreshOnChange) router.refresh();
52
- },
53
- [themeEndpoint, refreshOnChange, router]
54
- );
55
- const onTimeZoneChange = React.useCallback(
56
- async (timeZone) => {
57
- await postPreference(timeZoneEndpoint, { timeZone });
58
- if (refreshOnChange) router.refresh();
59
- },
60
- [timeZoneEndpoint, refreshOnChange, router]
61
- );
62
- return /* @__PURE__ */ jsx(
63
- NajmUIProvider,
64
- {
65
- ...props,
66
- onThemeChange,
67
- onTimeZoneChange
68
- }
69
- );
70
- }
71
-
72
- export { NajmNextUIProvider, NextLinkAdapter, useNextNavigationAdapter };
@@ -0,0 +1,71 @@
1
+ import { NajmUIProvider } from './chunk-7F65QM43.mjs';
2
+ import React from 'react';
3
+ import { useRouter } from 'next/navigation';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ function NextLinkAdapter({ children, ...props }) {
7
+ return React.createElement("a", props, children);
8
+ }
9
+ function useNextNavigationAdapter() {
10
+ return {
11
+ pathname: typeof window !== "undefined" ? window.location.pathname : "",
12
+ push: (path) => {
13
+ if (typeof window !== "undefined") {
14
+ window.history.pushState(null, "", path);
15
+ }
16
+ },
17
+ replace: (path) => {
18
+ if (typeof window !== "undefined") {
19
+ window.history.replaceState(null, "", path);
20
+ }
21
+ }
22
+ };
23
+ }
24
+ var DEFAULT_THEME_ENDPOINT = "/api/ui-theme";
25
+ var DEFAULT_TIME_ZONE_ENDPOINT = "/api/ui-timezone";
26
+ async function postPreference(endpoint, body) {
27
+ const response = await fetch(endpoint, {
28
+ method: "POST",
29
+ headers: { "Content-Type": "application/json" },
30
+ credentials: "same-origin",
31
+ body: JSON.stringify(body)
32
+ });
33
+ if (!response.ok) {
34
+ throw new Error(
35
+ `Failed to persist preference to ${endpoint}: ${response.status}`
36
+ );
37
+ }
38
+ }
39
+ function NajmNextUIProvider({
40
+ endpoints,
41
+ refreshOnChange = true,
42
+ ...props
43
+ }) {
44
+ const router = useRouter();
45
+ const themeEndpoint = endpoints?.theme ?? DEFAULT_THEME_ENDPOINT;
46
+ const timeZoneEndpoint = endpoints?.timeZone ?? DEFAULT_TIME_ZONE_ENDPOINT;
47
+ const onThemeChange = React.useCallback(
48
+ async (theme) => {
49
+ await postPreference(themeEndpoint, { theme });
50
+ if (refreshOnChange) router.refresh();
51
+ },
52
+ [themeEndpoint, refreshOnChange, router]
53
+ );
54
+ const onTimeZoneChange = React.useCallback(
55
+ async (timeZone) => {
56
+ await postPreference(timeZoneEndpoint, { timeZone });
57
+ if (refreshOnChange) router.refresh();
58
+ },
59
+ [timeZoneEndpoint, refreshOnChange, router]
60
+ );
61
+ return /* @__PURE__ */ jsx(
62
+ NajmUIProvider,
63
+ {
64
+ ...props,
65
+ onThemeChange,
66
+ onTimeZoneChange
67
+ }
68
+ );
69
+ }
70
+
71
+ export { NajmNextUIProvider, NextLinkAdapter, useNextNavigationAdapter };
@@ -114,9 +114,14 @@ function buildPaginationLabels(t, prefix = DEFAULT_PAGINATION_KEY_PREFIX) {
114
114
  rowsSelected: (selected, total) => t(key("rowsSelected"), { selected, total })
115
115
  };
116
116
  }
117
+ var EMPTY_DESIGN = Object.freeze({
118
+ version: 1,
119
+ theme: {},
120
+ components: {}
121
+ });
117
122
  function NajmUICore({
118
123
  children,
119
- design,
124
+ design = EMPTY_DESIGN,
120
125
  className,
121
126
  t,
122
127
  paginationKeyPrefix = DEFAULT_PAGINATION_KEY_PREFIX,
@@ -0,0 +1,24 @@
1
+ import { createContext, useContext, useMemo } from 'react';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ // src/components/branding/NBrandingContext.tsx
5
+ var NBrandingContext = createContext(null);
6
+ function useNBranding() {
7
+ return useContext(NBrandingContext);
8
+ }
9
+ function NBrandingProvider({
10
+ children,
11
+ appName,
12
+ logoExpanded,
13
+ logoCollapsed,
14
+ logoFallback,
15
+ logoHref
16
+ }) {
17
+ const value = useMemo(
18
+ () => ({ appName, logoExpanded, logoCollapsed, logoFallback, logoHref }),
19
+ [appName, logoExpanded, logoCollapsed, logoFallback, logoHref]
20
+ );
21
+ return /* @__PURE__ */ jsx(NBrandingContext.Provider, { value, children });
22
+ }
23
+
24
+ export { NBrandingProvider, useNBranding };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as NajmThemeProviderProps, b as NajmAppearance, c as NajmMode, d as NajmDesignConfig, e as NajmThemeConfig, f as NajmAccent, g as NajmThemeTokens, h as NajmPreset, i as NajmComponentName, j as NajmComponentStyleConfig, k as NajmComponentThemeConfig, l as NajmTypographyConfig, m as NajmLayoutConfig, n as NajmVariantStyle, o as NTablePaginationVariant, p as NTablePaginationLabels, q as NTableCardPagination, r as NajmResponsiveBreakpoint, s as NajmResponsiveValue } from './NajmUIProvider-x4chK0io.js';
3
- export { D as DEFAULT_PAGINATION_KEY_PREFIX, t as DEFAULT_TIME_ZONE, u as NAJM_COMPONENT_NAMES, v as NTableDefaults, w as NTableDefaultsProvider, x as NTableInfinitePagination, y as NTableLoadMorePagination, z as NajmComponentRadius, A as NajmDensity, B as NajmPreferencesContextValue, C as NajmPreferencesProvider, E as NajmPreferencesProviderProps, F as NajmSlotStyle, G as NajmTranslate, H as NajmUIProvider, N as NajmUIProviderProps, R as RADIUS_VALUE_MAP, I as buildPaginationLabels, J as resolveRadiusValue, K as useNTableDefaults, L as useNajmPreferencesContext, M as useNajmTheme, O as useNajmTimeZone } from './NajmUIProvider-x4chK0io.js';
2
+ import { a as NajmThemeProviderProps, b as NajmAppearance, c as NajmMode, d as NajmDesignConfig, e as NajmThemeConfig, f as NajmAccent, g as NajmThemeTokens, h as NajmPreset, i as NajmComponentName, j as NajmComponentStyleConfig, k as NajmComponentThemeConfig, l as NajmTypographyConfig, m as NajmLayoutConfig, n as NajmVariantStyle, o as NTablePaginationVariant, p as NTablePaginationLabels, q as NTableCardPagination, r as NajmResponsiveBreakpoint, s as NajmResponsiveValue } from './NajmUIProvider-BsCoDjHH.js';
3
+ export { D as DEFAULT_PAGINATION_KEY_PREFIX, t as DEFAULT_TIME_ZONE, u as NAJM_COMPONENT_NAMES, v as NTableDefaults, w as NTableDefaultsProvider, x as NTableInfinitePagination, y as NTableLoadMorePagination, z as NajmComponentRadius, A as NajmDensity, B as NajmPreferencesContextValue, C as NajmPreferencesProvider, E as NajmPreferencesProviderProps, F as NajmSlotStyle, G as NajmTranslate, H as NajmUIProvider, N as NajmUIProviderProps, R as RADIUS_VALUE_MAP, I as buildPaginationLabels, J as resolveRadiusValue, K as useNTableDefaults, L as useNajmPreferencesContext, M as useNajmTheme, O as useNajmTimeZone } from './NajmUIProvider-BsCoDjHH.js';
4
4
  import * as React$1 from 'react';
5
5
  import React__default, { RefObject, ReactNode, ComponentType, InputHTMLAttributes, Ref, ImgHTMLAttributes, CSSProperties, MouseEvent, MouseEventHandler } from 'react';
6
6
  import * as class_variance_authority_types from 'class-variance-authority/types';
package/dist/index.mjs CHANGED
@@ -1,5 +1,7 @@
1
- import { useResolvedPaginationLabels } from './chunk-JZJCQBOH.mjs';
2
- export { DEFAULT_PAGINATION_KEY_PREFIX, DEFAULT_TIME_ZONE, NTableDefaultsProvider, NajmPreferencesProvider, NajmUIProvider, buildPaginationLabels, useNTableDefaults, useNajmPreferencesContext, useNajmTheme, useNajmTimeZone } from './chunk-JZJCQBOH.mjs';
1
+ import { useNBranding } from './chunk-IGUQGT3G.mjs';
2
+ export { NBrandingProvider, useNBranding } from './chunk-IGUQGT3G.mjs';
3
+ import { useResolvedPaginationLabels } from './chunk-7F65QM43.mjs';
4
+ export { DEFAULT_PAGINATION_KEY_PREFIX, DEFAULT_TIME_ZONE, NTableDefaultsProvider, NajmPreferencesProvider, NajmUIProvider, buildPaginationLabels, useNTableDefaults, useNajmPreferencesContext, useNajmTheme, useNajmTimeZone } from './chunk-7F65QM43.mjs';
3
5
  import { resolveRadiusValue, inputBorderClasses, cn, Button, NIcon, NajmScroll, surfaceBorderClasses, useNajmScrollViewport, resolveVariantAlias, buttonVariants, NButton, parseNajmDesignConfig, useTableStore, TableStoreContext, sidebarBorderClasses, NTableJson } from './chunk-4DLRXB2W.mjs';
4
6
  export { Button, NAJM_COMPONENT_NAMES, NButton, NIcon, NTableJson, NajmScroll, RADIUS_VALUE_MAP, TableStoreContext, buttonVariants, cn, defineNajmDesignConfig, defineNajmThemeConfig, inputBorderClasses, parseNajmDesignConfig, parseNajmThemeConfig, resolveRadiusValue, resolveVariantAlias, sidebarBorderClasses, stringifyNajmDesignConfig, stringifyNajmThemeConfig, surfaceBorderClasses, useTableStore } from './chunk-4DLRXB2W.mjs';
5
7
  import { useNajmComponentStyle, NajmThemeContainerCtx, useNajmThemeMode, useNajmDesign, composePreset } from './chunk-YBM5CTE6.mjs';
@@ -7556,24 +7558,6 @@ function NImage({ src, fallback, alt = "", ...rest }) {
7556
7558
  const resolved = failed === src && fallback ? fallback : src;
7557
7559
  return /* @__PURE__ */ jsx("img", { ...rest, alt, src: resolved, onError: () => setFailed(src) });
7558
7560
  }
7559
- var NBrandingContext = createContext(null);
7560
- function useNBranding() {
7561
- return useContext(NBrandingContext);
7562
- }
7563
- function NBrandingProvider({
7564
- children,
7565
- appName,
7566
- logoExpanded,
7567
- logoCollapsed,
7568
- logoFallback,
7569
- logoHref
7570
- }) {
7571
- const value = useMemo(
7572
- () => ({ appName, logoExpanded, logoCollapsed, logoFallback, logoHref }),
7573
- [appName, logoExpanded, logoCollapsed, logoFallback, logoHref]
7574
- );
7575
- return /* @__PURE__ */ jsx(NBrandingContext.Provider, { value, children });
7576
- }
7577
7561
  var avatarVariants = cva(
7578
7562
  "relative flex shrink-0 overflow-hidden",
7579
7563
  {
@@ -15185,4 +15169,4 @@ function NGridItem({
15185
15169
  return /* @__PURE__ */ jsx("div", { className: itemClassName, ...props, children });
15186
15170
  }
15187
15171
 
15188
- export { Alert, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, AvatarGroup, AvatarImage, AvatarInput, AvatarStatus, Badge, BaseInput, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroupInput, CheckboxInput, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorArrayInput, ColorPickerInput, Combobox, ComboboxInput, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_THEME_FILE_NAME, DateInput, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicArray_default as DynamicArray, EmojiInput, FileImportButton, FileInput, Form, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, IconButton, ImageInput, Indicator4 as Indicator, Input, Label2 as Label, LangInput, MultiSelectInput, NAJM_SAVED_THEME_VALUE, NAlert, NAppShell, NCard as NAsyncCard, NAvatar, NBadge, NBarChart, NBrandingProvider, NBulkActionsBar, NCard, NCardAction, NCardFooter, NCardInfo, NCardMedia, NCardSection, NChartSkeleton, NCommandPalette, NConfirmDialog, NContextMenu, NDataCardShell, NDeleteDialog, NDeleteDialogContent, NDetailCard, NDetailItem, NDetailList, NDialog, NDialogDescription, NDialogHeader, NDialogPrimaryButton, NDialogSecondaryButton, NDonutCard, NEditorTabs, NEmptyState, NErrorBoundary, NErrorState, NFileBrowser, NFileTypeIcon, NFilterBar, NFolderIcon, NForm, NFormSectionHeader, NGrid, NGridItem, NImage, NIndicator, NInspectorSheet, NLineChart, NLoadingState, NMultiDialog, NNavbar, NPageHeader, NPageHeaderActions, NPageHeaderCompactActions, NPageHeaderFilters, NPageHeaderTop, NPageLayout, NPieChart, NPortalScopeProvider, NProgress, NRowActions, NSection, NSectionHeader, NSectionInfo, NSectionWithInfo, NSheet, NSidebar, NSidebarBrand, NSidebarContent, NSidebarFooter, NSidebarHeader, NSidebarItem, NSidebarMobile, NSidebarProvider, NSidebarSection, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, NSmartPasteDialog, NSpinner, NStatCard, NStatCardSkeleton, NStatusBreakdown, Swap as NSwap, NTable, NTableCardRoot, NTableCards, NTableContent, NTableHeader, NTableLoadingSkeleton, NTablePagination, NTableRowSkeleton, NTableSkeleton, NTabs, NThemeCustomizer, NThemePresets, NUploader, NViewBody, NViewToggle, NativeSelect, NumberInput, OtpInput, PasswordInput, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, RadioGroup, RadioGroupInput, RadioGroupItem, RepeatingFields, ScrollArea, SearchField, SearchField as SearchInput, SegmentedControl, Select, SelectContent, SelectGroup, SelectInput, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SimpleTooltip, NSkeleton as Skeleton, Slider, SliderInput, StarRatingInput, StatusPill, StepIndicator, StepsHeader, StepsProgress, Swap, SwapIndeterminate, SwapOff, SwapOn, Switch, SwitchInput, TAB_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextAreaInput, TextInput, Textarea, TimeInput, TimeZoneInput, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VariantProvider, WizardForm, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buildPageItems, createDialogStore, createTableStore, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, normalizeThemeFileName, parseColor, parseThemeFile, resolveHiddenBelowClass, resolveSlot, sliderVariants, stringifyThemeFile, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNBranding, useNForm, useNPortalScope, useNSidebar, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useVariant, useVariantPreset };
15172
+ export { Alert, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, AvatarGroup, AvatarImage, AvatarInput, AvatarStatus, Badge, BaseInput, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroupInput, CheckboxInput, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorArrayInput, ColorPickerInput, Combobox, ComboboxInput, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_THEME_FILE_NAME, DateInput, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicArray_default as DynamicArray, EmojiInput, FileImportButton, FileInput, Form, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, IconButton, ImageInput, Indicator4 as Indicator, Input, Label2 as Label, LangInput, MultiSelectInput, NAJM_SAVED_THEME_VALUE, NAlert, NAppShell, NCard as NAsyncCard, NAvatar, NBadge, NBarChart, NBulkActionsBar, NCard, NCardAction, NCardFooter, NCardInfo, NCardMedia, NCardSection, NChartSkeleton, NCommandPalette, NConfirmDialog, NContextMenu, NDataCardShell, NDeleteDialog, NDeleteDialogContent, NDetailCard, NDetailItem, NDetailList, NDialog, NDialogDescription, NDialogHeader, NDialogPrimaryButton, NDialogSecondaryButton, NDonutCard, NEditorTabs, NEmptyState, NErrorBoundary, NErrorState, NFileBrowser, NFileTypeIcon, NFilterBar, NFolderIcon, NForm, NFormSectionHeader, NGrid, NGridItem, NImage, NIndicator, NInspectorSheet, NLineChart, NLoadingState, NMultiDialog, NNavbar, NPageHeader, NPageHeaderActions, NPageHeaderCompactActions, NPageHeaderFilters, NPageHeaderTop, NPageLayout, NPieChart, NPortalScopeProvider, NProgress, NRowActions, NSection, NSectionHeader, NSectionInfo, NSectionWithInfo, NSheet, NSidebar, NSidebarBrand, NSidebarContent, NSidebarFooter, NSidebarHeader, NSidebarItem, NSidebarMobile, NSidebarProvider, NSidebarSection, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, NSmartPasteDialog, NSpinner, NStatCard, NStatCardSkeleton, NStatusBreakdown, Swap as NSwap, NTable, NTableCardRoot, NTableCards, NTableContent, NTableHeader, NTableLoadingSkeleton, NTablePagination, NTableRowSkeleton, NTableSkeleton, NTabs, NThemeCustomizer, NThemePresets, NUploader, NViewBody, NViewToggle, NativeSelect, NumberInput, OtpInput, PasswordInput, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, RadioGroup, RadioGroupInput, RadioGroupItem, RepeatingFields, ScrollArea, SearchField, SearchField as SearchInput, SegmentedControl, Select, SelectContent, SelectGroup, SelectInput, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SimpleTooltip, NSkeleton as Skeleton, Slider, SliderInput, StarRatingInput, StatusPill, StepIndicator, StepsHeader, StepsProgress, Swap, SwapIndeterminate, SwapOff, SwapOn, Switch, SwitchInput, TAB_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextAreaInput, TextInput, Textarea, TimeInput, TimeZoneInput, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VariantProvider, WizardForm, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buildPageItems, createDialogStore, createTableStore, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, normalizeThemeFileName, parseColor, parseThemeFile, resolveHiddenBelowClass, resolveSlot, sliderVariants, stringifyThemeFile, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNSidebar, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useVariant, useVariantPreset };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najm-kit",
3
- "version": "2.6.4",
3
+ "version": "2.7.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Reusable React UI component package for Najm framework",
@@ -27,6 +27,11 @@
27
27
  "import": "./dist/adapters/next.mjs",
28
28
  "default": "./dist/adapters/next.mjs"
29
29
  },
30
+ "./app": {
31
+ "types": "./dist/adapters/app.d.ts",
32
+ "import": "./dist/adapters/app.mjs",
33
+ "default": "./dist/adapters/app.mjs"
34
+ },
30
35
  "./package.json": "./package.json",
31
36
  "./json": {
32
37
  "types": "./dist/json.d.ts",
@@ -54,6 +59,7 @@
54
59
  "@hookform/resolvers": "^5",
55
60
  "zod": ">=4",
56
61
  "next": ">=14",
62
+ "najm-i18n": ">=2",
57
63
  "@uiw/react-codemirror": "^4.25.0",
58
64
  "@codemirror/state": "^6.6.0",
59
65
  "@codemirror/view": "^6.42.0",
@@ -67,6 +73,9 @@
67
73
  "next": {
68
74
  "optional": true
69
75
  },
76
+ "najm-i18n": {
77
+ "optional": true
78
+ },
70
79
  "@uiw/react-codemirror": {
71
80
  "optional": true
72
81
  },
@@ -147,6 +156,7 @@
147
156
  "@uiw/react-codemirror": "^4.25.0",
148
157
  "@vitejs/plugin-react": "^5.2.0",
149
158
  "happy-dom": "^20.11.1",
159
+ "najm-i18n": "^2.0.3",
150
160
  "postcss": "^8.5.22",
151
161
  "react-hook-form": "^7",
152
162
  "rimraf": "^6",