najm-kit 2.11.23 → 2.12.1
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 +26 -12
- package/README.md +28 -1
- package/dist/NIcon-D73-C51g.d.ts +21 -0
- package/dist/{NNotFoundState-BmGDW2Bx.d.ts → NNotFoundState-Z2n2gbhS.d.ts} +1 -16
- package/dist/{NajmUIProvider-BwL5HFIV.d.ts → NajmUIProvider-C9IJW1ya.d.ts} +2 -19
- package/dist/adapters/app.d.ts +6 -4
- package/dist/adapters/app.mjs +9 -6
- package/dist/adapters/next.d.ts +2 -1
- package/dist/adapters/next.mjs +5 -3
- package/dist/chunk-5UY7U2ED.mjs +9 -0
- package/dist/chunk-A34LRQYI.mjs +7 -0
- package/dist/chunk-BFFTC7LD.mjs +66 -0
- package/dist/{chunk-5ZTOCWRA.mjs → chunk-F32O3WRX.mjs} +7 -197
- package/dist/chunk-FZX3DONZ.mjs +200 -0
- package/dist/{chunk-BDQK6ECA.mjs → chunk-LMW4DM5L.mjs} +43 -101
- package/dist/{chunk-DKHIQFXX.mjs → chunk-QDFLHSWO.mjs} +1 -1
- package/dist/{chunk-5JVFMOLI.mjs → chunk-QJ22WAQY.mjs} +2 -28
- package/dist/{chunk-LK3SMYUP.mjs → chunk-TZRTOQCC.mjs} +1 -6
- package/dist/chunk-VKSJ2V3O.mjs +2205 -0
- package/dist/chunk-VZXMMC72.mjs +31 -0
- package/dist/{chunk-M5VGBZ7R.mjs → chunk-WHGRN7PP.mjs} +2 -1
- package/dist/formFill-CQkTA0JS.d.ts +17 -0
- package/dist/index.d.ts +23 -437
- package/dist/index.mjs +338 -1950
- package/dist/json.mjs +5 -3
- package/dist/location/google.d.ts +14 -0
- package/dist/location/google.mjs +184 -0
- package/dist/location/index.d.ts +33 -0
- package/dist/location/index.mjs +9 -0
- package/dist/location/leaflet.d.ts +13 -0
- package/dist/location/leaflet.mjs +168 -0
- package/dist/theme.css +23 -2
- package/dist/types-BQBx0RZd.d.ts +578 -0
- package/package.json +30 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 2.
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 2.12.1 - 2026-09-11
|
|
4
|
+
|
|
5
|
+
- Raised the location picker dialog and its overlay above parent Najm dialogs,
|
|
6
|
+
so it remains interactive when opened from a wizard or other modal form.
|
|
7
|
+
|
|
8
|
+
## 2.12.0 - 2026-09-11
|
|
9
|
+
|
|
10
|
+
- Added a provider-neutral composite location field with transactional
|
|
11
|
+
address/pin editing, accessible responsive dialog behavior, and React Hook
|
|
12
|
+
Form integration.
|
|
13
|
+
- Added isolated optional Leaflet and Google Maps adapter subpaths, including
|
|
14
|
+
package-owned marker rendering and optional provider-supplied geocoding.
|
|
15
|
+
- Added the location-picker manual acceptance page to the Najm playground.
|
|
16
|
+
|
|
17
|
+
## 2.11.23 - 2026-09-11
|
|
4
18
|
|
|
5
19
|
- Made the `WizardForm` footer surface transparent by default instead of
|
|
6
20
|
`bg-background/95` with `backdrop-blur`. Consumers can still override it
|
|
7
21
|
through `classNames.footer`.
|
|
8
22
|
|
|
9
|
-
## 2.11.22 - 2026-09-11
|
|
10
|
-
|
|
11
|
-
- Allowed destructive dialogs to render a caller-supplied title, wrap and
|
|
12
|
-
center long item names, and use a transparent destructive-outline cancel
|
|
13
|
-
action.
|
|
14
|
-
- Made native calendar caption dropdowns follow the resolved light or dark
|
|
15
|
-
theme and clarified pointer feedback for enabled and disabled dates.
|
|
16
|
-
|
|
17
|
-
## 2.11.21 - 2026-09-09
|
|
23
|
+
## 2.11.22 - 2026-09-11
|
|
24
|
+
|
|
25
|
+
- Allowed destructive dialogs to render a caller-supplied title, wrap and
|
|
26
|
+
center long item names, and use a transparent destructive-outline cancel
|
|
27
|
+
action.
|
|
28
|
+
- Made native calendar caption dropdowns follow the resolved light or dark
|
|
29
|
+
theme and clarified pointer feedback for enabled and disabled dates.
|
|
30
|
+
|
|
31
|
+
## 2.11.21 - 2026-09-09
|
|
18
32
|
|
|
19
33
|
- Added first-visit browser-language negotiation to `defineNajmPreferences`.
|
|
20
34
|
Applications can pass the raw `Accept-Language` header to `resolve`; explicit
|
package/README.md
CHANGED
|
@@ -10,7 +10,10 @@ bun add najm-kit tailwindcss @tailwindcss/postcss
|
|
|
10
10
|
|
|
11
11
|
Peer dependencies: `react >=18`, `react-dom >=18`. Requires **Tailwind CSS v4** in the host app.
|
|
12
12
|
|
|
13
|
-
Optional peer dependencies
|
|
13
|
+
Optional peer dependencies include `recharts`, `@tanstack/react-table`,
|
|
14
|
+
`react-hook-form`, `@tanstack/react-query`, `leaflet`, and
|
|
15
|
+
`@googlemaps/js-api-loader`. Map dependencies are reached only through their
|
|
16
|
+
dedicated location adapter subpaths.
|
|
14
17
|
|
|
15
18
|
## Styling — the entire setup
|
|
16
19
|
|
|
@@ -1199,3 +1202,27 @@ defineNajmPreferences({ i18n: appI18n, cookieOptions: { secure: true } });
|
|
|
1199
1202
|
|
|
1200
1203
|
The returned definition, its `cookieNames`, `cookieOptions`, `timeZones`, and
|
|
1201
1204
|
`handlers` are all frozen.
|
|
1205
|
+
# Location picker
|
|
1206
|
+
|
|
1207
|
+
`najm-kit/location` provides a provider-neutral composite form field. Import a
|
|
1208
|
+
map adapter only in a client boundary so a closed field does not load a map SDK:
|
|
1209
|
+
|
|
1210
|
+
```tsx
|
|
1211
|
+
import { FormLocationInput, NLocationProvider } from "najm-kit/location";
|
|
1212
|
+
import { createLeafletLocationAdapter } from "najm-kit/location/leaflet";
|
|
1213
|
+
|
|
1214
|
+
const adapter = createLeafletLocationAdapter({
|
|
1215
|
+
tileUrl: "https://tiles.example.test/{z}/{x}/{y}.png",
|
|
1216
|
+
attribution: "Required provider attribution",
|
|
1217
|
+
});
|
|
1218
|
+
|
|
1219
|
+
<NLocationProvider adapter={adapter} defaultCenter={{ latitude: 33.5731, longitude: -7.5898 }}>
|
|
1220
|
+
<FormLocationInput name="deliveryLocation" formLabel="Address" />
|
|
1221
|
+
</NLocationProvider>
|
|
1222
|
+
```
|
|
1223
|
+
|
|
1224
|
+
The field value is `{ address, latitude, longitude }`; coordinates are either
|
|
1225
|
+
a complete finite pair in range or both `null`. Search is absent unless an
|
|
1226
|
+
explicit `NLocationGeocoderAdapter` is supplied. The Google subpath exports
|
|
1227
|
+
`createGoogleLocationAdapter` and `createGooglePlacesGeocoder`; its browser key
|
|
1228
|
+
must be restricted by exact origins and enabled APIs.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type NIconSource = React__default.ReactElement | React__default.ComponentType<any> | React__default.ExoticComponent<any> | string | {
|
|
4
|
+
src: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
};
|
|
7
|
+
type NIconProps = Omit<React__default.HTMLAttributes<HTMLElement>, "children"> & {
|
|
8
|
+
size?: string | number;
|
|
9
|
+
icon: NIconSource;
|
|
10
|
+
alt?: string;
|
|
11
|
+
color?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
strokeWidth?: number;
|
|
14
|
+
stroke?: string;
|
|
15
|
+
fill?: string;
|
|
16
|
+
onClick?: React__default.MouseEventHandler<HTMLElement>;
|
|
17
|
+
style?: React__default.CSSProperties;
|
|
18
|
+
};
|
|
19
|
+
declare const NIcon: React__default.FC<NIconProps>;
|
|
20
|
+
|
|
21
|
+
export { type NIconSource as N, NIcon as a, type NIconProps as b };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { ZodTypeAny, TypeOf } from 'zod';
|
|
4
3
|
import { LucideIcon } from 'lucide-react';
|
|
5
4
|
|
|
6
5
|
interface NBrandingValue {
|
|
@@ -94,20 +93,6 @@ interface NBrandingStateProviderProps {
|
|
|
94
93
|
/** `NBrandingProvider` with the marks held as state an editor can write. */
|
|
95
94
|
declare function NBrandingStateProvider({ children, branding, initialBranding, }: Readonly<NBrandingStateProviderProps>): React.JSX.Element;
|
|
96
95
|
|
|
97
|
-
type FormFillOverride = unknown | readonly unknown[] | ((fieldName: string) => unknown);
|
|
98
|
-
type FormFillOverrides = Record<string, FormFillOverride>;
|
|
99
|
-
interface FormDevToolsOptions {
|
|
100
|
-
enabled?: boolean;
|
|
101
|
-
shortcut?: string;
|
|
102
|
-
}
|
|
103
|
-
interface FormDevToolsConfig<T extends ZodTypeAny = ZodTypeAny> extends FormDevToolsOptions {
|
|
104
|
-
fill?: () => Partial<TypeOf<T>>;
|
|
105
|
-
overrides?: FormFillOverrides;
|
|
106
|
-
}
|
|
107
|
-
type FormDevTools<T extends ZodTypeAny = ZodTypeAny> = boolean | FormDevToolsConfig<T>;
|
|
108
|
-
/** Build form-shaped test values from a Zod object schema. */
|
|
109
|
-
declare function buildFormFill<TSchema extends ZodTypeAny>(schema: TSchema, overrides?: FormFillOverrides): Partial<TypeOf<TSchema>>;
|
|
110
|
-
|
|
111
96
|
/**
|
|
112
97
|
* Shared surface a feedback state renders into.
|
|
113
98
|
*
|
|
@@ -189,4 +174,4 @@ interface NNotFoundStateProps extends NEmptyStateProps {
|
|
|
189
174
|
}
|
|
190
175
|
declare function NNotFoundState(props: NNotFoundStateProps): React__default.JSX.Element;
|
|
191
176
|
|
|
192
|
-
export { type
|
|
177
|
+
export { type NBrandingInput as N, NEmptyState as a, type NEmptyStateProps as b, NErrorState as c, type NErrorStateProps as d, type NFeedbackSurface as e, NForbiddenState as f, type NForbiddenStateProps as g, NLoadingState as h, type NLoadingStateProps as i, NNotFoundState as j, type NNotFoundStateProps as k, type NBrandingEditorValue as l, type NBrandingPayload as m, NBrandingProvider as n, NBrandingStateProvider as o, type NBrandingStateProviderProps as p, type NBrandingValue as q, normalizeBranding as r, useNBrandingEditor as s, useNBranding as u };
|
|
@@ -4,6 +4,7 @@ import { b as NajmMode, N as NajmDesignConfig } from './design-types-DffH_9XC.js
|
|
|
4
4
|
import { b as NTablePaginationLabels, N as NajmTranslate } from './paginationLabels-dZLSNxfo.js';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
|
+
import { N as NIconSource } from './NIcon-D73-C51g.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Accessible names and visible copy for the toolbar above the rows.
|
|
@@ -77,24 +78,6 @@ declare function useNTableDefaults(): NTableDefaults;
|
|
|
77
78
|
*/
|
|
78
79
|
declare function useResolvedToolbarLabels(own: NTableToolbarLabels | undefined): NTableToolbarLabels;
|
|
79
80
|
|
|
80
|
-
type NIconSource = React__default.ReactElement | React__default.ComponentType<any> | React__default.ExoticComponent<any> | string | {
|
|
81
|
-
src: string;
|
|
82
|
-
alt?: string;
|
|
83
|
-
};
|
|
84
|
-
type NIconProps = Omit<React__default.HTMLAttributes<HTMLElement>, "children"> & {
|
|
85
|
-
size?: string | number;
|
|
86
|
-
icon: NIconSource;
|
|
87
|
-
alt?: string;
|
|
88
|
-
color?: string;
|
|
89
|
-
className?: string;
|
|
90
|
-
strokeWidth?: number;
|
|
91
|
-
stroke?: string;
|
|
92
|
-
fill?: string;
|
|
93
|
-
onClick?: React__default.MouseEventHandler<HTMLElement>;
|
|
94
|
-
style?: React__default.CSSProperties;
|
|
95
|
-
};
|
|
96
|
-
declare const NIcon: React__default.FC<NIconProps>;
|
|
97
|
-
|
|
98
81
|
declare const badgeVariants: (props?: {
|
|
99
82
|
variant?: "secondary" | "destructive" | "default" | "outline" | "success" | "warning";
|
|
100
83
|
} & class_variance_authority_types.ClassProp) => string;
|
|
@@ -426,4 +409,4 @@ interface NajmUIProviderProps extends Omit<NajmPreferencesProviderProps, "childr
|
|
|
426
409
|
*/
|
|
427
410
|
declare function NajmUIProvider({ children, design, initialDesign, className, t, paginationKeyPrefix, toolbarKeyPrefix, dir, tableDefaults, badgeDefaults, feedbackDefaults, initialTheme, initialTimeZone, onThemeChange, onTimeZoneChange, normalizeTimeZone, }: NajmUIProviderProps): React.JSX.Element;
|
|
428
411
|
|
|
429
|
-
export {
|
|
412
|
+
export { useNajmPreferencesContext as A, type BadgeColor as B, useNajmTheme as C, DEFAULT_FEEDBACK_KEY_PREFIX as D, useNajmTimeZone as E, type FeedbackKey as F, useResolvedToolbarLabels as G, type NFeedbackDefaults as N, type NFeedbackLabelKeys as a, type NFeedbackLabels as b, type NajmUIProviderProps as c, type NTableToolbarLabels as d, type BadgeShape as e, Badge as f, type BadgeIcon as g, type BadgeLook as h, type BadgeProps as i, type BadgeSize as j, type BadgeVariant as k, DEFAULT_TIME_ZONE as l, NBadge as m, type NBadgeDefaults as n, type NBadgeLook as o, type NBadgeProps as p, type NTableDefaults as q, NTableDefaultsProvider as r, type NajmPreferencesContextValue as s, NajmPreferencesProvider as t, type NajmPreferencesProviderProps as u, NajmUIProvider as v, badgeColorVariants as w, badgeVariants as x, useDocumentDirection as y, useNTableDefaults as z };
|
package/dist/adapters/app.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Translations } from 'najm-i18n';
|
|
3
|
-
import {
|
|
4
|
-
export { a as NEmptyState, b as NEmptyStateProps, c as NErrorState, d as NErrorStateProps, e as NFeedbackSurface, f as NForbiddenState, g as NForbiddenStateProps, h as NLoadingState, i as NLoadingStateProps, j as NNotFoundState, k as NNotFoundStateProps } from '../NNotFoundState-
|
|
3
|
+
import { N as NBrandingInput } from '../NNotFoundState-Z2n2gbhS.js';
|
|
4
|
+
export { a as NEmptyState, b as NEmptyStateProps, c as NErrorState, d as NErrorStateProps, e as NFeedbackSurface, f as NForbiddenState, g as NForbiddenStateProps, h as NLoadingState, i as NLoadingStateProps, j as NNotFoundState, k as NNotFoundStateProps } from '../NNotFoundState-Z2n2gbhS.js';
|
|
5
5
|
import { NajmNextUIProviderProps } from './next.js';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { F as FormDevToolsOptions } from '../formFill-CQkTA0JS.js';
|
|
7
|
+
export { D as DEFAULT_FEEDBACK_KEY_PREFIX, F as FeedbackKey, N as NFeedbackDefaults, a as NFeedbackLabelKeys, b as NFeedbackLabels } from '../NajmUIProvider-C9IJW1ya.js';
|
|
8
8
|
import 'lucide-react';
|
|
9
9
|
import 'next/image';
|
|
10
|
+
import 'zod';
|
|
10
11
|
import '../design-types-DffH_9XC.js';
|
|
11
12
|
import '../paginationLabels-dZLSNxfo.js';
|
|
12
13
|
import 'class-variance-authority/types';
|
|
13
14
|
import 'class-variance-authority';
|
|
15
|
+
import '../NIcon-D73-C51g.js';
|
|
14
16
|
|
|
15
17
|
/** Branding shown by the kit's chrome. Purely presentational values. */
|
|
16
18
|
interface NajmAppBranding {
|
package/dist/adapters/app.mjs
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { FormDevToolsProvider, NBrandingStateProvider, NajmFormatProvider } from '../chunk-
|
|
3
|
-
export { NEmptyState, NErrorState, NForbiddenState,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
|
|
2
|
+
import { FormDevToolsProvider, NBrandingStateProvider, NajmFormatProvider } from '../chunk-F32O3WRX.mjs';
|
|
3
|
+
export { NEmptyState, NErrorState, NForbiddenState, NNotFoundState } from '../chunk-F32O3WRX.mjs';
|
|
4
|
+
export { NLoadingState } from '../chunk-FZX3DONZ.mjs';
|
|
5
|
+
import { NajmNextUIProvider } from '../chunk-QDFLHSWO.mjs';
|
|
6
|
+
import '../chunk-LMW4DM5L.mjs';
|
|
7
|
+
export { DEFAULT_FEEDBACK_KEY_PREFIX } from '../chunk-BFFTC7LD.mjs';
|
|
8
|
+
import '../chunk-WHGRN7PP.mjs';
|
|
9
|
+
import '../chunk-TZRTOQCC.mjs';
|
|
10
|
+
import '../chunk-5UY7U2ED.mjs';
|
|
8
11
|
import '../chunk-JABLSOQN.mjs';
|
|
9
12
|
import '../chunk-TFHWLE7N.mjs';
|
|
10
13
|
import * as React from 'react';
|
package/dist/adapters/next.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { ImageProps } from 'next/image';
|
|
3
|
-
import { c as NajmUIProviderProps } from '../NajmUIProvider-
|
|
3
|
+
import { c as NajmUIProviderProps } from '../NajmUIProvider-C9IJW1ya.js';
|
|
4
4
|
import '../design-types-DffH_9XC.js';
|
|
5
5
|
import '../paginationLabels-dZLSNxfo.js';
|
|
6
6
|
import 'class-variance-authority/types';
|
|
7
7
|
import 'class-variance-authority';
|
|
8
|
+
import '../NIcon-D73-C51g.js';
|
|
8
9
|
|
|
9
10
|
interface NextLinkAdapterProps extends Record<string, any> {
|
|
10
11
|
href: string;
|
package/dist/adapters/next.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export { NNextImage, NajmNextUIProvider, NextLinkAdapter, useNextNavigationAdapter } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { NNextImage, NajmNextUIProvider, NextLinkAdapter, useNextNavigationAdapter } from '../chunk-QDFLHSWO.mjs';
|
|
2
|
+
import '../chunk-LMW4DM5L.mjs';
|
|
3
|
+
import '../chunk-BFFTC7LD.mjs';
|
|
4
|
+
import '../chunk-TZRTOQCC.mjs';
|
|
5
|
+
import '../chunk-5UY7U2ED.mjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// src/location/assets/location-marker.webp
|
|
2
|
+
var location_marker_default = "data:image/webp;base64,UklGRrwTAABXRUJQVlA4WAoAAAAQAAAAXwAAdwAAQUxQSBgIAAABGbVtG6CwtEFE/8OMqtjbTXilbVdty42YmZmZmZmZmZmZmZmZKVMVYzEzy8wMxbbMzF57jTnnWPsC3uhEGpFpRaZUDJk5YjipWRh9NzDMsDtqhR0J7sBMke7A2+xT4wq+6sxsp0xZp4LIjhw6W2YYijo1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tlux/g+Se+FDaL2riFiq7nZtVRbC/njMBvPjsEjhUZu66Ts1ckhiHfAlZjxcAnTwuAAAAAAA=";
|
|
3
|
+
|
|
4
|
+
// src/location/locationMarker.ts
|
|
5
|
+
var locationMarkerUrl = location_marker_default ;
|
|
6
|
+
|
|
7
|
+
export { locationMarkerUrl };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/components/feedback/feedbackDefaults.tsx
|
|
5
|
+
var ENGLISH_FEEDBACK_LABELS = {
|
|
6
|
+
loadingLabel: "Loading...",
|
|
7
|
+
emptyTitle: "No data",
|
|
8
|
+
errorTitle: "Something went wrong",
|
|
9
|
+
retryLabel: "Try again",
|
|
10
|
+
forbiddenTitle: "Access denied",
|
|
11
|
+
forbiddenDescription: "You do not have permission to view this page.",
|
|
12
|
+
notFoundTitle: "Page not found",
|
|
13
|
+
notFoundDescription: "The requested page could not be found."
|
|
14
|
+
};
|
|
15
|
+
var NFeedbackDefaultsContext = React.createContext(null);
|
|
16
|
+
function NFeedbackDefaultsProvider({
|
|
17
|
+
value,
|
|
18
|
+
children
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ jsx(NFeedbackDefaultsContext.Provider, { value, children });
|
|
21
|
+
}
|
|
22
|
+
function useNFeedbackDefaults() {
|
|
23
|
+
return React.useContext(NFeedbackDefaultsContext);
|
|
24
|
+
}
|
|
25
|
+
var DEFAULT_FEEDBACK_KEY_PREFIX = "common.feedback";
|
|
26
|
+
function useResolvedFeedbackLabels() {
|
|
27
|
+
const ctx = useNFeedbackDefaults();
|
|
28
|
+
return React.useMemo(() => resolveFeedbackLabels(ctx), [ctx]);
|
|
29
|
+
}
|
|
30
|
+
function resolveFeedbackLabels(ctx) {
|
|
31
|
+
const defaults = ctx?.defaults;
|
|
32
|
+
const t = ctx?.t;
|
|
33
|
+
const labels = defaults?.labels;
|
|
34
|
+
const labelKeys = defaults?.labelKeys;
|
|
35
|
+
const prefix = defaults?.prefix ?? DEFAULT_FEEDBACK_KEY_PREFIX;
|
|
36
|
+
const translated = (key) => {
|
|
37
|
+
if (!t) return void 0;
|
|
38
|
+
const value = t(key);
|
|
39
|
+
return value === key ? void 0 : value;
|
|
40
|
+
};
|
|
41
|
+
const pick = (field, hasFallback) => {
|
|
42
|
+
const literal = labels?.[field];
|
|
43
|
+
if (literal !== void 0) return literal;
|
|
44
|
+
const key = labelKeys?.[field];
|
|
45
|
+
const fromCatalog = translated(key ?? `${prefix}.${field}`);
|
|
46
|
+
if (fromCatalog !== void 0) return fromCatalog;
|
|
47
|
+
if (hasFallback) return ENGLISH_FEEDBACK_LABELS[field];
|
|
48
|
+
return void 0;
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
loadingLabel: pick("loadingLabel", true) ?? ENGLISH_FEEDBACK_LABELS.loadingLabel,
|
|
52
|
+
emptyTitle: pick("emptyTitle", true) ?? ENGLISH_FEEDBACK_LABELS.emptyTitle,
|
|
53
|
+
errorTitle: pick("errorTitle", true) ?? ENGLISH_FEEDBACK_LABELS.errorTitle,
|
|
54
|
+
errorMessage: pick("errorMessage", false),
|
|
55
|
+
retryLabel: pick("retryLabel", true) ?? ENGLISH_FEEDBACK_LABELS.retryLabel,
|
|
56
|
+
forbiddenTitle: pick("forbiddenTitle", true) ?? ENGLISH_FEEDBACK_LABELS.forbiddenTitle,
|
|
57
|
+
forbiddenDescription: pick("forbiddenDescription", true) ?? ENGLISH_FEEDBACK_LABELS.forbiddenDescription,
|
|
58
|
+
notFoundTitle: pick("notFoundTitle", true) ?? ENGLISH_FEEDBACK_LABELS.notFoundTitle,
|
|
59
|
+
notFoundDescription: pick("notFoundDescription", true) ?? ENGLISH_FEEDBACK_LABELS.notFoundDescription
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function resolveFeedbackDefaultsValue(defaults, t) {
|
|
63
|
+
return { defaults: defaults ?? {}, t };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { DEFAULT_FEEDBACK_KEY_PREFIX, NFeedbackDefaultsProvider, resolveFeedbackDefaultsValue, useResolvedFeedbackLabels };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { NFeedbackStateFrame } from './chunk-FZX3DONZ.mjs';
|
|
2
|
+
import { useNajmPreferencesContext } from './chunk-LMW4DM5L.mjs';
|
|
3
|
+
import { useResolvedFeedbackLabels } from './chunk-BFFTC7LD.mjs';
|
|
4
|
+
import { Button } from './chunk-WHGRN7PP.mjs';
|
|
5
|
+
import { cn } from './chunk-5UY7U2ED.mjs';
|
|
4
6
|
import { humanizeToken, DEFAULT_PLACEHOLDER, formatRelativeTime, formatTime, formatDateTime, formatDate, formatPercent, formatNumber, formatCurrency } from './chunk-JABLSOQN.mjs';
|
|
5
7
|
import * as React3 from 'react';
|
|
6
8
|
import { createContext, useContext, useMemo, useState, useCallback } from 'react';
|
|
7
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
-
import { AlertTriangle,
|
|
10
|
+
import { AlertTriangle, ShieldOff, Compass } from 'lucide-react';
|
|
9
11
|
|
|
10
12
|
function normalizeBranding(input) {
|
|
11
13
|
if (!input) return {};
|
|
@@ -66,198 +68,6 @@ function NBrandingStateProvider({
|
|
|
66
68
|
}
|
|
67
69
|
function noop() {
|
|
68
70
|
}
|
|
69
|
-
var Default = ({ className, ...props }) => /* @__PURE__ */ jsx(LoaderIcon, { className: cn("animate-spin", className), ...props });
|
|
70
|
-
var Circle = ({ className, ...props }) => /* @__PURE__ */ jsx(LoaderCircleIcon, { className: cn("animate-spin", className), ...props });
|
|
71
|
-
var Pinwheel = ({ className, ...props }) => /* @__PURE__ */ jsx(LoaderPinwheelIcon, { className: cn("animate-spin", className), ...props });
|
|
72
|
-
var CircleFilled = ({ className, size = 24, ...props }) => /* @__PURE__ */ jsxs("div", { className: "relative", style: { width: size, height: size }, children: [
|
|
73
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 rotate-180", children: /* @__PURE__ */ jsx(LoaderCircleIcon, { className: cn("animate-spin", className, "text-foreground opacity-20"), size, ...props }) }),
|
|
74
|
-
/* @__PURE__ */ jsx(LoaderCircleIcon, { className: cn("relative animate-spin", className), size, ...props })
|
|
75
|
-
] });
|
|
76
|
-
var Ellipsis = ({ size = 24, ...props }) => /* @__PURE__ */ jsxs("svg", { height: size, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
77
|
-
/* @__PURE__ */ jsx("title", { children: "Loading..." }),
|
|
78
|
-
/* @__PURE__ */ jsx("circle", { cx: "4", cy: "12", fill: "currentColor", r: "2", children: /* @__PURE__ */ jsx("animate", { attributeName: "cy", begin: "0;ellipsis3.end+0.25s", calcMode: "spline", dur: "0.6s", id: "ellipsis1", keySplines: ".33,.66,.66,1;.33,0,.66,.33", values: "12;6;12" }) }),
|
|
79
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", fill: "currentColor", r: "2", children: /* @__PURE__ */ jsx("animate", { attributeName: "cy", begin: "ellipsis1.begin+0.1s", calcMode: "spline", dur: "0.6s", keySplines: ".33,.66,.66,1;.33,0,.66,.33", values: "12;6;12" }) }),
|
|
80
|
-
/* @__PURE__ */ jsx("circle", { cx: "20", cy: "12", fill: "currentColor", r: "2", children: /* @__PURE__ */ jsx("animate", { attributeName: "cy", begin: "ellipsis1.begin+0.2s", calcMode: "spline", dur: "0.6s", id: "ellipsis3", keySplines: ".33,.66,.66,1;.33,0,.66,.33", values: "12;6;12" }) })
|
|
81
|
-
] });
|
|
82
|
-
var Ring = ({ size = 24, ...props }) => /* @__PURE__ */ jsxs("svg", { height: size, stroke: "currentColor", viewBox: "0 0 44 44", width: size, xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
83
|
-
/* @__PURE__ */ jsx("title", { children: "Loading..." }),
|
|
84
|
-
/* @__PURE__ */ jsxs("g", { fill: "none", fillRule: "evenodd", strokeWidth: "2", children: [
|
|
85
|
-
/* @__PURE__ */ jsxs("circle", { cx: "22", cy: "22", r: "1", children: [
|
|
86
|
-
/* @__PURE__ */ jsx("animate", { attributeName: "r", begin: "0s", calcMode: "spline", dur: "1.8s", keySplines: "0.165, 0.84, 0.44, 1", keyTimes: "0; 1", repeatCount: "indefinite", values: "1; 20" }),
|
|
87
|
-
/* @__PURE__ */ jsx("animate", { attributeName: "stroke-opacity", begin: "0s", calcMode: "spline", dur: "1.8s", keySplines: "0.3, 0.61, 0.355, 1", keyTimes: "0; 1", repeatCount: "indefinite", values: "1; 0" })
|
|
88
|
-
] }),
|
|
89
|
-
/* @__PURE__ */ jsxs("circle", { cx: "22", cy: "22", r: "1", children: [
|
|
90
|
-
/* @__PURE__ */ jsx("animate", { attributeName: "r", begin: "-0.9s", calcMode: "spline", dur: "1.8s", keySplines: "0.165, 0.84, 0.44, 1", keyTimes: "0; 1", repeatCount: "indefinite", values: "1; 20" }),
|
|
91
|
-
/* @__PURE__ */ jsx("animate", { attributeName: "stroke-opacity", begin: "-0.9s", calcMode: "spline", dur: "1.8s", keySplines: "0.3, 0.61, 0.355, 1", keyTimes: "0; 1", repeatCount: "indefinite", values: "1; 0" })
|
|
92
|
-
] })
|
|
93
|
-
] })
|
|
94
|
-
] });
|
|
95
|
-
var Bars = ({ size = 24, ...props }) => /* @__PURE__ */ jsxs("svg", { height: size, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
96
|
-
/* @__PURE__ */ jsx("title", { children: "Loading..." }),
|
|
97
|
-
/* @__PURE__ */ jsx("rect", { fill: "currentColor", height: "4", rx: "1", width: "4", x: "1", y: "10", children: /* @__PURE__ */ jsx("animate", { attributeName: "opacity", begin: "0s", dur: "0.6s", keyTimes: "0;0.5;1", repeatCount: "indefinite", values: "1;0.3;1" }) }),
|
|
98
|
-
/* @__PURE__ */ jsx("rect", { fill: "currentColor", height: "4", rx: "1", width: "4", x: "10", y: "10", children: /* @__PURE__ */ jsx("animate", { attributeName: "opacity", begin: "0.1s", dur: "0.6s", keyTimes: "0;0.5;1", repeatCount: "indefinite", values: "1;0.3;1" }) }),
|
|
99
|
-
/* @__PURE__ */ jsx("rect", { fill: "currentColor", height: "4", rx: "1", width: "4", x: "19", y: "10", children: /* @__PURE__ */ jsx("animate", { attributeName: "opacity", begin: "0.2s", dur: "0.6s", keyTimes: "0;0.5;1", repeatCount: "indefinite", values: "1;0.3;1" }) })
|
|
100
|
-
] });
|
|
101
|
-
var Infinite = ({ size = 24, ...props }) => /* @__PURE__ */ jsxs(
|
|
102
|
-
"svg",
|
|
103
|
-
{
|
|
104
|
-
height: size,
|
|
105
|
-
preserveAspectRatio: "xMidYMid",
|
|
106
|
-
viewBox: "0 0 100 100",
|
|
107
|
-
width: size,
|
|
108
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
109
|
-
...props,
|
|
110
|
-
children: [
|
|
111
|
-
/* @__PURE__ */ jsx("title", { children: "Loading..." }),
|
|
112
|
-
/* @__PURE__ */ jsx(
|
|
113
|
-
"path",
|
|
114
|
-
{
|
|
115
|
-
d: "M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z",
|
|
116
|
-
fill: "none",
|
|
117
|
-
stroke: "currentColor",
|
|
118
|
-
strokeDasharray: "205.271142578125 51.317785644531256",
|
|
119
|
-
strokeLinecap: "round",
|
|
120
|
-
strokeWidth: "10",
|
|
121
|
-
style: { transform: "scale(0.8)", transformOrigin: "50px 50px" },
|
|
122
|
-
children: /* @__PURE__ */ jsx(
|
|
123
|
-
"animate",
|
|
124
|
-
{
|
|
125
|
-
attributeName: "stroke-dashoffset",
|
|
126
|
-
dur: "2s",
|
|
127
|
-
keyTimes: "0;1",
|
|
128
|
-
repeatCount: "indefinite",
|
|
129
|
-
values: "0;256.58892822265625"
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
var spinnerVariants = {
|
|
138
|
-
default: Default,
|
|
139
|
-
circle: Circle,
|
|
140
|
-
pinwheel: Pinwheel,
|
|
141
|
-
"circle-filled": CircleFilled,
|
|
142
|
-
ellipsis: Ellipsis,
|
|
143
|
-
ring: Ring,
|
|
144
|
-
bars: Bars,
|
|
145
|
-
infinite: Infinite
|
|
146
|
-
};
|
|
147
|
-
function NSpinner({ variant = "default", size = 24, className, ...props }) {
|
|
148
|
-
const Component = spinnerVariants[variant] || Default;
|
|
149
|
-
return /* @__PURE__ */ jsx(Component, { className, size, ...props });
|
|
150
|
-
}
|
|
151
|
-
function NPageLayout({
|
|
152
|
-
as: Comp = "main",
|
|
153
|
-
className,
|
|
154
|
-
style,
|
|
155
|
-
...props
|
|
156
|
-
}) {
|
|
157
|
-
const { layout } = useNajmDesign();
|
|
158
|
-
const pageGutter = layout?.pageGutter ?? "var(--page-gutter, 24px)";
|
|
159
|
-
const sectionGap = layout?.sectionGap ?? "var(--section-gap, 20px)";
|
|
160
|
-
return /* @__PURE__ */ jsx(
|
|
161
|
-
Comp,
|
|
162
|
-
{
|
|
163
|
-
className: cn("flex min-w-0 flex-col", className),
|
|
164
|
-
style: {
|
|
165
|
-
/**
|
|
166
|
-
* Published so descendants can cancel the page padding exactly. A
|
|
167
|
-
* full-bleed child (a non-card NPageHeader) cannot guess these: the
|
|
168
|
-
* design config resolves them to literals, not to the `--page-gutter`
|
|
169
|
-
* / `--section-gap` fallbacks.
|
|
170
|
-
*/
|
|
171
|
-
"--najm-page-gutter": pageGutter,
|
|
172
|
-
"--najm-section-gap": sectionGap,
|
|
173
|
-
gap: sectionGap,
|
|
174
|
-
paddingInline: pageGutter,
|
|
175
|
-
paddingBlock: sectionGap,
|
|
176
|
-
...style
|
|
177
|
-
},
|
|
178
|
-
...props
|
|
179
|
-
}
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
var INLINE_PADDING = {
|
|
183
|
-
loading: "py-8",
|
|
184
|
-
error: "py-8",
|
|
185
|
-
empty: "py-12"
|
|
186
|
-
};
|
|
187
|
-
var PANEL_BASE = "flex min-h-64 w-full flex-col items-center justify-center gap-3";
|
|
188
|
-
var PAGE_MIN = "min-h-[60vh]";
|
|
189
|
-
function NFeedbackStateFrame({
|
|
190
|
-
surface = "inline",
|
|
191
|
-
spacing = "empty",
|
|
192
|
-
className,
|
|
193
|
-
children,
|
|
194
|
-
...rest
|
|
195
|
-
}) {
|
|
196
|
-
if (surface === "page") {
|
|
197
|
-
return /* @__PURE__ */ jsx(
|
|
198
|
-
NPageLayout,
|
|
199
|
-
{
|
|
200
|
-
as: "div",
|
|
201
|
-
className: cn(
|
|
202
|
-
"items-center justify-center text-center",
|
|
203
|
-
PAGE_MIN,
|
|
204
|
-
className
|
|
205
|
-
),
|
|
206
|
-
...rest,
|
|
207
|
-
children
|
|
208
|
-
}
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
if (surface === "panel") {
|
|
212
|
-
return /* @__PURE__ */ jsx("div", { className: cn(PANEL_BASE, className), ...rest, children });
|
|
213
|
-
}
|
|
214
|
-
return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col items-center justify-center gap-3", INLINE_PADDING[spacing], className), ...rest, children });
|
|
215
|
-
}
|
|
216
|
-
function useLoadingLabel(explicit) {
|
|
217
|
-
const labels = useResolvedFeedbackLabels();
|
|
218
|
-
if (explicit !== void 0) return explicit;
|
|
219
|
-
return labels.loadingLabel;
|
|
220
|
-
}
|
|
221
|
-
function NLoadingState({
|
|
222
|
-
label,
|
|
223
|
-
className,
|
|
224
|
-
fullScreen = false,
|
|
225
|
-
spinnerVariant = "circle",
|
|
226
|
-
spinnerSize = 32,
|
|
227
|
-
surface = "inline"
|
|
228
|
-
}) {
|
|
229
|
-
const resolvedLabel = useLoadingLabel(label);
|
|
230
|
-
if (fullScreen) {
|
|
231
|
-
return /* @__PURE__ */ jsxs(
|
|
232
|
-
"div",
|
|
233
|
-
{
|
|
234
|
-
className: cn(
|
|
235
|
-
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm flex flex-col items-center justify-center gap-3 py-8",
|
|
236
|
-
className
|
|
237
|
-
),
|
|
238
|
-
children: [
|
|
239
|
-
/* @__PURE__ */ jsx(NSpinner, { variant: spinnerVariant, size: spinnerSize }),
|
|
240
|
-
resolvedLabel && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: resolvedLabel })
|
|
241
|
-
]
|
|
242
|
-
}
|
|
243
|
-
);
|
|
244
|
-
}
|
|
245
|
-
return /* @__PURE__ */ jsxs(
|
|
246
|
-
NFeedbackStateFrame,
|
|
247
|
-
{
|
|
248
|
-
surface,
|
|
249
|
-
spacing: "loading",
|
|
250
|
-
role: "status",
|
|
251
|
-
"aria-live": "polite",
|
|
252
|
-
"aria-busy": "true",
|
|
253
|
-
className,
|
|
254
|
-
children: [
|
|
255
|
-
/* @__PURE__ */ jsx(NSpinner, { variant: spinnerVariant, size: spinnerSize }),
|
|
256
|
-
resolvedLabel && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: resolvedLabel })
|
|
257
|
-
]
|
|
258
|
-
}
|
|
259
|
-
);
|
|
260
|
-
}
|
|
261
71
|
var SIZE_CLASSES = {
|
|
262
72
|
sm: "h-8 w-8",
|
|
263
73
|
md: "h-10 w-10",
|
|
@@ -647,4 +457,4 @@ function useNajmFormat() {
|
|
|
647
457
|
return value;
|
|
648
458
|
}
|
|
649
459
|
|
|
650
|
-
export { FormDevToolsProvider, NBrandingProvider, NBrandingStateProvider, NEmptyState, NErrorState, NForbiddenState,
|
|
460
|
+
export { FormDevToolsProvider, NBrandingProvider, NBrandingStateProvider, NEmptyState, NErrorState, NForbiddenState, NNotFoundState, NajmFormatProvider, buildFormFill, normalizeBranding, useNBranding, useNBrandingEditor, useNajmFormat, useNajmFormatContext, useResolvedFormDevTools };
|