@donotdev/ui 0.2.0 → 0.2.2

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.
Files changed (34) hide show
  1. package/dist/components/common/TechBento.d.ts +2 -6
  2. package/dist/components/common/TechBento.d.ts.map +1 -1
  3. package/dist/components/common/TechBento.js +14 -16
  4. package/dist/crud/components/EntityDisplayRenderer.d.ts +1 -1
  5. package/dist/crud/components/EntityDisplayRenderer.d.ts.map +1 -1
  6. package/dist/crud/components/EntityDisplayRenderer.js +13 -57
  7. package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
  8. package/dist/crud/components/EntityFormRenderer.js +2 -2
  9. package/dist/crud/crudImports.d.ts +1 -0
  10. package/dist/crud/crudImports.d.ts.map +1 -1
  11. package/dist/crud/crudImports.js +1 -0
  12. package/dist/dndev-next.css +35 -46
  13. package/dist/dndev.css +35 -46
  14. package/dist/index.js +4 -4
  15. package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
  16. package/dist/internal/layout/components/AutoMetaTags.js +6 -22
  17. package/dist/internal/layout/components/footer/FooterLegalLinks.js +2 -2
  18. package/dist/internal/layout/components/footer/useLegalLinks.d.ts +0 -2
  19. package/dist/internal/layout/components/footer/useLegalLinks.d.ts.map +1 -1
  20. package/dist/internal/layout/components/footer/useLegalLinks.js +0 -2
  21. package/dist/internal/layout/components/i18nSeoMeta.d.ts +54 -0
  22. package/dist/internal/layout/components/i18nSeoMeta.d.ts.map +1 -0
  23. package/dist/internal/layout/components/i18nSeoMeta.js +52 -0
  24. package/dist/internal/layout/components/index.d.ts +1 -1
  25. package/dist/internal/layout/components/index.js +1 -1
  26. package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
  27. package/dist/providers/NextJsAppProviders.js +0 -1
  28. package/dist/routing/AuthGuard.d.ts +0 -4
  29. package/dist/routing/AuthGuard.d.ts.map +1 -1
  30. package/dist/routing/AuthGuard.js +0 -4
  31. package/dist/styles/index.css +35 -46
  32. package/dist/symbol-index.json +1 -1
  33. package/guidelines/SEO.md +12 -0
  34. package/package.json +6 -6
@@ -1,4 +1,4 @@
1
- import type { BentoColumns, BentoGap, CardVariant, ResponsiveCols, Tone } from '@donotdev/components';
1
+ import type { BentoGap, CardVariant, ResponsiveCols, Tone } from '@donotdev/components';
2
2
  import { type TechKey } from '../../data/techLogos';
3
3
  /** Props for the TechBento component. */
