@activecollab/components 2.0.369 → 2.0.370

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 (95) hide show
  1. package/dist/cjs/components/StackedCard/Glyphs.js +86 -0
  2. package/dist/cjs/components/StackedCard/Glyphs.js.map +1 -0
  3. package/dist/cjs/components/StackedCard/Primitives.js +129 -0
  4. package/dist/cjs/components/StackedCard/Primitives.js.map +1 -0
  5. package/dist/cjs/components/StackedCard/StackedCard.js +103 -0
  6. package/dist/cjs/components/StackedCard/StackedCard.js.map +1 -0
  7. package/dist/cjs/components/StackedCard/Styles.js +192 -0
  8. package/dist/cjs/components/StackedCard/Styles.js.map +1 -0
  9. package/dist/cjs/components/StackedCard/constants.js +54 -0
  10. package/dist/cjs/components/StackedCard/constants.js.map +1 -0
  11. package/dist/cjs/components/StackedCard/index.js +50 -0
  12. package/dist/cjs/components/StackedCard/index.js.map +1 -0
  13. package/dist/cjs/components/index.js +11 -0
  14. package/dist/cjs/components/index.js.map +1 -1
  15. package/dist/cjs/presentation/stackedCard/content/ImageCard.js +5 -6
  16. package/dist/cjs/presentation/stackedCard/content/ImageCard.js.map +1 -1
  17. package/dist/cjs/presentation/stackedCard/content/LinkCard.js +28 -23
  18. package/dist/cjs/presentation/stackedCard/content/LinkCard.js.map +1 -1
  19. package/dist/cjs/presentation/stackedCard/content/NoteCard.js +5 -5
  20. package/dist/cjs/presentation/stackedCard/content/NoteCard.js.map +1 -1
  21. package/dist/cjs/presentation/stackedCard/content/SwatchCard.js +7 -8
  22. package/dist/cjs/presentation/stackedCard/content/SwatchCard.js.map +1 -1
  23. package/dist/cjs/presentation/stackedCard/content/TaskCard.js +9 -10
  24. package/dist/cjs/presentation/stackedCard/content/TaskCard.js.map +1 -1
  25. package/dist/cjs/presentation/stackedCard/content/shared.js +27 -7
  26. package/dist/cjs/presentation/stackedCard/content/shared.js.map +1 -1
  27. package/dist/cjs/presentation/stackedCard/storyScaffold.js +8 -6
  28. package/dist/cjs/presentation/stackedCard/storyScaffold.js.map +1 -1
  29. package/dist/esm/components/StackedCard/Glyphs.d.ts +19 -0
  30. package/dist/esm/components/StackedCard/Glyphs.d.ts.map +1 -0
  31. package/dist/esm/components/StackedCard/Glyphs.js +72 -0
  32. package/dist/esm/components/StackedCard/Glyphs.js.map +1 -0
  33. package/dist/esm/components/StackedCard/Primitives.d.ts +91 -0
  34. package/dist/esm/components/StackedCard/Primitives.d.ts.map +1 -0
  35. package/dist/esm/components/StackedCard/Primitives.js +122 -0
  36. package/dist/esm/components/StackedCard/Primitives.js.map +1 -0
  37. package/dist/esm/components/StackedCard/StackedCard.d.ts +74 -0
  38. package/dist/esm/components/StackedCard/StackedCard.d.ts.map +1 -0
  39. package/dist/esm/components/StackedCard/StackedCard.js +95 -0
  40. package/dist/esm/components/StackedCard/StackedCard.js.map +1 -0
  41. package/dist/esm/components/StackedCard/Styles.d.ts +46 -0
  42. package/dist/esm/components/StackedCard/Styles.d.ts.map +1 -0
  43. package/dist/esm/components/StackedCard/Styles.js +186 -0
  44. package/dist/esm/components/StackedCard/Styles.js.map +1 -0
  45. package/dist/esm/components/StackedCard/constants.d.ts +37 -0
  46. package/dist/esm/components/StackedCard/constants.d.ts.map +1 -0
  47. package/dist/esm/components/StackedCard/constants.js +48 -0
  48. package/dist/esm/components/StackedCard/constants.js.map +1 -0
  49. package/dist/esm/components/StackedCard/index.d.ts +5 -0
  50. package/dist/esm/components/StackedCard/index.d.ts.map +1 -0
  51. package/dist/esm/components/StackedCard/index.js +5 -0
  52. package/dist/esm/components/StackedCard/index.js.map +1 -0
  53. package/dist/esm/components/index.d.ts +1 -0
  54. package/dist/esm/components/index.d.ts.map +1 -1
  55. package/dist/esm/components/index.js +1 -0
  56. package/dist/esm/components/index.js.map +1 -1
  57. package/dist/esm/presentation/stackedCard/content/ImageCard.d.ts.map +1 -1
  58. package/dist/esm/presentation/stackedCard/content/ImageCard.js +2 -3
  59. package/dist/esm/presentation/stackedCard/content/ImageCard.js.map +1 -1
  60. package/dist/esm/presentation/stackedCard/content/LinkCard.d.ts.map +1 -1
  61. package/dist/esm/presentation/stackedCard/content/LinkCard.js +14 -9
  62. package/dist/esm/presentation/stackedCard/content/LinkCard.js.map +1 -1
  63. package/dist/esm/presentation/stackedCard/content/NoteCard.js +1 -1
  64. package/dist/esm/presentation/stackedCard/content/NoteCard.js.map +1 -1
  65. package/dist/esm/presentation/stackedCard/content/SwatchCard.d.ts.map +1 -1
  66. package/dist/esm/presentation/stackedCard/content/SwatchCard.js +2 -3
  67. package/dist/esm/presentation/stackedCard/content/SwatchCard.js.map +1 -1
  68. package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts.map +1 -1
  69. package/dist/esm/presentation/stackedCard/content/TaskCard.js +1 -2
  70. package/dist/esm/presentation/stackedCard/content/TaskCard.js.map +1 -1
  71. package/dist/esm/presentation/stackedCard/content/shared.d.ts +15 -0
  72. package/dist/esm/presentation/stackedCard/content/shared.d.ts.map +1 -1
  73. package/dist/esm/presentation/stackedCard/content/shared.js +22 -2
  74. package/dist/esm/presentation/stackedCard/content/shared.js.map +1 -1
  75. package/dist/esm/presentation/stackedCard/storyScaffold.d.ts +8 -6
  76. package/dist/esm/presentation/stackedCard/storyScaffold.d.ts.map +1 -1
  77. package/dist/esm/presentation/stackedCard/storyScaffold.js +8 -6
  78. package/dist/esm/presentation/stackedCard/storyScaffold.js.map +1 -1
  79. package/dist/index.js +1213 -686
  80. package/dist/index.js.map +1 -1
  81. package/dist/index.min.js +1 -1
  82. package/dist/index.min.js.map +1 -1
  83. package/package.json +1 -1
  84. package/dist/cjs/presentation/stackedCard/primitives.js +0 -254
  85. package/dist/cjs/presentation/stackedCard/primitives.js.map +0 -1
  86. package/dist/cjs/presentation/stackedCard/shell.js +0 -165
  87. package/dist/cjs/presentation/stackedCard/shell.js.map +0 -1
  88. package/dist/esm/presentation/stackedCard/primitives.d.ts +0 -84
  89. package/dist/esm/presentation/stackedCard/primitives.d.ts.map +0 -1
  90. package/dist/esm/presentation/stackedCard/primitives.js +0 -241
  91. package/dist/esm/presentation/stackedCard/primitives.js.map +0 -1
  92. package/dist/esm/presentation/stackedCard/shell.d.ts +0 -46
  93. package/dist/esm/presentation/stackedCard/shell.d.ts.map +0 -1
  94. package/dist/esm/presentation/stackedCard/shell.js +0 -156
  95. package/dist/esm/presentation/stackedCard/shell.js.map +0 -1
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StackedCardResizeHandleGlyph = exports.StackedCardRemoveCoverGlyph = exports.StackedCardExpandGlyph = exports.StackedCardCollapseGlyph = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ /**
10
+ * StackedCard chrome glyphs.
11
+ *
12
+ * These are part of the card's own chrome — they act on the CARD (collapse the
13
+ * cover, remove the cover, resize the card), never on the entity a card
14
+ * represents. They ship with the component rather than coming from the icon
15
+ * collection so a facade never has to re-pick them and every stacked card
16
+ * reads the same.
17
+ */
18
+
19
+ /** Collapse the cover down to its thin strip. */
20
+ var StackedCardCollapseGlyph = exports.StackedCardCollapseGlyph = function StackedCardCollapseGlyph() {
21
+ return /*#__PURE__*/_react.default.createElement("svg", {
22
+ viewBox: "0 0 16 16",
23
+ fill: "none",
24
+ "aria-hidden": "true"
25
+ }, /*#__PURE__*/_react.default.createElement("path", {
26
+ d: "M6.5 2.5v4h-4M9.5 13.5v-4h4",
27
+ stroke: "currentColor",
28
+ strokeWidth: "1.5",
29
+ strokeLinecap: "round",
30
+ strokeLinejoin: "round"
31
+ }));
32
+ };
33
+
34
+ /** Expand a collapsed cover — the inverse of collapse, shown on the strip. */
35
+ var StackedCardExpandGlyph = exports.StackedCardExpandGlyph = function StackedCardExpandGlyph() {
36
+ return /*#__PURE__*/_react.default.createElement("svg", {
37
+ viewBox: "0 0 16 16",
38
+ fill: "none",
39
+ "aria-hidden": "true"
40
+ }, /*#__PURE__*/_react.default.createElement("path", {
41
+ d: "M2.5 6.5v-4h4M13.5 9.5v4h-4",
42
+ stroke: "currentColor",
43
+ strokeWidth: "1.5",
44
+ strokeLinecap: "round",
45
+ strokeLinejoin: "round"
46
+ }));
47
+ };
48
+
49
+ /** Drop the cover entirely. */
50
+ var StackedCardRemoveCoverGlyph = exports.StackedCardRemoveCoverGlyph = function StackedCardRemoveCoverGlyph() {
51
+ return /*#__PURE__*/_react.default.createElement("svg", {
52
+ viewBox: "0 0 16 16",
53
+ fill: "none",
54
+ "aria-hidden": "true"
55
+ }, /*#__PURE__*/_react.default.createElement("rect", {
56
+ x: "2.25",
57
+ y: "3.75",
58
+ width: "11.5",
59
+ height: "8.5",
60
+ rx: "1.5",
61
+ stroke: "currentColor",
62
+ strokeWidth: "1.5"
63
+ }), /*#__PURE__*/_react.default.createElement("path", {
64
+ d: "M6 9.5L10 6M10 9.5L6 6",
65
+ stroke: "currentColor",
66
+ strokeWidth: "1.5",
67
+ strokeLinecap: "round"
68
+ }));
69
+ };
70
+
71
+ /** The bottom-right resize grip. */
72
+ var StackedCardResizeHandleGlyph = exports.StackedCardResizeHandleGlyph = function StackedCardResizeHandleGlyph() {
73
+ return /*#__PURE__*/_react.default.createElement("svg", {
74
+ width: "14",
75
+ height: "14",
76
+ viewBox: "0 0 14 14",
77
+ fill: "none",
78
+ "aria-hidden": "true"
79
+ }, /*#__PURE__*/_react.default.createElement("path", {
80
+ d: "M12 6v6H6M12 9.5L9.5 12",
81
+ stroke: "currentColor",
82
+ strokeWidth: "1.5",
83
+ strokeLinecap: "round"
84
+ }));
85
+ };
86
+ //# sourceMappingURL=Glyphs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Glyphs.js","names":["_react","_interopRequireDefault","require","e","__esModule","default","StackedCardCollapseGlyph","exports","createElement","viewBox","fill","d","stroke","strokeWidth","strokeLinecap","strokeLinejoin","StackedCardExpandGlyph","StackedCardRemoveCoverGlyph","x","y","width","height","rx","StackedCardResizeHandleGlyph"],"sources":["../../../../src/components/StackedCard/Glyphs.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\n/**\n * StackedCard chrome glyphs.\n *\n * These are part of the card's own chrome — they act on the CARD (collapse the\n * cover, remove the cover, resize the card), never on the entity a card\n * represents. They ship with the component rather than coming from the icon\n * collection so a facade never has to re-pick them and every stacked card\n * reads the same.\n */\n\n/** Collapse the cover down to its thin strip. */\nexport const StackedCardCollapseGlyph = (): ReactElement => (\n <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M6.5 2.5v4h-4M9.5 13.5v-4h4\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\n/** Expand a collapsed cover — the inverse of collapse, shown on the strip. */\nexport const StackedCardExpandGlyph = (): ReactElement => (\n <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M2.5 6.5v-4h4M13.5 9.5v4h-4\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\n/** Drop the cover entirely. */\nexport const StackedCardRemoveCoverGlyph = (): ReactElement => (\n <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <rect\n x=\"2.25\"\n y=\"3.75\"\n width=\"11.5\"\n height=\"8.5\"\n rx=\"1.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n />\n <path\n d=\"M6 9.5L10 6M10 9.5L6 6\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n />\n </svg>\n);\n\n/** The bottom-right resize grip. */\nexport const StackedCardResizeHandleGlyph = (): ReactElement => (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <path\n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AAG,aAAA;IAAKC,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC,MAAM;IAAC,eAAY;EAAM,gBACrDV,MAAA,CAAAK,OAAA,CAAAG,aAAA;IACEU,CAAC,EAAC,MAAM;IACRC,CAAC,EAAC,MAAM;IACRC,KAAK,EAAC,MAAM;IACZC,MAAM,EAAC,KAAK;IACZC,EAAE,EAAC,KAAK;IACRV,MAAM,EAAC,cAAc;IACrBC,WAAW,EAAC;EAAK,CAClB,CAAC,eACFb,MAAA,CAAAK,OAAA,CAAAG,aAAA;IACEG,CAAC,EAAC,wBAAwB;IAC1BC,MAAM,EAAC,cAAc;IACrBC,WAAW,EAAC,KAAK;IACjBC,aAAa,EAAC;EAAO,CACtB,CACE,CAAC;AAAA,CACP;;AAED;AACO,IAAMS,4BAA4B,GAAAhB,OAAA,CAAAgB,4BAAA,GAAG,SAA/BA,4BAA4BA,CAAA;EAAA,oBACvCvB,MAAA,CAAAK,OAAA,CAAAG,aAAA;IACEY,KAAK,EAAC,IAAI;IACVC,MAAM,EAAC,IAAI;IACXZ,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAC,MAAM;IACX,eAAY;EAAM,gBAElBV,MAAA,CAAAK,OAAA,CAAAG,aAAA;IACEG,CAAC,EAAC,yBAAyB;IAC3BC,MAAM,EAAC,cAAc;IACrBC,WAAW,EAAC,KAAK;IACjBC,aAAa,EAAC;EAAO,CACtB,CACE,CAAC;AAAA,CACP","ignoreList":[]}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StackedCardStack = exports.StackedCardRow = exports.StackedCardPlayBadge = exports.StackedCardCoverButton = exports.StackedCardCover = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _classnames = _interopRequireDefault(require("classnames"));
9
+ var _constants = require("./constants");
10
+ var _Glyphs = require("./Glyphs");
11
+ var _Styles = require("./Styles");
12
+ var _excluded = ["role", "bleed", "direction", "background", "className", "children"];
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
15
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
16
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
17
+ /**
18
+ * StackedCard layout primitives.
19
+ *
20
+ * A stacked card is a portrait presentation of data: content stacks top to
21
+ * bottom in rows. There are three primitives and nothing else —
22
+ *
23
+ * - StackedCardStack — the vertical column. A card IS a stack of rows; the
24
+ * primitive is exported for nested stacks (a row that stacks internally).
25
+ * - StackedCardRow — the one layout primitive. Cover, title, meta, footer
26
+ * are all rows; a `role` sets the default padding so the anatomy stays
27
+ * predictable across every card type.
28
+ * - StackedCardCover — sugar for a bleed row that holds media, reserves its
29
+ * height with `aspect-ratio` so a late image never reflows the card, and
30
+ * carries two control slots (center + top-right).
31
+ */
32
+
33
+ /* ------------------------------------------------------------------ */
34
+ /* Stack */
35
+ /* ------------------------------------------------------------------ */
36
+
37
+ /** A vertical flex column with no padding of its own. */
38
+ var StackedCardStack = exports.StackedCardStack = _Styles.StyledStackedCardStack;
39
+
40
+ /* ------------------------------------------------------------------ */
41
+ /* Row */
42
+ /* ------------------------------------------------------------------ */
43
+
44
+ /**
45
+ * One row of a card's stack.
46
+ *
47
+ * In `row` direction the first level of children is distributed evenly along
48
+ * the X axis; a child carrying the `data-fixed` attribute keeps its own width
49
+ * and the rest share what remains.
50
+ */
51
+ var StackedCardRow = exports.StackedCardRow = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
52
+ var _ref$role = _ref.role,
53
+ role = _ref$role === void 0 ? "custom" : _ref$role,
54
+ bleed = _ref.bleed,
55
+ _ref$direction = _ref.direction,
56
+ direction = _ref$direction === void 0 ? "row" : _ref$direction,
57
+ background = _ref.background,
58
+ className = _ref.className,
59
+ children = _ref.children,
60
+ rest = _objectWithoutProperties(_ref, _excluded);
61
+ return /*#__PURE__*/_react.default.createElement(_Styles.StyledStackedCardRow, _extends({
62
+ ref: ref,
63
+ $role: role,
64
+ $bleed: bleed,
65
+ $direction: direction,
66
+ $background: background,
67
+ className: (0, _classnames.default)("c-stacked-card__row", "c-stacked-card__row--".concat(role), {
68
+ "c-stacked-card__row--bleed": bleed
69
+ }, className)
70
+ }, rest), children);
71
+ });
72
+ StackedCardRow.displayName = "StackedCardRow";
73
+
74
+ /* ------------------------------------------------------------------ */
75
+ /* Cover */
76
+ /* ------------------------------------------------------------------ */
77
+
78
+ /**
79
+ * A bleed row that holds media.
80
+ *
81
+ * Controls in either slot are revealed on hover OR focus-within, so they stay
82
+ * reachable by keyboard. Collapsed, the media box gives way to a strip that is
83
+ * itself the expand button.
84
+ */
85
+ var StackedCardCover = exports.StackedCardCover = function StackedCardCover(_ref2) {
86
+ var _ref2$aspectRatio = _ref2.aspectRatio,
87
+ aspectRatio = _ref2$aspectRatio === void 0 ? _constants.STACKED_CARD_COVER_RATIO : _ref2$aspectRatio,
88
+ centerSlot = _ref2.centerSlot,
89
+ topRightSlot = _ref2.topRightSlot,
90
+ collapsed = _ref2.collapsed,
91
+ collapsedStrip = _ref2.collapsedStrip,
92
+ onExpand = _ref2.onExpand,
93
+ _ref2$expandLabel = _ref2.expandLabel,
94
+ expandLabel = _ref2$expandLabel === void 0 ? "Expand cover" : _ref2$expandLabel,
95
+ className = _ref2.className,
96
+ children = _ref2.children;
97
+ return /*#__PURE__*/_react.default.createElement(StackedCardRow, {
98
+ role: "cover",
99
+ bleed: true,
100
+ className: (0, _classnames.default)("c-stacked-card__cover", className)
101
+ }, collapsed ? /*#__PURE__*/_react.default.createElement(_Styles.StyledStackedCardCollapsedStrip, {
102
+ type: "button",
103
+ "aria-label": expandLabel,
104
+ onClick: onExpand,
105
+ className: "c-stacked-card__cover-strip"
106
+ }, collapsedStrip, /*#__PURE__*/_react.default.createElement(_Styles.StyledStackedCardStripExpand, {
107
+ className: _constants.STACKED_CARD_CONTROL_CLASS,
108
+ "aria-hidden": "true"
109
+ }, /*#__PURE__*/_react.default.createElement(_Glyphs.StackedCardExpandGlyph, null))) : /*#__PURE__*/_react.default.createElement(_Styles.StyledStackedCardCoverMedia, {
110
+ $aspectRatio: aspectRatio,
111
+ className: "c-stacked-card__cover-media"
112
+ }, /*#__PURE__*/_react.default.createElement(_Styles.StyledStackedCardCoverFill, null, children), centerSlot ? /*#__PURE__*/_react.default.createElement(_Styles.StyledStackedCardCoverCenter, {
113
+ className: _constants.STACKED_CARD_CONTROL_CLASS
114
+ }, centerSlot) : null, topRightSlot ? /*#__PURE__*/_react.default.createElement(_Styles.StyledStackedCardCoverTopRight, {
115
+ className: _constants.STACKED_CARD_CONTROL_CLASS
116
+ }, topRightSlot) : null));
117
+ };
118
+ StackedCardCover.displayName = "StackedCardCover";
119
+
120
+ /* ------------------------------------------------------------------ */
121
+ /* Cover chrome */
122
+ /* ------------------------------------------------------------------ */
123
+
124
+ /** Centered media control (a play button). Drop the glyph inside. */
125
+ var StackedCardPlayBadge = exports.StackedCardPlayBadge = _Styles.StyledStackedCardPlayBadge;
126
+
127
+ /** Top-right cover-management button (collapse, remove …). */
128
+ var StackedCardCoverButton = exports.StackedCardCoverButton = _Styles.StyledStackedCardCoverButton;
129
+ //# sourceMappingURL=Primitives.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Primitives.js","names":["_react","_interopRequireDefault","require","_classnames","_constants","_Glyphs","_Styles","_excluded","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_objectWithoutProperties","o","i","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","StackedCardStack","exports","StyledStackedCardStack","StackedCardRow","React","forwardRef","_ref","ref","_ref$role","role","bleed","_ref$direction","direction","background","className","children","rest","createElement","StyledStackedCardRow","$role","$bleed","$direction","$background","classnames","concat","displayName","StackedCardCover","_ref2","_ref2$aspectRatio","aspectRatio","STACKED_CARD_COVER_RATIO","centerSlot","topRightSlot","collapsed","collapsedStrip","onExpand","_ref2$expandLabel","expandLabel","StyledStackedCardCollapsedStrip","type","onClick","StyledStackedCardStripExpand","STACKED_CARD_CONTROL_CLASS","StackedCardExpandGlyph","StyledStackedCardCoverMedia","$aspectRatio","StyledStackedCardCoverFill","StyledStackedCardCoverCenter","StyledStackedCardCoverTopRight","StackedCardPlayBadge","StyledStackedCardPlayBadge","StackedCardCoverButton","StyledStackedCardCoverButton"],"sources":["../../../../src/components/StackedCard/Primitives.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n STACKED_CARD_CONTROL_CLASS,\n STACKED_CARD_COVER_RATIO,\n StackedCardRowDirection,\n StackedCardRowRole,\n} from \"./constants\";\nimport { StackedCardExpandGlyph } from \"./Glyphs\";\nimport {\n StyledStackedCardCollapsedStrip,\n StyledStackedCardCoverButton,\n StyledStackedCardCoverCenter,\n StyledStackedCardCoverFill,\n StyledStackedCardCoverMedia,\n StyledStackedCardCoverTopRight,\n StyledStackedCardPlayBadge,\n StyledStackedCardRow,\n StyledStackedCardStack,\n StyledStackedCardStripExpand,\n} from \"./Styles\";\n\n/**\n * StackedCard layout primitives.\n *\n * A stacked card is a portrait presentation of data: content stacks top to\n * bottom in rows. There are three primitives and nothing else —\n *\n * - StackedCardStack — the vertical column. A card IS a stack of rows; the\n * primitive is exported for nested stacks (a row that stacks internally).\n * - StackedCardRow — the one layout primitive. Cover, title, meta, footer\n * are all rows; a `role` sets the default padding so the anatomy stays\n * predictable across every card type.\n * - StackedCardCover — sugar for a bleed row that holds media, reserves its\n * height with `aspect-ratio` so a late image never reflows the card, and\n * carries two control slots (center + top-right).\n */\n\n/* ------------------------------------------------------------------ */\n/* Stack */\n/* ------------------------------------------------------------------ */\n\n/** A vertical flex column with no padding of its own. */\nexport const StackedCardStack = StyledStackedCardStack;\n\n/* ------------------------------------------------------------------ */\n/* Row */\n/* ------------------------------------------------------------------ */\n\nexport interface IStackedCardRowProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"role\"> {\n /**\n * Named layout role → default padding. Defaults to `custom`.\n *\n * This shadows the DOM `role` attribute on purpose: a row is a layout\n * increment, and the concept's vocabulary for it is the role. Rows that need\n * an ARIA role should carry it on their own content.\n */\n role?: StackedCardRowRole;\n /** Zero the padding, overriding the role (media rows, edge-to-edge bands). */\n bleed?: boolean;\n /** Footer bands lay their children out vertically. Defaults to `row`. */\n direction?: StackedCardRowDirection;\n /** A row can carry its own background (a tinted footer band, a state tint). */\n background?: string;\n className?: string;\n children: ReactNode;\n}\n\n/**\n * One row of a card's stack.\n *\n * In `row` direction the first level of children is distributed evenly along\n * the X axis; a child carrying the `data-fixed` attribute keeps its own width\n * and the rest share what remains.\n */\nexport const StackedCardRow = React.forwardRef<\n HTMLDivElement,\n IStackedCardRowProps\n>(\n (\n {\n role = \"custom\",\n bleed,\n direction = \"row\",\n background,\n className,\n children,\n ...rest\n },\n ref\n ): ReactElement => (\n <StyledStackedCardRow\n ref={ref}\n $role={role}\n $bleed={bleed}\n $direction={direction}\n $background={background}\n className={classnames(\n \"c-stacked-card__row\",\n `c-stacked-card__row--${role}`,\n { \"c-stacked-card__row--bleed\": bleed },\n className\n )}\n {...rest}\n >\n {children}\n </StyledStackedCardRow>\n )\n);\n\nStackedCardRow.displayName = \"StackedCardRow\";\n\n/* ------------------------------------------------------------------ */\n/* Cover */\n/* ------------------------------------------------------------------ */\n\nexport interface IStackedCardCoverProps {\n /**\n * CSS `aspect-ratio` value that reserves the cover's height, e.g.\n * `\"260 / 132\"`. A ratio, not a pixel height, so the cover scales with the\n * card and holds its space before the media loads.\n */\n aspectRatio?: string;\n /** Center slot — the media control (a play button over audio/video). */\n centerSlot?: ReactNode;\n /** Top-right slot — cover management (collapse, remove). */\n topRightSlot?: ReactNode;\n /**\n * Render the thin collapsed strip instead of the media box. The collapse\n * CONTROL lives in the caller's `topRightSlot`; this flag is the resulting\n * visual state.\n */\n collapsed?: boolean;\n /**\n * What the collapsed strip shows — an ~8px colour bar, a favicon + domain\n * row. Content-specific, so the caller supplies it.\n */\n collapsedStrip?: ReactNode;\n /** Fired when the collapsed strip's expand affordance is activated. */\n onExpand?: () => void;\n /** Accessible label for the expand affordance. */\n expandLabel?: string;\n className?: string;\n /** The fill: an `<img>`, an inline `<svg>`, or a solid-colour box. */\n children: ReactNode;\n}\n\n/**\n * A bleed row that holds media.\n *\n * Controls in either slot are revealed on hover OR focus-within, so they stay\n * reachable by keyboard. Collapsed, the media box gives way to a strip that is\n * itself the expand button.\n */\nexport const StackedCardCover = ({\n aspectRatio = STACKED_CARD_COVER_RATIO,\n centerSlot,\n topRightSlot,\n collapsed,\n collapsedStrip,\n onExpand,\n expandLabel = \"Expand cover\",\n className,\n children,\n}: IStackedCardCoverProps): ReactElement => (\n <StackedCardRow\n role=\"cover\"\n bleed\n className={classnames(\"c-stacked-card__cover\", className)}\n >\n {collapsed ? (\n <StyledStackedCardCollapsedStrip\n type=\"button\"\n aria-label={expandLabel}\n onClick={onExpand}\n className=\"c-stacked-card__cover-strip\"\n >\n {collapsedStrip}\n <StyledStackedCardStripExpand\n className={STACKED_CARD_CONTROL_CLASS}\n aria-hidden=\"true\"\n >\n <StackedCardExpandGlyph />\n </StyledStackedCardStripExpand>\n </StyledStackedCardCollapsedStrip>\n ) : (\n <StyledStackedCardCoverMedia\n $aspectRatio={aspectRatio}\n className=\"c-stacked-card__cover-media\"\n >\n <StyledStackedCardCoverFill>{children}</StyledStackedCardCoverFill>\n {centerSlot ? (\n <StyledStackedCardCoverCenter className={STACKED_CARD_CONTROL_CLASS}>\n {centerSlot}\n </StyledStackedCardCoverCenter>\n ) : null}\n {topRightSlot ? (\n <StyledStackedCardCoverTopRight\n className={STACKED_CARD_CONTROL_CLASS}\n >\n {topRightSlot}\n </StyledStackedCardCoverTopRight>\n ) : null}\n </StyledStackedCardCoverMedia>\n )}\n </StackedCardRow>\n);\n\nStackedCardCover.displayName = \"StackedCardCover\";\n\n/* ------------------------------------------------------------------ */\n/* Cover chrome */\n/* ------------------------------------------------------------------ */\n\n/** Centered media control (a play button). Drop the glyph inside. */\nexport const StackedCardPlayBadge = StyledStackedCardPlayBadge;\n\n/** Top-right cover-management button (collapse, remove …). */\nexport const StackedCardCoverButton = StyledStackedCardCoverButton;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAMA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAWkB,IAAAK,SAAA;AAAA,SAAAN,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAA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jB,CAAC;AAAA,CAClB;AAEDN,gBAAgB,CAACD,WAAW,GAAG,kBAAkB;;AAEjD;AACA;AACA;;AAEA;AACO,IAAMwB,oBAAoB,GAAAhD,OAAA,CAAAgD,oBAAA,GAAGC,kCAA0B;;AAE9D;AACO,IAAMC,sBAAsB,GAAAlD,OAAA,CAAAkD,sBAAA,GAAGC,oCAA4B","ignoreList":[]}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StackedCard = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _classnames = _interopRequireDefault(require("classnames"));
9
+ var _constants = require("./constants");
10
+ var _Glyphs = require("./Glyphs");
11
+ var _Styles = require("./Styles");
12
+ var _excluded = ["selected", "disabled", "pending", "isDragSource", "isDragPreview", "entered", "forceHover", "resizable", "priorityColor", "onResizeDelta", "className", "children"];
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
16
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
17
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
18
+ /**
19
+ * StackedCard — the hollow shell for cards on drag-and-drop surfaces.
20
+ *
21
+ * This is NOT the base for cards in lists. It is the card for surfaces where
22
+ * dragging is a primary interaction: column boards and canvases. Content is
23
+ * laid out top to bottom in `StackedCardRow`s, which makes every card a
24
+ * portrait presentation of its data.
25
+ *
26
+ * ── The rule the whole subsystem hangs on ──────────────────────────────────
27
+ * THE SHELL STAYS HOLLOW. There is no `contentType` enum here, no per-type
28
+ * prop soup, no `if task …`. The shell owns only VISUAL STATES (selected,
29
+ * disabled, pending, priority, drag source/preview, entered) and one intent
30
+ * callback (`onResizeDelta`). Content is passed as `children` and composes the
31
+ * layout primitives. Typed cards — an ImageCard, a LinkCard, a TaskCard — are
32
+ * facades built on top of it in the consuming app, and adding one requires
33
+ * ZERO changes in this file.
34
+ *
35
+ * ── What the shell does NOT do ────────────────────────────────────────────
36
+ * It implements no drag-and-drop, no selection bookkeeping, no resize policy
37
+ * and no keyboard navigation. The card reports; the host decides. Drag
38
+ * choreography (the drag layer, the landing indicator, the drop) belongs to
39
+ * the host surface, which then feeds the result back as `isDragSource` /
40
+ * `isDragPreview`. The shell forwards its ref and spreads DOM props, so a host
41
+ * can attach `tabIndex`, ARIA, pointer and keyboard handlers to it.
42
+ *
43
+ * ── Theming ───────────────────────────────────────────────────────────────
44
+ * Colours resolve through `--sc-*` custom properties with built-in fallbacks:
45
+ * `--sc-selection-ring` (selection / focus / entered) and the cover scrim
46
+ * family `--sc-scrim`, `--sc-scrim-strong`, `--sc-scrim-fg`. Declare any of
47
+ * them on an ancestor to retint a whole surface.
48
+ */
49
+
50
+ var StackedCard = exports.StackedCard = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
51
+ var selected = _ref.selected,
52
+ disabled = _ref.disabled,
53
+ pending = _ref.pending,
54
+ isDragSource = _ref.isDragSource,
55
+ isDragPreview = _ref.isDragPreview,
56
+ entered = _ref.entered,
57
+ forceHover = _ref.forceHover,
58
+ resizable = _ref.resizable,
59
+ priorityColor = _ref.priorityColor,
60
+ onResizeDelta = _ref.onResizeDelta,
61
+ className = _ref.className,
62
+ children = _ref.children,
63
+ rest = _objectWithoutProperties(_ref, _excluded);
64
+ var dragOrigin = (0, _react.useRef)(null);
65
+ var handlePointerDown = (0, _react.useCallback)(function (e) {
66
+ dragOrigin.current = {
67
+ x: e.clientX,
68
+ y: e.clientY
69
+ };
70
+ e.target.setPointerCapture(e.pointerId);
71
+ e.preventDefault();
72
+ }, []);
73
+ var handlePointerMove = (0, _react.useCallback)(function (e) {
74
+ if (!dragOrigin.current || !onResizeDelta) return;
75
+ onResizeDelta(e.clientX - dragOrigin.current.x, e.clientY - dragOrigin.current.y);
76
+ dragOrigin.current = {
77
+ x: e.clientX,
78
+ y: e.clientY
79
+ };
80
+ }, [onResizeDelta]);
81
+ var handlePointerUp = (0, _react.useCallback)(function () {
82
+ dragOrigin.current = null;
83
+ }, []);
84
+ return /*#__PURE__*/_react.default.createElement(_Styles.StyledStackedCard, _extends({
85
+ ref: ref,
86
+ $selected: selected,
87
+ $disabled: disabled,
88
+ $pending: pending,
89
+ $isDragSource: isDragSource,
90
+ $isDragPreview: isDragPreview,
91
+ $entered: entered,
92
+ $forceHover: forceHover,
93
+ $priorityColor: priorityColor,
94
+ className: (0, _classnames.default)("c-stacked-card", className)
95
+ }, rest), children, resizable ? /*#__PURE__*/_react.default.createElement(_Styles.StyledStackedCardResizeHandle, {
96
+ className: (0, _classnames.default)("c-stacked-card__resize-handle", _constants.STACKED_CARD_CONTROL_CLASS),
97
+ onPointerDown: handlePointerDown,
98
+ onPointerMove: handlePointerMove,
99
+ onPointerUp: handlePointerUp
100
+ }, /*#__PURE__*/_react.default.createElement(_Glyphs.StackedCardResizeHandleGlyph, null)) : null);
101
+ });
102
+ StackedCard.displayName = "StackedCard";
103
+ //# sourceMappingURL=StackedCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StackedCard.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_constants","_Glyphs","_Styles","_excluded","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","StackedCard","exports","React","forwardRef","_ref","ref","selected","disabled","pending","isDragSource","isDragPreview","entered","forceHover","resizable","priorityColor","onResizeDelta","className","children","rest","dragOrigin","useRef","handlePointerDown","useCallback","current","x","clientX","y","clientY","target","setPointerCapture","pointerId","preventDefault","handlePointerMove","handlePointerUp","createElement","StyledStackedCard","$selected","$disabled","$pending","$isDragSource","$isDragPreview","$entered","$forceHover","$priorityColor","classnames","StyledStackedCardResizeHandle","STACKED_CARD_CONTROL_CLASS","onPointerDown","onPointerMove","onPointerUp","StackedCardResizeHandleGlyph","displayName"],"sources":["../../../../src/components/StackedCard/StackedCard.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useCallback, useRef } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { STACKED_CARD_CONTROL_CLASS } from \"./constants\";\nimport { StackedCardResizeHandleGlyph } from \"./Glyphs\";\nimport { StyledStackedCard, StyledStackedCardResizeHandle } from \"./Styles\";\n\n/**\n * StackedCard — the hollow shell for cards on drag-and-drop surfaces.\n *\n * This is NOT the base for cards in lists. It is the card for surfaces where\n * dragging is a primary interaction: column boards and canvases. Content is\n * laid out top to bottom in `StackedCardRow`s, which makes every card a\n * portrait presentation of its data.\n *\n * ── The rule the whole subsystem hangs on ──────────────────────────────────\n * THE SHELL STAYS HOLLOW. There is no `contentType` enum here, no per-type\n * prop soup, no `if task …`. The shell owns only VISUAL STATES (selected,\n * disabled, pending, priority, drag source/preview, entered) and one intent\n * callback (`onResizeDelta`). Content is passed as `children` and composes the\n * layout primitives. Typed cards — an ImageCard, a LinkCard, a TaskCard — are\n * facades built on top of it in the consuming app, and adding one requires\n * ZERO changes in this file.\n *\n * ── What the shell does NOT do ────────────────────────────────────────────\n * It implements no drag-and-drop, no selection bookkeeping, no resize policy\n * and no keyboard navigation. The card reports; the host decides. Drag\n * choreography (the drag layer, the landing indicator, the drop) belongs to\n * the host surface, which then feeds the result back as `isDragSource` /\n * `isDragPreview`. The shell forwards its ref and spreads DOM props, so a host\n * can attach `tabIndex`, ARIA, pointer and keyboard handlers to it.\n *\n * ── Theming ───────────────────────────────────────────────────────────────\n * Colours resolve through `--sc-*` custom properties with built-in fallbacks:\n * `--sc-selection-ring` (selection / focus / entered) and the cover scrim\n * family `--sc-scrim`, `--sc-scrim-strong`, `--sc-scrim-fg`. Declare any of\n * them on an ancestor to retint a whole surface.\n */\n\nexport interface IStackedCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onResize\"> {\n /** Host-owned selection state — a ring around the card. */\n selected?: boolean;\n /** Policy state: the card cannot be acted on. Dimmed, inert. */\n disabled?: boolean;\n /**\n * Optimistic in-flight state — created or moved, not yet confirmed. Dimmed,\n * non-interactive and not draggable, but distinct from `disabled`: it is\n * transient, not a policy.\n */\n pending?: boolean;\n /**\n * The full-size outline placeholder left behind in the source position while\n * a drag is in flight. Content is hidden but keeps its box, so neighbouring\n * cards never move.\n */\n isDragSource?: boolean;\n /**\n * The 1:1 copy the host floats in its drag layer. Elevated shadow only — no\n * tilt, no scale, no translate.\n */\n isDragPreview?: boolean;\n /** Focus model: the card has been entered and focus is on an inner control. */\n entered?: boolean;\n /** Pin the hover treatment on, including revealed controls. For docs and specs. */\n forceHover?: boolean;\n /** Show the bottom-right resize grip. Opt-in, off by default. */\n resizable?: boolean;\n /**\n * Draws the emphasis border down the left edge. A data colour, passed in by\n * the caller (high priority, a label colour) — never baked into the shell.\n */\n priorityColor?: string;\n /**\n * Fired while the resize grip is dragged, with the pointer delta since the\n * last event. The card reports the deltas; the host decides what they mean.\n */\n onResizeDelta?: (dx: number, dy: number) => void;\n children: ReactNode;\n}\n\nexport const StackedCard = React.forwardRef<HTMLDivElement, IStackedCardProps>(\n (\n {\n selected,\n disabled,\n pending,\n isDragSource,\n isDragPreview,\n entered,\n forceHover,\n resizable,\n priorityColor,\n onResizeDelta,\n className,\n children,\n ...rest\n },\n ref\n ): ReactElement => {\n const dragOrigin = useRef<{ x: number; y: number } | null>(null);\n\n const handlePointerDown = useCallback((e: React.PointerEvent) => {\n dragOrigin.current = { x: e.clientX, y: e.clientY };\n (e.target as HTMLElement).setPointerCapture(e.pointerId);\n e.preventDefault();\n }, []);\n\n const handlePointerMove = useCallback(\n (e: React.PointerEvent) => {\n if (!dragOrigin.current || !onResizeDelta) return;\n onResizeDelta(\n e.clientX - dragOrigin.current.x,\n e.clientY - dragOrigin.current.y\n );\n dragOrigin.current = { x: e.clientX, y: e.clientY };\n },\n [onResizeDelta]\n );\n\n const handlePointerUp = useCallback(() => {\n dragOrigin.current = null;\n }, []);\n\n return (\n <StyledStackedCard\n ref={ref}\n $selected={selected}\n $disabled={disabled}\n $pending={pending}\n $isDragSource={isDragSource}\n $isDragPreview={isDragPreview}\n $entered={entered}\n $forceHover={forceHover}\n $priorityColor={priorityColor}\n className={classnames(\"c-stacked-card\", className)}\n {...rest}\n >\n {children}\n {resizable ? (\n <StyledStackedCardResizeHandle\n className={classnames(\n \"c-stacked-card__resize-handle\",\n STACKED_CARD_CONTROL_CLASS\n )}\n onPointerDown={handlePointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerUp}\n >\n <StackedCardResizeHandleGlyph />\n </StyledStackedCardResizeHandle>\n ) : null}\n </StyledStackedCard>\n );\n }\n);\n\nStackedCard.displayName = \"StackedCard\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,gBAE7BzE,MAAA,CAAAW,OAAA,CAAA+D,aAAA,CAACpE,OAAA,CAAAoF,4BAA4B,MAAE,CACF,CAAC,GAC9B,IACa,CAAC;AAExB,CACF,CAAC;AAEDlD,WAAW,CAACmD,WAAW,GAAG,aAAa","ignoreList":[]}
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledStackedCardStripExpand = exports.StyledStackedCardStack = exports.StyledStackedCardRow = exports.StyledStackedCardResizeHandle = exports.StyledStackedCardPlayBadge = exports.StyledStackedCardCoverTopRight = exports.StyledStackedCardCoverMedia = exports.StyledStackedCardCoverFill = exports.StyledStackedCardCoverCenter = exports.StyledStackedCardCoverButton = exports.StyledStackedCardCollapsedStrip = exports.StyledStackedCard = void 0;
7
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
+ var _constants = require("./constants");
9
+ var _BoxSizingStyle = require("../BoxSizingStyle");
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
11
+ /**
12
+ * Theming hooks.
13
+ *
14
+ * Every colour a StackedCard part needs is read through a `--sc-*` custom
15
+ * property with a built-in fallback, so the component looks right standing on
16
+ * its own and a host surface can still retint it by declaring the variable on
17
+ * any ancestor. No rgba/hex is baked into a rule; data colours (a swatch value,
18
+ * a priority colour) are always passed in by the caller.
19
+ */
20
+ var SELECTION_RING = "var(--sc-selection-ring, var(--color-primary-500))";
21
+ var SCRIM = "var(--sc-scrim, rgba(0, 0, 0, 0.55))";
22
+ var SCRIM_STRONG = "var(--sc-scrim-strong, rgba(0, 0, 0, 0.72))";
23
+ var SCRIM_FG = "var(--sc-scrim-fg, #ffffff)";
24
+
25
+ /** Selector for anything carrying the control class. */
26
+ var CONTROL = ".".concat(_constants.STACKED_CARD_CONTROL_CLASS);
27
+
28
+ /**
29
+ * The one reveal rule the whole subsystem shares: controls are hidden until the
30
+ * card (or the cover) is hovered OR holds focus. The focus path is what keeps
31
+ * them reachable by keyboard instead of mouse-only.
32
+ */
33
+ var revealControls = (0, _styledComponents.css)(["", "{opacity:0;transition:opacity 120ms ease;}&:hover ", ",&:focus-within ", "{opacity:1;}"], CONTROL, CONTROL, CONTROL);
34
+
35
+ /* ------------------------------------------------------------------ */
36
+ /* Stack — the vertical column. A card is a Stack of rows. */
37
+ /* ------------------------------------------------------------------ */
38
+
39
+ var StyledStackedCardStack = exports.StyledStackedCardStack = _styledComponents.default.div.withConfig({
40
+ displayName: "Styles__StyledStackedCardStack",
41
+ componentId: "sc-vnqm9x-0"
42
+ })(["", " position:relative;display:flex;flex-direction:column;"], _BoxSizingStyle.BoxSizingStyle);
43
+ StyledStackedCardStack.displayName = "StyledStackedCardStack";
44
+
45
+ /* ------------------------------------------------------------------ */
46
+ /* Row — the only layout primitive, differentiated by `role`. */
47
+ /* ------------------------------------------------------------------ */
48
+
49
+ var StyledStackedCardRow = exports.StyledStackedCardRow = _styledComponents.default.div.withConfig({
50
+ displayName: "Styles__StyledStackedCardRow",
51
+ componentId: "sc-vnqm9x-1"
52
+ })(["", " position:relative;display:flex;flex-direction:", ";align-items:", ";gap:", ";padding:", ";", " ", ""], _BoxSizingStyle.BoxSizingStyle, function (_ref) {
53
+ var $direction = _ref.$direction;
54
+ return $direction;
55
+ }, function (_ref2) {
56
+ var $direction = _ref2.$direction;
57
+ return $direction === "column" ? "stretch" : "center";
58
+ }, function (_ref3) {
59
+ var $direction = _ref3.$direction;
60
+ return $direction === "column" ? "4px" : "8px";
61
+ }, function (_ref4) {
62
+ var $role = _ref4.$role,
63
+ $bleed = _ref4.$bleed;
64
+ return $bleed ? "0" : _constants.STACKED_CARD_ROLE_PADDING[$role];
65
+ }, function (_ref5) {
66
+ var $background = _ref5.$background;
67
+ return $background && (0, _styledComponents.css)(["background:", ";"], $background);
68
+ }, function (_ref6) {
69
+ var $direction = _ref6.$direction;
70
+ return $direction === "row" && (0, _styledComponents.css)(["> *{flex:1 1 0;min-width:0;}> [", "]{flex:0 0 auto;}"], _constants.STACKED_CARD_FIXED_ATTR);
71
+ });
72
+ StyledStackedCardRow.displayName = "StyledStackedCardRow";
73
+
74
+ /* ------------------------------------------------------------------ */
75
+ /* Cover — a bleed row that holds media. */
76
+ /* ------------------------------------------------------------------ */
77
+
78
+ /**
79
+ * The media box reserves its height with `aspect-ratio` so the image (or the
80
+ * skeleton standing in for it) never reflows the card when it arrives.
81
+ */
82
+ var StyledStackedCardCoverMedia = exports.StyledStackedCardCoverMedia = _styledComponents.default.div.withConfig({
83
+ displayName: "Styles__StyledStackedCardCoverMedia",
84
+ componentId: "sc-vnqm9x-2"
85
+ })(["position:relative;width:100%;aspect-ratio:", ";overflow:hidden;", ""], function (_ref7) {
86
+ var $aspectRatio = _ref7.$aspectRatio;
87
+ return $aspectRatio;
88
+ }, revealControls);
89
+ StyledStackedCardCoverMedia.displayName = "StyledStackedCardCoverMedia";
90
+
91
+ /* The fill (an <img>, an inline <svg> wrapper, or a solid-colour box) is laid
92
+ over the reserved box and made to cover it. */
93
+ var StyledStackedCardCoverFill = exports.StyledStackedCardCoverFill = _styledComponents.default.div.withConfig({
94
+ displayName: "Styles__StyledStackedCardCoverFill",
95
+ componentId: "sc-vnqm9x-3"
96
+ })(["position:absolute;inset:0;> *{width:100%;height:100%;}> img{display:block;object-fit:cover;}"]);
97
+ StyledStackedCardCoverFill.displayName = "StyledStackedCardCoverFill";
98
+ var StyledStackedCardCoverCenter = exports.StyledStackedCardCoverCenter = _styledComponents.default.div.withConfig({
99
+ displayName: "Styles__StyledStackedCardCoverCenter",
100
+ componentId: "sc-vnqm9x-4"
101
+ })(["position:absolute;inset:0;display:flex;align-items:center;justify-content:center;"]);
102
+ StyledStackedCardCoverCenter.displayName = "StyledStackedCardCoverCenter";
103
+ var StyledStackedCardCoverTopRight = exports.StyledStackedCardCoverTopRight = _styledComponents.default.div.withConfig({
104
+ displayName: "Styles__StyledStackedCardCoverTopRight",
105
+ componentId: "sc-vnqm9x-5"
106
+ })(["position:absolute;top:8px;right:8px;display:flex;gap:6px;"]);
107
+ StyledStackedCardCoverTopRight.displayName = "StyledStackedCardCoverTopRight";
108
+
109
+ /**
110
+ * Collapsed cover — the media box gives way to a thin strip. The strip IS the
111
+ * expand affordance: the whole bar is a button and a chevron hint is revealed
112
+ * on hover or focus. It reserves no height of its own; the caller's
113
+ * `collapsedStrip` (an ~8px colour bar, a favicon + domain row) sets how tall
114
+ * it reads.
115
+ */
116
+ var StyledStackedCardCollapsedStrip = exports.StyledStackedCardCollapsedStrip = _styledComponents.default.button.withConfig({
117
+ displayName: "Styles__StyledStackedCardCollapsedStrip",
118
+ componentId: "sc-vnqm9x-6"
119
+ })(["", " position:relative;display:flex;align-items:center;width:100%;min-height:16px;padding:0;border:0;background:transparent;cursor:pointer;text-align:left;", "{opacity:0;transition:opacity 120ms ease;}&:hover ", ",&:focus-visible ", "{opacity:1;}&:focus-visible{outline:2px solid ", ";outline-offset:-2px;}"], _BoxSizingStyle.BoxSizingStyle, CONTROL, CONTROL, CONTROL, SELECTION_RING);
120
+ StyledStackedCardCollapsedStrip.displayName = "StyledStackedCardCollapsedStrip";
121
+
122
+ /* The expand chevron sits at the right, vertically centred, so it reads the
123
+ same whether the strip is a hairline colour bar or a taller favicon row. */
124
+ var StyledStackedCardStripExpand = exports.StyledStackedCardStripExpand = _styledComponents.default.span.withConfig({
125
+ displayName: "Styles__StyledStackedCardStripExpand",
126
+ componentId: "sc-vnqm9x-7"
127
+ })(["position:absolute;top:50%;right:8px;transform:translateY(-50%);display:inline-flex;width:16px;height:16px;color:var(--color-theme-600);svg{width:14px;height:14px;}"]);
128
+ StyledStackedCardStripExpand.displayName = "StyledStackedCardStripExpand";
129
+
130
+ /* ------------------------------------------------------------------ */
131
+ /* Cover chrome — scrim-backed controls that sit over media */
132
+ /* ------------------------------------------------------------------ */
133
+
134
+ /** Centered media control (a play button). The caller drops the glyph inside. */
135
+ var StyledStackedCardPlayBadge = exports.StyledStackedCardPlayBadge = _styledComponents.default.span.withConfig({
136
+ displayName: "Styles__StyledStackedCardPlayBadge",
137
+ componentId: "sc-vnqm9x-8"
138
+ })(["display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;background:", ";color:", ";svg{fill:currentColor;width:20px;height:20px;margin-left:2px;}"], SCRIM, SCRIM_FG);
139
+ StyledStackedCardPlayBadge.displayName = "StyledStackedCardPlayBadge";
140
+
141
+ /** Top-right cover-management button (collapse, remove …). */
142
+ var StyledStackedCardCoverButton = exports.StyledStackedCardCoverButton = _styledComponents.default.button.withConfig({
143
+ displayName: "Styles__StyledStackedCardCoverButton",
144
+ componentId: "sc-vnqm9x-9"
145
+ })(["", " display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:0;border-radius:8px;cursor:pointer;color:", ";background:", ";svg{width:16px;height:16px;display:block;}&:hover{background:", ";}"], _BoxSizingStyle.BoxSizingStyle, SCRIM_FG, SCRIM, SCRIM_STRONG);
146
+ StyledStackedCardCoverButton.displayName = "StyledStackedCardCoverButton";
147
+
148
+ /* ------------------------------------------------------------------ */
149
+ /* Resize (opt-in): handle on hover, the card only reports deltas */
150
+ /* ------------------------------------------------------------------ */
151
+
152
+ var StyledStackedCardResizeHandle = exports.StyledStackedCardResizeHandle = _styledComponents.default.span.withConfig({
153
+ displayName: "Styles__StyledStackedCardResizeHandle",
154
+ componentId: "sc-vnqm9x-10"
155
+ })(["position:absolute;right:2px;bottom:2px;width:14px;height:14px;cursor:nwse-resize;color:var(--color-theme-600);z-index:2;svg{display:block;}"]);
156
+ StyledStackedCardResizeHandle.displayName = "StyledStackedCardResizeHandle";
157
+
158
+ /* ------------------------------------------------------------------ */
159
+ /* The shell */
160
+ /* ------------------------------------------------------------------ */
161
+
162
+ var hoverStyle = (0, _styledComponents.css)(["box-shadow:0 4px 12px rgba(0,0,0,0.12);border-color:var(--color-theme-500);"]);
163
+ var StyledStackedCard = exports.StyledStackedCard = _styledComponents.default.div.withConfig({
164
+ displayName: "Styles__StyledStackedCard",
165
+ componentId: "sc-vnqm9x-11"
166
+ })(["", " position:relative;display:flex;flex-direction:column;width:", "px;border-radius:", "px;background-color:var(--page-paper-main);border:1px solid var(--border-primary);box-shadow:0 1px 3px rgba(0,0,0,0.08);overflow:hidden;transition:box-shadow 150ms ease,border-color 150ms ease;", " &:hover{", "}&:focus-visible{outline:none;", " box-shadow:0 0 0 2px ", ";}", " ", " ", " ", " ", " ", " ", " ", ""], _BoxSizingStyle.BoxSizingStyle, _constants.STACKED_CARD_WIDTH, _constants.STACKED_CARD_RADIUS, revealControls, hoverStyle, hoverStyle, SELECTION_RING, function (_ref8) {
167
+ var $forceHover = _ref8.$forceHover;
168
+ return $forceHover && (0, _styledComponents.css)(["", " && ", "{opacity:1;}"], hoverStyle, CONTROL);
169
+ }, function (_ref9) {
170
+ var $priorityColor = _ref9.$priorityColor;
171
+ return $priorityColor && (0, _styledComponents.css)(["&::before{content:\"\";position:absolute;top:0;bottom:0;left:0;width:4px;background:", ";z-index:2;}"], $priorityColor);
172
+ }, function (_ref0) {
173
+ var $selected = _ref0.$selected;
174
+ return $selected && (0, _styledComponents.css)(["border-color:", ";box-shadow:0 0 0 2px ", ";"], SELECTION_RING, SELECTION_RING);
175
+ }, function (_ref1) {
176
+ var $disabled = _ref1.$disabled;
177
+ return $disabled && (0, _styledComponents.css)(["opacity:0.5;pointer-events:none;"]);
178
+ }, function (_ref10) {
179
+ var $pending = _ref10.$pending;
180
+ return $pending && (0, _styledComponents.css)(["opacity:0.6;pointer-events:none;cursor:progress;"]);
181
+ }, function (_ref11) {
182
+ var $isDragSource = _ref11.$isDragSource;
183
+ return $isDragSource && (0, _styledComponents.css)(["background:transparent;border:1px dashed var(--color-theme-500);box-shadow:none;&:hover{box-shadow:none;border-color:var(--color-theme-500);}> *{visibility:hidden;}"]);
184
+ }, function (_ref12) {
185
+ var $isDragPreview = _ref12.$isDragPreview;
186
+ return $isDragPreview && (0, _styledComponents.css)(["box-shadow:0 12px 28px rgba(0,0,0,0.24);cursor:grabbing;"]);
187
+ }, function (_ref13) {
188
+ var $entered = _ref13.$entered;
189
+ return $entered && (0, _styledComponents.css)(["&&{border-color:", ";box-shadow:inset 0 0 0 2px ", ",0 0 0 2px ", ";}"], SELECTION_RING, SELECTION_RING, SELECTION_RING);
190
+ });
191
+ StyledStackedCard.displayName = "StyledStackedCard";
192
+ //# sourceMappingURL=Styles.js.map