@donotdev/ui 0.0.25 → 0.0.27

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 (40) hide show
  1. package/dist/components/common/index.d.ts +0 -5
  2. package/dist/components/common/index.d.ts.map +1 -1
  3. package/dist/components/common/index.js +0 -5
  4. package/dist/components/layout/GameFlow.d.ts +1 -1
  5. package/dist/components/layout/GameFlow.js +1 -1
  6. package/dist/crud/components/EntityCardList.d.ts +1 -1
  7. package/dist/crud/components/EntityCardList.d.ts.map +1 -1
  8. package/dist/crud/components/EntityCardList.js +60 -5
  9. package/dist/crud/components/EntityRecommendations.d.ts +24 -1
  10. package/dist/crud/components/EntityRecommendations.d.ts.map +1 -1
  11. package/dist/crud/components/EntityRecommendations.js +42 -4
  12. package/dist/dndev-next.css +237 -20
  13. package/dist/dndev.css +312 -22
  14. package/dist/index.js +4 -4
  15. package/dist/internal/initializers/BaseStoresInitializer.d.ts.map +1 -1
  16. package/dist/internal/initializers/BaseStoresInitializer.js +21 -2
  17. package/dist/internal/layout/components/footer/FooterLegalLinks.d.ts +2 -0
  18. package/dist/internal/layout/components/footer/FooterLegalLinks.d.ts.map +1 -1
  19. package/dist/internal/layout/components/footer/FooterLegalLinks.js +2 -2
  20. package/dist/routing/AuthGuard.d.ts.map +1 -1
  21. package/dist/routing/AuthGuard.js +4 -5
  22. package/dist/styles/index.css +312 -22
  23. package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
  24. package/dist/vite-routing/AppRoutes.js +3 -3
  25. package/package.json +3 -6
  26. package/dist/components/common/AppLoading.d.ts +0 -14
  27. package/dist/components/common/AppLoading.d.ts.map +0 -1
  28. package/dist/components/common/AppLoading.js +0 -35
  29. package/dist/components/common/Loader.d.ts +0 -33
  30. package/dist/components/common/Loader.d.ts.map +0 -1
  31. package/dist/components/common/Loader.js +0 -81
  32. package/dist/components/common/LoadingMessage.d.ts +0 -114
  33. package/dist/components/common/LoadingMessage.d.ts.map +0 -1
  34. package/dist/components/common/LoadingMessage.js +0 -127
  35. package/dist/components/common/LoadingOverlay.d.ts +0 -112
  36. package/dist/components/common/LoadingOverlay.d.ts.map +0 -1
  37. package/dist/components/common/LoadingOverlay.js +0 -155
  38. package/dist/components/common/LoadingScreen.d.ts +0 -20
  39. package/dist/components/common/LoadingScreen.d.ts.map +0 -1
  40. package/dist/components/common/LoadingScreen.js +0 -45
@@ -6,13 +6,8 @@
6
6
  * @since 0.0.1
7
7
  * @author AMBROISE PARK Consulting
8
8
  */
9
- export { default as AppLoading } from './AppLoading';
10
9
  export { default as FeatureDisabled } from './FeatureDisabled';
11
10
  export { default as Icon } from './icon';
12
- export { default as Loader } from './Loader';
13
- export { default as LoadingMessage, LoadingMessageSimple, LoadingMessageProcessing, LoadingMessageAlmostDone, LoadingMessageComplete, LoadingMessageSaving, LoadingMessageUploading, LoadingMessageSearching, LoadingMessageConnecting, } from './LoadingMessage';
14
- export { default as LoadingOverlay, LoadingContainerOverlay, } from './LoadingOverlay';
15
- export { default as LoadingScreen } from './LoadingScreen';
16
11
  export { RedirectOverlay } from './RedirectOverlay';
17
12
  export { default as ProgressBar } from './ProgressBar';
18
13
  export { default as Skeleton } from './Skeleton';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/common/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,OAAO,IAAI,cAAc,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,OAAO,IAAI,cAAc,EACzB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/common/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
@@ -7,13 +7,8 @@
7
7
  * @since 0.0.1
8
8
  * @author AMBROISE PARK Consulting
9
9
  */
10
- export { default as AppLoading } from './AppLoading';
11
10
  export { default as FeatureDisabled } from './FeatureDisabled';
12
11
  export { default as Icon } from './icon';