4
4
  export type TechBentoProps = {
@@ -17,10 +17,6 @@ export type TechBentoProps = {
17
17
  * @example [1, 1, 2, 3] - 1 col mobile/tablet, 2 laptop, 3 desktop
18
18
  */
19
19
  cols?: number | ResponsiveCols;
20
- /**
21
- * @deprecated Use `cols` prop instead. Kept for backward compatibility.
22
- */
23
- columns?: BentoColumns;
24
20
  gap?: BentoGap;
25
21
  separator?: boolean;
26
22
  /** Tone system for background colors (matches Section/CallToAction) */
@@ -37,6 +33,6 @@ export type TechBentoProps = {
37
33
  defaultOpen?: boolean;
38
34
  className?: string;
39
35
  };
40
- export declare function TechBento({ title, techs, cols, columns, gap, separator, tone, align, collapsible, open, onOpenChange, defaultOpen, className, }: TechBentoProps): import("react").JSX.Element;
36
+ export declare function TechBento({ title, techs, cols, gap, separator, tone, align, collapsible, open, onOpenChange, defaultOpen, className, }: TechBentoProps): import("react").JSX.Element;
41
37
  export default TechBento;
42
38
  //# sourceMappingURL=TechBento.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TechBento.d.ts","sourceRoot":"","sources":["../../../src/components/common/TechBento.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,cAAc,EACd,IAAI,EACL,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAa,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/D,yCAAyC;AACzC,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,OAAO,CAAC;QACd,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;QAC3C,OAAO,CAAC,EAAE,WAAW,CAAC;KACvB,CAAC,CAAC;IACH;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAC/B;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uEAAuE;IACvE,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0DAA0D;IAC1D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA0CF,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,IAAQ,EACR,OAAO,EACP,GAAc,EACd,SAAiB,EACjB,IAAiB,EACjB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,SAAS,GACV,EAAE,cAAc,+BA4DhB;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"TechBento.d.ts","sourceRoot":"","sources":["../../../src/components/common/TechBento.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAEV,QAAQ,EACR,WAAW,EACX,cAAc,EACd,IAAI,EACL,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAa,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/D,yCAAyC;AACzC,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,OAAO,CAAC;QACd,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;QAC3C,OAAO,CAAC,EAAE,WAAW,CAAC;KACvB,CAAC,CAAC;IACH;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAC/B,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uEAAuE;IACvE,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0DAA0D;IAC1D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA0CF,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,IAAQ,EACR,GAAc,EACd,SAAiB,EACjB,IAAiB,EACjB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,SAAS,GACV,EAAE,cAAc,+BA0DhB;AAED,eAAe,SAAS,CAAC"}
@@ -13,25 +13,23 @@ function TechCard({ techKey, variant, }) {
13
13
  const decodedSvg = sanitizeSvg(rawSvg);
14
14
  return (_jsx(Card, { variant: variant, className: "dndev-tech-card", style: { '--tech-color': logo.color }, "data-hover": isHovered, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: _jsxs(Stack, { direction: "column", align: "center", gap: "tight", children: [_jsx("div", { className: "dndev-tech-card-logo", "data-tech": techKey, dangerouslySetInnerHTML: { __html: decodedSvg } }), _jsx(Text, { as: "span", level: "small", children: logo.name })] }) }));
15
15
  }
16
- export function TechBento({ title, techs, cols = 3, columns, gap = 'medium', separator = false, tone = TONE.GHOST, align, collapsible, open, onOpenChange, defaultOpen, className, }) {
16
+ export function TechBento({ title, techs, cols = 3, gap = 'medium', separator = false, tone = TONE.GHOST, align, collapsible, open, onOpenChange, defaultOpen, className, }) {
17
17
  // Convert Grid's cols format to Bento's columns format
18
18
  // Grid: [mobile, tablet, laptop, desktop]
19
19
  // Bento: { mobile, tablet, desktop, wide }
20
- const bentoColumns = columns
21
- ? columns
22
- : typeof cols === 'number'
23
- ? {
24
- mobile: cols,
25
- tablet: cols,
26
- desktop: cols,
27
- wide: cols,
28
- }
29
- : {
30
- mobile: cols[0],
31
- tablet: cols[1],
32
- desktop: cols[2], // Grid's laptop → Bento's desktop
33
- wide: cols[3], // Grid's desktop → Bento's wide
34
- };
20
+ const bentoColumns = typeof cols === 'number'
21
+ ? {
22
+ mobile: cols,
23
+ tablet: cols,
24
+ desktop: cols,
25
+ wide: cols,
26
+ }
27
+ : {
28
+ mobile: cols[0],
29
+ tablet: cols[1],
30
+ desktop: cols[2], // Grid's laptop → Bento's desktop
31
+ wide: cols[3], // Grid's desktop → Bento's wide
32
+ };
35
33
  const getSpan = (size) => {
36
34
  if (size === 'long')
37
35
  return { cols: 2, rows: 1 };
@@ -4,7 +4,7 @@ export type { EntityDisplayRendererProps };
4
4
  * EntityDisplayRenderer - Automatically fetches and displays entity data
5
5
  *
6
6
  * Features:
7
- * - Automatic data fetching using useCrud
7
+ * - Reactive data fetching using useCrudDoc (stays in sync with edits)
8
8
  * - Loading state handling
9
9
  * - Error handling
10
10
  * - Automatic field rendering (respects visibility rules)
@@ -1 +1 @@
1
- {"version":3,"file":"EntityDisplayRenderer.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityDisplayRenderer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAS/E,YAAY,EAAE,0BAA0B,EAAE,CAAC;AAE3C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EAAE,EAC3E,MAAM,EACN,EAAE,EACF,CAAC,EACD,SAAc,EACd,cAAc,EACd,eAAe,EACf,UAAU,EAAE,cAAc,EAC1B,aAAa,EACb,OAAO,GACR,EAAE,0BAA0B,CAAC,CAAC,CAAC,sCAgN/B;AAED,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"EntityDisplayRenderer.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityDisplayRenderer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAS/E,YAAY,EAAE,0BAA0B,EAAE,CAAC;AAE3C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EAAE,EAC3E,MAAM,EACN,EAAE,EACF,CAAC,EACD,SAAc,EACd,cAAc,EACd,eAAe,EACf,UAAU,EAAE,cAAc,EAC1B,aAAa,EACb,OAAO,GACR,EAAE,0BAA0B,CAAC,CAAC,CAAC,sCA+J/B;AAED,eAAe,qBAAqB,CAAC"}
@@ -10,16 +10,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
10
  * @since 0.0.1
11
11
  * @author AMBROISE PARK Consulting
12
12
  */
13
- import { useEffect, useState, useMemo } from 'react';
13
+ import { useMemo } from 'react';
14
14
  import { Stack, Spinner } from '@donotdev/components';
15
15
  import { useTranslation, isFieldVisible } from '@donotdev/core';
16
16
  import { useAuthSafe } from '../../utils/useAuthSafe';
17
- import { isCrudModuleAvailable, useCrud, DisplayFieldRenderer, } from '../crudImports';
17
+ import { isCrudModuleAvailable, useCrudDoc, DisplayFieldRenderer, } from '../crudImports';
18
18
  /**
19
19
  * EntityDisplayRenderer - Automatically fetches and displays entity data
20
20
  *
21
21
  * Features:
22
- * - Automatic data fetching using useCrud
22
+ * - Reactive data fetching using useCrudDoc (stays in sync with edits)
23
23
  * - Loading state handling
24
24
  * - Error handling
25
25
  * - Automatic field rendering (respects visibility rules)
@@ -39,63 +39,16 @@ export function EntityDisplayRenderer({ entity, id, t, className = '', loadingMe
39
39
  // Auto-detect role from auth; prop overrides. Preview = design-time showcase, show all fields.
40
40
  const authRole = useAuthSafe('userRole');
41
41
  const viewerRole = viewerRoleProp ?? (isPreview ? 'super' : authRole);
42
- const { get, loading, data: storeData, error: storeError, isAvailable, } = useCrud(entity);
43
- const [isFetching, setIsFetching] = useState(false);
44
- const [fetchError, setFetchError] = useState(null);
45
- const [data, setData] = useState(null);
42
+ // Reactive read: re-renders on every cache write for this document (edits, deletes)
43
+ const { data: fetchedData, loading, error, notFound, } = useCrudDoc(entity, id, { enabled: !isPreview });
46
44
  // Entity + crud namespaces so formatValue can resolve crud:price.* etc.
47
45
  const { t: tDual } = useTranslation([entity.namespace, 'crud']);
48
46
  const { t: tCrud } = useTranslation('crud');
49
47
  const translate = t || tDual;
50
- // Fetch data when id is available and service is ready (skip in preview mode)
51
- useEffect(() => {
52
- if (isPreview)
53
- return;
54
- // Early return if no ID
55
- if (!id) {
56
- setData(null);
57
- setFetchError(null);
58
- setIsFetching(false);
59
- return;
60
- }
61
- // Early return if service not ready
62
- if (!isAvailable || !get) {
63
- return;
64
- }
65
- let cancelled = false;
66
- setIsFetching(true);
67
- setFetchError(null);
68
- // Call get function - it should trigger the fetch
69
- get(id)
70
- .then((fetchedData) => {
71
- if (cancelled)
72
- return;
73
- setIsFetching(false);
74
- if (fetchedData) {
75
- setData(fetchedData);
76
- setFetchError(null);
77
- }
78
- else {
79
- setData(null);
80
- setFetchError(new Error('Entity not found'));
81
- }
82
- })
83
- .catch((err) => {
84
- if (cancelled)
85
- return;
86
- setIsFetching(false);
87
- setFetchError(err instanceof Error ? err : new Error(String(err)));
88
- setData(null);
89
- });
90
- return () => {
91
- cancelled = true;
92
- };
93
- }, [id, get, isAvailable, isPreview]);
94
- // In preview mode: use preview data directly
95
- // Priority: preview > store data (reactive) > local fetch data
96
- const displayData = isPreview ? preview : storeData || data;
97
- const displayError = isPreview ? null : storeError || fetchError;
98
- const isLoading = isPreview ? false : loading || isFetching || !id;
48
+ // Preview: design-time showcase data, no read
49
+ const displayData = isPreview ? preview : fetchedData;
50
+ const displayError = isPreview ? null : error;
51
+ const isLoading = isPreview ? false : loading || !id;
99
52
  // Filter fields: respect visibility AND skip empty values
100
53
  // MUST be called before any early returns (Rules of Hooks)
101
54
  const visibleFields = useMemo(() => {
@@ -114,7 +67,7 @@ export function EntityDisplayRenderer({ entity, id, t, className = '', loadingMe
114
67
  if (fieldConfig.visibility === 'hidden') {
115
68
  return false;
116
69
  }
117
- // Get field value (displayData may be preview T or store row; entity is AnyEntity in props)
70
+ // Get field value (displayData may be preview T or cached row; entity is AnyEntity in props)
118
71
  const value = displayData[fieldName];
119
72
  // Hide if value is empty/null/undefined
120
73
  if (value === null || value === undefined) {
@@ -148,6 +101,9 @@ export function EntityDisplayRenderer({ entity, id, t, className = '', loadingMe
148
101
  }, className: className, children: _jsx(Spinner, { overlay: true, "aria-label": loadingMessage ||
149
102
  tCrud('form.loading', { defaultValue: 'Loading...' }) }) }));
150
103
  }
104
+ // CRUD unavailable (consent declined / feature absent): nothing will load
105
+ if (!displayData && !displayError && !notFound)
106
+ return null;
151
107
  // Error or not found state
152
108
  if (displayError || !displayData) {
153
109
  return (_jsx(Stack, { align: "center", justify: "center", style: {
@@ -1 +1 @@
1
- {"version":3,"file":"EntityFormRenderer.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityFormRenderer.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,uBAAuB,EACvB,YAAY,EAEb,MAAM,gBAAgB,CAAC;AAexB,YAAY,EAAE,uBAAuB,EAAE,CAAC;AA6BxC;;;;;;;;;;;;GAYG;AACH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EACtE,KAAK,EAAE,uBAAuB,CAAC,CAAC,CAAC,+BAIlC;AAseD,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"EntityFormRenderer.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityFormRenderer.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,uBAAuB,EACvB,YAAY,EAEb,MAAM,gBAAgB,CAAC;AAexB,YAAY,EAAE,uBAAuB,EAAE,CAAC;AA6BxC;;;;;;;;;;;;GAYG;AACH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EACtE,KAAK,EAAE,uBAAuB,CAAC,CAAC,CAAC,+BAIlC;AAoeD,eAAe,kBAAkB,CAAC"}
@@ -114,7 +114,7 @@ function EntityFormRendererCore({ entity, onSubmit, t, className = '', submitTex
114
114
  t: translate,
115
115
  loading,
116
116
  });
117
- const { control, handleSubmit, formState: { errors }, fields: rawFields, formStatus, uploadProgress, isDirty, hasUserInteracted, resetForm, } = form;
117
+ const { control, handleSubmit, fields: rawFields, formStatus, uploadProgress, isDirty, hasUserInteracted, resetForm, } = form;
118
118
  const isDirtyForBlocking = isDirty && hasUserInteracted;
119
119
  // Filter fields based on previewRole when visibility info is shown
120
120
  const renderableFields = useMemo(() => {
@@ -268,7 +268,7 @@ function EntityFormRendererCore({ entity, onSubmit, t, className = '', submitTex
268
268
  const badgeLabel = roleLabels[config.visibility] ??
269
269
  config.visibility;
270
270
  // Wrap field with visibility badge when enabled
271
- const fieldElement = !effectiveEditable ? (_jsx(FormDisplayField, { name: name, config: effectiveConfig, control: control, t: translate }, name)) : (_jsx(FormFieldRenderer, { name: name, config: effectiveConfig, control: control, errors: errors, t: translate }, name));
271
+ const fieldElement = !effectiveEditable ? (_jsx(FormDisplayField, { name: name, config: effectiveConfig, control: control, t: translate }, name)) : (_jsx(FormFieldRenderer, { name: name, config: effectiveConfig, control: control, t: translate }, name));
272
272
  // If no badge needed, return field directly
273
273
  if (!showBadge)
274
274
  return fieldElement;
@@ -20,6 +20,7 @@ export declare const useFormStore: import("zustand").UseBoundStore<import("zusta
20
20
  export declare const useFieldConditions: typeof crudModule.useFieldConditions;
21
21
  export declare const useCrud: typeof crudModule.useCrud;
22
22
  export declare const useCrudList: typeof crudModule.useCrudList;
23
+ export declare const useCrudDoc: typeof crudModule.useCrudDoc;
23
24
  export declare const useCrudCardList: typeof crudModule.useCrudCardList;
24
25
  export declare const useEntityFavorites: typeof crudModule.useEntityFavorites;
25
26
  export declare const useCrudFilters: typeof crudModule.useCrudFilters;
@@ -1 +1 @@
1
- {"version":3,"file":"crudImports.d.ts","sourceRoot":"","sources":["../../src/crud/crudImports.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,SAA4C,CAAC;AAG/E,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,YAAY,iKAA2B,CAAC;AACrD,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,OAAO,2BAAsB,CAAC;AAC3C,eAAO,MAAM,WAAW,+BAA0B,CAAC;AACnD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AAGrE,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AACrE,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,QAAQ,4BAAuB,CAAC;AAG7C,eAAO,MAAM,mBAAmB,uCAAkC,CAAC;AACnE,eAAO,MAAM,WAAW,+BAA0B,CAAC"}
1
+ {"version":3,"file":"crudImports.d.ts","sourceRoot":"","sources":["../../src/crud/crudImports.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,SAA4C,CAAC;AAG/E,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,YAAY,iKAA2B,CAAC;AACrD,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,OAAO,2BAAsB,CAAC;AAC3C,eAAO,MAAM,WAAW,+BAA0B,CAAC;AACnD,eAAO,MAAM,UAAU,8BAAyB,CAAC;AACjD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AAGrE,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AACrE,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,QAAQ,4BAAuB,CAAC;AAG7C,eAAO,MAAM,mBAAmB,uCAAkC,CAAC;AACnE,eAAO,MAAM,WAAW,+BAA0B,CAAC"}
@@ -22,6 +22,7 @@ export const useFormStore = crudModule?.useFormStore;
22
22
  export const useFieldConditions = crudModule?.useFieldConditions;
23
23
  export const useCrud = crudModule?.useCrud;
24
24
  export const useCrudList = crudModule?.useCrudList;
25
+ export const useCrudDoc = crudModule?.useCrudDoc;
25
26
  export const useCrudCardList = crudModule?.useCrudCardList;
26
27
  export const useEntityFavorites = crudModule?.useEntityFavorites;
27
28
  export const useCrudFilters = crudModule?.useCrudFilters;
@@ -194,7 +194,6 @@
194
194
  --font-size-xs: 0.75rem; /* 12px - captions, shortcuts, meta */
195
195
  --font-size-sm: 0.875rem; /* 14px - small text, captions */
196
196
  --font-size-base: 1rem; /* 16px - body text, DEFAULT */
197
- --font-size-input: 16px; /* Form field text - hardcoded for iOS zoom + density-proof */
198
197
  --font-size-lg: 1.25rem; /* 20px - base × 1.25¹ - emphasized text */
199
198
  --font-size-xl: 1.563rem; /* 25px - base × 1.25² - headings */
200
199
  --font-size-2xl: 1.953rem; /* 31px - base × 1.25³ - large headings */
@@ -448,6 +447,13 @@
448
447
  ); /* 32-48px fluid, 2vw floor */
449
448
  --line-height: 1.33; /* Perfect Fourth - All text */
450
449
  }
450
+
451
+ /* Form field text: follows density, never below 16px (iOS focus zoom).
452
+ Declared on [data-density] too, so nested densities resolve their own base. */
453
+ :root,
454
+ [data-density] {
455
+ --font-size-input: max(16px, var(--font-size-base));
456
+ }
451
457
  /* 2. Theme system - color palette definitions */
452
458
  /* packages/components/src/styles/themes.css */
453
459
 
@@ -1399,6 +1405,14 @@ em {
1399
1405
  pointer-events: none;
1400
1406
  opacity: var(--opacity-muted);
1401
1407
  }
1408
+ /* Ripple clip layer (injected by JS) - contains the ripple regardless of the host's overflow */
1409
+ .dndev-interactive .dndev-ripple-clip {
1410
+ position: absolute;
1411
+ inset: 0;
1412
+ overflow: hidden;
1413
+ border-radius: inherit;
1414
+ pointer-events: none;
1415
+ }
1402
1416
  /* Ripple effect element (injected by JS) */
1403
1417
  .dndev-interactive .dndev-ripple {
1404
1418
  position: absolute;
@@ -1407,6 +1421,9 @@ em {
1407
1421
  pointer-events: none;
1408
1422
  animation: dndev-ripple var(--dur-slow) var(--ease-in-out) forwards;
1409
1423
  }
1424
+ .dndev-interactive[data-variant='ghost'],.dndev-interactive[data-variant='link'] {
1425
+ --ripple-opacity: 0;
1426
+ }
1410
1427
  .dndev-interactive[data-display='compact'] {
1411
1428
  width: var(--touch-target);
1412
1429
  height: var(--touch-target);
@@ -1551,8 +1568,12 @@ em {
1551
1568
  .dndev-interactive[data-role='menu-item']:focus-visible,.dndev-interactive[data-role='menu-item'][data-highlighted] {
1552
1569
  background: rgb(from var(--primary) r g b / 0.1);
1553
1570
  color: var(--primary);
1554
- outline: 2px solid var(--ring);
1555
- outline-offset: 0;
1571
+ outline: none;
1572
+ box-shadow: none;
1573
+ }
1574
+ /* Items fill their clipped container: scaling would expose its edges */
1575
+ .dndev-interactive[data-role='menu-item']:active:not(:disabled) {
1576
+ transform: none;
1556
1577
  }
1557
1578
  .dndev-interactive[data-role='menu-item'][data-disabled] {
1558
1579
  pointer-events: none;
@@ -4266,6 +4287,7 @@ em {
4266
4287
  padding: var(--gap-sm) var(--gap-md);
4267
4288
  cursor: pointer;
4268
4289
  border-radius: var(--radius-interactive);
4290
+ font-weight: var(--font-weight-normal);
4269
4291
  transition: background-color var(--dur-fast) var(--ease-in-out);
4270
4292
  }
4271
4293
 
@@ -4296,7 +4318,7 @@ em {
4296
4318
  }
4297
4319
 
4298
4320
  .dndev-combobox-option-label {
4299
- font-size: var(--font-size-sm);
4321
+ font-size: var(--font-size-input);
4300
4322
  color: var(--foreground);
4301
4323
  }
4302
4324
 
@@ -6777,39 +6799,20 @@ input[type='number'] {
6777
6799
  border-top-color: transparent;
6778
6800
  }
6779
6801
 
6780
- .dndev-select-trigger [data-radix-select-icon] {
6781
- opacity: var(--opacity-muted);
6782
- width: var(--icon-md);
6783
- height: var(--icon-md);
6784
- }
6785
-
6786
- .dndev-select-trigger [data-radix-select-value] {
6787
- font-size: var(--font-size-input);
6788
- }
6789
-
6790
6802
  .dndev-select-content {
6791
6803
  width: var(--radix-select-trigger-width);
6792
6804
  min-width: var(--radix-select-trigger-width);
6793
6805
  }
6794
6806
 
6795
- [data-radix-select-viewport] {
6796
- display: flex;
6797
- flex-direction: column;
6798
- padding: 0;
6799
- }
6800
-
6801
- .dndev-interactive[data-radix-select-item] {
6802
- width: 100%;
6803
- justify-content: flex-start;
6804
- text-align: start;
6807
+ .dndev-select-content .dndev-interactive[data-role='menu-item'] {
6808
+ font-size: var(--font-size-input);
6809
+ font-weight: var(--font-weight-normal);
6805
6810
  }
6806
6811
 
6807
- .dndev-interactive[data-radix-select-item] [data-radix-select-item-text] {
6812
+ [data-radix-select-viewport] {
6808
6813
  display: flex;
6809
6814
  flex-direction: column;
6810
- align-items: flex-start;
6811
- text-align: start;
6812
- flex: 1;
6815
+ padding: 0;
6813
6816
  }
6814
6817
 
6815
6818
  .dndev-select-item-description {
@@ -6817,20 +6820,6 @@ input[type='number'] {
6817
6820
  color: var(--muted-foreground);
6818
6821
  }
6819
6822
 
6820
- .dndev-interactive[data-radix-select-item] [data-radix-select-item-indicator] {
6821
- display: flex;
6822
- align-items: center;
6823
- justify-content: center;
6824
- color: currentColor;
6825
- }
6826
-
6827
- .dndev-interactive[data-radix-select-item]
6828
- [data-radix-select-item-indicator]
6829
- svg {
6830
- width: 1rem;
6831
- height: 1rem;
6832
- }
6833
-
6834
6823
  /* packages/components/src/atomic/ScrollArea/ScrollArea.css */
6835
6824
 
6836
6825
  .dndev-scroll-area {
@@ -7977,9 +7966,9 @@ input[type='number'] {
7977
7966
  overflow: hidden;
7978
7967
  }
7979
7968
 
7980
- /* Default: show overflow when wrap is enabled (allows wrapping) */
7969
+ /* Default: show overflow when wrap is enabled (allows wrapping); interactive elements keep their own clipping */
7981
7970
 
7982
- .dndev-stack[data-direction='row'][data-wrap='wrap']:not([data-overflow]) > *,.dndev-stack[data-direction='row'][data-wrap='wrap-reverse']:not([data-overflow]) > * {
7971
+ .dndev-stack[data-direction='row'][data-wrap='wrap']:not([data-overflow]) > *:not(.dndev-interactive),.dndev-stack[data-direction='row'][data-wrap='wrap-reverse']:not([data-overflow]) > *:not(.dndev-interactive) {
7983
7972
  overflow: visible;
7984
7973
  }
7985
7974
 
@@ -10472,11 +10461,11 @@ input[type='number'] {
10472
10461
  /* ========== RIPPLE EFFECT ========== */
10473
10462
  @keyframes dndev-ripple {
10474
10463
  0% {
10475
- transform: translate(-50%, -50%) scale(0);
10464
+ transform: scale(0);
10476
10465
  opacity: var(--ripple-opacity);
10477
10466
  }
10478
10467
  100% {
10479
- transform: translate(-50%, -50%) scale(4);
10468
+ transform: scale(4);
10480
10469
  opacity: 0;
10481
10470
  }
10482
10471
  }
package/dist/dndev.css CHANGED
@@ -193,7 +193,6 @@
193
193
  --font-size-xs: 0.75rem; /* 12px - captions, shortcuts, meta */
194
194
  --font-size-sm: 0.875rem; /* 14px - small text, captions */
195
195
  --font-size-base: 1rem; /* 16px - body text, DEFAULT */
196
- --font-size-input: 16px; /* Form field text - hardcoded for iOS zoom + density-proof */
197
196
  --font-size-lg: 1.25rem; /* 20px - base × 1.25¹ - emphasized text */
198
197
  --font-size-xl: 1.563rem; /* 25px - base × 1.25² - headings */
199
198
  --font-size-2xl: 1.953rem; /* 31px - base × 1.25³ - large headings */
@@ -447,6 +446,13 @@
447
446
  ); /* 32-48px fluid, 2vw floor */
448
447
  --line-height: 1.33; /* Perfect Fourth - All text */
449
448
  }
449
+
450
+ /* Form field text: follows density, never below 16px (iOS focus zoom).
451
+ Declared on [data-density] too, so nested densities resolve their own base. */
452
+ :root,
453
+ [data-density] {
454
+ --font-size-input: max(16px, var(--font-size-base));
455
+ }
450
456
  /* 2. Theme system - color palette definitions */
451
457
  /* packages/components/src/styles/themes.css */
452
458
 
@@ -1398,6 +1404,14 @@ em {
1398
1404
  pointer-events: none;
1399
1405
  opacity: var(--opacity-muted);
1400
1406
  }
1407
+ /* Ripple clip layer (injected by JS) - contains the ripple regardless of the host's overflow */
1408
+ .dndev-interactive .dndev-ripple-clip {
1409
+ position: absolute;
1410
+ inset: 0;
1411
+ overflow: hidden;
1412
+ border-radius: inherit;
1413
+ pointer-events: none;
1414
+ }
1401
1415
  /* Ripple effect element (injected by JS) */
1402
1416
  .dndev-interactive .dndev-ripple {
1403
1417
  position: absolute;
@@ -1406,6 +1420,9 @@ em {
1406
1420
  pointer-events: none;
1407
1421
  animation: dndev-ripple var(--dur-slow) var(--ease-in-out) forwards;
1408
1422
  }
1423
+ .dndev-interactive[data-variant='ghost'],.dndev-interactive[data-variant='link'] {
1424
+ --ripple-opacity: 0;
1425
+ }
1409
1426
  .dndev-interactive[data-display='compact'] {
1410
1427
  width: var(--touch-target);
1411
1428
  height: var(--touch-target);
@@ -1550,8 +1567,12 @@ em {
1550
1567
  .dndev-interactive[data-role='menu-item']:focus-visible,.dndev-interactive[data-role='menu-item'][data-highlighted] {
1551
1568
  background: rgb(from var(--primary) r g b / 0.1);
1552
1569
  color: var(--primary);
1553
- outline: 2px solid var(--ring);
1554
- outline-offset: 0;
1570
+ outline: none;
1571
+ box-shadow: none;
1572
+ }
1573
+ /* Items fill their clipped container: scaling would expose its edges */
1574
+ .dndev-interactive[data-role='menu-item']:active:not(:disabled) {
1575
+ transform: none;
1555
1576
  }
1556
1577
  .dndev-interactive[data-role='menu-item'][data-disabled] {
1557
1578
  pointer-events: none;
@@ -4265,6 +4286,7 @@ em {
4265
4286
  padding: var(--gap-sm) var(--gap-md);
4266
4287
  cursor: pointer;
4267
4288
  border-radius: var(--radius-interactive);
4289
+ font-weight: var(--font-weight-normal);
4268
4290
  transition: background-color var(--dur-fast) var(--ease-in-out);
4269
4291
  }
4270
4292
 
@@ -4295,7 +4317,7 @@ em {
4295
4317
  }
4296
4318
 
4297
4319
  .dndev-combobox-option-label {
4298
- font-size: var(--font-size-sm);
4320
+ font-size: var(--font-size-input);
4299
4321
  color: var(--foreground);
4300
4322
  }
4301
4323
 
@@ -6776,39 +6798,20 @@ input[type='number'] {
6776
6798
  border-top-color: transparent;
6777
6799
  }
6778
6800
 
6779
- .dndev-select-trigger [data-radix-select-icon] {
6780
- opacity: var(--opacity-muted);
6781
- width: var(--icon-md);
6782
- height: var(--icon-md);
6783
- }
6784
-
6785
- .dndev-select-trigger [data-radix-select-value] {
6786
- font-size: var(--font-size-input);
6787
- }
6788
-
6789
6801
  .dndev-select-content {
6790
6802
  width: var(--radix-select-trigger-width);
6791
6803
  min-width: var(--radix-select-trigger-width);
6792
6804
  }
6793
6805
 
6794
- [data-radix-select-viewport] {
6795
- display: flex;
6796
- flex-direction: column;
6797
- padding: 0;
6798
- }
6799
-
6800
- .dndev-interactive[data-radix-select-item] {
6801
- width: 100%;
6802
- justify-content: flex-start;
6803
- text-align: start;
6806
+ .dndev-select-content .dndev-interactive[data-role='menu-item'] {
6807
+ font-size: var(--font-size-input);
6808
+ font-weight: var(--font-weight-normal);
6804
6809
  }
6805
6810
 
6806
- .dndev-interactive[data-radix-select-item] [data-radix-select-item-text] {
6811
+ [data-radix-select-viewport] {
6807
6812
  display: flex;
6808
6813
  flex-direction: column;
6809
- align-items: flex-start;
6810
- text-align: start;
6811
- flex: 1;
6814
+ padding: 0;
6812
6815
  }
6813
6816
 
6814
6817
  .dndev-select-item-description {
@@ -6816,20 +6819,6 @@ input[type='number'] {
6816
6819
  color: var(--muted-foreground);
6817
6820
  }
6818
6821
 
6819
- .dndev-interactive[data-radix-select-item] [data-radix-select-item-indicator] {
6820
- display: flex;
6821
- align-items: center;
6822
- justify-content: center;
6823
- color: currentColor;
6824
- }
6825
-
6826
- .dndev-interactive[data-radix-select-item]
6827
- [data-radix-select-item-indicator]
6828
- svg {
6829
- width: 1rem;
6830
- height: 1rem;
6831
- }
6832
-
6833
6822
  /* packages/components/src/atomic/ScrollArea/ScrollArea.css */
6834
6823
 
6835
6824
  .dndev-scroll-area {
@@ -7976,9 +7965,9 @@ input[type='number'] {
7976
7965
  overflow: hidden;
7977
7966
  }
7978
7967
 
7979
- /* Default: show overflow when wrap is enabled (allows wrapping) */
7968
+ /* Default: show overflow when wrap is enabled (allows wrapping); interactive elements keep their own clipping */
7980
7969
 
7981
- .dndev-stack[data-direction='row'][data-wrap='wrap']:not([data-overflow]) > *,.dndev-stack[data-direction='row'][data-wrap='wrap-reverse']:not([data-overflow]) > * {
7970
+ .dndev-stack[data-direction='row'][data-wrap='wrap']:not([data-overflow]) > *:not(.dndev-interactive),.dndev-stack[data-direction='row'][data-wrap='wrap-reverse']:not([data-overflow]) > *:not(.dndev-interactive) {
7982
7971
  overflow: visible;
7983
7972
  }
7984
7973
 
@@ -10471,11 +10460,11 @@ input[type='number'] {
10471
10460
  /* ========== RIPPLE EFFECT ========== */
10472
10461
  @keyframes dndev-ripple {
10473
10462
  0% {
10474
- transform: translate(-50%, -50%) scale(0);
10463
+ transform: scale(0);
10475
10464
  opacity: var(--ripple-opacity);
10476
10465
  }
10477
10466
  100% {
10478
- transform: translate(-50%, -50%) scale(4);
10467
+ transform: scale(4);
10479
10468
  opacity: 0;
10480
10469
  }
10481
10470
  }