@particle-academy/react-fancy 5.29.1 → 5.30.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.
Files changed (38) hide show
  1. package/dist/Card-CuRZivBz.d.cts +136 -0
  2. package/dist/Card-CuRZivBz.d.ts +136 -0
  3. package/dist/card.cjs +12 -6
  4. package/dist/card.d.cts +50 -3
  5. package/dist/card.d.ts +50 -3
  6. package/dist/card.js +3 -1
  7. package/dist/chunk-5F6V5HHT.cjs +399 -0
  8. package/dist/chunk-5F6V5HHT.cjs.map +1 -0
  9. package/dist/{chunk-Y3T7WMT6.cjs → chunk-65HKNZFG.cjs} +2 -2
  10. package/dist/{chunk-Y3T7WMT6.cjs.map → chunk-65HKNZFG.cjs.map} +1 -1
  11. package/dist/{chunk-2HGYDDIQ.js → chunk-ASCATIDJ.js} +3 -3
  12. package/dist/{chunk-2HGYDDIQ.js.map → chunk-ASCATIDJ.js.map} +1 -1
  13. package/dist/{chunk-6GWOB2Z4.js → chunk-CESGP5AF.js} +2 -2
  14. package/dist/{chunk-6GWOB2Z4.js.map → chunk-CESGP5AF.js.map} +1 -1
  15. package/dist/chunk-CF2U25LM.js +392 -0
  16. package/dist/chunk-CF2U25LM.js.map +1 -0
  17. package/dist/chunk-CFH6CJQG.js +3 -0
  18. package/dist/chunk-CFH6CJQG.js.map +1 -0
  19. package/dist/chunk-FJKZ5NOA.cjs +4 -0
  20. package/dist/chunk-FJKZ5NOA.cjs.map +1 -0
  21. package/dist/{chunk-FEUAZW3X.cjs → chunk-SCGE6DCE.cjs} +3 -3
  22. package/dist/{chunk-FEUAZW3X.cjs.map → chunk-SCGE6DCE.cjs.map} +1 -1
  23. package/dist/heading.cjs +3 -2
  24. package/dist/heading.js +2 -1
  25. package/dist/index.cjs +26 -25
  26. package/dist/index.d.cts +1 -1
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.js +5 -4
  29. package/dist/json-editor.cjs +13 -13
  30. package/dist/json-editor.js +2 -2
  31. package/docs/Card.md +170 -20
  32. package/package.json +1 -1
  33. package/dist/Card-BZ5F6-wd.d.cts +0 -50
  34. package/dist/Card-BZ5F6-wd.d.ts +0 -50
  35. package/dist/chunk-5DQ2XUJI.cjs +0 -173
  36. package/dist/chunk-5DQ2XUJI.cjs.map +0 -1
  37. package/dist/chunk-ZIDBI6JX.js +0 -167
  38. package/dist/chunk-ZIDBI6JX.js.map +0 -1