13
- export { default as Loader } from './Loader';
14
- export { default as LoadingMessage, LoadingMessageSimple, LoadingMessageProcessing, LoadingMessageAlmostDone, LoadingMessageComplete, LoadingMessageSaving, LoadingMessageUploading, LoadingMessageSearching, LoadingMessageConnecting, } from './LoadingMessage';
15
- export { default as LoadingOverlay, LoadingContainerOverlay, } from './LoadingOverlay';
16
- export { default as LoadingScreen } from './LoadingScreen';
17
12
  export { RedirectOverlay } from './RedirectOverlay';
18
13
  export { default as ProgressBar } from './ProgressBar';
19
14
  export { default as Skeleton } from './Skeleton';
@@ -49,7 +49,7 @@ export interface GameFlowProps {
49
49
  * screenRegistry={screenRegistry}
50
50
  * currentScreen={currentScreen}
51
51
  * nextScreen={nextScreen}
52
- * fallback={<AppLoading />}
52
+ * fallback={<Spinner overlay />}
53
53
  * />
54
54
  * ```
55
55
  *
@@ -59,7 +59,7 @@ function getLazyComponent(screenName, registry) {
59
59
  * screenRegistry={screenRegistry}
60
60
  * currentScreen={currentScreen}
61
61
  * nextScreen={nextScreen}
62
- * fallback={<AppLoading />}
62
+ * fallback={<Spinner overlay />}
63
63
  * />
64
64
  * ```
65
65
  *
@@ -12,5 +12,5 @@ export type { EntityCardListProps };
12
12
  * - Auto-routing when handler not provided
13
13
  */
14
14
  export declare function EntityCardList({ entity, basePath, onClick, cols, staleTime, // 30 minutes default cache
15
- filter, hideFilters, resultLabel, tone, }: EntityCardListProps): import("react/jsx-runtime").JSX.Element | null;
15
+ queryOptions, filter, hideFilters, resultLabel, tone, }: EntityCardListProps): import("react/jsx-runtime").JSX.Element | null;
16
16
  //# sourceMappingURL=EntityCardList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityCardList.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityCardList.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,mBAAmB,EAAgB,MAAM,gBAAgB,CAAC;AAYxE,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,QAAQ,EACR,OAAO,EACP,IAAmB,EACnB,SAA0B,EAAE,2BAA2B;AACvD,MAAM,EACN,WAAmB,EACnB,WAAW,EACX,IAAI,GACL,EAAE,mBAAmB,kDA+LrB"}
