@activecollab/components 2.0.363 → 2.0.365
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/presentation/shared/index.js +37 -1
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/cjs/presentation/shared/settings.js +91 -0
- package/dist/cjs/presentation/shared/settings.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/content/ImageCard.js +60 -0
- package/dist/cjs/presentation/stackedCard/content/ImageCard.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/content/LinkCard.js +348 -0
- package/dist/cjs/presentation/stackedCard/content/LinkCard.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/content/NoteCard.js +92 -0
- package/dist/cjs/presentation/stackedCard/content/NoteCard.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/content/SwatchCard.js +74 -0
- package/dist/cjs/presentation/stackedCard/content/SwatchCard.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/content/TaskCard.js +231 -0
- package/dist/cjs/presentation/stackedCard/content/TaskCard.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/content/index.js +83 -0
- package/dist/cjs/presentation/stackedCard/content/index.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/content/shared.js +144 -0
- package/dist/cjs/presentation/stackedCard/content/shared.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/content/unfurl.js +172 -0
- package/dist/cjs/presentation/stackedCard/content/unfurl.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/primitives.js +254 -0
- package/dist/cjs/presentation/stackedCard/primitives.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/resizePolicy.js +183 -0
- package/dist/cjs/presentation/stackedCard/resizePolicy.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/shell.js +165 -0
- package/dist/cjs/presentation/stackedCard/shell.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/storyScaffold.js +72 -0
- package/dist/cjs/presentation/stackedCard/storyScaffold.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/useInlineEdit.js +208 -0
- package/dist/cjs/presentation/stackedCard/useInlineEdit.js.map +1 -0
- package/dist/esm/presentation/shared/index.d.ts +2 -0
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +1 -0
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/esm/presentation/shared/settings.d.ts +33 -0
- package/dist/esm/presentation/shared/settings.d.ts.map +1 -0
- package/dist/esm/presentation/shared/settings.js +84 -0
- package/dist/esm/presentation/shared/settings.js.map +1 -0
- package/dist/esm/presentation/stackedCard/content/ImageCard.d.ts +15 -0
- package/dist/esm/presentation/stackedCard/content/ImageCard.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/content/ImageCard.js +50 -0
- package/dist/esm/presentation/stackedCard/content/ImageCard.js.map +1 -0
- package/dist/esm/presentation/stackedCard/content/LinkCard.d.ts +28 -0
- package/dist/esm/presentation/stackedCard/content/LinkCard.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/content/LinkCard.js +336 -0
- package/dist/esm/presentation/stackedCard/content/LinkCard.js.map +1 -0
- package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts +10 -0
- package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/content/NoteCard.js +82 -0
- package/dist/esm/presentation/stackedCard/content/NoteCard.js.map +1 -0
- package/dist/esm/presentation/stackedCard/content/SwatchCard.d.ts +14 -0
- package/dist/esm/presentation/stackedCard/content/SwatchCard.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/content/SwatchCard.js +64 -0
- package/dist/esm/presentation/stackedCard/content/SwatchCard.js.map +1 -0
- package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts +29 -0
- package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/content/TaskCard.js +218 -0
- package/dist/esm/presentation/stackedCard/content/TaskCard.js.map +1 -0
- package/dist/esm/presentation/stackedCard/content/index.d.ts +8 -0
- package/dist/esm/presentation/stackedCard/content/index.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/content/index.js +8 -0
- package/dist/esm/presentation/stackedCard/content/index.js.map +1 -0
- package/dist/esm/presentation/stackedCard/content/shared.d.ts +46 -0
- package/dist/esm/presentation/stackedCard/content/shared.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/content/shared.js +134 -0
- package/dist/esm/presentation/stackedCard/content/shared.js.map +1 -0
- package/dist/esm/presentation/stackedCard/content/unfurl.d.ts +89 -0
- package/dist/esm/presentation/stackedCard/content/unfurl.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/content/unfurl.js +147 -0
- package/dist/esm/presentation/stackedCard/content/unfurl.js.map +1 -0
- package/dist/esm/presentation/stackedCard/primitives.d.ts +84 -0
- package/dist/esm/presentation/stackedCard/primitives.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/primitives.js +241 -0
- package/dist/esm/presentation/stackedCard/primitives.js.map +1 -0
- package/dist/esm/presentation/stackedCard/resizePolicy.d.ts +97 -0
- package/dist/esm/presentation/stackedCard/resizePolicy.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/resizePolicy.js +173 -0
- package/dist/esm/presentation/stackedCard/resizePolicy.js.map +1 -0
- package/dist/esm/presentation/stackedCard/shell.d.ts +46 -0
- package/dist/esm/presentation/stackedCard/shell.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/shell.js +156 -0
- package/dist/esm/presentation/stackedCard/shell.js.map +1 -0
- package/dist/esm/presentation/stackedCard/storyScaffold.d.ts +28 -0
- package/dist/esm/presentation/stackedCard/storyScaffold.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/storyScaffold.js +66 -0
- package/dist/esm/presentation/stackedCard/storyScaffold.js.map +1 -0
- package/dist/esm/presentation/stackedCard/useInlineEdit.d.ts +68 -0
- package/dist/esm/presentation/stackedCard/useInlineEdit.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/useInlineEdit.js +192 -0
- package/dist/esm/presentation/stackedCard/useInlineEdit.js.map +1 -0
- package/package.json +1 -1
|
@@ -36,7 +36,12 @@ var _exportNames = {
|
|
|
36
36
|
UserMenu: true,
|
|
37
37
|
TwoFactorShield: true,
|
|
38
38
|
BackupCodesDialogs: true,
|
|
39
|
-
CreateLoginCodeDialogs: true
|
|
39
|
+
CreateLoginCodeDialogs: true,
|
|
40
|
+
SettingsHeader: true,
|
|
41
|
+
SettingsContent: true,
|
|
42
|
+
StyledSettingRow: true,
|
|
43
|
+
RowText: true,
|
|
44
|
+
SettingRow: true
|
|
40
45
|
};
|
|
41
46
|
Object.defineProperty(exports, "BackupCodesDialogs", {
|
|
42
47
|
enumerable: true,
|
|
@@ -158,6 +163,30 @@ Object.defineProperty(exports, "RoundAvatar", {
|
|
|
158
163
|
return _RoundAvatar.RoundAvatar;
|
|
159
164
|
}
|
|
160
165
|
});
|
|
166
|
+
Object.defineProperty(exports, "RowText", {
|
|
167
|
+
enumerable: true,
|
|
168
|
+
get: function get() {
|
|
169
|
+
return _settings.RowText;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
Object.defineProperty(exports, "SettingRow", {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
get: function get() {
|
|
175
|
+
return _settings.SettingRow;
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
Object.defineProperty(exports, "SettingsContent", {
|
|
179
|
+
enumerable: true,
|
|
180
|
+
get: function get() {
|
|
181
|
+
return _settings.SettingsContent;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(exports, "SettingsHeader", {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
get: function get() {
|
|
187
|
+
return _settings.SettingsHeader;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
161
190
|
Object.defineProperty(exports, "SourceCodeSection", {
|
|
162
191
|
enumerable: true,
|
|
163
192
|
get: function get() {
|
|
@@ -176,6 +205,12 @@ Object.defineProperty(exports, "StyledPagePaper", {
|
|
|
176
205
|
return _PresentationShell.StyledPagePaper;
|
|
177
206
|
}
|
|
178
207
|
});
|
|
208
|
+
Object.defineProperty(exports, "StyledSettingRow", {
|
|
209
|
+
enumerable: true,
|
|
210
|
+
get: function get() {
|
|
211
|
+
return _settings.StyledSettingRow;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
179
214
|
Object.defineProperty(exports, "SuggestSubtasksButton", {
|
|
180
215
|
enumerable: true,
|
|
181
216
|
get: function get() {
|
|
@@ -264,4 +299,5 @@ var _TaskOptionsMenu = require("./TaskOptionsMenu");
|
|
|
264
299
|
var _UserMenu = require("./UserMenu");
|
|
265
300
|
var _TwoFactorShield = require("./TwoFactorShield");
|
|
266
301
|
var _TwoFactorDialogs = require("./TwoFactorDialogs");
|
|
302
|
+
var _settings = require("./settings");
|
|
267
303
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_tokens","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_MainLogo","_RoundAvatar","_PresentationShell","_headers","_FloatingControls","_HelpAndSupportMenu","_LinkingCommandsButton","_LinkBranchOrPullRequestDialog","_ConnectRepositoryDialog","_WebhookLogsDialog","_SourceCodeSection","_SuggestSubtasksButton","_TaskOptionsMenu","_UserMenu","_TwoFactorShield","_TwoFactorDialogs"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_tokens","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_MainLogo","_RoundAvatar","_PresentationShell","_headers","_FloatingControls","_HelpAndSupportMenu","_LinkingCommandsButton","_LinkBranchOrPullRequestDialog","_ConnectRepositoryDialog","_WebhookLogsDialog","_SourceCodeSection","_SuggestSubtasksButton","_TaskOptionsMenu","_UserMenu","_TwoFactorShield","_TwoFactorDialogs","_settings"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\nexport {\n SettingsHeader,\n SettingsContent,\n StyledSettingRow,\n RowText,\n SettingRow,\n} from \"./settings\";\nexport type { SettingsHeaderProps, SettingRowProps } from \"./settings\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledSettingRow = exports.SettingsHeader = exports.SettingsContent = exports.SettingRow = exports.RowText = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _tokens = require("./tokens");
|
|
10
|
+
var _Card = require("../../components/Card");
|
|
11
|
+
var _IconButton = require("../../components/IconButton");
|
|
12
|
+
var _Icons = require("../../components/Icons");
|
|
13
|
+
var _Typography = require("../../components/Typography");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
/**
|
|
16
|
+
* Shared building blocks for the System Settings presentation stories
|
|
17
|
+
* (`Presentation/System Settings/*`). The settings page header, the max-width
|
|
18
|
+
* body column and the "row" card (title + description on the left, a control on
|
|
19
|
+
* the right) are defined once here and reused by the Index, General and
|
|
20
|
+
* Security stories so the chrome stays identical and in one place.
|
|
21
|
+
*
|
|
22
|
+
* Mirrors the app: PageHeader.jsx + BackButton.js (header) and the repeated
|
|
23
|
+
* `Card variant="paper-2"` row pattern from the SystemSettings pages.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/* ------------------------------------------------------------------ */
|
|
27
|
+
/* Settings page header (mirrors PageHeader.jsx + BackButton.js) */
|
|
28
|
+
/* ------------------------------------------------------------------ */
|
|
29
|
+
|
|
30
|
+
var StyledSettingsHeader = _styledComponents.default.div.withConfig({
|
|
31
|
+
displayName: "settings__StyledSettingsHeader",
|
|
32
|
+
componentId: "sc-1el9eq3-0"
|
|
33
|
+
})(["display:flex;align-items:center;justify-content:space-between;margin:12px 0;width:100%;height:40px;flex-shrink:0;.header-left{display:flex;align-items:center;width:100%;max-width:100%;@media (min-width:", "){min-width:0;}}.back-button{flex-shrink:0;margin-right:4px;@media (min-width:", "){margin-right:8px;}}.page-title-desktop{display:none;margin-right:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;@media (min-width:", "){display:block;}}.page-title-mobile{display:block;margin-right:8px;font-weight:300;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;@media (min-width:", "){display:none;}}.page-header-spacer{display:none;height:100%;width:208px;flex-shrink:0;@media (min-width:", "){display:flex;}}"], _tokens.SM, _tokens.MD, _tokens.MD, _tokens.MD, _tokens.SM);
|
|
34
|
+
var SettingsHeader = exports.SettingsHeader = function SettingsHeader(_ref) {
|
|
35
|
+
var title = _ref.title,
|
|
36
|
+
backTitle = _ref.backTitle;
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(StyledSettingsHeader, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
+
className: "header-left"
|
|
39
|
+
}, backTitle ? /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
|
|
40
|
+
variant: "text gray",
|
|
41
|
+
className: "back-button"
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.ArrowLeftIcon, null)) : null, /*#__PURE__*/_react.default.createElement(_Typography.Title2, {
|
|
43
|
+
className: "page-title-desktop"
|
|
44
|
+
}, title), /*#__PURE__*/_react.default.createElement(_Typography.Header2, {
|
|
45
|
+
className: "page-title-mobile"
|
|
46
|
+
}, title)), /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
className: "page-header-spacer"
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/* ------------------------------------------------------------------ */
|
|
52
|
+
/* Shared layout pieces */
|
|
53
|
+
/* ------------------------------------------------------------------ */
|
|
54
|
+
|
|
55
|
+
/** The page body, max-width 850px and left-aligned (mirrors the app Page). */
|
|
56
|
+
var SettingsContent = exports.SettingsContent = _styledComponents.default.div.withConfig({
|
|
57
|
+
displayName: "settings__SettingsContent",
|
|
58
|
+
componentId: "sc-1el9eq3-1"
|
|
59
|
+
})(["display:flex;flex-direction:column;flex-grow:1;width:100%;max-width:850px;"]);
|
|
60
|
+
|
|
61
|
+
/** A settings row card: title + description on the left, control on the right. */
|
|
62
|
+
var StyledSettingRow = exports.StyledSettingRow = (0, _styledComponents.default)(_Card.Card).withConfig({
|
|
63
|
+
displayName: "settings__StyledSettingRow",
|
|
64
|
+
componentId: "sc-1el9eq3-2"
|
|
65
|
+
})(["box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;min-height:68px;padding:12px 16px 12px 20px;margin-bottom:4px;", ""], function (_ref2) {
|
|
66
|
+
var $clickable = _ref2.$clickable;
|
|
67
|
+
return $clickable ? "\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-theme-200);\n }\n " : "";
|
|
68
|
+
});
|
|
69
|
+
var RowText = exports.RowText = _styledComponents.default.div.withConfig({
|
|
70
|
+
displayName: "settings__RowText",
|
|
71
|
+
componentId: "sc-1el9eq3-3"
|
|
72
|
+
})(["display:flex;flex-direction:column;flex:1 1 0%;min-width:0;padding-right:12px;.row-title{margin-bottom:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.row-description{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.row-description-wrap{white-space:normal;}"]);
|
|
73
|
+
var SettingRow = exports.SettingRow = function SettingRow(_ref3) {
|
|
74
|
+
var title = _ref3.title,
|
|
75
|
+
description = _ref3.description,
|
|
76
|
+
control = _ref3.control,
|
|
77
|
+
onClick = _ref3.onClick,
|
|
78
|
+
_ref3$wrapDescription = _ref3.wrapDescription,
|
|
79
|
+
wrapDescription = _ref3$wrapDescription === void 0 ? false : _ref3$wrapDescription;
|
|
80
|
+
return /*#__PURE__*/_react.default.createElement(StyledSettingRow, {
|
|
81
|
+
variant: "paper-2",
|
|
82
|
+
$clickable: Boolean(onClick),
|
|
83
|
+
onClick: onClick
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(RowText, null, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
85
|
+
className: "row-title"
|
|
86
|
+
}, title), description ? /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
87
|
+
className: wrapDescription ? "row-description-wrap" : "row-description",
|
|
88
|
+
color: "tertiary"
|
|
89
|
+
}, description) : null), control);
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","names":["_react","_interopRequireDefault","require","_styledComponents","_tokens","_Card","_IconButton","_Icons","_Typography","e","__esModule","default","StyledSettingsHeader","styled","div","withConfig","displayName","componentId","SM","MD","SettingsHeader","exports","_ref","title","backTitle","createElement","className","IconButton","variant","ArrowLeftIcon","Title2","Header2","SettingsContent","StyledSettingRow","Card","_ref2","$clickable","RowText","SettingRow","_ref3","description","control","onClick","_ref3$wrapDescription","wrapDescription","Boolean","Body2","Caption1","color"],"sources":["../../../../src/presentation/shared/settings.tsx"],"sourcesContent":["/**\n * Shared building blocks for the System Settings presentation stories\n * (`Presentation/System Settings/*`). The settings page header, the max-width\n * body column and the \"row\" card (title + description on the left, a control on\n * the right) are defined once here and reused by the Index, General and\n * Security stories so the chrome stays identical and in one place.\n *\n * Mirrors the app: PageHeader.jsx + BackButton.js (header) and the repeated\n * `Card variant=\"paper-2\"` row pattern from the SystemSettings pages.\n */\nimport React, { ReactElement, ReactNode } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { MD, SM } from \"./tokens\";\nimport { Card } from \"../../components/Card\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { ArrowLeftIcon } from \"../../components/Icons\";\nimport { Body2, Caption1, Header2, Title2 } from \"../../components/Typography\";\n\n/* ------------------------------------------------------------------ */\n/* Settings page header (mirrors PageHeader.jsx + BackButton.js) */\n/* ------------------------------------------------------------------ */\n\nconst StyledSettingsHeader = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 12px 0;\n width: 100%;\n height: 40px;\n flex-shrink: 0;\n\n .header-left {\n display: flex;\n align-items: center;\n width: 100%;\n max-width: 100%;\n\n @media (min-width: ${SM}) {\n min-width: 0;\n }\n }\n\n .back-button {\n flex-shrink: 0;\n margin-right: 4px;\n\n @media (min-width: ${MD}) {\n margin-right: 8px;\n }\n }\n\n .page-title-desktop {\n display: none;\n margin-right: 8px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n @media (min-width: ${MD}) {\n display: block;\n }\n }\n\n .page-title-mobile {\n display: block;\n margin-right: 8px;\n font-weight: 300;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n @media (min-width: ${MD}) {\n display: none;\n }\n }\n\n /* keeps the title clear of the absolutely-positioned top-right controls */\n .page-header-spacer {\n display: none;\n height: 100%;\n width: 208px;\n flex-shrink: 0;\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n }\n`;\n\nexport interface SettingsHeaderProps {\n title: string;\n backTitle?: string;\n}\n\nexport const SettingsHeader = ({\n title,\n backTitle,\n}: SettingsHeaderProps): ReactElement => (\n <StyledSettingsHeader>\n <div className=\"header-left\">\n {backTitle ? (\n <IconButton variant=\"text gray\" className=\"back-button\">\n <ArrowLeftIcon />\n </IconButton>\n ) : null}\n <Title2 className=\"page-title-desktop\">{title}</Title2>\n <Header2 className=\"page-title-mobile\">{title}</Header2>\n </div>\n <div className=\"page-header-spacer\" />\n </StyledSettingsHeader>\n);\n\n/* ------------------------------------------------------------------ */\n/* Shared layout pieces */\n/* ------------------------------------------------------------------ */\n\n/** The page body, max-width 850px and left-aligned (mirrors the app Page). */\nexport const SettingsContent = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n width: 100%;\n max-width: 850px;\n`;\n\n/** A settings row card: title + description on the left, control on the right. */\nexport const StyledSettingRow = styled(Card)<{ $clickable?: boolean }>`\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 68px;\n padding: 12px 16px 12px 20px;\n margin-bottom: 4px;\n\n ${({ $clickable }) =>\n $clickable\n ? `\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-theme-200);\n }\n `\n : \"\"}\n`;\n\nexport const RowText = styled.div`\n display: flex;\n flex-direction: column;\n flex: 1 1 0%;\n min-width: 0;\n padding-right: 12px;\n\n .row-title {\n margin-bottom: 2px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .row-description {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n /* Long descriptions that are allowed to wrap onto multiple lines. */\n .row-description-wrap {\n white-space: normal;\n }\n`;\n\nexport interface SettingRowProps {\n title: string;\n description?: ReactNode;\n control?: ReactNode;\n onClick?: () => void;\n /** Let a long description wrap onto multiple lines instead of truncating. */\n wrapDescription?: boolean;\n}\n\nexport const SettingRow = ({\n title,\n description,\n control,\n onClick,\n wrapDescription = false,\n}: SettingRowProps): ReactElement => (\n <StyledSettingRow\n variant=\"paper-2\"\n $clickable={Boolean(onClick)}\n onClick={onClick}\n >\n <RowText>\n <Body2 className=\"row-title\">{title}</Body2>\n {description ? (\n <Caption1\n className={\n wrapDescription ? \"row-description-wrap\" : \"row-description\"\n }\n color=\"tertiary\"\n >\n {description}\n </Caption1>\n ) : null}\n </RowText>\n {control}\n </StyledSettingRow>\n);\n"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAA+E,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAlB/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;;AAEA,IAAMG,oBAAoB,GAAGC,yBAAM,CAACC,GAAG,CAA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|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ImageSkeleton = exports.ImagePlaceholder = exports.ImageCard = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _shared = require("./shared");
|
|
9
|
+
var _Icons = require("../../../components/Icons");
|
|
10
|
+
var _Loaders = require("../../../components/Loaders");
|
|
11
|
+
var _primitives = require("../primitives");
|
|
12
|
+
var _shell = require("../shell");
|
|
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
|
+
/**
|
|
16
|
+
* ImageCard — a full-bleed image and little else. Cover-management controls
|
|
17
|
+
* (collapse, remove) appear on hover; there is no other chrome. Fixed-box in
|
|
18
|
+
* production (host sets width AND height, the cover scales aspect-locked); shown
|
|
19
|
+
* here in the auto-height shell with a reserved image aspect ratio.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
var ImageCard = exports.ImageCard = function ImageCard(_ref) {
|
|
23
|
+
var _ref$color = _ref.color,
|
|
24
|
+
color = _ref$color === void 0 ? "#F0997B" : _ref$color,
|
|
25
|
+
src = _ref.src;
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Cover, {
|
|
27
|
+
aspectRatio: _shell.COVER_RATIO_IMAGE,
|
|
28
|
+
topRightSlot: (0, _shared.coverManagement)({
|
|
29
|
+
removeLabel: "Remove image"
|
|
30
|
+
})
|
|
31
|
+
}, src ? /*#__PURE__*/_react.default.createElement("img", {
|
|
32
|
+
src: src,
|
|
33
|
+
alt: ""
|
|
34
|
+
}) : /*#__PURE__*/_react.default.createElement(_shared.StyledColorCover, {
|
|
35
|
+
$color: color
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/* ---- placeholder + skeleton ---- */
|
|
40
|
+
|
|
41
|
+
/* The placeholder doubles as the drop target (visual only here). */
|
|
42
|
+
var ImagePlaceholder = exports.ImagePlaceholder = function ImagePlaceholder(props) {
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(_shared.Placeholder, _extends({
|
|
44
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.UploadIcon, null),
|
|
45
|
+
label: "Drop an image or click to upload",
|
|
46
|
+
height: 168,
|
|
47
|
+
dashed: true
|
|
48
|
+
}, props));
|
|
49
|
+
};
|
|
50
|
+
var ImageSkeleton = exports.ImageSkeleton = function ImageSkeleton() {
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Cover, {
|
|
52
|
+
aspectRatio: _shell.COVER_RATIO_IMAGE
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
54
|
+
style: {
|
|
55
|
+
width: "100%",
|
|
56
|
+
height: "100%"
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=ImageCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageCard.js","names":["_react","_interopRequireDefault","require","_shared","_Icons","_Loaders","_primitives","_shell","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","ImageCard","exports","_ref","_ref$color","color","src","createElement","Cover","aspectRatio","COVER_RATIO_IMAGE","topRightSlot","coverManagement","removeLabel","alt","StyledColorCover","$color","ImagePlaceholder","props","Placeholder","icon","UploadIcon","label","height","dashed","ImageSkeleton","SkeletonLoader","style","width"],"sources":["../../../../../src/presentation/stackedCard/content/ImageCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport { StyledColorCover, coverManagement, Placeholder } from \"./shared\";\nimport { UploadIcon } from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport { Cover } from \"../primitives\";\nimport { COVER_RATIO_IMAGE } from \"../shell\";\n\n/**\n * ImageCard — a full-bleed image and little else. Cover-management controls\n * (collapse, remove) appear on hover; there is no other chrome. Fixed-box in\n * production (host sets width AND height, the cover scales aspect-locked); shown\n * here in the auto-height shell with a reserved image aspect ratio.\n */\n\nexport interface ImageCardProps {\n color?: string;\n src?: string;\n}\n\nexport const ImageCard = ({\n color = \"#F0997B\",\n src,\n}: ImageCardProps): ReactElement => (\n <Cover\n aspectRatio={COVER_RATIO_IMAGE}\n topRightSlot={coverManagement({ removeLabel: \"Remove image\" })}\n >\n {src ? <img src={src} alt=\"\" /> : <StyledColorCover $color={color} />}\n </Cover>\n);\n\n/* ---- placeholder + skeleton ---- */\n\n/* The placeholder doubles as the drop target (visual only here). */\nexport const ImagePlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder\n icon={<UploadIcon />}\n label=\"Drop an image or click to upload\"\n height={168}\n dashed\n {...props}\n />\n);\n\nexport const ImageSkeleton = (): ReactElement => (\n <Cover aspectRatio={COVER_RATIO_IMAGE}>\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n </Cover>\n);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAA6C,SAAAD,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,M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C,UAAU,MAAE,CAAE;IACrBC,KAAK,EAAC,kCAAkC;IACxCC,MAAM,EAAE,GAAI;IACZC,MAAM;EAAA,GACFN,KAAK,CACV,CAAC;AAAA,CACH;AAEM,IAAMO,aAAa,GAAAvB,OAAA,CAAAuB,aAAA,GAAG,SAAhBA,aAAaA,CAAA;EAAA,oBACxB/C,MAAA,CAAAU,OAAA,CAAAmB,aAAA,CAACvB,WAAA,CAAAwB,KAAK;IAACC,WAAW,EAAEC;EAAkB,gBACpChC,MAAA,CAAAU,OAAA,CAAAmB,aAAA,CAACxB,QAAA,CAAA2C,cAAc;IAACC,KAAK,EAAE;MAAEC,KAAK,EAAE,MAAM;MAAEL,MAAM,EAAE;IAAO;EAAE,CAAE,CACtD,CAAC;AAAA,CACT","ignoreList":[]}
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LinkSkeleton = exports.LinkPlaceholder = exports.LinkCard = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _shared = require("./shared");
|
|
10
|
+
var _unfurl = require("./unfurl");
|
|
11
|
+
var _Icons = require("../../../components/Icons");
|
|
12
|
+
var _Loaders = require("../../../components/Loaders");
|
|
13
|
+
var _Typography = require("../../../components/Typography");
|
|
14
|
+
var _Typography2 = require("../../../components/Typography/Typography");
|
|
15
|
+
var _primitives = require("../primitives");
|
|
16
|
+
var _shell = require("../shell");
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
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); }
|
|
19
|
+
/**
|
|
20
|
+
* LinkCard — a link preview as a LIFECYCLE, not two static layouts.
|
|
21
|
+
*
|
|
22
|
+
* Data climbs a progressive ladder (url → basic → full); the anatomy is
|
|
23
|
+
* CONSTANT at every tier, so each slot swaps a skeleton for real content in
|
|
24
|
+
* place and the card never reflows on upgrade. Four statuses layer on top:
|
|
25
|
+
* resolving — climbing the ladder, aspect + rows reserved by skeletons
|
|
26
|
+
* resolved — the full card
|
|
27
|
+
* stale — resolved, but past its cache window: shows `fetchedAt` and a
|
|
28
|
+
* re-unfurl affordance
|
|
29
|
+
* error — the unfurl failed: favicon + raw URL + retry, NO media
|
|
30
|
+
*
|
|
31
|
+
* Compact ↔ expanded is a user-switchable DISPLAY LEVEL on the same link
|
|
32
|
+
* entity (the data lives in the controller, so switching never refetches or
|
|
33
|
+
* loses it) — not two separate card types.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/* ------------------------------------------------------------------ */
|
|
37
|
+
/* Small building blocks */
|
|
38
|
+
/* ------------------------------------------------------------------ */
|
|
39
|
+
|
|
40
|
+
var StyledDomainRow = _styledComponents.default.div.withConfig({
|
|
41
|
+
displayName: "LinkCard__StyledDomainRow",
|
|
42
|
+
componentId: "sc-qyea73-0"
|
|
43
|
+
})(["display:flex;align-items:center;gap:8px;min-height:16px;"]);
|
|
44
|
+
var StyledChips = _styledComponents.default.div.withConfig({
|
|
45
|
+
displayName: "LinkCard__StyledChips",
|
|
46
|
+
componentId: "sc-qyea73-1"
|
|
47
|
+
})(["display:flex;align-items:center;gap:6px;min-height:18px;"]);
|
|
48
|
+
|
|
49
|
+
/* The stale strip — a re-unfurl affordance with the fetch time. */
|
|
50
|
+
var StyledStaleStrip = _styledComponents.default.div.withConfig({
|
|
51
|
+
displayName: "LinkCard__StyledStaleStrip",
|
|
52
|
+
componentId: "sc-qyea73-2"
|
|
53
|
+
})(["display:flex;align-items:center;gap:8px;color:var(--color-theme-600);> span{flex:1 1 auto;min-width:0;}"]);
|
|
54
|
+
var StyledReunfurl = _styledComponents.default.button.withConfig({
|
|
55
|
+
displayName: "LinkCard__StyledReunfurl",
|
|
56
|
+
componentId: "sc-qyea73-3"
|
|
57
|
+
})(["display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;padding:3px 8px;border:1px solid var(--border-primary);border-radius:6px;background:var(--page-paper-main);color:var(--color-theme-800);font-size:11px;cursor:pointer;svg{width:12px;height:12px;}&:hover{background:var(--color-theme-200);border-color:var(--sc-selection-ring);}"]);
|
|
58
|
+
|
|
59
|
+
/* The error body — favicon + raw URL + retry, no media (per spec §5). */
|
|
60
|
+
var StyledErrorBody = _styledComponents.default.div.withConfig({
|
|
61
|
+
displayName: "LinkCard__StyledErrorBody",
|
|
62
|
+
componentId: "sc-qyea73-4"
|
|
63
|
+
})(["display:flex;flex-direction:column;gap:10px;padding:12px;.err-head{display:flex;align-items:center;gap:8px;color:var(--red-alert);}.err-head svg{width:16px;height:16px;flex:0 0 auto;}.err-url{display:flex;align-items:center;gap:8px;word-break:break-all;}"]);
|
|
64
|
+
var StyledRetry = _styledComponents.default.button.withConfig({
|
|
65
|
+
displayName: "LinkCard__StyledRetry",
|
|
66
|
+
componentId: "sc-qyea73-5"
|
|
67
|
+
})(["align-self:flex-start;display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid var(--border-primary);border-radius:6px;background:var(--page-paper-main);color:var(--color-theme-800);cursor:pointer;svg{width:14px;height:14px;}&:hover{background:var(--color-theme-200);border-color:var(--sc-selection-ring);}"]);
|
|
68
|
+
|
|
69
|
+
/* The expanded footer band — tinted, holds the title + domain under the hero. */
|
|
70
|
+
var StyledFooterTitle = (0, _styledComponents.default)(_Typography.Body2).withConfig({
|
|
71
|
+
displayName: "LinkCard__StyledFooterTitle",
|
|
72
|
+
componentId: "sc-qyea73-6"
|
|
73
|
+
})(["display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;"]);
|
|
74
|
+
|
|
75
|
+
/* ------------------------------------------------------------------ */
|
|
76
|
+
/* The display-level switch — lives in the entity "…" slot */
|
|
77
|
+
/* ------------------------------------------------------------------ */
|
|
78
|
+
|
|
79
|
+
var StyledDisplayToggle = _styledComponents.default.button.withConfig({
|
|
80
|
+
displayName: "LinkCard__StyledDisplayToggle",
|
|
81
|
+
componentId: "sc-qyea73-7"
|
|
82
|
+
})(["display:inline-flex;align-items:center;padding:2px 8px;border:1px solid var(--border-primary);border-radius:10px;background:var(--color-theme-200);color:var(--color-theme-700);font-size:11px;cursor:pointer;white-space:nowrap;&:hover{background:var(--color-theme-300);}"]);
|
|
83
|
+
var DisplayToggle = function DisplayToggle(_ref) {
|
|
84
|
+
var display = _ref.display,
|
|
85
|
+
onToggle = _ref.onToggle;
|
|
86
|
+
return /*#__PURE__*/_react.default.createElement(StyledDisplayToggle, {
|
|
87
|
+
type: "button",
|
|
88
|
+
"data-fixed": true,
|
|
89
|
+
className: "sc-control",
|
|
90
|
+
"aria-label": "Switch display level",
|
|
91
|
+
onClick: onToggle
|
|
92
|
+
}, display === "compact" ? "Expand ▾" : "Compact ▴");
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/* ------------------------------------------------------------------ */
|
|
96
|
+
/* LinkCard */
|
|
97
|
+
/* ------------------------------------------------------------------ */
|
|
98
|
+
|
|
99
|
+
var LinkCard = exports.LinkCard = function LinkCard(_ref2) {
|
|
100
|
+
var _data$heroColor2, _data$faviconColor2;
|
|
101
|
+
var unfurl = _ref2.unfurl,
|
|
102
|
+
_ref2$display = _ref2.display,
|
|
103
|
+
display = _ref2$display === void 0 ? "compact" : _ref2$display,
|
|
104
|
+
onToggleDisplay = _ref2.onToggleDisplay;
|
|
105
|
+
var status = unfurl.status,
|
|
106
|
+
tier = unfurl.tier,
|
|
107
|
+
data = unfurl.data,
|
|
108
|
+
fetchedAt = unfurl.fetchedAt,
|
|
109
|
+
retry = unfurl.retry,
|
|
110
|
+
reunfurl = unfurl.reunfurl;
|
|
111
|
+
|
|
112
|
+
// ── Error: favicon + raw URL + retry, no media ──────────────────
|
|
113
|
+
if (status === "error") {
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(StyledErrorBody, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
115
|
+
className: "err-head"
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.WarningTriangleIcon, null), /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
117
|
+
weight: "bold",
|
|
118
|
+
color: "tertiary"
|
|
119
|
+
}, "Couldn\u2019t load a preview")), /*#__PURE__*/_react.default.createElement("div", {
|
|
120
|
+
className: "err-url"
|
|
121
|
+
}, /*#__PURE__*/_react.default.createElement(_shared.StyledFavicon, {
|
|
122
|
+
$bg: "var(--color-theme-400)",
|
|
123
|
+
"data-fixed": true
|
|
124
|
+
}), /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
125
|
+
color: "secondary"
|
|
126
|
+
}, data.url)), /*#__PURE__*/_react.default.createElement(StyledRetry, {
|
|
127
|
+
type: "button",
|
|
128
|
+
onClick: retry
|
|
129
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.ArrowRefreshIcon, null), /*#__PURE__*/_react.default.createElement(_Typography2.Typography, {
|
|
130
|
+
as: "span",
|
|
131
|
+
variant: "Caption 1"
|
|
132
|
+
}, "Retry")));
|
|
133
|
+
}
|
|
134
|
+
var hasBasic = tier === "basic" || tier === "full";
|
|
135
|
+
var hasFull = tier === "full";
|
|
136
|
+
var toggle = onToggleDisplay !== null && onToggleDisplay !== void 0 ? onToggleDisplay : function () {
|
|
137
|
+
return undefined;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
// ── Expanded: hero + tinted footer band (title + domain) ────────
|
|
141
|
+
if (display === "expanded") {
|
|
142
|
+
var _data$heroColor, _data$faviconColor;
|
|
143
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_primitives.Cover, {
|
|
144
|
+
aspectRatio: _shell.COVER_RATIO_HERO,
|
|
145
|
+
centerSlot: hasFull && data.playable ? _shared.playControl : undefined,
|
|
146
|
+
topRightSlot: (0, _shared.coverManagement)()
|
|
147
|
+
}, hasFull ? /*#__PURE__*/_react.default.createElement(_shared.StyledColorCover, {
|
|
148
|
+
$color: (_data$heroColor = data.heroColor) !== null && _data$heroColor !== void 0 ? _data$heroColor : "#1D9E75"
|
|
149
|
+
}) : /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
150
|
+
style: {
|
|
151
|
+
width: "100%",
|
|
152
|
+
height: "100%"
|
|
153
|
+
}
|
|
154
|
+
})), /*#__PURE__*/_react.default.createElement(_primitives.StackRow, {
|
|
155
|
+
role: "footer",
|
|
156
|
+
direction: "column",
|
|
157
|
+
background: "var(--color-theme-200)"
|
|
158
|
+
}, /*#__PURE__*/_react.default.createElement(StyledDomainRow, null, hasBasic ? /*#__PURE__*/_react.default.createElement(_shared.StyledFavicon, {
|
|
159
|
+
$bg: (_data$faviconColor = data.faviconColor) !== null && _data$faviconColor !== void 0 ? _data$faviconColor : "#0F6E56",
|
|
160
|
+
"data-fixed": true
|
|
161
|
+
}) : /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
162
|
+
"data-fixed": true,
|
|
163
|
+
style: {
|
|
164
|
+
width: 16,
|
|
165
|
+
height: 16,
|
|
166
|
+
borderRadius: 4
|
|
167
|
+
}
|
|
168
|
+
}), hasBasic ? /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
169
|
+
color: "tertiary"
|
|
170
|
+
}, data.domain) : /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
171
|
+
color: "tertiary"
|
|
172
|
+
}, data.url), /*#__PURE__*/_react.default.createElement("span", {
|
|
173
|
+
style: {
|
|
174
|
+
flex: "1 1 auto"
|
|
175
|
+
}
|
|
176
|
+
}), /*#__PURE__*/_react.default.createElement(DisplayToggle, {
|
|
177
|
+
display: display,
|
|
178
|
+
onToggle: toggle
|
|
179
|
+
})), hasBasic ? /*#__PURE__*/_react.default.createElement(StyledFooterTitle, {
|
|
180
|
+
weight: "bold"
|
|
181
|
+
}, data.title) : /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
182
|
+
style: {
|
|
183
|
+
height: 14,
|
|
184
|
+
width: "90%"
|
|
185
|
+
}
|
|
186
|
+
}), hasFull ? /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
187
|
+
color: "tertiary"
|
|
188
|
+
}, data.description) : /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
189
|
+
style: {
|
|
190
|
+
height: 10,
|
|
191
|
+
width: "70%"
|
|
192
|
+
}
|
|
193
|
+
})), status === "stale" ? /*#__PURE__*/_react.default.createElement(_primitives.StackRow, {
|
|
194
|
+
role: "meta"
|
|
195
|
+
}, /*#__PURE__*/_react.default.createElement(StaleStrip, {
|
|
196
|
+
fetchedAt: fetchedAt,
|
|
197
|
+
onReunfurl: reunfurl
|
|
198
|
+
})) : null);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// ── Compact: cover + favicon/domain + title + chips ─────────────
|
|
202
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_primitives.Cover, {
|
|
203
|
+
aspectRatio: _shell.COVER_RATIO,
|
|
204
|
+
centerSlot: hasFull && data.playable ? _shared.playControl : undefined
|
|
205
|
+
}, hasFull ? /*#__PURE__*/_react.default.createElement(_shared.StyledColorCover, {
|
|
206
|
+
$color: (_data$heroColor2 = data.heroColor) !== null && _data$heroColor2 !== void 0 ? _data$heroColor2 : "#1D9E75"
|
|
207
|
+
}) : /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
208
|
+
style: {
|
|
209
|
+
width: "100%",
|
|
210
|
+
height: "100%"
|
|
211
|
+
}
|
|
212
|
+
})), /*#__PURE__*/_react.default.createElement(_primitives.StackRow, {
|
|
213
|
+
role: "custom"
|
|
214
|
+
}, /*#__PURE__*/_react.default.createElement(StyledDomainRow, null, hasBasic ? /*#__PURE__*/_react.default.createElement(_shared.StyledFavicon, {
|
|
215
|
+
$bg: (_data$faviconColor2 = data.faviconColor) !== null && _data$faviconColor2 !== void 0 ? _data$faviconColor2 : "#0F6E56",
|
|
216
|
+
"data-fixed": true
|
|
217
|
+
}) : /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
218
|
+
"data-fixed": true,
|
|
219
|
+
style: {
|
|
220
|
+
width: 16,
|
|
221
|
+
height: 16,
|
|
222
|
+
borderRadius: 4
|
|
223
|
+
}
|
|
224
|
+
}), hasBasic ? /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
225
|
+
color: "tertiary"
|
|
226
|
+
}, data.domain) : /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
227
|
+
color: "tertiary"
|
|
228
|
+
}, data.url), /*#__PURE__*/_react.default.createElement("span", {
|
|
229
|
+
style: {
|
|
230
|
+
flex: "1 1 auto"
|
|
231
|
+
}
|
|
232
|
+
}), /*#__PURE__*/_react.default.createElement(DisplayToggle, {
|
|
233
|
+
display: display,
|
|
234
|
+
onToggle: toggle
|
|
235
|
+
}))), /*#__PURE__*/_react.default.createElement(_primitives.StackRow, {
|
|
236
|
+
role: "title"
|
|
237
|
+
}, hasBasic ? /*#__PURE__*/_react.default.createElement(_shared.StyledClamp, null, data.title) : /*#__PURE__*/_react.default.createElement("div", {
|
|
238
|
+
style: {
|
|
239
|
+
width: "100%"
|
|
240
|
+
}
|
|
241
|
+
}, /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
242
|
+
style: {
|
|
243
|
+
height: 14,
|
|
244
|
+
width: "92%"
|
|
245
|
+
}
|
|
246
|
+
}), /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
247
|
+
style: {
|
|
248
|
+
height: 14,
|
|
249
|
+
width: "60%",
|
|
250
|
+
marginTop: 6
|
|
251
|
+
}
|
|
252
|
+
}))), /*#__PURE__*/_react.default.createElement(_primitives.StackRow, {
|
|
253
|
+
role: "custom"
|
|
254
|
+
}, /*#__PURE__*/_react.default.createElement(StyledChips, null, hasFull ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, data.kind ? /*#__PURE__*/_react.default.createElement(_shared.StyledChip, {
|
|
255
|
+
"data-fixed": true
|
|
256
|
+
}, data.kind) : null, data.duration ? /*#__PURE__*/_react.default.createElement(_shared.StyledChip, {
|
|
257
|
+
"data-fixed": true
|
|
258
|
+
}, data.duration) : null) : /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
259
|
+
style: {
|
|
260
|
+
height: 18,
|
|
261
|
+
width: 96,
|
|
262
|
+
borderRadius: 10
|
|
263
|
+
}
|
|
264
|
+
}))), status === "stale" ? /*#__PURE__*/_react.default.createElement(_primitives.StackRow, {
|
|
265
|
+
role: "meta"
|
|
266
|
+
}, /*#__PURE__*/_react.default.createElement(StaleStrip, {
|
|
267
|
+
fetchedAt: fetchedAt,
|
|
268
|
+
onReunfurl: reunfurl
|
|
269
|
+
})) : null);
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
/* The stale affordance — fetch time + a manual re-unfurl button. */
|
|
273
|
+
var StaleStrip = function StaleStrip(_ref3) {
|
|
274
|
+
var fetchedAt = _ref3.fetchedAt,
|
|
275
|
+
onReunfurl = _ref3.onReunfurl;
|
|
276
|
+
return /*#__PURE__*/_react.default.createElement(StyledStaleStrip, null, /*#__PURE__*/_react.default.createElement(_Typography2.Typography, {
|
|
277
|
+
as: "span",
|
|
278
|
+
variant: "Caption 1",
|
|
279
|
+
color: "tertiary"
|
|
280
|
+
}, "Preview may be out of date \xB7 fetched ", (0, _unfurl.formatFetchedAt)(fetchedAt)), /*#__PURE__*/_react.default.createElement(StyledReunfurl, {
|
|
281
|
+
type: "button",
|
|
282
|
+
onClick: onReunfurl
|
|
283
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.ArrowRefreshIcon, null), "Re-unfurl"));
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
/* ---- skeleton ---- */
|
|
287
|
+
|
|
288
|
+
/* Mirrors the compact anatomy row for row (this is the `resolving` render at
|
|
289
|
+
tier `url`), so a resolving link never reflows as it climbs the ladder. */
|
|
290
|
+
var LinkSkeleton = exports.LinkSkeleton = function LinkSkeleton() {
|
|
291
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_primitives.Cover, {
|
|
292
|
+
aspectRatio: _shell.COVER_RATIO
|
|
293
|
+
}, /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
294
|
+
style: {
|
|
295
|
+
width: "100%",
|
|
296
|
+
height: "100%"
|
|
297
|
+
}
|
|
298
|
+
})), /*#__PURE__*/_react.default.createElement(_primitives.StackRow, {
|
|
299
|
+
role: "custom"
|
|
300
|
+
}, /*#__PURE__*/_react.default.createElement(StyledDomainRow, null, /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
301
|
+
"data-fixed": true,
|
|
302
|
+
style: {
|
|
303
|
+
width: 16,
|
|
304
|
+
height: 16,
|
|
305
|
+
borderRadius: 4
|
|
306
|
+
}
|
|
307
|
+
}), /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
308
|
+
style: {
|
|
309
|
+
height: 10,
|
|
310
|
+
width: "40%"
|
|
311
|
+
}
|
|
312
|
+
}))), /*#__PURE__*/_react.default.createElement(_primitives.StackRow, {
|
|
313
|
+
role: "title"
|
|
314
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
315
|
+
style: {
|
|
316
|
+
width: "100%"
|
|
317
|
+
}
|
|
318
|
+
}, /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
319
|
+
style: {
|
|
320
|
+
height: 14,
|
|
321
|
+
width: "92%"
|
|
322
|
+
}
|
|
323
|
+
}), /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
324
|
+
style: {
|
|
325
|
+
height: 14,
|
|
326
|
+
width: "60%",
|
|
327
|
+
marginTop: 6
|
|
328
|
+
}
|
|
329
|
+
}))), /*#__PURE__*/_react.default.createElement(_primitives.StackRow, {
|
|
330
|
+
role: "custom"
|
|
331
|
+
}, /*#__PURE__*/_react.default.createElement(StyledChips, null, /*#__PURE__*/_react.default.createElement(_Loaders.SkeletonLoader, {
|
|
332
|
+
style: {
|
|
333
|
+
height: 18,
|
|
334
|
+
width: 96,
|
|
335
|
+
borderRadius: 10
|
|
336
|
+
}
|
|
337
|
+
}))));
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
/* ---- placeholder ---- */
|
|
341
|
+
|
|
342
|
+
var LinkPlaceholder = exports.LinkPlaceholder = function LinkPlaceholder(props) {
|
|
343
|
+
return /*#__PURE__*/_react.default.createElement(_shared.Placeholder, _extends({
|
|
344
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.InsertLinkIcon, null),
|
|
345
|
+
label: "Add a link"
|
|
346
|
+
}, props));
|
|
347
|
+
};
|
|
348
|
+
//# sourceMappingURL=LinkCard.js.map
|