@@ -0,0 +1,136 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ /** Scales the card's padding and its corner radius. */
5
+ type CardSize = "xs" | "sm" | "md" | "lg";
6
+ /**
7
+ * The inset applied to the card's direct children.
8
+ *
9
+ * Separate from `CardSize` because they are separate keys: `size` only picks
10
+ * the DEFAULT step, and `padding` overrides it. Anything that has to line up
11
+ * with the content's edge — an inset divider, a `Card.Bleed` — is keyed by this
12
+ * and never by `size`.
13
+ */
14
+ type CardPadding = "none" | "xs" | "sm" | "md" | "lg";
15
+ /**
16
+ * How `Card.Header` / `Card.Body` / `Card.Footer` are set apart.
17
+ *
18
+ * `"divided"` is the default because it is what Card has always rendered.
19
+ * Seamless is arguably the nicer default — it is what Flux chose — but making
20
+ * it the default here would have silently restyled every card in every
21
+ * consumer, which is not a thing a minor release may do.
22
+ */
23
+ type CardSections = "divided" | "plain" | "banded";
24
+ /** Which of the card's edges a `Card.Bleed` reaches. */
25
+ type CardBleedEdges = "x" | "top" | "bottom" | "all";
26
+ interface CardProps extends HTMLAttributes<HTMLDivElement> {
27
+ /**
28
+ * The card's surface. `muted` and `soft` are tint steps between `outlined`
29
+ * (no tint) and `flat`.
30
+ */
31
+ variant?: "outlined" | "elevated" | "flat" | "muted" | "soft";
32
+ /**
33
+ * Padding on the card's direct children. Defaults to the step implied by
34
+ * `size`; pass it to override that, including `"none"`.
35
+ */
36
+ padding?: CardPadding;
37
+ /** Scales padding and corner radius together. Default `"md"`. */
38
+ size?: CardSize;
39
+ /** How the header, body and footer are separated. Default `"divided"`. */
40
+ sections?: CardSections;
41
+ /**
42
+ * With `sections="divided"`, stop the rules at the content's edge instead of
43
+ * running them across the card.
44
+ */
45
+ dividerInset?: boolean;
46
+ /**
47
+ * A faint hairline along the inside of the top edge — white at 70% in light
48
+ * mode, white at 10% in dark, so a tinted or elevated surface reads as lit
49
+ * from above in both.
50
+ *
51
+ * Default `false`, deliberately unlike Flux's `true` — flipping a decorative
52
+ * hairline on by default would change the appearance of every existing card.
53
+ */
54
+ highlight?: boolean;
55
+ /**
56
+ * Card is a link or a grid tile: adds the hover lift + border/shadow
57
+ * response, and clips children to the rounded corners so a `Card.Media`
58
+ * sits flush.
59
+ */
60
+ interactive?: boolean;
61
+ }
62
+ interface CardMediaProps extends HTMLAttributes<HTMLDivElement> {
63
+ /** Image URL. Omit for a pure colour/gradient tile. */
64
+ src?: string;
65
+ alt?: string;
66
+ /** CSS `aspect-ratio`. Default `"16/9"`. Ignored when `height` is set. */
67
+ ratio?: string;
68
+ /** Fixed height instead of an aspect ratio. */
69
+ height?: number | string;
70
+ /**
71
+ * Shown UNDER the image — while it loads, and permanently if it never
72
+ * arrives. Any CSS background value, so a gradient works.
73
+ */
74
+ background?: string;
75
+ /** `object-position` for the image. Default `"center"`. */
76
+ objectPosition?: string;
77
+ loading?: "lazy" | "eager";
78
+ /** Slots pinned to the media's corners — a number chip, a status pill. */
79
+ topLeft?: ReactNode;
80
+ topRight?: ReactNode;
81
+ bottomLeft?: ReactNode;
82
+ bottomRight?: ReactNode;
83
+ }
84
+ /**
85
+ * Shared by `Card.Header` and `Card.Footer`.
86
+ *
87
+ * `heading` / `description` / `actions` exist so the common header does not
88
+ * need a layout wrapper from the caller. Two pages in this suite's own showcase
89
+ * were writing `<div style={{ display: "flex", justifyContent: "space-between"
90
+ * }}>` INSIDE a `Card.Header` — inline styles, in the app whose job is to
91
+ * demonstrate the kit. 136 headers there, and nothing in the kit laid one out.
92
+ *
93
+ * `children` is the escape hatch and it WINS: pass it and the three props are
94
+ * ignored rather than rendered alongside, so a caller who sets both gets one
95
+ * title instead of two.
96
+ */
97
+ interface CardSectionProps extends HTMLAttributes<HTMLDivElement> {
98
+ /** The title. Rendered through `<Heading>`. */
99
+ heading?: ReactNode;
100
+ /** Which heading element to render. Default `"h3"`. */
101
+ headingLevel?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
102
+ /** Supporting line under the heading. Rendered through muted `<Text>`. */
103
+ description?: ReactNode;
104
+ /** Controls pushed to the far end, vertically centred on the heading. */
105
+ actions?: ReactNode;
106
+ /**
107
+ * Only used when there is no `Card` above this — a standalone header takes
108
+ * its own size, because there is no card to inherit one from.
109
+ */
110
+ size?: CardSize;
111
+ /** Full control. Replaces heading/description/actions, keeps the frame. */
112
+ children?: ReactNode;
113
+ }
114
+ interface CardHeaderProps extends CardSectionProps {
115
+ }
116
+ interface CardFooterProps extends CardSectionProps {
117
+ }
118
+ interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {
119
+ }
120
+ interface CardBleedProps extends HTMLAttributes<HTMLDivElement> {
121
+ /**
122
+ * Which card edges to reach. Default `"x"` — the sides only, which is what
123
+ * an inline image or table wants.
124
+ */
125
+ edges?: CardBleedEdges;
126
+ }
127
+
128
+ declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>> & {
129
+ Media: react.ForwardRefExoticComponent<CardMediaProps & react.RefAttributes<HTMLDivElement>>;
130
+ Header: react.ForwardRefExoticComponent<CardHeaderProps & react.RefAttributes<HTMLDivElement>>;
131
+ Body: react.ForwardRefExoticComponent<CardBodyProps & react.RefAttributes<HTMLDivElement>>;
132
+ Footer: react.ForwardRefExoticComponent<CardFooterProps & react.RefAttributes<HTMLDivElement>>;
133
+ Bleed: react.ForwardRefExoticComponent<CardBleedProps & react.RefAttributes<HTMLDivElement>>;
134
+ };
135
+
136
+ export { type CardHeaderProps as C, type CardBodyProps as a, type CardFooterProps as b, type CardMediaProps as c, type CardBleedProps as d, Card as e, type CardBleedEdges as f, type CardPadding as g, type CardProps as h, type CardSectionProps as i, type CardSections as j, type CardSize as k };
@@ -0,0 +1,136 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ /** Scales the card's padding and its corner radius. */
5
+ type CardSize = "xs" | "sm" | "md" | "lg";
6
+ /**
7
+ * The inset applied to the card's direct children.
8
+ *
9
+ * Separate from `CardSize` because they are separate keys: `size` only picks
10
+ * the DEFAULT step, and `padding` overrides it. Anything that has to line up
11
+ * with the content's edge — an inset divider, a `Card.Bleed` — is keyed by this
12
+ * and never by `size`.
13
+ */
14
+ type CardPadding = "none" | "xs" | "sm" | "md" | "lg";
15
+ /**
16
+ * How `Card.Header` / `Card.Body` / `Card.Footer` are set apart.
17
+ *
18
+ * `"divided"` is the default because it is what Card has always rendered.
19
+ * Seamless is arguably the nicer default — it is what Flux chose — but making
20
+ * it the default here would have silently restyled every card in every
21
+ * consumer, which is not a thing a minor release may do.
22
+ */
23
+ type CardSections = "divided" | "plain" | "banded";
24
+ /** Which of the card's edges a `Card.Bleed` reaches. */
25
+ type CardBleedEdges = "x" | "top" | "bottom" | "all";
26
+ interface CardProps extends HTMLAttributes<HTMLDivElement> {
27
+ /**
28
+ * The card's surface. `muted` and `soft` are tint steps between `outlined`
29
+ * (no tint) and `flat`.
30
+ */
31
+ variant?: "outlined" | "elevated" | "flat" | "muted" | "soft";
32
+ /**
33
+ * Padding on the card's direct children. Defaults to the step implied by
34
+ * `size`; pass it to override that, including `"none"`.
35
+ */
36
+ padding?: CardPadding;
37
+ /** Scales padding and corner radius together. Default `"md"`. */
38
+ size?: CardSize;
39
+ /** How the header, body and footer are separated. Default `"divided"`. */
40
+ sections?: CardSections;
41
+ /**
42
+ * With `sections="divided"`, stop the rules at the content's edge instead of
43
+ * running them across the card.
44
+ */
45
+ dividerInset?: boolean;
46
+ /**
47
+ * A faint hairline along the inside of the top edge — white at 70% in light
48
+ * mode, white at 10% in dark, so a tinted or elevated surface reads as lit
49
+ * from above in both.
50
+ *
51
+ * Default `false`, deliberately unlike Flux's `true` — flipping a decorative
52
+ * hairline on by default would change the appearance of every existing card.
53
+ */
54
+ highlight?: boolean;
55
+ /**
56
+ * Card is a link or a grid tile: adds the hover lift + border/shadow
57
+ * response, and clips children to the rounded corners so a `Card.Media`
58
+ * sits flush.
59
+ */
60
+ interactive?: boolean;
61
+ }
62
+ interface CardMediaProps extends HTMLAttributes<HTMLDivElement> {
63
+ /** Image URL. Omit for a pure colour/gradient tile. */
64
+ src?: string;
65
+ alt?: string;
66
+ /** CSS `aspect-ratio`. Default `"16/9"`. Ignored when `height` is set. */
67
+ ratio?: string;
68
+ /** Fixed height instead of an aspect ratio. */
69
+ height?: number | string;
70
+ /**
71
+ * Shown UNDER the image — while it loads, and permanently if it never
72
+ * arrives. Any CSS background value, so a gradient works.
73
+ */
74
+ background?: string;
75
+ /** `object-position` for the image. Default `"center"`. */
76
+ objectPosition?: string;
77
+ loading?: "lazy" | "eager";
78
+ /** Slots pinned to the media's corners — a number chip, a status pill. */
79
+ topLeft?: ReactNode;
80
+ topRight?: ReactNode;
81
+ bottomLeft?: ReactNode;
82
+ bottomRight?: ReactNode;
83
+ }
84
+ /**
85
+ * Shared by `Card.Header` and `Card.Footer`.
86
+ *
87
+ * `heading` / `description` / `actions` exist so the common header does not
88
+ * need a layout wrapper from the caller. Two pages in this suite's own showcase
89
+ * were writing `<div style={{ display: "flex", justifyContent: "space-between"
90
+ * }}>` INSIDE a `Card.Header` — inline styles, in the app whose job is to
91
+ * demonstrate the kit. 136 headers there, and nothing in the kit laid one out.
92
+ *
93
+ * `children` is the escape hatch and it WINS: pass it and the three props are
94
+ * ignored rather than rendered alongside, so a caller who sets both gets one
95
+ * title instead of two.
96
+ */
97
+ interface CardSectionProps extends HTMLAttributes<HTMLDivElement> {
98
+ /** The title. Rendered through `<Heading>`. */
99
+ heading?: ReactNode;
100
+ /** Which heading element to render. Default `"h3"`. */
101
+ headingLevel?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
102
+ /** Supporting line under the heading. Rendered through muted `<Text>`. */
103
+ description?: ReactNode;
104
+ /** Controls pushed to the far end, vertically centred on the heading. */
105
+ actions?: ReactNode;
106
+ /**
107
+ * Only used when there is no `Card` above this — a standalone header takes
108
+ * its own size, because there is no card to inherit one from.
109
+ */
110
+ size?: CardSize;
111
+ /** Full control. Replaces heading/description/actions, keeps the frame. */
112
+ children?: ReactNode;
113
+ }
114
+ interface CardHeaderProps extends CardSectionProps {
115
+ }
116
+ interface CardFooterProps extends CardSectionProps {
117
+ }
118
+ interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {
119
+ }
120
+ interface CardBleedProps extends HTMLAttributes<HTMLDivElement> {
121
+ /**
122
+ * Which card edges to reach. Default `"x"` — the sides only, which is what
123
+ * an inline image or table wants.
124
+ */
125
+ edges?: CardBleedEdges;
126
+ }
127
+
128
+ declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>> & {
129
+ Media: react.ForwardRefExoticComponent<CardMediaProps & react.RefAttributes<HTMLDivElement>>;
130
+ Header: react.ForwardRefExoticComponent<CardHeaderProps & react.RefAttributes<HTMLDivElement>>;
131
+ Body: react.ForwardRefExoticComponent<CardBodyProps & react.RefAttributes<HTMLDivElement>>;
132
+ Footer: react.ForwardRefExoticComponent<CardFooterProps & react.RefAttributes<HTMLDivElement>>;
133
+ Bleed: react.ForwardRefExoticComponent<CardBleedProps & react.RefAttributes<HTMLDivElement>>;
134
+ };
135
+
136
+ export { type CardHeaderProps as C, type CardBodyProps as a, type CardFooterProps as b, type CardMediaProps as c, type CardBleedProps as d, Card as e, type CardBleedEdges as f, type CardPadding as g, type CardProps as h, type CardSectionProps as i, type CardSections as j, type CardSize as k };
package/dist/card.cjs CHANGED
@@ -1,29 +1,35 @@
1
1
  'use strict';