1
+ {"version":3,"file":"EntityCardList.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityCardList.tsx"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,mBAAmB,EAAgB,MAAM,gBAAgB,CAAC;AAYxE,YAAY,EAAE,mBAAmB,EAAE,CAAC;AA0GpC;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,QAAQ,EACR,OAAO,EACP,IAAmB,EACnB,SAA0B,EAAE,2BAA2B;AACvD,YAAY,EACZ,MAAM,EACN,WAAmB,EACnB,WAAW,EACX,IAAI,GACL,EAAE,mBAAmB,kDAyLrB"}
@@ -15,11 +15,66 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
15
15
  */
16
16
  import { Heart } from 'lucide-react';
17
17
  import { useMemo, useCallback } from 'react';
18
- import { Card, Grid, Stack, Text, Spinner, Section, Button, } from '@donotdev/components';
19
- import { useTranslation, getListCardFieldNames } from '@donotdev/core';
18
+ import { Card, Grid, Stack, Text, Skeleton, Section, Button, } from '@donotdev/components';
19
+ import { useTranslation, getListCardFieldNames, useBreakpoint, } from '@donotdev/core';
20
20
  import { isCrudModuleAvailable, useCrudCardList, EntityFilters, useEntityFavorites, useCrudFilters, } from '../crudImports';
21
21
  import { CrudCard } from './CrudCardLink';
22
22
  import { useNavigate } from '../../routing';
23
+ /**
24
+ * Resolve skeleton slots from entity shape — mirrors CrudCard's useResolvedSlots exactly.
25
+ * Returns the actual field names per slot so skeletons render the same structure as real cards.
26
+ */
27
+ function resolveSkeletonSlots(entity) {
28
+ const l = entity.listCardFields;
29
+ if (l && !Array.isArray(l)) {
30
+ const layout = l;
31
+ return {
32
+ titleFields: layout.title ?? [],
33
+ subtitleFields: layout.subtitle ?? [],
34
+ contentFields: layout.content ?? [],
35
+ footerFields: layout.footer ?? [],
36
+ };
37
+ }
38
+ const fieldsToShow = getListCardFieldNames(entity);
39
+ const isImage = (name) => {
40
+ const type = entity.fields[name]?.type;
41
+ return type === 'image' || type === 'images';
42
+ };
43
+ const other = fieldsToShow.filter((n) => !isImage(n));
44
+ const images = fieldsToShow.filter(isImage);
45
+ return {
46
+ titleFields: other.length > 0 ? [other[0]] : [],
47
+ subtitleFields: [],
48
+ contentFields: [...other.slice(1, 4), ...images],
49
+ footerFields: [],
50
+ };
51
+ }
52
+ /**
53
+ * Skeleton grid — renders the same Card structure as CrudCard but with
54
+ * Skeleton elements instead of real data. No hardcoded sizes; the Card's
55
+ * own layout determines the shape.
56
+ */
57
+ const BREAKPOINT_INDEX = {
58
+ mobile: 0,
59
+ tablet: 1,
60
+ laptop: 2,
61
+ desktop: 3,
62
+ };
63
+ function CardListSkeleton({ cols, entity, }) {
64
+ const slots = resolveSkeletonSlots(entity);
65
+ const bp = useBreakpoint('current');
66
+ const currentCols = (Array.isArray(cols)
67
+ ? cols[BREAKPOINT_INDEX[bp] ?? 3]
68
+ : cols) ?? 1;
69
+ const count = currentCols * 3;
70
+ const isImage = (name) => {
71
+ const type = entity.fields[name]?.type;
72
+ return type === 'image' || type === 'images';
73
+ };
74
+ const contentNode = slots.contentFields.length > 0 ? (_jsx(Stack, { direction: "column", gap: "tight", children: slots.contentFields.map((fieldName) => isImage(fieldName) ? (_jsx(Skeleton, { height: 120 }, fieldName)) : (_jsxs("div", { children: [_jsx(Text, { level: "small", variant: "muted", children: _jsx(Skeleton, {}) }), _jsx(Text, { children: _jsx(Skeleton, {}) })] }, fieldName))) })) : undefined;
75
+ const footerNode = slots.footerFields.length > 0 ? (_jsx(Text, { level: "small", children: _jsx(Skeleton, {}) })) : undefined;
76
+ return (_jsx(Grid, { cols: cols, children: Array.from({ length: count }, (_, i) => (_jsx(Card, { title: _jsx(Skeleton, {}), subtitle: slots.subtitleFields.length > 0 ? _jsx(Skeleton, {}) : undefined, content: contentNode, footer: footerNode, elevated: true }, i))) }));
77
+ }
23
78
  /**
24
79
  * Entity Card List Component - Card grid view for public/user-facing browsing
25
80
  *
@@ -32,7 +87,7 @@ import { useNavigate } from '../../routing';
32
87
  * - Auto-routing when handler not provided
33
88
  */
34
89
  export function EntityCardList({ entity, basePath, onClick, cols = [1, 2, 3, 4], staleTime = 1000 * 60 * 30, // 30 minutes default cache
35
- filter, hideFilters = false, resultLabel, tone, }) {
90
+ queryOptions, filter, hideFilters = false, resultLabel, tone, }) {
36
91
  // Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
37
92
  // eslint-disable-next-line react-hooks/rules-of-hooks
38
93
  if (!isCrudModuleAvailable)
@@ -40,7 +95,7 @@ filter, hideFilters = false, resultLabel, tone, }) {
40
95
  const navigate = useNavigate();
41
96
  const base = basePath ?? `/${entity.collection}`;
42
97
  // useCrudCardList -> handles fetching + client-side filter/search/sort via `processed`
43
- const { items: rawData, processed, loading, } = useCrudCardList(entity, { staleTime });
98
+ const { items: rawData, processed, loading, } = useCrudCardList(entity, { staleTime, queryOptions });
44
99
  // Favorites - always enabled, no props needed
45
100
  const { isFavorite, toggleFavorite, favoritesFilter } = useEntityFavorites({
46
101
  collection: entity.collection,
@@ -92,7 +147,7 @@ filter, hideFilters = false, resultLabel, tone, }) {
92
147
  defaultValue: data.length === 1
93
148
  ? 'Found 1 occurrence'
94
149
  : `Found ${data.length} occurrences`,
95
- }), collapsible: true, defaultOpen: true, tone: tone, children: loading ? (_jsx(Stack, { align: "center", justify: "center", style: { padding: 'var(--gap-3xl)' }, children: _jsx(Spinner, {}) })) : data.length === 0 ? (_jsxs(Stack, { align: "center", justify: "center", style: { padding: 'var(--gap-3xl)', textAlign: 'center' }, children: [_jsx(Text, { level: "h3", style: { color: 'var(--muted-foreground)' }, children: tCrud('emptyState.title', {
150
+ }), collapsible: true, defaultOpen: true, tone: tone, children: loading ? (_jsx(CardListSkeleton, { cols: cols, entity: entity })) : data.length === 0 ? (_jsxs(Stack, { align: "center", justify: "center", style: { padding: 'var(--gap-3xl)', textAlign: 'center' }, children: [_jsx(Text, { level: "h3", style: { color: 'var(--muted-foreground)' }, children: tCrud('emptyState.title', {
96
151
  defaultValue: `No ${entity.name.toLowerCase()} found`,
97
152
  }) }), _jsx(Text, { style: { color: 'var(--muted-foreground)' }, children: tCrud('emptyState.description', {
98
153
  defaultValue: `No ${entity.name.toLowerCase()} available at this time.`,
@@ -3,10 +3,21 @@ import type { EntityRecommendationsProps } from '@donotdev/core';
3
3
  * Displays a grid of related entity cards.
4
4
  * Uses useCrudCardList (listCard schema) so cards render identically to EntityCardList.
5
5
  *
6
+ * **Title resolution (i18n):**
7
+ * 1. `title` prop — if provided, used as-is (pre-translated string)
8
+ * 2. `recommendations.title` in entity namespace — consumer override
9
+ * 3. `recommendations.title` in `crud` namespace — framework default ("You may also like")
10
+ *
11
+ * Consumers override by adding to their entity translation file:
12
+ * ```json
13
+ * { "recommendations": { "title": "Similar Apartments" } }
14
+ * ```
15
+ *
6
16
  * @example
17
+ * ```tsx
18
+ * // Auto-translated title (entity namespace → crud fallback)
7
19
  * <EntityRecommendations
8
20
  * entity={apartmentEntity}
9
- * title={t('apartment.recommendations')}
10
21
  * queryOptions={{
11
22
  * where: [
12
23
  * { field: 'district_code', operator: 'eq', value: current.district_code },
@@ -15,6 +26,18 @@ import type { EntityRecommendationsProps } from '@donotdev/core';
15
26
  * limit: 3,
16
27
  * }}
17
28
  * />
29
+ *
30
+ * // Explicit title override
31
+ * <EntityRecommendations
32
+ * entity={apartmentEntity}
33
+ * title="Nearby Apartments"
34
+ * queryOptions={...}
35
+ * />
36
+ * ```
37
+ *
38
+ * @version 0.0.2
39
+ * @since 0.0.15
40
+ * @author AMBROISE PARK Consulting
18
41
  */
19
42
  export declare function EntityRecommendations({ entity, queryOptions, title, basePath, cols, className, }: EntityRecommendationsProps): import("react/jsx-runtime").JSX.Element | null;
20
43
  //# sourceMappingURL=EntityRecommendations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityRecommendations.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityRecommendations.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAKjE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,IAAQ,EACR,SAAS,GACV,EAAE,0BAA0B,kDA2B5B"}
1
+ {"version":3,"file":"EntityRecommendations.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityRecommendations.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAKjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,IAAQ,EACR,SAAS,GACV,EAAE,0BAA0B,kDA0D5B"}
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  // packages/ui/src/crud/components/EntityRecommendations.tsx
4
4
  /**
5
5
  * @fileoverview Reusable recommendations section for related entities
@@ -10,17 +10,29 @@ import { jsx as _jsx } from "react/jsx-runtime";
10
10
  * @since 0.0.15
11
11
  * @author AMBROISE PARK Consulting
12
12
  */
13
- import { Section } from '@donotdev/components';
13
+ import { Card, Section, Skeleton, Stack } from '@donotdev/components';
14
+ import { useTranslation, useBreakpoint } from '@donotdev/core';
14
15
  import { isCrudModuleAvailable, useCrudCardList } from '../crudImports';
15
16
  import { CrudCard } from './CrudCardLink';
16
17
  /**
17
18
  * Displays a grid of related entity cards.
18
19
  * Uses useCrudCardList (listCard schema) so cards render identically to EntityCardList.
19
20
  *
21
+ * **Title resolution (i18n):**
22
+ * 1. `title` prop — if provided, used as-is (pre-translated string)
23
+ * 2. `recommendations.title` in entity namespace — consumer override
24
+ * 3. `recommendations.title` in `crud` namespace — framework default ("You may also like")
25
+ *
26
+ * Consumers override by adding to their entity translation file:
27
+ * ```json
28
+ * { "recommendations": { "title": "Similar Apartments" } }
29
+ * ```
30
+ *
20
31
  * @example
32
+ * ```tsx
33
+ * // Auto-translated title (entity namespace → crud fallback)
21
34
  * <EntityRecommendations
22
35
  * entity={apartmentEntity}
23
- * title={t('apartment.recommendations')}
24
36
  * queryOptions={{
25
37
  * where: [
26
38
  * { field: 'district_code', operator: 'eq', value: current.district_code },
@@ -29,12 +41,25 @@ import { CrudCard } from './CrudCardLink';
29
41
  * limit: 3,
30
42
  * }}
31
43
  * />
44
+ *
45
+ * // Explicit title override
46
+ * <EntityRecommendations
47
+ * entity={apartmentEntity}
48
+ * title="Nearby Apartments"
49
+ * queryOptions={...}
50
+ * />
51
+ * ```
52
+ *
53
+ * @version 0.0.2
54
+ * @since 0.0.15
55
+ * @author AMBROISE PARK Consulting
32
56
  */
33
57
  export function EntityRecommendations({ entity, queryOptions, title, basePath, cols = 3, className, }) {
34
58
  // Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
35
59
  // eslint-disable-next-line react-hooks/rules-of-hooks
36
60
  if (!isCrudModuleAvailable)
37
61
  return null;
62
+ const { t } = useTranslation([entity.namespace, 'crud']);
38
63
  const { items, loading } = useCrudCardList(entity, {
39
64
  queryOptions,
40
65
  });
@@ -42,5 +67,18 @@ export function EntityRecommendations({ entity, queryOptions, title, basePath, c
42
67
  return null;
43
68
  }
44
69
  const resolvedBasePath = basePath ?? `/${entity.collection}`;
45
- return (_jsx(Section, { title: title, gridCols: cols, className: className, children: items.map((item) => (_jsx(CrudCard, { item: item, entity: entity, detailHref: `${resolvedBasePath}/${item.id}` }, item.id))) }));
70
+ const resolvedTitle = title ?? t('recommendations.title', { defaultValue: 'You may also like' });
71
+ // Breakpoint-aware skeleton count: 3 rows at current breakpoint
72
+ const bp = useBreakpoint('current');
73
+ const bpIndex = {
74
+ mobile: 0,
75
+ tablet: 1,
76
+ laptop: 2,
77
+ desktop: 3,
78
+ };
79
+ const currentCols = (Array.isArray(cols) ? cols[bpIndex[bp] ?? 3] : cols) ?? 1;
80
+ const skeletonCount = currentCols * 3;
81
+ return (_jsx(Section, { title: resolvedTitle, gridCols: cols, className: className, children: loading
82
+ ? Array.from({ length: skeletonCount }, (_, i) => (_jsx(Card, { title: _jsx(Skeleton, { width: "60%" }), subtitle: _jsx(Skeleton, { width: "40%" }), content: _jsxs(Stack, { direction: "column", gap: "tight", children: [_jsx(Skeleton, { width: "80%" }), _jsx(Skeleton, { width: "50%" })] }), elevated: true }, i)))
83
+ : items.map((item) => (_jsx(CrudCard, { item: item, entity: entity, detailHref: `${resolvedBasePath}/${item.id}` }, item.id))) }));
46
84
  }
@@ -2770,6 +2770,37 @@ em {
2770
2770
  .dndev-cta[data-tone='accent'] {
2771
2771
  background: color-mix(in oklab, var(--accent) 5%, transparent);
2772
2772
  }
2773
+ /* Bleed: full viewport width */
2774
+ .dndev-cta--bleed {
2775
+ width: 100vw;
2776
+ margin-inline: calc(50% - 50vw);
2777
+ }
2778
+ /* Background image with overlay for text readability */
2779
+ .dndev-cta--bg-image {
2780
+ position: relative;
2781
+ background-size: cover;
2782
+ background-position: center;
2783
+ background-repeat: no-repeat;
2784
+ }
2785
+ .dndev-cta--bg-image::before {
2786
+ content: '';
2787
+ position: absolute;
2788
+ inset: 0;
2789
+ background: linear-gradient(
2790
+ to bottom,
2791
+ rgba(0, 0, 0, 0.4),
2792
+ rgba(0, 0, 0, 0.6)
2793
+ );
2794
+ z-index: 0;
2795
+ }
2796
+ .dndev-cta--bg-image > * {
2797
+ position: relative;
2798
+ z-index: 1;
2799
+ }
2800
+ .dndev-cta--bg-image,
2801
+ .dndev-cta--bg-image .dndev-cta-content {
2802
+ color: white;
2803
+ }
2773
2804
  .dndev-cta-content {
2774
2805
  display: flex;
2775
2806
  flex-direction: column;
@@ -2785,18 +2816,48 @@ em {
2785
2816
  padding-inline: var(--gap-lg);
2786
2817
  }
2787
2818
  }
2819
+ /* Text alignment */
2788
2820
  .dndev-cta-content[data-text-align='start'] {
2789
2821
  text-align: start;
2790
- align-items: flex-start;
2791
2822
  }
2792
2823
  .dndev-cta-content[data-text-align='center'] {
2793
2824
  text-align: center;
2794
- align-items: center;
2795
2825
  }
2796
2826
  .dndev-cta-content[data-text-align='end'] {
2797
2827
  text-align: end;
2828
+ }
2829
+ /* Item alignment (align-items) */
2830
+ .dndev-cta-content[data-align='start'] {
2831
+ align-items: flex-start;
2832
+ }
2833
+ .dndev-cta-content[data-align='center'] {
2834
+ align-items: center;
2835
+ }
2836
+ .dndev-cta-content[data-align='end'] {
2798
2837
  align-items: flex-end;
2799
2838
  }
2839
+ .dndev-cta-content[data-align='stretch'] {
2840
+ align-items: stretch;
2841
+ }
2842
+ /* Content justification (justify-content) */
2843
+ .dndev-cta-content[data-justify='start'] {
2844
+ justify-content: flex-start;
2845
+ }
2846
+ .dndev-cta-content[data-justify='center'] {
2847
+ justify-content: center;
2848
+ }
2849
+ .dndev-cta-content[data-justify='end'] {
2850
+ justify-content: flex-end;
2851
+ }
2852
+ .dndev-cta-content[data-justify='between'] {
2853
+ justify-content: space-between;
2854
+ }
2855
+ .dndev-cta-content[data-justify='around'] {
2856
+ justify-content: space-around;
2857
+ }
2858
+ .dndev-cta-content[data-justify='evenly'] {
2859
+ justify-content: space-evenly;
2860
+ }
2800
2861
  .dndev-cta-actions {
2801
2862
  display: flex;
2802
2863
  flex-direction: row;
@@ -3905,6 +3966,16 @@ em {
3905
3966
  .dndev-grid-component[data-align='stretch'] {
3906
3967
  align-items: stretch;
3907
3968
  }
3969
+ /* Text alignment */
3970
+ .dndev-grid-component[data-text-align='start'] {
3971
+ text-align: start;
3972
+ }
3973
+ .dndev-grid-component[data-text-align='center'] {
3974
+ text-align: center;
3975
+ }
3976
+ .dndev-grid-component[data-text-align='end'] {
3977
+ text-align: end;
3978
+ }
3908
3979
  /* Justify items (horizontal alignment) */
3909
3980
  .dndev-grid-component[data-justify='start'] {
3910
3981
  justify-items: start;
@@ -3960,33 +4031,88 @@ em {
3960
4031
  padding-inline: var(--gap-lg);
3961
4032
  }
3962
4033
  }
4034
+ .dndev-hero-section {
4035
+
4036
+ display: flex;
4037
+ flex-direction: column;
4038
+ }
4039
+ .dndev-hero-section h1 {
4040
+ font-family: var(--font-headline, var(--font-sans));
4041
+ }
4042
+ /* Text alignment */
3963
4043
  .dndev-hero-section[data-text-align='start'] {
3964
- display: flex;
3965
- flex-direction: column;
3966
- align-items: flex-start;
3967
4044
  text-align: start;
3968
4045
  }
3969
- .dndev-hero-section[data-text-align='start'] h1 {
3970
- font-family: var(--font-headline, var(--font-sans));
3971
- }
3972
4046
  .dndev-hero-section[data-text-align='center'] {
3973
- display: flex;
3974
- flex-direction: column;
3975
- align-items: center;
3976
4047
  text-align: center;
3977
4048
  }
3978
- .dndev-hero-section[data-text-align='center'] h1 {
3979
- font-family: var(--font-headline, var(--font-sans));
3980
- }
3981
4049
  .dndev-hero-section[data-text-align='end'] {
3982
- display: flex;
3983
- flex-direction: column;
3984
- align-items: flex-end;
3985
4050
  text-align: end;
3986
4051
  }
3987
- .dndev-hero-section[data-text-align='end'] h1 {
3988
- font-family: var(--font-headline, var(--font-sans));
3989
- }
4052
+ /* Item alignment (align-items) */
4053
+ .dndev-hero-section[data-align='start'] {
4054
+ align-items: flex-start;
4055
+ }
4056
+ .dndev-hero-section[data-align='center'] {
4057
+ align-items: center;
4058
+ }
4059
+ .dndev-hero-section[data-align='end'] {
4060
+ align-items: flex-end;
4061
+ }
4062
+ .dndev-hero-section[data-align='stretch'] {
4063
+ align-items: stretch;
4064
+ }
4065
+ /* Content justification (justify-content) */
4066
+ .dndev-hero-section[data-justify='start'] {
4067
+ justify-content: flex-start;
4068
+ }
4069
+ .dndev-hero-section[data-justify='center'] {
4070
+ justify-content: center;
4071
+ }
4072
+ .dndev-hero-section[data-justify='end'] {
4073
+ justify-content: flex-end;
4074
+ }
4075
+ .dndev-hero-section[data-justify='between'] {
4076
+ justify-content: space-between;
4077
+ }
4078
+ .dndev-hero-section[data-justify='around'] {
4079
+ justify-content: space-around;
4080
+ }
4081
+ .dndev-hero-section[data-justify='evenly'] {
4082
+ justify-content: space-evenly;
4083
+ }
4084
+ /* Bleed: full viewport width */
4085
+ .dndev-hero-section--bleed {
4086
+ width: 100vw;
4087
+ max-width: none;
4088
+ margin-inline: calc(50% - 50vw);
4089
+ }
4090
+ /* Background image with overlay for text readability */
4091
+ .dndev-hero-section--bg-image {
4092
+ position: relative;
4093
+ background-size: cover;
4094
+ background-position: center;
4095
+ background-repeat: no-repeat;
4096
+ }
4097
+ .dndev-hero-section--bg-image::before {
4098
+ content: '';
4099
+ position: absolute;
4100
+ inset: 0;
4101
+ background: linear-gradient(
4102
+ to bottom,
4103
+ rgba(0, 0, 0, 0.4),
4104
+ rgba(0, 0, 0, 0.6)
4105
+ );
4106
+ z-index: 0;
4107
+ }
4108
+ .dndev-hero-section--bg-image > * {
4109
+ position: relative;
4110
+ z-index: 1;
4111
+ }
4112
+ .dndev-hero-section--bg-image,
4113
+ .dndev-hero-section--bg-image .dndev-hero-subtitle {
4114
+ color: white;
4115
+ }
3990
4116
  .dndev-hero-subtitle {
3991
4117
  font-size: var(--font-size-lg); /* 20px - muted via component */
3992
4118
  }
@@ -5030,6 +5156,14 @@ input[type='number'] {
5030
5156
  .dndev-section-full-width {
5031
5157
  width: 100%;
5032
5158
  }
5159
+ /* Bleed: background spans full viewport width, content stays padded */
5160
+ .dndev-section-bleed {
5161
+ width: 100vw;
5162
+ margin-inline: calc(50% - 50vw);
5163
+ }
5164
+ .dndev-section-bleed > .dndev-section-content {
5165
+ max-width: none;
5166
+ }
5033
5167
  /* Content wrapper: constrained + centered + padded */
5034
5168
  .dndev-section-content {
5035
5169
  /* Respects PageContainer's --content-width (passed through breakthrough root) */
@@ -5046,6 +5180,48 @@ input[type='number'] {
5046
5180
  padding-inline: var(--gap-lg);
5047
5181
  }
5048
5182
  }
5183
+ /* Propagate text-align to all section content via CSS inheritance */
5184
+ .dndev-section-full-width[data-text-align='start'] > .dndev-section-content {
5185
+ text-align: start;
5186
+ }
5187
+ .dndev-section-full-width[data-text-align='center'] > .dndev-section-content {
5188
+ text-align: center;
5189
+ }
5190
+ .dndev-section-full-width[data-text-align='end'] > .dndev-section-content {
5191
+ text-align: end;
5192
+ }
5193
+ /* Item alignment (align-items) on content container */
5194
+ .dndev-section-content[data-align='start'] {
5195
+ align-items: flex-start;
5196
+ }
5197
+ .dndev-section-content[data-align='center'] {
5198
+ align-items: center;
5199
+ }
5200
+ .dndev-section-content[data-align='end'] {
5201
+ align-items: flex-end;
5202
+ }
5203
+ .dndev-section-content[data-align='stretch'] {
5204
+ align-items: stretch;
5205
+ }
5206
+ /* Content justification (justify-content) on content container */
5207
+ .dndev-section-content[data-justify='start'] {
5208
+ justify-content: flex-start;
5209
+ }
5210
+ .dndev-section-content[data-justify='center'] {
5211
+ justify-content: center;
5212
+ }
5213
+ .dndev-section-content[data-justify='end'] {
5214
+ justify-content: flex-end;
5215
+ }
5216
+ .dndev-section-content[data-justify='between'] {
5217
+ justify-content: space-between;
5218
+ }
5219
+ .dndev-section-content[data-justify='around'] {
5220
+ justify-content: space-around;
5221
+ }
5222
+ .dndev-section-content[data-justify='evenly'] {
5223
+ justify-content: space-evenly;
5224
+ }
5049
5225
  /* Section title: uppercase, accent color, letter spacing */
5050
5226
  .dndev-section-title {
5051
5227
  text-transform: uppercase;
@@ -5739,6 +5915,37 @@ input[type='number'] {
5739
5915
  height: var(--icon-touch, 48px);
5740
5916
  border-width: 3px;
5741
5917
  }
5918
+ /* Container overlay - scoped to parent (position: relative) */
5919
+ .dndev-spinner-overlay--container {
5920
+ position: absolute;
5921
+ inset: 0;
5922
+ display: flex;
5923
+ align-items: center;
5924
+ justify-content: center;
5925
+ background: rgb(from var(--background) r g b / 0.8);
5926
+ backdrop-filter: blur(8px);
5927
+ -webkit-backdrop-filter: blur(8px);
5928
+ z-index: var(--z-overlay, 9999);
5929
+ transition: opacity var(--dur-normal, 0.2s) var(--ease-in-out, ease-in-out);
5930
+ }
5931
+ .dndev-spinner-overlay--container .dndev-spinner {
5932
+ width: var(--icon-lg, 32px);
5933
+ height: var(--icon-lg, 32px);
5934
+ border-width: 3px;
5935
+ }
5936
+ /* Spinner content wrapper (spinner + message) */
5937
+ .dndev-spinner-content {
5938
+ display: flex;
5939
+ flex-direction: column;
5940
+ align-items: center;
5941
+ gap: var(--gap-md, 12px);
5942
+ }
5943
+ /* Message text below spinner */
5944
+ .dndev-spinner-message {
5945
+ color: var(--muted-foreground);
5946
+ font-size: var(--font-size-sm, 0.875rem);
5947
+ font-weight: 500;
5948
+ }
5742
5949
  /* Spinner animation */
5743
5950
  @keyframes spin {
5744
5951
  to {
@@ -5869,6 +6076,16 @@ input[type='number'] {
5869
6076
  .dndev-stack[data-force='true'] > * {
5870
6077
  align-self: inherit !important;
5871
6078
  }
6079
+ /* Text alignment */
6080
+ .dndev-stack[data-text-align='start'] {
6081
+ text-align: start;
6082
+ }
6083
+ .dndev-stack[data-text-align='center'] {
6084
+ text-align: center;
6085
+ }
6086
+ .dndev-stack[data-text-align='end'] {
6087
+ text-align: end;
6088
+ }
5872
6089
  /* packages/components/src/atomic/Stepper/Stepper.css */
5873
6090
  .dndev-stepper-container:focus,.dndev-stepper-container:focus-visible {
5874
6091
  outline: none;