@donotdev/ui 0.1.47 → 0.2.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.
@@ -0,0 +1 @@
1
+ import"./chunk-O2XFH626.js";import{Cookie as w,Settings as W,Shield as G,BarChart3 as K,Target as V}from"lucide-react";import{useState as v,useEffect as y,useRef as q}from"react";import{Accordion as X,Button as m,BUTTON_VARIANT as f,Card as $,Switch as J,Text as u,cn as Q,Stack as s}from"@donotdev/components";import{handleError as Z,useConsent as d,getCookieExamples as S,hasOptionalCookies as ee}from"@donotdev/core";import{CONSENT_CATEGORY as r}from"@donotdev/core";import{useTranslation as te}from"@donotdev/core";import{isClient as ne}from"@donotdev/core";import{Fragment as se,jsx as n,jsxs as a}from"react/jsx-runtime";var oe=480;function ie({position:N="bottom",className:O=""}){let p=d("hasConsented"),g=d("categories"),D=d("acceptAll"),B=d("declineAll"),I=d("updateCategory"),k=d("showBanner"),{t:e}=te("cookies"),[C,E]=v(!1),[h,l]=v(!p||k),[A,b]=v(g),T=q(null),[L,P]=v(!1);y(()=>P(!0),[]),y(()=>{k&&l(!0)},[k]);let R=Object.keys(g),U=[{id:r.NECESSARY,icon:G,title:e("essentialCookies"),description:e("essentialDescription"),examples:S("necessary")||e("essentialExamples"),locked:!0},{id:r.FUNCTIONAL,icon:w,title:e("functionalCookies"),description:e("functionalDescription"),examples:S("functional")||e("functionalExamples"),legalNotice:e("functionalLegalNotice"),locked:!1},{id:r.ANALYTICS,icon:K,title:e("analyticsCookies"),description:e("analyticsDescription"),examples:S("analytics")||e("analyticsExamples"),locked:!1},{id:r.MARKETING,icon:V,title:e("marketingCookies"),description:e("marketingDescription"),examples:S("marketing")||e("marketingExamples"),locked:!1}].filter(t=>R.includes(t.id)),x=ee(),c=!x;if(y(()=>{let t={...g};if(C){let o=t;Object.keys(o).forEach(i=>{i!==r.NECESSARY&&o[i]===!1&&(o[i]=!0)})}b(t)},[g,C]),y(()=>{if(!ne()||p||!h||c)return;let t=i=>{T.current&&!T.current.contains(i.target)&&l(!1)},o=setTimeout(()=>{document.addEventListener("mousedown",t)},100);return()=>{clearTimeout(o),document.removeEventListener("mousedown",t)}},[p,h,c]),!L||p&&!k)return null;let M=()=>{try{Object.entries(A).forEach(([t,o])=>{if(t!==r.NECESSARY&&o!==void 0){let i=t;Object.values(r).includes(i)&&I(i,!!o)}}),E(!1),l(!1)}catch(t){Z(t,{userMessage:"Error saving preferences",context:{operation:"save_preferences"},severity:"warning",log:!0,reportToSentry:!1,showNotification:!1})}},z=()=>{D(),l(!1)},H=()=>{B(),l(!1)},Y=a(s,{gap:"medium",children:[n(u,{as:"p",variant:"muted",level:"small",style:{lineHeight:1.55},children:e(c?"necessaryOnlyDescription":"cookieBannerDescription")}),x&&n(X,{type:"single",collapsible:!0,value:C?"preferences":"",onValueChange:t=>E(t==="preferences"),items:[{value:"preferences",trigger:a(s,{direction:"row",align:"center",gap:"tight",children:[n(W,{className:"dndev-size-sm"}),n(u,{as:"span",level:"small",weight:"medium",children:e("customize")})]}),content:n(s,{gap:"tight",children:U.map(t=>{let o=t.icon,i=A[t.id]??!1;return a(s,{direction:"row",align:"start",justify:"between",gap:"medium",style:{padding:"0.75rem",borderRadius:"var(--radius-surface, 0.5rem)",background:"var(--muted)"},children:[a(s,{direction:"row",align:"start",gap:"tight",style:{flex:1,minWidth:0},children:[n(o,{className:"dndev-size-sm",style:{color:"var(--primary)",marginTop:"0.15rem",flexShrink:0}}),a(s,{gap:"none",style:{minWidth:0},children:[n(u,{as:"span",level:"small",weight:"semibold",children:t.title}),n(u,{as:"span",variant:"muted",level:"caption",style:{lineHeight:1.45},children:t.description})]})]}),t.locked?n(u,{as:"span",variant:"muted",level:"caption",weight:"medium",style:{flexShrink:0},children:e("alwaysOn")}):n(J,{checked:i,onCheckedChange:F=>b(_=>({..._,[t.id]:F}))})]},t.id)})})}]})]}),j=C?a(s,{direction:"row",gap:"tight",style:{width:"100%"},children:[n(m,{onClick:()=>E(!1),variant:f.OUTLINE,style:{flex:1},children:e("form.cancel","Cancel")}),n(m,{onClick:M,variant:f.DEFAULT,style:{flex:1},children:e("savePreferences","Save Preferences")})]}):a(s,{direction:"row",gap:"tight",style:{width:"100%"},children:[x&&n(m,{onClick:H,variant:f.OUTLINE,style:{flex:1},children:e("declineOptional")}),n(m,{onClick:z,variant:f.DEFAULT,style:{flex:1},children:e(c?"acknowledge":"acceptAll")})]});return a(se,{children:[h&&n($,{ref:T,elevated:!0,icon:w,title:e(c?"necessaryOnlyTitle":"cookiePreferences"),content:Y,footer:j,className:Q("dndev-fixed dndev-z-modal",O),style:{[N==="top"?"top":"bottom"]:"var(--gap-md)",insetInlineStart:"var(--gap-md)",width:`min(${oe}px, calc(100vw - var(--gap-md) * 2))`,height:"auto"}}),!h&&!p&&!c&&n(m,{onClick:()=>l(!0),variant:f.OUTLINE,floating:!0,icon:w,display:"compact",tooltip:e("cookiePreferences"),"aria-label":e("cookiePreferences"),className:"dndev-fixed dndev-z-toast",style:{[N==="top"?"top":"bottom"]:"var(--gap-md)",insetInlineStart:"var(--gap-md)"}})]})}var fe=ie;export{fe as default};
@@ -0,0 +1 @@
1
+ import{a as u,h as T}from"./chunk-DRFM6WXH.js";import"./chunk-O2XFH626.js";import{Link as G,Star as I}from"lucide-react";import{useCallback as k,useEffect as D,useRef as O}from"react";import{Badge as S,Command as R,CommandDialog as F}from"@donotdev/components";import{useOverlayStore as v,useTranslation as A}from"@donotdev/core";import{jsx as o,jsxs as t}from"react/jsx-runtime";var E=()=>{let{t:e}=A("dndev"),d=O(null),m=v(a=>a.isCommandDialogOpen),r=v(a=>a.closeCommandDialog),{navigationItems:f,favoriteItems:s,recentItems:i,toggleFavorite:b,isFavorite:c,navigateToItem:h}=T();D(()=>{m&&requestAnimationFrame(()=>{d.current?.focus()})},[m]);let C=k(a=>{h(a),r()},[h,r]),p=k((a,g=!0)=>a.map(n=>({label:n.label,value:n.path,description:n.path!==n.label?n.path:void 0,icon:o(u,{icon:n.icon,fallback:G}),badge:n.badge?o(S,{children:n.badge}):void 0,onSelect:()=>C(n.path),rightSlot:g?o("button",{type:"button",onClick:N=>{N.stopPropagation(),b(n.path)},className:"dndev-command-favorite-button","data-favorited":c(n.path),"aria-label":c(n.path)?e("globalGoTo.unfavorite","Remove from favorites"):e("globalGoTo.favorite","Add to favorites"),children:o(u,{icon:I,className:"dndev-size-sm"})}):void 0})),[C,b,c,e]),l=[];if(s.length>0&&l.push({heading:e("globalGoTo.favorites","Favorites"),items:p(s,!1)}),i.length>0){let a=i.flatMap(g=>p([g],!0));a.length>0&&l.push({heading:e("globalGoTo.recent","Recent"),separator:s.length>0,items:a})}l.push({heading:e("globalGoTo.allPages","All Pages"),separator:s.length>0||i.length>0,items:p(f)});let y=f.length>0;return t(F,{open:m,onOpenChange:a=>a?null:r(),children:[o(R,{placeholder:e("globalGoTo.placeholder","Search pages..."),emptyMessage:y?e("globalGoTo.noResults","No results found."):e("globalGoTo.empty","No pages available."),groups:l}),o("div",{className:"dndev-command-footer",children:t("div",{className:"dndev-command-footer-shortcuts",children:[t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"\u2318K"}),o("span",{children:e("globalGoTo.shortcutOpen","Open")})]}),t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"\u2191"}),o("kbd",{className:"dndev-command-footer-key",children:"\u2193"}),o("span",{children:e("globalGoTo.shortcutNavigate","Navigate")})]}),t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"\u21B5"}),o("span",{children:e("globalGoTo.shortcutSelect","Select")})]}),t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"Esc"}),o("span",{children:e("globalGoTo.shortcutClose","Close")})]})]})})]})},L=()=>v(d=>d.isCommandDialogOpen)?o(E,{}):null,K=L;export{K as default};
@@ -0,0 +1 @@
1
+ import*as f from"lucide-react";import{isValidElement as b}from"react";import{cn as d}from"@donotdev/components";import{jsx as c}from"react/jsx-runtime";function x(e){if(!e)return f.Palette;let n=e.replace(/['"]/g,"");return f[n]||f.Palette}var C=({icon:e,fallback:n,className:i,ariaHidden:s=!1})=>{let o=e||n;if(!o)return null;let a="dndev-size-md";if(typeof o=="function"||typeof o=="object"&&o!==null&&"render"in o)return c(o,{className:d(a,i),style:{flexShrink:0},"aria-hidden":s});if(typeof o=="string"){if(!/^[a-zA-Z0-9_-]+$/.test(o))return c("span",{className:d(a,i),style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":s,children:o});let p=x(o);return c(p,{className:d(a,i),style:{flexShrink:0},"aria-hidden":s})}return b(o)?c("span",{className:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":s,children:o}):c("span",{className:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":s,children:o})},D=C;import*as y from"@donotdev/auth";import{DEGRADED_AUTH_API as P}from"@donotdev/core";var m=y?.useAuth;function L(e){return P[e]}function I(e){return m?m(e):L(e)}var O=typeof m=="function",M=y?.PasswordResetCallback??(()=>null);import{useMemo as h}from"react";import{useNavigationStore as S,useTranslation as E}from"@donotdev/core";import{USER_ROLES as T}from"@donotdev/core";import{useLocation as k}from"@donotdev/ui/routing/hooks";function g(){let e=k(),n=I("user"),i=!!n,{t:s}=E(),o=n?.role||T.GUEST,a=S(r=>!r||typeof r.getFilteredRoutes!="function"?[]:r.getFilteredRoutes({authenticated:i,role:o}));return h(()=>Array.isArray(a)?a.map(r=>({...r,label:K(r,s),isActive:F(r.path,e.pathname),hasChildren:!1,children:void 0})).sort((r,l)=>r.label.localeCompare(l.label,void 0,{sensitivity:"base"})):[],[a,e.pathname,s])}function Q(e){let n=g();return h(()=>n.find(i=>i.path===e),[n,e])}function K(e,n){let i=e.meta?.namespace;return typeof i!="string"||i===""?e.label:n(`${i}:title`,{defaultValue:e.label})}function F(e,n){return e==="/"?n==="/":n===e?!0:n.startsWith(e+"/")}import{useCallback as V}from"react";import{useNavigationStore as u}from"@donotdev/core";import{useNavigate as _}from"@donotdev/ui/routing/hooks";var ne=()=>{let e=_(),n=g()??[],i=u(t=>t.favorites),s=u(t=>t.recent),o=u(t=>t.toggleFavorite),a=u(t=>t.isFavorite),r=u(t=>t.addRecent),l=n.length?n.filter(t=>i.includes(t.path)):[],p=n.length?n.filter(t=>s.includes(t.path)).slice(0,5):[],A=t=>{o(t)},N=t=>a(t),v=t=>{r(t)},R=V(t=>{v(t),e(t)},[e,v]);return{navigationItems:n,favoriteItems:l,recentItems:p,toggleFavorite:A,isFavorite:N,navigateToItem:R}};export{C as a,D as b,I as c,O as d,M as e,g as f,Q as g,ne as h};
@@ -1 +1 @@
1
- {"version":3,"file":"CookieConsent.d.ts","sourceRoot":"","sources":["../../../src/components/cookie-consent/CookieConsent.tsx"],"names":[],"mappings":"AA6BA,6CAA6C;AAC7C,MAAM,WAAW,kBAAkB;IACjC,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,iBAAS,aAAa,CAAC,EACrB,QAAmB,EACnB,SAAc,GACf,EAAE,kBAAkB,sCA8UpB;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"CookieConsent.d.ts","sourceRoot":"","sources":["../../../src/components/cookie-consent/CookieConsent.tsx"],"names":[],"mappings":"AA6BA,6CAA6C;AAC7C,MAAM,WAAW,kBAAkB;IACjC,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,iBAAS,aAAa,CAAC,EACrB,QAAmB,EACnB,SAAc,GACf,EAAE,kBAAkB,sCAgVpB;AAED,eAAe,aAAa,CAAC"}
@@ -74,12 +74,9 @@ function CookieConsent({ position = 'bottom', className = '', }) {
74
74
  },
75
75
  ].filter((cat) => requiredCategories.includes(cat.id));
76
76
  const hasOptionalCategories = checkHasOptionalCookies();
77
- // Auto-accept if only necessary cookies (GDPR/CCPA — necessary don't need consent)
78
- useEffect(() => {
79
- if (!hasConsented && !hasOptionalCategories) {
80
- acceptAll();
81
- }
82
- }, [hasConsented, hasOptionalCategories, acceptAll]);
77
+ // Functional cookies only (sign-in, language, consent): nothing to consent to, but the
78
+ // visitor is told once — an information bar with a single OK that records it.
79
+ const informationOnly = !hasOptionalCategories;
83
80
  // Sync local draft state when accordion opens — default optional ON for easier UX
84
81
  useEffect(() => {
85
82
  const defaulted = { ...categories };
@@ -95,7 +92,8 @@ function CookieConsent({ position = 'bottom', className = '', }) {
95
92
  }, [categories, showPreferences]);
96
93
  // Dismiss on outside click when banner is showing pre-consent
97
94
  useEffect(() => {
98
- if (!isClient() || hasConsented || !showBanner)
95
+ // The information bar stays until acknowledged (OK), no dismiss by outside click.
96
+ if (!isClient() || hasConsented || !showBanner || informationOnly)
99
97
  return;
100
98
  const handleClickOutside = (event) => {
101
99
  if (bannerRef.current &&
@@ -110,7 +108,7 @@ function CookieConsent({ position = 'bottom', className = '', }) {
110
108
  clearTimeout(timeoutId);
111
109
  document.removeEventListener('mousedown', handleClickOutside);
112
110
  };
113
- }, [hasConsented, showBanner]);
111
+ }, [hasConsented, showBanner, informationOnly]);
114
112
  if (!mounted)
115
113
  return null;
116
114
  if (hasConsented && !storeShowBanner)
@@ -147,7 +145,9 @@ function CookieConsent({ position = 'bottom', className = '', }) {
147
145
  declineAll();
148
146
  setShowBanner(false);
149
147
  };
150
- const bannerContent = (_jsxs(Stack, { gap: "medium", children: [_jsx(Text, { as: "p", variant: "muted", level: "small", style: { lineHeight: 1.55 }, children: t('cookieBannerDescription') }), hasOptionalCategories && (_jsx(Accordion, { type: "single", collapsible: true, value: showPreferences ? 'preferences' : '', onValueChange: (value) => setShowPreferences(value === 'preferences'), items: [
148
+ const bannerContent = (_jsxs(Stack, { gap: "medium", children: [_jsx(Text, { as: "p", variant: "muted", level: "small", style: { lineHeight: 1.55 }, children: informationOnly
149
+ ? t('necessaryOnlyDescription')
150
+ : t('cookieBannerDescription') }), hasOptionalCategories && (_jsx(Accordion, { type: "single", collapsible: true, value: showPreferences ? 'preferences' : '', onValueChange: (value) => setShowPreferences(value === 'preferences'), items: [
151
151
  {
152
152
  value: 'preferences',
153
153
  trigger: (_jsxs(Stack, { direction: "row", align: "center", gap: "tight", children: [_jsx(Settings, { className: "dndev-size-sm" }), _jsx(Text, { as: "span", level: "small", weight: "medium", children: t('customize') })] })),
@@ -169,13 +169,13 @@ function CookieConsent({ position = 'bottom', className = '', }) {
169
169
  }) })),
170
170
  },
171
171
  ] }))] }));
172
- const bannerFooter = showPreferences ? (_jsxs(Stack, { direction: "row", gap: "tight", style: { width: '100%' }, children: [_jsx(Button, { onClick: () => setShowPreferences(false), variant: BUTTON_VARIANT.OUTLINE, style: { flex: 1 }, children: t('form.cancel', 'Cancel') }), _jsx(Button, { onClick: handleSave, variant: BUTTON_VARIANT.DEFAULT, style: { flex: 1 }, children: t('savePreferences', 'Save Preferences') })] })) : (_jsxs(Stack, { direction: "row", gap: "tight", style: { width: '100%' }, children: [hasOptionalCategories && (_jsx(Button, { onClick: handleDeclineAll, variant: BUTTON_VARIANT.OUTLINE, style: { flex: 1 }, children: t('declineOptional') })), _jsx(Button, { onClick: handleAcceptAll, variant: BUTTON_VARIANT.DEFAULT, style: { flex: 1 }, children: t('acceptAll') })] }));
173
- return (_jsxs(_Fragment, { children: [showBanner && (_jsx(Card, { ref: bannerRef, elevated: true, icon: Cookie, title: t('cookiePreferences'), content: bannerContent, footer: bannerFooter, className: cn('dndev-fixed dndev-z-modal', className), style: {
172
+ const bannerFooter = showPreferences ? (_jsxs(Stack, { direction: "row", gap: "tight", style: { width: '100%' }, children: [_jsx(Button, { onClick: () => setShowPreferences(false), variant: BUTTON_VARIANT.OUTLINE, style: { flex: 1 }, children: t('form.cancel', 'Cancel') }), _jsx(Button, { onClick: handleSave, variant: BUTTON_VARIANT.DEFAULT, style: { flex: 1 }, children: t('savePreferences', 'Save Preferences') })] })) : (_jsxs(Stack, { direction: "row", gap: "tight", style: { width: '100%' }, children: [hasOptionalCategories && (_jsx(Button, { onClick: handleDeclineAll, variant: BUTTON_VARIANT.OUTLINE, style: { flex: 1 }, children: t('declineOptional') })), _jsx(Button, { onClick: handleAcceptAll, variant: BUTTON_VARIANT.DEFAULT, style: { flex: 1 }, children: informationOnly ? t('acknowledge') : t('acceptAll') })] }));
173
+ return (_jsxs(_Fragment, { children: [showBanner && (_jsx(Card, { ref: bannerRef, elevated: true, icon: Cookie, title: informationOnly ? t('necessaryOnlyTitle') : t('cookiePreferences'), content: bannerContent, footer: bannerFooter, className: cn('dndev-fixed dndev-z-modal', className), style: {
174
174
  [position === 'top' ? 'top' : 'bottom']: 'var(--gap-md)',
175
175
  insetInlineStart: 'var(--gap-md)',
176
176
  width: `min(${MAX_WIDTH}px, calc(100vw - var(--gap-md) * 2))`,
177
177
  height: 'auto',
178
- } })), !showBanner && !hasConsented && (_jsx(Button, { onClick: () => setShowBanner(true), variant: BUTTON_VARIANT.OUTLINE, floating: true, icon: Cookie, display: "compact", tooltip: t('cookiePreferences'), "aria-label": t('cookiePreferences'), className: "dndev-fixed dndev-z-toast", style: {
178
+ } })), !showBanner && !hasConsented && !informationOnly && (_jsx(Button, { onClick: () => setShowBanner(true), variant: BUTTON_VARIANT.OUTLINE, floating: true, icon: Cookie, display: "compact", tooltip: t('cookiePreferences'), "aria-label": t('cookiePreferences'), className: "dndev-fixed dndev-z-toast", style: {
179
179
  [position === 'top' ? 'top' : 'bottom']: 'var(--gap-md)',
180
180
  insetInlineStart: 'var(--gap-md)',
181
181
  } }))] }));
@@ -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;
@@ -1624,6 +1645,32 @@ em {
1624
1645
  text-transform: var(--text-transform-label, none);
1625
1646
  }
1626
1647
 
1648
+ /* ICON BADGE - count bubble on the icon's top-end corner (Button `badge`) */
1649
+ .dndev-interactive-icon-anchor {
1650
+ position: relative;
1651
+ display: inline-flex;
1652
+ }
1653
+
1654
+ .dndev-interactive-badge {
1655
+ position: absolute;
1656
+ inset-block-start: -0.5em;
1657
+ inset-inline-end: -0.65em;
1658
+ min-width: 1.25rem;
1659
+ height: 1.25rem;
1660
+ padding-inline: 0.3rem;
1661
+ display: inline-flex;
1662
+ align-items: center;
1663
+ justify-content: center;
1664
+ border-radius: var(--radius-full);
1665
+ background: var(--primary);
1666
+ color: var(--primary-foreground);
1667
+ font-size: var(--font-size-xs);
1668
+ font-weight: var(--font-weight-semibold);
1669
+ font-variant-numeric: tabular-nums;
1670
+ line-height: 1;
1671
+ pointer-events: none;
1672
+ }
1673
+
1627
1674
  /* Compact mode - always hide label */
1628
1675
  .dndev-interactive-label[data-display='compact'] {
1629
1676
  display: none;
@@ -3730,6 +3777,44 @@ em {
3730
3777
  object-fit: cover;
3731
3778
  }
3732
3779
 
3780
+ /* Contain: whole image visible on the muted cover background (cut-outs), inset
3781
+ proportionally so a packshot never touches the frame. */
3782
+ .dndev-card-cover[data-fit='contain'] > img:not(.dndev-card-cover-hover) {
3783
+ -o-object-fit: contain;
3784
+ object-fit: contain;
3785
+ box-sizing: border-box;
3786
+ padding: 8%;
3787
+ }
3788
+
3789
+ /* Hover view: stacked over the cover, crossfades in on hover / keyboard focus. */
3790
+ .dndev-card-cover > img.dndev-card-cover-hover {
3791
+ position: absolute;
3792
+ inset: 0;
3793
+ -o-object-fit: cover;
3794
+ object-fit: cover;
3795
+ opacity: 0;
3796
+ transition: opacity 0.4s var(--ease-in-out);
3797
+ }
3798
+
3799
+ @media (hover: hover) {
3800
+ .dndev-card:hover .dndev-card-cover-hover {
3801
+ opacity: 1;
3802
+ }
3803
+ }
3804
+
3805
+ /* Keyboard focus only: a mouse click keeps focus inside the card, which must not
3806
+ pin the hover view after the pointer leaves. */
3807
+ .dndev-card:has(:focus-visible) .dndev-card-cover-hover,
3808
+ .dndev-card:focus-visible .dndev-card-cover-hover {
3809
+ opacity: 1;
3810
+ }
3811
+
3812
+ @media (prefers-reduced-motion: reduce) {
3813
+ .dndev-card-cover > img.dndev-card-cover-hover {
3814
+ transition: none;
3815
+ }
3816
+ }
3817
+
3733
3818
  /* Consumer-supplied ReactNode: wrapper fills, inner media fills. */
3734
3819
  .dndev-card-cover-media {
3735
3820
  position: relative;
@@ -4202,6 +4287,7 @@ em {
4202
4287
  padding: var(--gap-sm) var(--gap-md);
4203
4288
  cursor: pointer;
4204
4289
  border-radius: var(--radius-interactive);
4290
+ font-weight: var(--font-weight-normal);
4205
4291
  transition: background-color var(--dur-fast) var(--ease-in-out);
4206
4292
  }
4207
4293
 
@@ -4232,7 +4318,7 @@ em {
4232
4318
  }
4233
4319
 
4234
4320
  .dndev-combobox-option-label {
4235
- font-size: var(--font-size-sm);
4321
+ font-size: var(--font-size-input);
4236
4322
  color: var(--foreground);
4237
4323
  }
4238
4324
 
@@ -5137,12 +5223,23 @@ em {
5137
5223
  margin-inline: calc(50% - 50vw);
5138
5224
  }
5139
5225
 
5140
- /* Background image with overlay for text readability */
5226
+ /* Background image with overlay for text readability.
5227
+ The photo is an <img> (discoverable by the preload scanner), laid under the scrim. */
5141
5228
  .dndev-hero-section--bg-image {
5142
5229
  position: relative;
5143
- background-size: cover;
5144
- background-position: center;
5145
- background-repeat: no-repeat;
5230
+ overflow: hidden;
5231
+ }
5232
+
5233
+ .dndev-hero-section--bg-image > .dndev-hero-section__cover {
5234
+ position: absolute;
5235
+ inset: 0;
5236
+ width: 100%;
5237
+ height: 100%;
5238
+ -o-object-fit: cover;
5239
+ object-fit: cover;
5240
+ -o-object-position: center;
5241
+ object-position: center;
5242
+ z-index: 0;
5146
5243
  }
5147
5244
 
5148
5245
  .dndev-hero-section--bg-image::before {
@@ -5154,12 +5251,22 @@ em {
5154
5251
  rgba(0, 0, 0, 0.4),
5155
5252
  rgba(0, 0, 0, 0.6)
5156
5253
  );
5157
- z-index: 0;
5254
+ z-index: 1;
5255
+ }
5256
+
5257
+ /* Soft scrim: bright photography stays bright; only the bottom band darkens
5258
+ enough for white text placed there. */
5259
+ .dndev-hero-section--bg-image[data-scrim='soft']::before {
5260
+ background: linear-gradient(
5261
+ to bottom,
5262
+ rgba(0, 0, 0, 0) 45%,
5263
+ rgba(0, 0, 0, 0.55) 100%
5264
+ );
5158
5265
  }
5159
5266
 
5160
- .dndev-hero-section--bg-image > * {
5267
+ .dndev-hero-section--bg-image > :not(.dndev-hero-section__cover) {
5161
5268
  position: relative;
5162
- z-index: 1;
5269
+ z-index: 2;
5163
5270
  }
5164
5271
 
5165
5272
  .dndev-hero-section--bg-image,
@@ -5466,6 +5573,12 @@ em {
5466
5573
  display: block;
5467
5574
  }
5468
5575
 
5576
+ .image-gallery__thumbnail-image[data-fit='contain'] {
5577
+ -o-object-fit: contain;
5578
+ object-fit: contain;
5579
+ background-color: var(--muted);
5580
+ }
5581
+
5469
5582
  /* Responsive adjustments */
5470
5583
  @media (max-width: 640px) {
5471
5584
  .image-gallery__thumbnail {
@@ -6346,7 +6459,7 @@ input[type='number'] {
6346
6459
  background-color: var(--secondary);
6347
6460
  }
6348
6461
 
6349
- .dndev-progress [data-radix-progress-indicator] {
6462
+ .dndev-progress > [data-state] {
6350
6463
  height: 100%;
6351
6464
  width: 100%;
6352
6465
  flex: 1;
@@ -6356,23 +6469,23 @@ input[type='number'] {
6356
6469
  /* Variant colors */
6357
6470
  }
6358
6471
 
6359
- [data-variant='default']:is(.dndev-progress [data-radix-progress-indicator]) {
6472
+ [data-variant='default']:is(.dndev-progress > [data-state]) {
6360
6473
  background-color: var(--primary);
6361
6474
  }
6362
6475
 
6363
- [data-variant='accent']:is(.dndev-progress [data-radix-progress-indicator]) {
6476
+ [data-variant='accent']:is(.dndev-progress > [data-state]) {
6364
6477
  background-color: var(--accent);
6365
6478
  }
6366
6479
 
6367
- [data-variant='success']:is(.dndev-progress [data-radix-progress-indicator]) {
6480
+ [data-variant='success']:is(.dndev-progress > [data-state]) {
6368
6481
  background-color: var(--success);
6369
6482
  }
6370
6483
 
6371
- [data-variant='warning']:is(.dndev-progress [data-radix-progress-indicator]) {
6484
+ [data-variant='warning']:is(.dndev-progress > [data-state]) {
6372
6485
  background-color: var(--warning);
6373
6486
  }
6374
6487
 
6375
- [data-variant='destructive']:is(.dndev-progress [data-radix-progress-indicator]) {
6488
+ [data-variant='destructive']:is(.dndev-progress > [data-state]) {
6376
6489
  background-color: var(--destructive);
6377
6490
  }
6378
6491
 
@@ -6686,39 +6799,20 @@ input[type='number'] {
6686
6799
  border-top-color: transparent;
6687
6800
  }
6688
6801
 
6689
- .dndev-select-trigger [data-radix-select-icon] {
6690
- opacity: var(--opacity-muted);
6691
- width: var(--icon-md);
6692
- height: var(--icon-md);
6693
- }
6694
-
6695
- .dndev-select-trigger [data-radix-select-value] {
6696
- font-size: var(--font-size-input);
6697
- }
6698
-
6699
6802
  .dndev-select-content {
6700
6803
  width: var(--radix-select-trigger-width);
6701
6804
  min-width: var(--radix-select-trigger-width);
6702
6805
  }
6703
6806
 
6704
- [data-radix-select-viewport] {
6705
- display: flex;
6706
- flex-direction: column;
6707
- padding: 0;
6708
- }
6709
-
6710
- .dndev-interactive[data-radix-select-item] {
6711
- width: 100%;
6712
- justify-content: flex-start;
6713
- 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);
6714
6810
  }
6715
6811
 
6716
- .dndev-interactive[data-radix-select-item] [data-radix-select-item-text] {
6812
+ [data-radix-select-viewport] {
6717
6813
  display: flex;
6718
6814
  flex-direction: column;
6719
- align-items: flex-start;
6720
- text-align: start;
6721
- flex: 1;
6815
+ padding: 0;
6722
6816
  }
6723
6817
 
6724
6818
  .dndev-select-item-description {
@@ -6726,20 +6820,6 @@ input[type='number'] {
6726
6820
  color: var(--muted-foreground);
6727
6821
  }
6728
6822
 
6729
- .dndev-interactive[data-radix-select-item] [data-radix-select-item-indicator] {
6730
- display: flex;
6731
- align-items: center;
6732
- justify-content: center;
6733
- color: currentColor;
6734
- }
6735
-
6736
- .dndev-interactive[data-radix-select-item]
6737
- [data-radix-select-item-indicator]
6738
- svg {
6739
- width: 1rem;
6740
- height: 1rem;
6741
- }
6742
-
6743
6823
  /* packages/components/src/atomic/ScrollArea/ScrollArea.css */
6744
6824
 
6745
6825
  .dndev-scroll-area {
@@ -7140,6 +7220,13 @@ input[type='number'] {
7140
7220
  /* Square edges for panel metaphor */
7141
7221
  }
7142
7222
 
7223
+ /* Narrow panel (carts, filters): full width on phones, a column on larger screens */
7224
+
7225
+ .dndev-sheet-content[data-size='narrow'][data-side='right'],.dndev-sheet-content[data-size='narrow'][data-side='left'] {
7226
+ width: 100%;
7227
+ max-width: 28rem;
7228
+ }
7229
+
7143
7230
  .dndev-sheet-content[data-side='right'] {
7144
7231
  /* Physical positioning: right edge */
7145
7232
  right: 0;
@@ -7879,9 +7966,9 @@ input[type='number'] {
7879
7966
  overflow: hidden;
7880
7967
  }
7881
7968
 
7882
- /* 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 */
7883
7970
 
7884
- .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) {
7885
7972
  overflow: visible;
7886
7973
  }
7887
7974
 
@@ -8534,6 +8621,65 @@ input[type='number'] {
8534
8621
  display: none;
8535
8622
  }
8536
8623
 
8624
+ /* packages/components/src/atomic/QuantityStepper/QuantityStepper.css */
8625
+
8626
+ /* One outlined control (e-commerce standard, e.g. Shopify Dawn): borderless − / +
8627
+ buttons around a centred, tabular quantity. Same height and radius as buttons. */
8628
+ .dndev-quantity-stepper {
8629
+ display: inline-flex;
8630
+ align-items: stretch;
8631
+ min-height: var(--touch-target);
8632
+ border: var(--border-hairline) solid var(--border);
8633
+ border-radius: var(--radius-interactive);
8634
+ background: var(--interactive);
8635
+ color: var(--foreground);
8636
+ }
8637
+ .dndev-quantity-stepper[data-full-width] {
8638
+ display: flex;
8639
+ width: 100%;
8640
+ }
8641
+ .dndev-quantity-stepper[data-disabled] {
8642
+ opacity: 0.6;
8643
+ }
8644
+ .dndev-quantity-stepper > .dndev-interactive {
8645
+ flex: 0 0 auto;
8646
+ aspect-ratio: 1;
8647
+ min-height: 0;
8648
+ border: none;
8649
+ border-radius: inherit;
8650
+ background: transparent;
8651
+ }
8652
+
8653
+ .dndev-quantity-stepper-value {
8654
+ flex: 1 1 auto;
8655
+ display: flex;
8656
+ align-items: center;
8657
+ justify-content: center;
8658
+ min-width: 3ch;
8659
+ padding-inline: var(--gap-sm);
8660
+ border: none;
8661
+ background: none;
8662
+ color: inherit;
8663
+ font: inherit;
8664
+ font-weight: var(--font-weight-medium);
8665
+ font-variant-numeric: tabular-nums;
8666
+ text-align: center;
8667
+ }
8668
+
8669
+ .dndev-quantity-stepper-value:is(button) {
8670
+ cursor: pointer;
8671
+ }
8672
+
8673
+ .dndev-quantity-stepper-value:is(button):hover {
8674
+ text-decoration: underline;
8675
+ text-underline-offset: 0.2em;
8676
+ }
8677
+
8678
+ .dndev-quantity-stepper-value:is(button):focus-visible {
8679
+ outline: none;
8680
+ box-shadow: var(--shadow-focus);
8681
+ }
8682
+
8537
8683
  /* packages/components/src/atomic/Tag/Tag.css */
8538
8684
 
8539
8685
  .dndev-tag {
@@ -8720,6 +8866,9 @@ input[type='number'] {
8720
8866
 
8721
8867
  .dndev-text-base[data-level^='h'] {
8722
8868
  font-family: var(--font-headline);
8869
+ /* Display sizes need tighter leading than body copy; themes opt in with
8870
+ --line-height-heading, otherwise headings keep the text line-height. */
8871
+ line-height: var(--line-height-heading, var(--line-height));
8723
8872
 
8724
8873
  /* A single word wider than its column is the one thing text cannot solve by
8725
8874
  wrapping, and display type hits it first: uppercase, letter-spaced headings
@@ -10312,11 +10461,11 @@ input[type='number'] {
10312
10461
  /* ========== RIPPLE EFFECT ========== */
10313
10462
  @keyframes dndev-ripple {
10314
10463
  0% {
10315
- transform: translate(-50%, -50%) scale(0);
10464
+ transform: scale(0);
10316
10465
  opacity: var(--ripple-opacity);
10317
10466
  }
10318
10467
  100% {
10319
- transform: translate(-50%, -50%) scale(4);
10468
+ transform: scale(4);
10320
10469
  opacity: 0;
10321
10470
  }
10322
10471
  }
@@ -11761,6 +11910,12 @@ main[role='main'][data-routing-animation='none'] {
11761
11910
  .dndev-layout {
11762
11911
  position: relative;
11763
11912
  width: 100%;
11913
+ /* The density preset is rendered on this wrapper by the server, but <html> only
11914
+ receives it after hydration. font-size and line-height inherit as computed
11915
+ values from <body>, so re-read the density tokens here: otherwise the first
11916
+ paint uses the root defaults and text grows once <html> is updated. */
11917
+ font-size: var(--font-size-base);
11918
+ line-height: var(--line-height);
11764
11919
  height: 100vh;
11765
11920
  height: 100dvh;
11766
11921
  max-height: 100vh;
@@ -11938,7 +12093,7 @@ aside[role='navigation'].sidebar {
11938
12093
  /* Desktop presets with no sidebar: Hide sidebar element for performance/accessibility */
11939
12094
  /* Landing, Plain, Game have --sidebar-width: 0px, also need display: none */
11940
12095
  }
11941
- [data-layout='landing']:root aside.sidebar[role='navigation'],[data-layout='plain']:root aside.sidebar[role='navigation'],[data-layout='game']:root aside.sidebar[role='navigation'] {
12096
+ [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'] {
11942
12097
  display: none;
11943
12098
  }
11944
12099
  /* Moolti: Sidebar spans full height (no header/footer on desktop) */