2
2
 
3
- var chunk5DQ2XUJI_cjs = require('./chunk-5DQ2XUJI.cjs');
3
+ var chunk5F6V5HHT_cjs = require('./chunk-5F6V5HHT.cjs');
4
+ require('./chunk-XLFGWNW4.cjs');
5
+ require('./chunk-65HKNZFG.cjs');
4
6
  require('./chunk-ZU5Q77OT.cjs');
5
7
 
6
8
 
7
9
 
8
10
  Object.defineProperty(exports, "Card", {
9
11
  enumerable: true,
10
- get: function () { return chunk5DQ2XUJI_cjs.Card; }
12
+ get: function () { return chunk5F6V5HHT_cjs.Card; }
13
+ });
14
+ Object.defineProperty(exports, "CardBleed", {
15
+ enumerable: true,
16
+ get: function () { return chunk5F6V5HHT_cjs.CardBleed; }
11
17
  });
12
18
  Object.defineProperty(exports, "CardBody", {
13
19
  enumerable: true,
14
- get: function () { return chunk5DQ2XUJI_cjs.CardBody; }
20
+ get: function () { return chunk5F6V5HHT_cjs.CardBody; }
15
21
  });
16
22
  Object.defineProperty(exports, "CardFooter", {
17
23
  enumerable: true,
18
- get: function () { return chunk5DQ2XUJI_cjs.CardFooter; }
24
+ get: function () { return chunk5F6V5HHT_cjs.CardFooter; }
19
25
  });
