@donotdev/ui 0.1.46 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CookieConsent-QOUAY6B4.js +1 -0
- package/dist/GoToDialog-YGBON6FR.js +1 -0
- package/dist/chunk-DRFM6WXH.js +1 -0
- package/dist/components/cookie-consent/CookieConsent.d.ts.map +1 -1
- package/dist/components/cookie-consent/CookieConsent.js +12 -12
- package/dist/dndev-next.css +180 -14
- package/dist/dndev.css +180 -14
- package/dist/index.js +3 -3
- package/dist/internal/layout/DnDevLayout.d.ts.map +1 -1
- package/dist/internal/layout/DnDevLayout.js +11 -4
- package/dist/providers/NextJsAppProviders.d.ts +7 -0
- package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
- package/dist/providers/NextJsAppProviders.js +15 -4
- package/dist/routing/useNavigation.d.ts.map +1 -1
- package/dist/routing/useNavigation.js +14 -2
- package/dist/styles/index.css +180 -14
- package/package.json +21 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DnDevLayout.d.ts","sourceRoot":"","sources":["../../../src/internal/layout/DnDevLayout.tsx"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAIV,YAAY,EACb,MAAM,gBAAgB,CAAC;AA0CxB,UAAU,yBAAyB;IACjC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,GAAI,kCAIzB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"DnDevLayout.d.ts","sourceRoot":"","sources":["../../../src/internal/layout/DnDevLayout.tsx"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAIV,YAAY,EACb,MAAM,gBAAgB,CAAC;AA0CxB,UAAU,yBAAyB;IACjC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,GAAI,kCAIzB,yBAAyB,gCAyZ3B,CAAC"}
|
|
@@ -64,7 +64,7 @@ export const DnDevLayout = ({ children, layout, className, }) => {
|
|
|
64
64
|
const preset = useLayout('layoutPreset');
|
|
65
65
|
const routePresetOverride = useLayout('routePresetOverride');
|
|
66
66
|
const isMobile = useBreakpoint('isMobileOrTablet');
|
|
67
|
-
const { app, features, customPresets } = useAppConfig();
|
|
67
|
+
const { app, features, customPresets, preset: configPreset } = useAppConfig();
|
|
68
68
|
const debugEnabled = isDev() && features?.debug === true;
|
|
69
69
|
// Subscribe to language changes for zone re-renders
|
|
70
70
|
useTranslation('dndev');
|
|
@@ -83,10 +83,17 @@ export const DnDevLayout = ({ children, layout, className, }) => {
|
|
|
83
83
|
return presetRegistry;
|
|
84
84
|
return { ...presetRegistry, ...customPresets };
|
|
85
85
|
}, [customPresets]);
|
|
86
|
-
// Effective preset: route override >
|
|
86
|
+
// Effective preset: route override > store > appConfig > fallback.
|
|
87
|
+
// appConfig sits between the store and the fallback on purpose: the store starts
|
|
88
|
+
// at `layoutPreset: null` and only receives appConfig.preset from themeStore's
|
|
89
|
+
// async initialize() (a post-hydration effect). Falling straight through to
|
|
90
|
+
// 'landing' made SSR and the first client paint render the landing chrome for
|
|
91
|
+
// every non-landing app, then swap it out on hydration — a visible flash.
|
|
92
|
+
// appConfig is available synchronously on both server and client, so reading it
|
|
93
|
+
// here makes the first paint already correct; the later store init is a no-op.
|
|
87
94
|
const effectivePreset = useMemo(() => {
|
|
88
|
-
return routePresetOverride || preset || 'landing';
|
|
89
|
-
}, [routePresetOverride, preset]);
|
|
95
|
+
return routePresetOverride || preset || configPreset || 'landing';
|
|
96
|
+
}, [routePresetOverride, preset, configPreset]);
|
|
90
97
|
// Get preset config (presets only override what's different, defaults fill the rest)
|
|
91
98
|
const config = useMemo(() => {
|
|
92
99
|
const presetConfig = (effectiveRegistry[effectivePreset] ??
|
|
@@ -26,7 +26,14 @@ import type { AppProvidersProps } from '@donotdev/core';
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
export interface NextJsAppProvidersProps extends AppProvidersProps {
|
|
29
|
+
/**
|
|
30
|
+
* The request's `Cookie` header, passed by the app's root layout. The server render
|
|
31
|
+
* and the client's hydration pass read the language cookie and the auth session
|
|
32
|
+
* from it, so both render the visitor's language and signed-in state.
|
|
33
|
+
*/
|
|
29
34
|
serverCookies?: string;
|
|
35
|
+
/** The request's `Accept-Language` header, passed by the app's root layout. */
|
|
36
|
+
acceptLanguage?: string | null;
|
|
30
37
|
}
|
|
31
38
|
export declare function NextJsAppProviders(props: NextJsAppProvidersProps): import("react").JSX.Element;
|
|
32
39
|
//# sourceMappingURL=NextJsAppProviders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NextJsAppProviders.d.ts","sourceRoot":"","sources":["../../src/providers/NextJsAppProviders.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NextJsAppProviders.d.ts","sourceRoot":"","sources":["../../src/providers/NextJsAppProviders.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAwDxD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAQD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,+BAyFhE"}
|
|
@@ -9,8 +9,9 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
9
9
|
* @since 0.0.1
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
12
|
-
import { lazy, Suspense, useEffect, useState } from 'react';
|
|
13
|
-
import {
|
|
12
|
+
import { lazy, Suspense, useEffect, useMemo, useState } from 'react';
|
|
13
|
+
import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental';
|
|
14
|
+
import { AppConfigProvider, AuthSessionProvider, getProvider, getRequestLanguage, hasProvider, QueryProviders, RequestLanguageProvider, } from '@donotdev/core';
|
|
14
15
|
import { useConsent } from '@donotdev/core';
|
|
15
16
|
import { NextJsStoresInitializer } from '../internal/initializers/NextJsStoresInitializer';
|
|
16
17
|
import FaviconHead from '../internal/layout/components/FaviconHead';
|
|
@@ -48,8 +49,18 @@ function ConsentBanner() {
|
|
|
48
49
|
}
|
|
49
50
|
return (_jsx(Suspense, { fallback: null, children: _jsx(CookieConsent, {}) }));
|
|
50
51
|
}
|
|
52
|
+
/** Auth session snapshot of the request, `null` when the auth provider cannot tell. */
|
|
53
|
+
function readAuthSnapshot(cookieHeader) {
|
|
54
|
+
if (cookieHeader === undefined || !hasProvider('auth'))
|
|
55
|
+
return null;
|
|
56
|
+
return getProvider('auth').readSessionSnapshot?.(cookieHeader) ?? null;
|
|
57
|
+
}
|
|
51
58
|
export function NextJsAppProviders(props) {
|
|
52
|
-
const { config = {}, layout, children, serverCookies, customStores } = props;
|
|
59
|
+
const { config = {}, layout, children, serverCookies, acceptLanguage, customStores, } = props;
|
|
60
|
+
// Same header values on the server and in the hydration pass → same language and
|
|
61
|
+
// signed-in state on both, so the first paint is final (no keys, no auth swap).
|
|
62
|
+
const requestLanguage = useMemo(() => getRequestLanguage(serverCookies, acceptLanguage), [serverCookies, acceptLanguage]);
|
|
63
|
+
const authSnapshot = useMemo(() => readAuthSnapshot(serverCookies), [serverCookies]);
|
|
53
64
|
// SSR is the default for Next apps: render the provider tree on the server so
|
|
54
65
|
// page content is present in the initial HTML (crawlable, real SSR). An app
|
|
55
66
|
// opts OUT with appConfig.ssr === false, restoring the legacy client-only
|
|
@@ -63,5 +74,5 @@ export function NextJsAppProviders(props) {
|
|
|
63
74
|
if (!ssr && !isMounted) {
|
|
64
75
|
return _jsx(_Fragment, { children: children });
|
|
65
76
|
}
|
|
66
|
-
return (_jsxs(AppConfigProvider, { config: config, platform: "nextjs", children: [_jsx(SentryInitializer, {}), _jsxs(NextJsStoresInitializer, { serverCookies: serverCookies, customStores: customStores, children: [_jsx(FaviconHead, {}), _jsx(PerformanceHints, {}), _jsx(QueryProviders, { children: _jsxs(UIProviders, { children: [_jsx(DnDevLayout, { layout: layout, children: children }), _jsx(ConsentBanner, {}), _jsx(AuthReturnTo, {}), _jsx(PasswordResetCallback, {}), _jsx(Suspense, { fallback: null, children: _jsx(PWAUpdateNotification, {}) }), _jsx(Suspense, { fallback: null, children: _jsx(RedirectOverlay, {}) })] }) })] })] }));
|
|
77
|
+
return (_jsx(RequestLanguageProvider, { language: requestLanguage, children: _jsx(AuthSessionProvider, { snapshot: authSnapshot, children: _jsxs(AppConfigProvider, { config: config, platform: "nextjs", children: [_jsx(SentryInitializer, {}), _jsxs(NextJsStoresInitializer, { serverCookies: serverCookies, customStores: customStores, children: [_jsx(FaviconHead, {}), _jsx(PerformanceHints, {}), _jsx(QueryProviders, { children: _jsx(ReactQueryStreamedHydration, { children: _jsxs(UIProviders, { children: [_jsx(DnDevLayout, { layout: layout, children: children }), _jsx(ConsentBanner, {}), _jsx(AuthReturnTo, {}), _jsx(PasswordResetCallback, {}), _jsx(Suspense, { fallback: null, children: _jsx(PWAUpdateNotification, {}) }), _jsx(Suspense, { fallback: null, children: _jsx(RedirectOverlay, {}) })] }) }) })] })] }) }) }));
|
|
67
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNavigation.d.ts","sourceRoot":"","sources":["../../src/routing/useNavigation.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAQtD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,WAAW,EAAE,OAAO,CAAC;IACrB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,IAAI,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"useNavigation.d.ts","sourceRoot":"","sources":["../../src/routing/useNavigation.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAQtD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,WAAW,EAAE,OAAO,CAAC;IACrB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,IAAI,cAAc,EAAE,CAkDrD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAG3E"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @author AMBROISE PARK Consulting
|
|
9
9
|
*/
|
|
10
10
|
import { useMemo } from 'react';
|
|
11
|
-
import { useNavigationStore } from '@donotdev/core';
|
|
11
|
+
import { useNavigationStore, useTranslation } from '@donotdev/core';
|
|
12
12
|
import { USER_ROLES } from '@donotdev/core';
|
|
13
13
|
// Platform-specific hooks via conditional exports
|
|
14
14
|
import { useLocation } from '@donotdev/ui/routing/hooks';
|
|
@@ -37,6 +37,7 @@ export function useNavigationItems() {
|
|
|
37
37
|
// Get auth state - hooks must be called at top level
|
|
38
38
|
const user = useAuthSafe('user');
|
|
39
39
|
const authenticated = !!user;
|
|
40
|
+
const { t } = useTranslation();
|
|
40
41
|
const role = user?.role || USER_ROLES.GUEST;
|
|
41
42
|
// Use Zustand selector for proper caching - only re-runs when auth state changes
|
|
42
43
|
const filteredRoutes = useNavigationStore((state) => {
|
|
@@ -63,12 +64,13 @@ export function useNavigationItems() {
|
|
|
63
64
|
return filteredRoutes
|
|
64
65
|
.map((route) => ({
|
|
65
66
|
...route,
|
|
67
|
+
label: routeLabel(route, t),
|
|
66
68
|
isActive: isRouteActive(route.path, location.pathname),
|
|
67
69
|
hasChildren: false,
|
|
68
70
|
children: undefined,
|
|
69
71
|
}))
|
|
70
72
|
.sort((a, b) => a.label.localeCompare(b.label, undefined, { sensitivity: 'base' })); // Alphabetical sorting by label
|
|
71
|
-
}, [filteredRoutes, location.pathname]);
|
|
73
|
+
}, [filteredRoutes, location.pathname, t]);
|
|
72
74
|
}
|
|
73
75
|
/**
|
|
74
76
|
* Resolves a single navigation item from the store by path.
|
|
@@ -104,6 +106,16 @@ export function useNavigationRoute(path) {
|
|
|
104
106
|
return useMemo(() => items.find((item) => item.path === path), [items, path]);
|
|
105
107
|
}
|
|
106
108
|
// ===== HELPER FUNCTIONS =====
|
|
109
|
+
/**
|
|
110
|
+
* Navigation label of a route: the page's `<namespace>:title` (the PageMeta contract,
|
|
111
|
+
* same key as the page `<title>`), else the label discovery derived from the file name.
|
|
112
|
+
*/
|
|
113
|
+
function routeLabel(route, t) {
|
|
114
|
+
const namespace = route.meta?.namespace;
|
|
115
|
+
if (typeof namespace !== 'string' || namespace === '')
|
|
116
|
+
return route.label;
|
|
117
|
+
return t(`${namespace}:title`, { defaultValue: route.label });
|
|
118
|
+
}
|
|
107
119
|
/**
|
|
108
120
|
* Determines if a route path is currently active
|
|
109
121
|
*/
|
package/dist/styles/index.css
CHANGED
|
@@ -1619,6 +1619,32 @@ em {
|
|
|
1619
1619
|
text-transform: var(--text-transform-label, none);
|
|
1620
1620
|
}
|
|
1621
1621
|
|
|
1622
|
+
/* ICON BADGE - count bubble on the icon's top-end corner (Button `badge`) */
|
|
1623
|
+
.dndev-interactive-icon-anchor {
|
|
1624
|
+
position: relative;
|
|
1625
|
+
display: inline-flex;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
.dndev-interactive-badge {
|
|
1629
|
+
position: absolute;
|
|
1630
|
+
inset-block-start: -0.5em;
|
|
1631
|
+
inset-inline-end: -0.65em;
|
|
1632
|
+
min-width: 1.25rem;
|
|
1633
|
+
height: 1.25rem;
|
|
1634
|
+
padding-inline: 0.3rem;
|
|
1635
|
+
display: inline-flex;
|
|
1636
|
+
align-items: center;
|
|
1637
|
+
justify-content: center;
|
|
1638
|
+
border-radius: var(--radius-full);
|
|
1639
|
+
background: var(--primary);
|
|
1640
|
+
color: var(--primary-foreground);
|
|
1641
|
+
font-size: var(--font-size-xs);
|
|
1642
|
+
font-weight: var(--font-weight-semibold);
|
|
1643
|
+
font-variant-numeric: tabular-nums;
|
|
1644
|
+
line-height: 1;
|
|
1645
|
+
pointer-events: none;
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1622
1648
|
/* Compact mode - always hide label */
|
|
1623
1649
|
.dndev-interactive-label[data-display='compact'] {
|
|
1624
1650
|
display: none;
|
|
@@ -3725,6 +3751,44 @@ em {
|
|
|
3725
3751
|
object-fit: cover;
|
|
3726
3752
|
}
|
|
3727
3753
|
|
|
3754
|
+
/* Contain: whole image visible on the muted cover background (cut-outs), inset
|
|
3755
|
+
proportionally so a packshot never touches the frame. */
|
|
3756
|
+
.dndev-card-cover[data-fit='contain'] > img:not(.dndev-card-cover-hover) {
|
|
3757
|
+
-o-object-fit: contain;
|
|
3758
|
+
object-fit: contain;
|
|
3759
|
+
box-sizing: border-box;
|
|
3760
|
+
padding: 8%;
|
|
3761
|
+
}
|
|
3762
|
+
|
|
3763
|
+
/* Hover view: stacked over the cover, crossfades in on hover / keyboard focus. */
|
|
3764
|
+
.dndev-card-cover > img.dndev-card-cover-hover {
|
|
3765
|
+
position: absolute;
|
|
3766
|
+
inset: 0;
|
|
3767
|
+
-o-object-fit: cover;
|
|
3768
|
+
object-fit: cover;
|
|
3769
|
+
opacity: 0;
|
|
3770
|
+
transition: opacity 0.4s var(--ease-in-out);
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3773
|
+
@media (hover: hover) {
|
|
3774
|
+
.dndev-card:hover .dndev-card-cover-hover {
|
|
3775
|
+
opacity: 1;
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
|
|
3779
|
+
/* Keyboard focus only: a mouse click keeps focus inside the card, which must not
|
|
3780
|
+
pin the hover view after the pointer leaves. */
|
|
3781
|
+
.dndev-card:has(:focus-visible) .dndev-card-cover-hover,
|
|
3782
|
+
.dndev-card:focus-visible .dndev-card-cover-hover {
|
|
3783
|
+
opacity: 1;
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3786
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3787
|
+
.dndev-card-cover > img.dndev-card-cover-hover {
|
|
3788
|
+
transition: none;
|
|
3789
|
+
}
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3728
3792
|
/* Consumer-supplied ReactNode: wrapper fills, inner media fills. */
|
|
3729
3793
|
.dndev-card-cover-media {
|
|
3730
3794
|
position: relative;
|
|
@@ -5132,12 +5196,23 @@ em {
|
|
|
5132
5196
|
margin-inline: calc(50% - 50vw);
|
|
5133
5197
|
}
|
|
5134
5198
|
|
|
5135
|
-
/* Background image with overlay for text readability
|
|
5199
|
+
/* Background image with overlay for text readability.
|
|
5200
|
+
The photo is an <img> (discoverable by the preload scanner), laid under the scrim. */
|
|
5136
5201
|
.dndev-hero-section--bg-image {
|
|
5137
5202
|
position: relative;
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5203
|
+
overflow: hidden;
|
|
5204
|
+
}
|
|
5205
|
+
|
|
5206
|
+
.dndev-hero-section--bg-image > .dndev-hero-section__cover {
|
|
5207
|
+
position: absolute;
|
|
5208
|
+
inset: 0;
|
|
5209
|
+
width: 100%;
|
|
5210
|
+
height: 100%;
|
|
5211
|
+
-o-object-fit: cover;
|
|
5212
|
+
object-fit: cover;
|
|
5213
|
+
-o-object-position: center;
|
|
5214
|
+
object-position: center;
|
|
5215
|
+
z-index: 0;
|
|
5141
5216
|
}
|
|
5142
5217
|
|
|
5143
5218
|
.dndev-hero-section--bg-image::before {
|
|
@@ -5149,12 +5224,22 @@ em {
|
|
|
5149
5224
|
rgba(0, 0, 0, 0.4),
|
|
5150
5225
|
rgba(0, 0, 0, 0.6)
|
|
5151
5226
|
);
|
|
5152
|
-
z-index:
|
|
5227
|
+
z-index: 1;
|
|
5228
|
+
}
|
|
5229
|
+
|
|
5230
|
+
/* Soft scrim: bright photography stays bright; only the bottom band darkens
|
|
5231
|
+
enough for white text placed there. */
|
|
5232
|
+
.dndev-hero-section--bg-image[data-scrim='soft']::before {
|
|
5233
|
+
background: linear-gradient(
|
|
5234
|
+
to bottom,
|
|
5235
|
+
rgba(0, 0, 0, 0) 45%,
|
|
5236
|
+
rgba(0, 0, 0, 0.55) 100%
|
|
5237
|
+
);
|
|
5153
5238
|
}
|
|
5154
5239
|
|
|
5155
|
-
.dndev-hero-section--bg-image >
|
|
5240
|
+
.dndev-hero-section--bg-image > :not(.dndev-hero-section__cover) {
|
|
5156
5241
|
position: relative;
|
|
5157
|
-
z-index:
|
|
5242
|
+
z-index: 2;
|
|
5158
5243
|
}
|
|
5159
5244
|
|
|
5160
5245
|
.dndev-hero-section--bg-image,
|
|
@@ -5461,6 +5546,12 @@ em {
|
|
|
5461
5546
|
display: block;
|
|
5462
5547
|
}
|
|
5463
5548
|
|
|
5549
|
+
.image-gallery__thumbnail-image[data-fit='contain'] {
|
|
5550
|
+
-o-object-fit: contain;
|
|
5551
|
+
object-fit: contain;
|
|
5552
|
+
background-color: var(--muted);
|
|
5553
|
+
}
|
|
5554
|
+
|
|
5464
5555
|
/* Responsive adjustments */
|
|
5465
5556
|
@media (max-width: 640px) {
|
|
5466
5557
|
.image-gallery__thumbnail {
|
|
@@ -6341,7 +6432,7 @@ input[type='number'] {
|
|
|
6341
6432
|
background-color: var(--secondary);
|
|
6342
6433
|
}
|
|
6343
6434
|
|
|
6344
|
-
.dndev-progress [data-
|
|
6435
|
+
.dndev-progress > [data-state] {
|
|
6345
6436
|
height: 100%;
|
|
6346
6437
|
width: 100%;
|
|
6347
6438
|
flex: 1;
|
|
@@ -6351,23 +6442,23 @@ input[type='number'] {
|
|
|
6351
6442
|
/* Variant colors */
|
|
6352
6443
|
}
|
|
6353
6444
|
|
|
6354
|
-
[data-variant='default']:is(.dndev-progress [data-
|
|
6445
|
+
[data-variant='default']:is(.dndev-progress > [data-state]) {
|
|
6355
6446
|
background-color: var(--primary);
|
|
6356
6447
|
}
|
|
6357
6448
|
|
|
6358
|
-
[data-variant='accent']:is(.dndev-progress [data-
|
|
6449
|
+
[data-variant='accent']:is(.dndev-progress > [data-state]) {
|
|
6359
6450
|
background-color: var(--accent);
|
|
6360
6451
|
}
|
|
6361
6452
|
|
|
6362
|
-
[data-variant='success']:is(.dndev-progress [data-
|
|
6453
|
+
[data-variant='success']:is(.dndev-progress > [data-state]) {
|
|
6363
6454
|
background-color: var(--success);
|
|
6364
6455
|
}
|
|
6365
6456
|
|
|
6366
|
-
[data-variant='warning']:is(.dndev-progress [data-
|
|
6457
|
+
[data-variant='warning']:is(.dndev-progress > [data-state]) {
|
|
6367
6458
|
background-color: var(--warning);
|
|
6368
6459
|
}
|
|
6369
6460
|
|
|
6370
|
-
[data-variant='destructive']:is(.dndev-progress [data-
|
|
6461
|
+
[data-variant='destructive']:is(.dndev-progress > [data-state]) {
|
|
6371
6462
|
background-color: var(--destructive);
|
|
6372
6463
|
}
|
|
6373
6464
|
|
|
@@ -7135,6 +7226,13 @@ input[type='number'] {
|
|
|
7135
7226
|
/* Square edges for panel metaphor */
|
|
7136
7227
|
}
|
|
7137
7228
|
|
|
7229
|
+
/* Narrow panel (carts, filters): full width on phones, a column on larger screens */
|
|
7230
|
+
|
|
7231
|
+
.dndev-sheet-content[data-size='narrow'][data-side='right'],.dndev-sheet-content[data-size='narrow'][data-side='left'] {
|
|
7232
|
+
width: 100%;
|
|
7233
|
+
max-width: 28rem;
|
|
7234
|
+
}
|
|
7235
|
+
|
|
7138
7236
|
.dndev-sheet-content[data-side='right'] {
|
|
7139
7237
|
/* Physical positioning: right edge */
|
|
7140
7238
|
right: 0;
|
|
@@ -8529,6 +8627,65 @@ input[type='number'] {
|
|
|
8529
8627
|
display: none;
|
|
8530
8628
|
}
|
|
8531
8629
|
|
|
8630
|
+
/* packages/components/src/atomic/QuantityStepper/QuantityStepper.css */
|
|
8631
|
+
|
|
8632
|
+
/* One outlined control (e-commerce standard, e.g. Shopify Dawn): borderless − / +
|
|
8633
|
+
buttons around a centred, tabular quantity. Same height and radius as buttons. */
|
|
8634
|
+
.dndev-quantity-stepper {
|
|
8635
|
+
display: inline-flex;
|
|
8636
|
+
align-items: stretch;
|
|
8637
|
+
min-height: var(--touch-target);
|
|
8638
|
+
border: var(--border-hairline) solid var(--border);
|
|
8639
|
+
border-radius: var(--radius-interactive);
|
|
8640
|
+
background: var(--interactive);
|
|
8641
|
+
color: var(--foreground);
|
|
8642
|
+
}
|
|
8643
|
+
.dndev-quantity-stepper[data-full-width] {
|
|
8644
|
+
display: flex;
|
|
8645
|
+
width: 100%;
|
|
8646
|
+
}
|
|
8647
|
+
.dndev-quantity-stepper[data-disabled] {
|
|
8648
|
+
opacity: 0.6;
|
|
8649
|
+
}
|
|
8650
|
+
.dndev-quantity-stepper > .dndev-interactive {
|
|
8651
|
+
flex: 0 0 auto;
|
|
8652
|
+
aspect-ratio: 1;
|
|
8653
|
+
min-height: 0;
|
|
8654
|
+
border: none;
|
|
8655
|
+
border-radius: inherit;
|
|
8656
|
+
background: transparent;
|
|
8657
|
+
}
|
|
8658
|
+
|
|
8659
|
+
.dndev-quantity-stepper-value {
|
|
8660
|
+
flex: 1 1 auto;
|
|
8661
|
+
display: flex;
|
|
8662
|
+
align-items: center;
|
|
8663
|
+
justify-content: center;
|
|
8664
|
+
min-width: 3ch;
|
|
8665
|
+
padding-inline: var(--gap-sm);
|
|
8666
|
+
border: none;
|
|
8667
|
+
background: none;
|
|
8668
|
+
color: inherit;
|
|
8669
|
+
font: inherit;
|
|
8670
|
+
font-weight: var(--font-weight-medium);
|
|
8671
|
+
font-variant-numeric: tabular-nums;
|
|
8672
|
+
text-align: center;
|
|
8673
|
+
}
|
|
8674
|
+
|
|
8675
|
+
.dndev-quantity-stepper-value:is(button) {
|
|
8676
|
+
cursor: pointer;
|
|
8677
|
+
}
|
|
8678
|
+
|
|
8679
|
+
.dndev-quantity-stepper-value:is(button):hover {
|
|
8680
|
+
text-decoration: underline;
|
|
8681
|
+
text-underline-offset: 0.2em;
|
|
8682
|
+
}
|
|
8683
|
+
|
|
8684
|
+
.dndev-quantity-stepper-value:is(button):focus-visible {
|
|
8685
|
+
outline: none;
|
|
8686
|
+
box-shadow: var(--shadow-focus);
|
|
8687
|
+
}
|
|
8688
|
+
|
|
8532
8689
|
/* packages/components/src/atomic/Tag/Tag.css */
|
|
8533
8690
|
|
|
8534
8691
|
.dndev-tag {
|
|
@@ -8715,6 +8872,9 @@ input[type='number'] {
|
|
|
8715
8872
|
|
|
8716
8873
|
.dndev-text-base[data-level^='h'] {
|
|
8717
8874
|
font-family: var(--font-headline);
|
|
8875
|
+
/* Display sizes need tighter leading than body copy; themes opt in with
|
|
8876
|
+
--line-height-heading, otherwise headings keep the text line-height. */
|
|
8877
|
+
line-height: var(--line-height-heading, var(--line-height));
|
|
8718
8878
|
|
|
8719
8879
|
/* A single word wider than its column is the one thing text cannot solve by
|
|
8720
8880
|
wrapping, and display type hits it first: uppercase, letter-spaced headings
|
|
@@ -11756,6 +11916,12 @@ main[role='main'][data-routing-animation='none'] {
|
|
|
11756
11916
|
.dndev-layout {
|
|
11757
11917
|
position: relative;
|
|
11758
11918
|
width: 100%;
|
|
11919
|
+
/* The density preset is rendered on this wrapper by the server, but <html> only
|
|
11920
|
+
receives it after hydration. font-size and line-height inherit as computed
|
|
11921
|
+
values from <body>, so re-read the density tokens here: otherwise the first
|
|
11922
|
+
paint uses the root defaults and text grows once <html> is updated. */
|
|
11923
|
+
font-size: var(--font-size-base);
|
|
11924
|
+
line-height: var(--line-height);
|
|
11759
11925
|
height: 100vh;
|
|
11760
11926
|
height: 100dvh;
|
|
11761
11927
|
max-height: 100vh;
|
|
@@ -11933,7 +12099,7 @@ aside[role='navigation'].sidebar {
|
|
|
11933
12099
|
/* Desktop presets with no sidebar: Hide sidebar element for performance/accessibility */
|
|
11934
12100
|
/* Landing, Plain, Game have --sidebar-width: 0px, also need display: none */
|
|
11935
12101
|
}
|
|
11936
|
-
[data-layout='landing']:root aside.sidebar[role='navigation'],[data-layout='plain']:root aside.sidebar[role='navigation'],[data-layout='game']:root aside.sidebar[role='navigation'] {
|
|
12102
|
+
[data-layout='landing']:root aside.sidebar[role='navigation'],[data-layout='plain']:root aside.sidebar[role='navigation'],[data-layout='game']:root aside.sidebar[role='navigation'],.dndev-layout[data-layout='landing'] aside.sidebar[role='navigation'],.dndev-layout[data-layout='plain'] aside.sidebar[role='navigation'],.dndev-layout[data-layout='game'] aside.sidebar[role='navigation'] {
|
|
11937
12103
|
display: none;
|
|
11938
12104
|
}
|
|
11939
12105
|
/* Moolti: Sidebar spans full height (no header/footer on desktop) */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@donotdev/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,28 +49,29 @@
|
|
|
49
49
|
"type-check": "bunx tsc --noEmit"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@fontsource/inter": "^5.
|
|
53
|
-
"@fontsource/playfair-display": "^5.
|
|
54
|
-
"@fontsource/press-start-2p": "^5.
|
|
55
|
-
"@fontsource/roboto": "^5.
|
|
56
|
-
"@fontsource/space-grotesk": "^5.
|
|
52
|
+
"@fontsource/inter": "^5.3.0",
|
|
53
|
+
"@fontsource/playfair-display": "^5.3.0",
|
|
54
|
+
"@fontsource/press-start-2p": "^5.3.0",
|
|
55
|
+
"@fontsource/roboto": "^5.3.0",
|
|
56
|
+
"@fontsource/space-grotesk": "^5.3.0",
|
|
57
|
+
"@tanstack/react-query-next-experimental": "5.107.1"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {
|
|
59
|
-
"@donotdev/ai": "^0.
|
|
60
|
-
"@donotdev/auth": "^0.
|
|
61
|
-
"@donotdev/billing": "^0.
|
|
62
|
-
"@donotdev/components": "^0.
|
|
63
|
-
"@donotdev/core": "^0.
|
|
64
|
-
"@donotdev/crud": "^0.
|
|
65
|
-
"@donotdev/oauth": "^0.
|
|
66
|
-
"@hookform/resolvers": "^5.
|
|
60
|
+
"@donotdev/ai": "^0.2.0",
|
|
61
|
+
"@donotdev/auth": "^0.2.0",
|
|
62
|
+
"@donotdev/billing": "^0.2.0",
|
|
63
|
+
"@donotdev/components": "^0.2.0",
|
|
64
|
+
"@donotdev/core": "^0.2.0",
|
|
65
|
+
"@donotdev/crud": "^0.2.0",
|
|
66
|
+
"@donotdev/oauth": "^0.2.0",
|
|
67
|
+
"@hookform/resolvers": "^5.9.2",
|
|
67
68
|
"lucide-react": "^0.575.0",
|
|
68
|
-
"react": "^19.
|
|
69
|
-
"react-dom": "^19.
|
|
69
|
+
"react": "^19.3.1",
|
|
70
|
+
"react-dom": "^19.3.1",
|
|
70
71
|
"react-helmet-async": "^2.0.5",
|
|
71
|
-
"react-hook-form": "^7.
|
|
72
|
-
"react-router-dom": "^7.
|
|
73
|
-
"valibot": "^1.
|
|
72
|
+
"react-hook-form": "^7.91.0",
|
|
73
|
+
"react-router-dom": "^7.18.5",
|
|
74
|
+
"valibot": "^1.5.0"
|
|
74
75
|
},
|
|
75
76
|
"peerDependenciesMeta": {
|
|
76
77
|
"@donotdev/ai": {
|
|
@@ -113,4 +114,4 @@
|
|
|
113
114
|
"registry": "https://registry.npmjs.org",
|
|
114
115
|
"access": "public"
|
|
115
116
|
}
|
|
116
|
-
}
|
|
117
|
+
}
|