@donotdev/components 0.1.42 → 0.1.44

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.
@@ -155,7 +155,8 @@ export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'
155
155
  /**
156
156
  * Optional content absolutely positioned on top of the cover.
157
157
  * Anchored by `overlayPosition` with theme-token inset. Overlay sits above
158
- * both the cover and the body slot (z-index 2).
158
+ * both the cover and the body slot (z-index 2, or z-index 4 when fullOverlay
159
+ * is also set so it appears above the scrim).
159
160
  */
160
161
  overlay?: ReactNode;
161
162
  /**
@@ -163,6 +164,17 @@ export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'
163
164
  * @default 'top-left'
164
165
  */
165
166
  overlayPosition?: CardOverlayPosition;
167
+ /**
168
+ * Optional full-card scrim rendered as `position:absolute; inset:0` at the
169
+ * card root level. Participates in the card's CSS transform (hover lift,
170
+ * etc.) because it is a direct child of `.dndev-card`.
171
+ *
172
+ * Use for status overlays (sold, reserved, signed) that must cover the
173
+ * entire card surface. Clipped to the card's border-radius via
174
+ * `overflow:hidden`. `pointer-events:none` — card click-through is
175
+ * preserved. z-index 3 (above body, below `overlay` at z-index 4).
176
+ */
177
+ fullOverlay?: ReactNode;
166
178
  /**
167
179
  * Background treatment for the body slot (the padded region holding
168
180
  * title/subtitle/icon/content/footer/children, if any).
@@ -233,6 +245,6 @@ export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'
233
245
  * @param {CardProps} props - The props for the card
234
246
  * @returns {JSX.Element} The rendered card
235
247
  */
236
- declare const Card: ({ className, variant, asChild, icon, title, subtitle, content, footer, children, tooltip, onClick, clickable, elevated, cover, coverAspect, overlay, overlayPosition, bodyBackground, style, ref, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
248
+ declare const Card: ({ className, variant, asChild, icon, title, subtitle, content, footer, children, tooltip, onClick, clickable, elevated, cover, coverAspect, overlay, overlayPosition, fullOverlay, bodyBackground, style, ref, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
237
249
  export default Card;
238
250
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Card/index.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAI7D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAOvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE3E,uEAAuE;AACvE,MAAM,MAAM,mBAAmB,GAC3B,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAC;AAEnB;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,CA0B7E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,CAAC,EAAE,QAAQ,EACf,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,EAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAC5B,SAAS,CA0BX;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,EACrC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,SAAS,EACrD,OAAO,EAAE,OAAO,GACf,SAAS,CA8BX;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;CAAkB,CAAC;AAE5C;;GAEG;AACH,MAAM,MAA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;;;GAqDG;AACH,QAAA,MAAM,IAAI,GAAI,2NAuBX,SAAS,4CA0FX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -158,7 +158,7 @@ export const CARD_VARIANT = SURFACE_VARIANT;
158
158
  * @param {CardProps} props - The props for the card
159
159
  * @returns {JSX.Element} The rendered card
160
160
  */
161
- const Card = ({ className, variant, asChild = false, icon, title, subtitle, content, footer, children, tooltip, onClick, clickable, elevated, cover, coverAspect, overlay, overlayPosition = 'top-left', bodyBackground = 'transparent', style, ref, ...props }) => {
161
+ const Card = ({ className, variant, asChild = false, icon, title, subtitle, content, footer, children, tooltip, onClick, clickable, elevated, cover, coverAspect, overlay, overlayPosition = 'top-left', fullOverlay, bodyBackground = 'transparent', style, ref, ...props }) => {
162
162
  const Comp = asChild ? Slot : 'div';
163
163
  const variantAttrs = getVariantDataAttrs({ variant });
164
164
  const isClickable = clickable !== undefined ? clickable : !!onClick;
@@ -177,6 +177,7 @@ const Card = ({ className, variant, asChild = false, icon, title, subtitle, cont
177
177
  ...(cover !== undefined && { 'data-has-cover': 'true' }),
178
178
  ...(cover !== undefined && !hasBody && { 'data-cover-only': 'true' }),
179
179
  ...(overlay !== undefined && { 'data-overlay-position': overlayPosition }),
180
+ ...(fullOverlay !== undefined && { 'data-has-full-overlay': 'true' }),
180
181
  };
181
182
  // When cover-only, the card itself owns the aspectRatio so the cover fills it.
182
183
  // Drop `height: 100%` in cover-only mode so aspectRatio drives height from width.
@@ -193,6 +194,6 @@ const Card = ({ className, variant, asChild = false, icon, title, subtitle, cont
193
194
  if (asChild) {
194
195
  return (_jsx(Comp, { ref: ref, className: cn('dndev-card', surfaceVariants({ variant }), className), style: rootStyle, ...cardAttrs, onClick: onClick, title: tooltip, ...props, children: children }));
195
196
  }
196
- return (_jsxs(Comp, { ref: ref, className: cn('dndev-card', surfaceVariants({ variant }), className), style: rootStyle, ...cardAttrs, onClick: onClick, title: tooltip, ...props, children: [coverNode, overlay && _jsx("div", { className: "dndev-card-overlay", children: overlay }), hasBody && (_jsxs("div", { className: "dndev-card-body", "data-body-background": bodyBackground, children: [header, hasContent && (_jsxs("div", { className: "dndev-card-content", children: [contentNode, children] })), footer && _jsx("div", { className: "dndev-card-footer", children: footer })] }))] }));
197
+ return (_jsxs(Comp, { ref: ref, className: cn('dndev-card', surfaceVariants({ variant }), className), style: rootStyle, ...cardAttrs, onClick: onClick, title: tooltip, ...props, children: [coverNode, fullOverlay && (_jsx("div", { className: "dndev-card-full-overlay", children: fullOverlay })), overlay && _jsx("div", { className: "dndev-card-overlay", children: overlay }), hasBody && (_jsxs("div", { className: "dndev-card-body", "data-body-background": bodyBackground, children: [header, hasContent && (_jsxs("div", { className: "dndev-card-content", children: [contentNode, children] })), footer && _jsx("div", { className: "dndev-card-footer", children: footer })] }))] }));
197
198
  };
198
199
  export default Card;
@@ -21,7 +21,7 @@ export interface StepperStep {
21
21
  content: ReactNode;
22
22
  }
23
23
  declare const stepperVariants: (props?: ({
24
- variant?: "default" | "muted" | "accent" | "primary" | "destructive" | "success" | "warning" | "secondary" | null | undefined;
24
+ variant?: "default" | "muted" | "primary" | "secondary" | "accent" | "success" | "warning" | "destructive" | null | undefined;
25
25
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
26
26
  /** Union of available Stepper variant values. */
27
27
  export type StepperVariant = VariantProps<typeof stepperVariants>['variant'];