20
26
  Object.defineProperty(exports, "CardHeader", {
21
27
  enumerable: true,
22
- get: function () { return chunk5DQ2XUJI_cjs.CardHeader; }
28
+ get: function () { return chunk5F6V5HHT_cjs.CardHeader; }
23
29
  });
24
30
  Object.defineProperty(exports, "CardMedia", {
25
31
  enumerable: true,
26
- get: function () { return chunk5DQ2XUJI_cjs.CardMedia; }
32
+ get: function () { return chunk5F6V5HHT_cjs.CardMedia; }
27
33
  });
28
34
  //# sourceMappingURL=card.cjs.map
29
35
  //# sourceMappingURL=card.cjs.map
package/dist/card.d.cts CHANGED
@@ -1,11 +1,20 @@
1
- import { C as CardHeaderProps, a as CardBodyProps, b as CardFooterProps, c as CardMediaProps } from './Card-BZ5F6-wd.cjs';
2
- export { d as Card, e as CardProps } from './Card-BZ5F6-wd.cjs';
1
+ import { C as CardHeaderProps, a as CardBodyProps, b as CardFooterProps, c as CardMediaProps, d as CardBleedProps } from './Card-CuRZivBz.cjs';
2
+ export { e as Card, f as CardBleedEdges, g as CardPadding, h as CardProps, i as CardSectionProps, j as CardSections, k as CardSize } from './Card-CuRZivBz.cjs';
3
3
  import * as react from 'react';
4
4
 
5
+ /**
6
+ * A card's header. Also usable on its own, as a section heading above a card —
7
+ * see `CardSection`, which decides that from the absence of a `CardContext`.
8
+ */
5
9
  declare const CardHeader: react.ForwardRefExoticComponent<CardHeaderProps & react.RefAttributes<HTMLDivElement>>;
6
10
 
7
11
  declare const CardBody: react.ForwardRefExoticComponent<CardBodyProps & react.RefAttributes<HTMLDivElement>>;
8
12
 
13
+ /**
14
+ * A card's footer. Its rule sits on the TOP edge, and a lone `actions` block
15
+ * aligns to the end — matching `ModalFooter`, which has always done that while
16
+ * this component laid out nothing.
17
+ */
9
18
  declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & react.RefAttributes<HTMLDivElement>>;
10
19
 
11
20
  /**
@@ -26,4 +35,42 @@ declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & reac
26
35
  */
27
36
  declare const CardMedia: react.ForwardRefExoticComponent<CardMediaProps & react.RefAttributes<HTMLDivElement>>;
28
37
 
29
- export { CardBody, CardBodyProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps };
38
+ /**
39
+ * Run content out to the card's edges — an image, a table, a chart strip.
40
+ *
41
+ * ## Why this is arithmetic and not a CSS-variable protocol
42
+ *
43
+ * Flux solves the same problem with a published set of custom properties
44
+ * (`--flux-bleed-x`, `--flux-bleed-top`, …) that any child component may read.
45
+ * It has to: its padding sits on the CARD, so a descendant has no way to know
46
+ * how far it must reach. That is a public CSS API — a cross-package contract to
47
+ * version forever.
48
+ *
49
+ * Ours does not need one, because padding sits on the card's direct CHILDREN.
50
+ * The distance to the edge is therefore always one padding step, which the
51
+ * padded section passes down in context. No variables, nothing for a consumer
52
+ * to depend on, nothing to keep stable across releases.
53
+ *
54
+ * ## Two cases, and they are opposites
55
+ *
56
+ * - **Inside a `Card.Header` / `Card.Body` / `Card.Footer`** (the normal case):
57
+ * the padding is on that section, so reaching the edge is a NEGATIVE MARGIN.
58
+ * - **As a direct child of `Card`**: the padding is on this element, so
59
+ * reaching the edge is ZEROING it. A negative margin here would pull the
60
+ * content clean outside the card.
61
+ *
62
+ * A component cannot see its own depth, so the sections publish their padding
63
+ * step in context and its absence means "you are the padded element". Both
64
+ * cases read as "cancel the padding", which is exactly why picking either one
65
+ * alone ships looking correct in whichever demo the author happened to write.
66
+ *
67
+ * The distance comes from that context and NOT from the card's `size`, because
68
+ * the two disagree whenever `padding` is passed explicitly — and disagree by a
69
+ * whole step, which looks like a rendering bug rather than a prop conflict.
70
+ *
71
+ * Corners are rounded only where the content actually meets the card's edge, so
72
+ * a mid-body strip stays square while one at the top follows the card's radius.
73
+ */
74
+ declare const CardBleed: react.ForwardRefExoticComponent<CardBleedProps & react.RefAttributes<HTMLDivElement>>;
75
+
76
+ export { CardBleed, CardBleedProps, CardBody, CardBodyProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps };
package/dist/card.d.ts CHANGED
@@ -1,11 +1,20 @@
1
- import { C as CardHeaderProps, a as CardBodyProps, b as CardFooterProps, c as CardMediaProps } from './Card-BZ5F6-wd.js';
2
- export { d as Card, e as CardProps } from './Card-BZ5F6-wd.js';
1
+ import { C as CardHeaderProps, a as CardBodyProps, b as CardFooterProps, c as CardMediaProps, d as CardBleedProps } from './Card-CuRZivBz.js';
2
+ export { e as Card, f as CardBleedEdges, g as CardPadding, h as CardProps, i as CardSectionProps, j as CardSections, k as CardSize } from './Card-CuRZivBz.js';
3
3
  import * as react from 'react';
4
4
 
5
+ /**
6
+ * A card's header. Also usable on its own, as a section heading above a card —
7
+ * see `CardSection`, which decides that from the absence of a `CardContext`.
8
+ */
5
9
  declare const CardHeader: react.ForwardRefExoticComponent<CardHeaderProps & react.RefAttributes<HTMLDivElement>>;
6
10
 
7
11
  declare const CardBody: react.ForwardRefExoticComponent<CardBodyProps & react.RefAttributes<HTMLDivElement>>;
8
12
 
13
+ /**
14
+ * A card's footer. Its rule sits on the TOP edge, and a lone `actions` block
15
+ * aligns to the end — matching `ModalFooter`, which has always done that while
16
+ * this component laid out nothing.
17
+ */
9
18
  declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & react.RefAttributes<HTMLDivElement>>;
10
19
 
11
20
  /**
@@ -26,4 +35,42 @@ declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & reac
26
35
  */
27
36
  declare const CardMedia: react.ForwardRefExoticComponent<CardMediaProps & react.RefAttributes<HTMLDivElement>>;
28
37
 
29
- export { CardBody, CardBodyProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps };
38
+ /**
39
+ * Run content out to the card's edges — an image, a table, a chart strip.
40
+ *
41
+ * ## Why this is arithmetic and not a CSS-variable protocol
42
+ *
43
+ * Flux solves the same problem with a published set of custom properties
44
+ * (`--flux-bleed-x`, `--flux-bleed-top`, …) that any child component may read.
45
+ * It has to: its padding sits on the CARD, so a descendant has no way to know
46
+ * how far it must reach. That is a public CSS API — a cross-package contract to
47
+ * version forever.
48
+ *
49
+ * Ours does not need one, because padding sits on the card's direct CHILDREN.
50
+ * The distance to the edge is therefore always one padding step, which the
51
+ * padded section passes down in context. No variables, nothing for a consumer
52
+ * to depend on, nothing to keep stable across releases.
53
+ *
54
+ * ## Two cases, and they are opposites
55
+ *
56
+ * - **Inside a `Card.Header` / `Card.Body` / `Card.Footer`** (the normal case):
57
+ * the padding is on that section, so reaching the edge is a NEGATIVE MARGIN.
58
+ * - **As a direct child of `Card`**: the padding is on this element, so
59
+ * reaching the edge is ZEROING it. A negative margin here would pull the
60
+ * content clean outside the card.
61
+ *
62
+ * A component cannot see its own depth, so the sections publish their padding
63
+ * step in context and its absence means "you are the padded element". Both
64
+ * cases read as "cancel the padding", which is exactly why picking either one
65
+ * alone ships looking correct in whichever demo the author happened to write.
66
+ *
67
+ * The distance comes from that context and NOT from the card's `size`, because
68
+ * the two disagree whenever `padding` is passed explicitly — and disagree by a
69
+ * whole step, which looks like a rendering bug rather than a prop conflict.
70
+ *
71
+ * Corners are rounded only where the content actually meets the card's edge, so
72
+ * a mid-body strip stays square while one at the top follows the card's radius.
73
+ */
74
+ declare const CardBleed: react.ForwardRefExoticComponent<CardBleedProps & react.RefAttributes<HTMLDivElement>>;
75
+
76
+ export { CardBleed, CardBleedProps, CardBody, CardBodyProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps };
package/dist/card.js CHANGED
@@ -1,4 +1,6 @@
1
- export { Card, CardBody, CardFooter, CardHeader, CardMedia } from './chunk-ZIDBI6JX.js';
1
+ export { Card, CardBleed, CardBody, CardFooter, CardHeader, CardMedia } from './chunk-CF2U25LM.js';
2
+ import './chunk-5RLP77KK.js';
3
+ import './chunk-CESGP5AF.js';
2
4
  import './chunk-MMW2JGKZ.js';
3
5
  //# sourceMappingURL=card.js.map
4
6
  //# sourceMappingURL=card.js.map