@activecollab/components 2.0.460 → 2.0.462
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/SourceCodeSection.js +204 -24
- package/dist/cjs/presentation/shared/SourceCodeSection.js.map +1 -1
- package/dist/cjs/presentation/shared/index.js +36 -0
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/cjs/presentation/shared/settings.js +73 -18
- package/dist/cjs/presentation/shared/settings.js.map +1 -1
- package/dist/cjs/presentation/shared/systemSettingsDialog.js +150 -0
- package/dist/cjs/presentation/shared/systemSettingsDialog.js.map +1 -0
- package/dist/esm/presentation/shared/SourceCodeSection.d.ts.map +1 -1
- package/dist/esm/presentation/shared/SourceCodeSection.js +173 -26
- package/dist/esm/presentation/shared/SourceCodeSection.js.map +1 -1
- package/dist/esm/presentation/shared/index.d.ts +4 -2
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +2 -1
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/esm/presentation/shared/settings.d.ts +20 -6
- package/dist/esm/presentation/shared/settings.d.ts.map +1 -1
- package/dist/esm/presentation/shared/settings.js +73 -18
- package/dist/esm/presentation/shared/settings.js.map +1 -1
- package/dist/esm/presentation/shared/systemSettingsDialog.d.ts +40 -0
- package/dist/esm/presentation/shared/systemSettingsDialog.d.ts.map +1 -0
- package/dist/esm/presentation/shared/systemSettingsDialog.js +137 -0
- package/dist/esm/presentation/shared/systemSettingsDialog.js.map +1 -0
- package/package.json +1 -1
|
@@ -62,9 +62,14 @@ var _exportNames = {
|
|
|
62
62
|
CreateLoginCodeDialogs: true,
|
|
63
63
|
SettingsHeader: true,
|
|
64
64
|
SettingsContent: true,
|
|
65
|
+
SettingGroup: true,
|
|
65
66
|
StyledSettingRow: true,
|
|
66
67
|
RowText: true,
|
|
67
68
|
SettingRow: true,
|
|
69
|
+
SettingCount: true,
|
|
70
|
+
SettingValue: true,
|
|
71
|
+
SystemSettingsDialog: true,
|
|
72
|
+
SYSTEM_SETTINGS_GROUPS: true,
|
|
68
73
|
FeatureAvailability: true,
|
|
69
74
|
DEFAULT_FEATURE_AVAILABILITY: true,
|
|
70
75
|
PORTFOLIO_TYPES: true,
|
|
@@ -365,12 +370,36 @@ Object.defineProperty(exports, "RowText", {
|
|
|
365
370
|
return _settings.RowText;
|
|
366
371
|
}
|
|
367
372
|
});
|
|
373
|
+
Object.defineProperty(exports, "SYSTEM_SETTINGS_GROUPS", {
|
|
374
|
+
enumerable: true,
|
|
375
|
+
get: function get() {
|
|
376
|
+
return _systemSettingsDialog.SYSTEM_SETTINGS_GROUPS;
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
Object.defineProperty(exports, "SettingCount", {
|
|
380
|
+
enumerable: true,
|
|
381
|
+
get: function get() {
|
|
382
|
+
return _settings.SettingCount;
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
Object.defineProperty(exports, "SettingGroup", {
|
|
386
|
+
enumerable: true,
|
|
387
|
+
get: function get() {
|
|
388
|
+
return _settings.SettingGroup;
|
|
389
|
+
}
|
|
390
|
+
});
|
|
368
391
|
Object.defineProperty(exports, "SettingRow", {
|
|
369
392
|
enumerable: true,
|
|
370
393
|
get: function get() {
|
|
371
394
|
return _settings.SettingRow;
|
|
372
395
|
}
|
|
373
396
|
});
|
|
397
|
+
Object.defineProperty(exports, "SettingValue", {
|
|
398
|
+
enumerable: true,
|
|
399
|
+
get: function get() {
|
|
400
|
+
return _settings.SettingValue;
|
|
401
|
+
}
|
|
402
|
+
});
|
|
374
403
|
Object.defineProperty(exports, "SettingsContent", {
|
|
375
404
|
enumerable: true,
|
|
376
405
|
get: function get() {
|
|
@@ -425,6 +454,12 @@ Object.defineProperty(exports, "SuggestSubtasksButton", {
|
|
|
425
454
|
return _SuggestSubtasksButton.SuggestSubtasksButton;
|
|
426
455
|
}
|
|
427
456
|
});
|
|
457
|
+
Object.defineProperty(exports, "SystemSettingsDialog", {
|
|
458
|
+
enumerable: true,
|
|
459
|
+
get: function get() {
|
|
460
|
+
return _systemSettingsDialog.SystemSettingsDialog;
|
|
461
|
+
}
|
|
462
|
+
});
|
|
428
463
|
Object.defineProperty(exports, "TabHeader", {
|
|
429
464
|
enumerable: true,
|
|
430
465
|
get: function get() {
|
|
@@ -586,6 +621,7 @@ var _UserDetailsDialog = require("./UserDetailsDialog");
|
|
|
586
621
|
var _TwoFactorShield = require("./TwoFactorShield");
|
|
587
622
|
var _TwoFactorDialogs = require("./TwoFactorDialogs");
|
|
588
623
|
var _settings = require("./settings");
|
|
624
|
+
var _systemSettingsDialog = require("./systemSettingsDialog");
|
|
589
625
|
var _FeatureAvailability = require("./FeatureAvailability");
|
|
590
626
|
var _portfolioDetails = require("./portfolioDetails");
|
|
591
627
|
//# 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","_ProjectOptionsMenu","_PortfolioOptionsMenu","_dashboardWidgets","_FloatingControls","_MessageDialog","_MessageFeedback","_HelpAndSupportMenu","_LinkingCommandsButton","_LinkBranchOrPullRequestDialog","_ConnectRepositoryDialog","_WebhookLogsDialog","_SourceCodeSection","_SuggestSubtasksButton","_TaskOptionsMenu","_UserMenu","_UserDetailsDialog","_TwoFactorShield","_TwoFactorDialogs","_settings","_FeatureAvailability","_portfolioDetails"],"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 { ProjectOptionsMenu } from \"./ProjectOptionsMenu\";\nexport { PortfolioOptionsMenu } from \"./PortfolioOptionsMenu\";\nexport type { PortfolioOptionsMenuProps } from \"./PortfolioOptionsMenu\";\nexport {\n WidgetGrid,\n WidgetGroupBy,\n StatWidget,\n WidgetRankedList,\n OverviewWidget,\n AreaChartWidget,\n DailyDeltaChartWidget,\n LeaderboardWidget,\n StackedBarChartWidget,\n CHART_SERIES_COLORS,\n OVERVIEW_SECTION_COLORS,\n PERIOD_OPTIONS,\n PeriodPicker,\n} from \"./dashboardWidgets\";\nexport type {\n WidgetGroupByProps,\n StatWidgetProps,\n RankedListItem,\n OverviewSectionData,\n OverviewWidgetProps,\n AreaChartWidgetProps,\n DailyDeltaPoint,\n DailyDeltaChartWidgetProps,\n LeaderboardRowData,\n LeaderboardWidgetProps,\n StackedBarColumn,\n StackedBarChartWidgetProps,\n PeriodPickerProps,\n} from \"./dashboardWidgets\";\n\nexport type { ProjectOptionsMenuProps } from \"./ProjectOptionsMenu\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport {\n MessageDialog,\n DocLinkContext,\n messageComponents,\n} from \"./MessageDialog\";\nexport type {\n MessageDialogProps,\n MessageDialogSize,\n OpenArticleHandler,\n} from \"./MessageDialog\";\nexport {\n MessageFeedback,\n POSITIVE_FEEDBACK_OPTIONS,\n NEGATIVE_FEEDBACK_OPTIONS,\n} from \"./MessageFeedback\";\nexport type {\n MessageFeedbackProps,\n MessageFeedbackResult,\n FeedbackOption,\n FeedbackSentiment,\n} from \"./MessageFeedback\";\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 {\n UserDetailsDialog,\n USER_DETAILS_AVATAR_SIZE,\n} from \"./UserDetailsDialog\";\nexport type {\n UserDetailsDialogProps,\n UserDetailsAvatar,\n} from \"./UserDetailsDialog\";\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 {
|
|
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","_ProjectOptionsMenu","_PortfolioOptionsMenu","_dashboardWidgets","_FloatingControls","_MessageDialog","_MessageFeedback","_HelpAndSupportMenu","_LinkingCommandsButton","_LinkBranchOrPullRequestDialog","_ConnectRepositoryDialog","_WebhookLogsDialog","_SourceCodeSection","_SuggestSubtasksButton","_TaskOptionsMenu","_UserMenu","_UserDetailsDialog","_TwoFactorShield","_TwoFactorDialogs","_settings","_systemSettingsDialog","_FeatureAvailability","_portfolioDetails"],"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 { ProjectOptionsMenu } from \"./ProjectOptionsMenu\";\nexport { PortfolioOptionsMenu } from \"./PortfolioOptionsMenu\";\nexport type { PortfolioOptionsMenuProps } from \"./PortfolioOptionsMenu\";\nexport {\n WidgetGrid,\n WidgetGroupBy,\n StatWidget,\n WidgetRankedList,\n OverviewWidget,\n AreaChartWidget,\n DailyDeltaChartWidget,\n LeaderboardWidget,\n StackedBarChartWidget,\n CHART_SERIES_COLORS,\n OVERVIEW_SECTION_COLORS,\n PERIOD_OPTIONS,\n PeriodPicker,\n} from \"./dashboardWidgets\";\nexport type {\n WidgetGroupByProps,\n StatWidgetProps,\n RankedListItem,\n OverviewSectionData,\n OverviewWidgetProps,\n AreaChartWidgetProps,\n DailyDeltaPoint,\n DailyDeltaChartWidgetProps,\n LeaderboardRowData,\n LeaderboardWidgetProps,\n StackedBarColumn,\n StackedBarChartWidgetProps,\n PeriodPickerProps,\n} from \"./dashboardWidgets\";\n\nexport type { ProjectOptionsMenuProps } from \"./ProjectOptionsMenu\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport {\n MessageDialog,\n DocLinkContext,\n messageComponents,\n} from \"./MessageDialog\";\nexport type {\n MessageDialogProps,\n MessageDialogSize,\n OpenArticleHandler,\n} from \"./MessageDialog\";\nexport {\n MessageFeedback,\n POSITIVE_FEEDBACK_OPTIONS,\n NEGATIVE_FEEDBACK_OPTIONS,\n} from \"./MessageFeedback\";\nexport type {\n MessageFeedbackProps,\n MessageFeedbackResult,\n FeedbackOption,\n FeedbackSentiment,\n} from \"./MessageFeedback\";\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 {\n UserDetailsDialog,\n USER_DETAILS_AVATAR_SIZE,\n} from \"./UserDetailsDialog\";\nexport type {\n UserDetailsDialogProps,\n UserDetailsAvatar,\n} from \"./UserDetailsDialog\";\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 SettingGroup,\n StyledSettingRow,\n RowText,\n SettingRow,\n SettingCount,\n SettingValue,\n} from \"./settings\";\nexport type {\n SettingsHeaderProps,\n SettingGroupProps,\n SettingRowProps,\n} from \"./settings\";\nexport {\n SystemSettingsDialog,\n SYSTEM_SETTINGS_GROUPS,\n} from \"./systemSettingsDialog\";\nexport type {\n SystemSettingsDialogProps,\n SystemSettingsSectionId,\n} from \"./systemSettingsDialog\";\nexport {\n FeatureAvailability,\n DEFAULT_FEATURE_AVAILABILITY,\n} from \"./FeatureAvailability\";\nexport type {\n FeatureAvailabilityProps,\n AvailabilityRow,\n AvailabilityMark,\n AvailabilityStatus,\n} from \"./FeatureAvailability\";\nexport {\n PORTFOLIO_TYPES,\n VISIBILITY_OPTIONS,\n DEFAULT_PORTFOLIO_FORM_VALUES,\n LEADERS_LIST,\n CATEGORIES,\n CLIENTS,\n contextFieldLabel,\n leaderShortName,\n defaultPortfolioName,\n isPortfolioDetailsValid,\n sampleProjectOptionIds,\n PortfolioDetailsFields,\n EditPortfolioDialog,\n ProjectsPicker,\n PICKER_PROJECTS,\n} from \"./portfolioDetails\";\nexport type {\n PortfolioKind,\n PortfolioVisibility,\n GroupBy,\n PortfolioFormValues,\n PickerLeader,\n PortfolioDetailsFieldsProps,\n EditPortfolioDialogProps,\n PickerProject,\n ProjectsPickerProps,\n} from \"./portfolioDetails\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,OAAA,GAAAC,OA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IAAAoC,qBAAA,GAAApC,OAAA;AAQA,IAAAqC,oBAAA,GAAArC,OAAA;AAUA,IAAAsC,iBAAA,GAAAtC,OAAA","ignoreList":[]}
|
|
@@ -3,24 +3,28 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.StyledSettingRow = exports.SettingsHeader = exports.SettingsContent = exports.SettingRow = exports.RowText = void 0;
|
|
6
|
+
exports.StyledSettingRow = exports.SettingsHeader = exports.SettingsContent = exports.SettingValue = exports.SettingRow = exports.SettingGroup = exports.SettingCount = exports.RowText = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
var _tokens = require("./tokens");
|
|
10
10
|
var _Card = require("../../components/Card");
|
|
11
|
+
var _Chip = require("../../components/Chip");
|
|
11
12
|
var _IconButton = require("../../components/IconButton");
|
|
12
13
|
var _Icons = require("../../components/Icons");
|
|
14
|
+
var _Label = require("../../components/Label");
|
|
13
15
|
var _Typography = require("../../components/Typography");
|
|
14
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
17
|
/**
|
|
16
18
|
* Shared building blocks for the System Settings presentation stories
|
|
17
|
-
* (`Presentation/System Settings/*`). The
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* (`Presentation/System Settings/*`). The section group (a Label above its
|
|
20
|
+
* rows) and the "row" card (title + description on the left, a control on the
|
|
21
|
+
* right) are defined once here and reused by every section story so the chrome
|
|
22
|
+
* stays identical and in one place.
|
|
21
23
|
*
|
|
22
|
-
* Mirrors the app:
|
|
23
|
-
* `
|
|
24
|
+
* Mirrors the app: components/Settings/SettingRow.jsx (`SettingGroup` and
|
|
25
|
+
* `SettingRow`). The legacy page header/body (`SettingsHeader`,
|
|
26
|
+
* `SettingsContent`) predate the dialog redesign and are kept for any page-
|
|
27
|
+
* style story that still needs them.
|
|
24
28
|
*/
|
|
25
29
|
|
|
26
30
|
/* ------------------------------------------------------------------ */
|
|
@@ -58,25 +62,44 @@ var SettingsContent = exports.SettingsContent = _styledComponents.default.div.wi
|
|
|
58
62
|
componentId: "sc-1el9eq3-1"
|
|
59
63
|
})(["display:flex;flex-direction:column;flex-grow:1;width:100%;max-width:850px;"]);
|
|
60
64
|
|
|
65
|
+
/**
|
|
66
|
+
* A section group: a Label above its rows, 24px below the block (tw-mb-6) and
|
|
67
|
+
* 8px below the label (tw-mb-2). Mirrors app SettingRow.jsx `SettingGroup`.
|
|
68
|
+
*/
|
|
69
|
+
var StyledSettingGroup = _styledComponents.default.div.withConfig({
|
|
70
|
+
displayName: "settings__StyledSettingGroup",
|
|
71
|
+
componentId: "sc-1el9eq3-2"
|
|
72
|
+
})(["display:flex;flex-direction:column;margin-bottom:24px;.group-label{display:block;margin-bottom:8px;}"]);
|
|
73
|
+
var SettingGroup = exports.SettingGroup = function SettingGroup(_ref2) {
|
|
74
|
+
var label = _ref2.label,
|
|
75
|
+
children = _ref2.children,
|
|
76
|
+
className = _ref2.className;
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(StyledSettingGroup, {
|
|
78
|
+
className: className
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_Label.Label, {
|
|
80
|
+
className: "group-label"
|
|
81
|
+
}, label), children);
|
|
82
|
+
};
|
|
83
|
+
|
|
61
84
|
/** A settings row card: title + description on the left, control on the right. */
|
|
62
85
|
var StyledSettingRow = exports.StyledSettingRow = (0, _styledComponents.default)(_Card.Card).withConfig({
|
|
63
86
|
displayName: "settings__StyledSettingRow",
|
|
64
|
-
componentId: "sc-1el9eq3-
|
|
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 (
|
|
66
|
-
var $clickable =
|
|
87
|
+
componentId: "sc-1el9eq3-3"
|
|
88
|
+
})(["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 (_ref3) {
|
|
89
|
+
var $clickable = _ref3.$clickable;
|
|
67
90
|
return $clickable ? "\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-theme-200);\n }\n " : "";
|
|
68
91
|
});
|
|
69
92
|
var RowText = exports.RowText = _styledComponents.default.div.withConfig({
|
|
70
93
|
displayName: "settings__RowText",
|
|
71
|
-
componentId: "sc-1el9eq3-
|
|
94
|
+
componentId: "sc-1el9eq3-4"
|
|
72
95
|
})(["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(
|
|
74
|
-
var title =
|
|
75
|
-
description =
|
|
76
|
-
control =
|
|
77
|
-
onClick =
|
|
78
|
-
|
|
79
|
-
wrapDescription =
|
|
96
|
+
var SettingRow = exports.SettingRow = function SettingRow(_ref4) {
|
|
97
|
+
var title = _ref4.title,
|
|
98
|
+
description = _ref4.description,
|
|
99
|
+
control = _ref4.control,
|
|
100
|
+
onClick = _ref4.onClick,
|
|
101
|
+
_ref4$wrapDescription = _ref4.wrapDescription,
|
|
102
|
+
wrapDescription = _ref4$wrapDescription === void 0 ? false : _ref4$wrapDescription;
|
|
80
103
|
return /*#__PURE__*/_react.default.createElement(StyledSettingRow, {
|
|
81
104
|
variant: "paper-2",
|
|
82
105
|
$clickable: Boolean(onClick),
|
|
@@ -88,4 +111,36 @@ var SettingRow = exports.SettingRow = function SettingRow(_ref3) {
|
|
|
88
111
|
color: "tertiary"
|
|
89
112
|
}, description) : null), control);
|
|
90
113
|
};
|
|
114
|
+
|
|
115
|
+
/* ------------------------------------------------------------------ */
|
|
116
|
+
/* Collapsible-row right controls — a count Chip or a value, plus a */
|
|
117
|
+
/* caret. Used by the Workday, Time & Expenses and Invoices sections */
|
|
118
|
+
/* for rows that expand in the app; the stories show them collapsed, */
|
|
119
|
+
/* so the caret is decorative. Mirrors the app's `Chip` + ExpandToggle */
|
|
120
|
+
/* / `Caption1` + ExpandToggle pattern. */
|
|
121
|
+
/* ------------------------------------------------------------------ */
|
|
122
|
+
|
|
123
|
+
var CaretRow = _styledComponents.default.div.withConfig({
|
|
124
|
+
displayName: "settings__CaretRow",
|
|
125
|
+
componentId: "sc-1el9eq3-5"
|
|
126
|
+
})(["display:flex;align-items:center;gap:12px;.caret{display:inline-flex;transform:rotate(180deg);}"]);
|
|
127
|
+
var SettingCount = exports.SettingCount = function SettingCount(_ref5) {
|
|
128
|
+
var count = _ref5.count;
|
|
129
|
+
return /*#__PURE__*/_react.default.createElement(CaretRow, null, /*#__PURE__*/_react.default.createElement(_Chip.Chip, {
|
|
130
|
+
label: String(count),
|
|
131
|
+
backgroundColor: "var(--color-theme-300)",
|
|
132
|
+
color: "var(--color-theme-900)",
|
|
133
|
+
size: "regular"
|
|
134
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
135
|
+
className: "caret"
|
|
136
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.CollapseExpandSingleIcon, null)));
|
|
137
|
+
};
|
|
138
|
+
var SettingValue = exports.SettingValue = function SettingValue(_ref6) {
|
|
139
|
+
var value = _ref6.value;
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement(CaretRow, null, /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
141
|
+
color: "tertiary"
|
|
142
|
+
}, value), /*#__PURE__*/_react.default.createElement("span", {
|
|
143
|
+
className: "caret"
|
|
144
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.CollapseExpandSingleIcon, null)));
|
|
145
|
+
};
|
|
91
146
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +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,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,muBAedC,UAAE,EASFC,UAAE,EAYFA,UAAE,EAaFA,UAAE,EAYFD,UAAE,CAI1B;AAOM,IAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,SAAjBA,cAAcA,CAAAE,IAAA;EAAA,IACzBC,KAAK,GAAAD,IAAA,CA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AA;EAAAC,WAAA;AAAA,oSAwBhC;AAWM,IAAMqB,UAAU,GAAAjB,OAAA,CAAAiB,UAAA,GAAG,SAAbA,UAAUA,CAAAC,KAAA;EAAA,IACrBhB,KAAK,GAAAgB,KAAA,CAALhB,KAAK;IACLiB,WAAW,GAAAD,KAAA,CAAXC,WAAW;IACXC,OAAO,GAAAF,KAAA,CAAPE,OAAO;IACPC,OAAO,GAAAH,KAAA,CAAPG,OAAO;IAAAC,qBAAA,GAAAJ,KAAA,CACPK,eAAe;IAAfA,eAAe,GAAAD,qBAAA,cAAG,KAAK,GAAAA,qBAAA;EAAA,oBAEvB3C,MAAA,CAAAW,OAAA,CAAAc,aAAA,CAACQ,gBAAgB;IACfL,OAAO,EAAC,SAAS;IACjBQ,UAAU,EAAES,OAAO,CAACH,OAAO,CAAE;IAC7BA,OAAO,EAAEA;EAAQ,gBAEjB1C,MAAA,CAAAW,OAAA,CAAAc,aAAA,CAACY,OAAO,qBACNrC,MAAA,CAAAW,OAAA,CAAAc,aAAA,CAACjB,WAAA,CAAAsC,KAAK;IAACpB,SAAS,EAAC;EAAW,GAAEH,KAAa,CAAC,EAC3CiB,WAAW,gBACVxC,MAAA,CAAAW,OAAA,CAAAc,aAAA,CAACjB,WAAA,CAAAuC,QAAQ;IACPrB,SAAS,EACPkB,eAAe,GAAG,sBAAsB,GAAG,iBAC5C;IACDI,KAAK,EAAC;EAAU,GAEfR,WACO,CAAC,GACT,IACG,CAAC,EACTC,OACe,CAAC;AAAA,CACpB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"settings.js","names":["_react","_interopRequireDefault","require","_styledComponents","_tokens","_Card","_Chip","_IconButton","_Icons","_Label","_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","StyledSettingGroup","SettingGroup","_ref2","label","children","Label","StyledSettingRow","Card","_ref3","$clickable","RowText","SettingRow","_ref4","description","control","onClick","_ref4$wrapDescription","wrapDescription","Boolean","Body2","Caption1","color","CaretRow","SettingCount","_ref5","count","Chip","String","backgroundColor","size","CollapseExpandSingleIcon","SettingValue","_ref6","value"],"sources":["../../../../src/presentation/shared/settings.tsx"],"sourcesContent":["/**\n * Shared building blocks for the System Settings presentation stories\n * (`Presentation/System Settings/*`). The section group (a Label above its\n * rows) and the \"row\" card (title + description on the left, a control on the\n * right) are defined once here and reused by every section story so the chrome\n * stays identical and in one place.\n *\n * Mirrors the app: components/Settings/SettingRow.jsx (`SettingGroup` and\n * `SettingRow`). The legacy page header/body (`SettingsHeader`,\n * `SettingsContent`) predate the dialog redesign and are kept for any page-\n * style story that still needs them.\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 { Chip } from \"../../components/Chip\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ArrowLeftIcon,\n CollapseExpandSingleIcon,\n} from \"../../components/Icons\";\nimport { Label } from \"../../components/Label\";\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/**\n * A section group: a Label above its rows, 24px below the block (tw-mb-6) and\n * 8px below the label (tw-mb-2). Mirrors app SettingRow.jsx `SettingGroup`.\n */\nconst StyledSettingGroup = styled.div`\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n\n .group-label {\n display: block;\n margin-bottom: 8px;\n }\n`;\n\nexport interface SettingGroupProps {\n label: string;\n children: ReactNode;\n className?: string;\n}\n\nexport const SettingGroup = ({\n label,\n children,\n className,\n}: SettingGroupProps): ReactElement => (\n <StyledSettingGroup className={className}>\n <Label className=\"group-label\">{label}</Label>\n {children}\n </StyledSettingGroup>\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\n/* ------------------------------------------------------------------ */\n/* Collapsible-row right controls — a count Chip or a value, plus a */\n/* caret. Used by the Workday, Time & Expenses and Invoices sections */\n/* for rows that expand in the app; the stories show them collapsed, */\n/* so the caret is decorative. Mirrors the app's `Chip` + ExpandToggle */\n/* / `Caption1` + ExpandToggle pattern. */\n/* ------------------------------------------------------------------ */\n\nconst CaretRow = styled.div`\n display: flex;\n align-items: center;\n gap: 12px;\n\n .caret {\n display: inline-flex;\n transform: rotate(180deg);\n }\n`;\n\nexport const SettingCount = ({\n count,\n}: {\n count: number | string;\n}): ReactElement => (\n <CaretRow>\n <Chip\n label={String(count)}\n backgroundColor=\"var(--color-theme-300)\"\n color=\"var(--color-theme-900)\"\n size=\"regular\"\n />\n <span className=\"caret\">\n <CollapseExpandSingleIcon />\n </span>\n </CaretRow>\n);\n\nexport const SettingValue = ({ value }: { value: string }): ReactElement => (\n <CaretRow>\n <Caption1 color=\"tertiary\">{value}</Caption1>\n <span className=\"caret\">\n <CollapseExpandSingleIcon />\n </span>\n </CaretRow>\n);\n"],"mappings":";;;;;;AAYA,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,KAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAIA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAA+E,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAzB/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;;AAEA,IAAMG,oBAAoB,GAAGC,yBAAM,CAACC,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,muBAedC,UAAE,EASFC,UAAE,EAYFA,UAAE,EAaFA,UAAE,EAYFD,UAAE,CAI1B;AAOM,IAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,SAAjBA,cAAcA,CAAAE,IAAA;EAAA,IACzBC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,SAAS,GAAAF,IAAA,CAATE,SAAS;EAAA,oBAET1B,MAAA,CAAAa,OAAA,CAAAc,aAAA,CAACb,oBAAoB,qBACnBd,MAAA,CAAAa,OAAA,CAAA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CAAAc,aAAA,CAACnB,MAAA,CAAAyD,wBAAwB,MAAE,CACvB,CACE,CAAC;AAAA,CACZ","ignoreList":[]}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SystemSettingsDialog = exports.SYSTEM_SETTINGS_GROUPS = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _Dialog = require("../../components/Dialog");
|
|
10
|
+
var _Icons = require("../../components/Icons");
|
|
11
|
+
var _Input = require("../../components/Input");
|
|
12
|
+
var _SideNav = require("../../components/SideNav");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
/**
|
|
15
|
+
* Shared chrome for the redesigned System Settings presentation stories
|
|
16
|
+
* (`Presentation/System Settings/*`). The whole feature is now one modal
|
|
17
|
+
* dialog: a `Dialog size="xxxl" height="95%"` titled "System Settings" whose
|
|
18
|
+
* content is a two-column shell — a `SideNav` rail (search field + the
|
|
19
|
+
* Administration / Work / Finances groups) on the left, and the active
|
|
20
|
+
* section's pane on the right. Every section story renders this shell with its
|
|
21
|
+
* own `active` id and supplies only the pane content, so the chrome stays
|
|
22
|
+
* identical and lives in one place.
|
|
23
|
+
*
|
|
24
|
+
* Mirrors the app:
|
|
25
|
+
* - components/Settings/SystemSettingsDialog.jsx (Dialog size/height/title)
|
|
26
|
+
* - pages/SystemSettings/SystemSettingsShell.jsx (rail + pane grid, the
|
|
27
|
+
* in-dialog surface overrides, the search field above the SideNav)
|
|
28
|
+
* - pages/SystemSettings/sections.jsx (the groups, ids, icons and labels)
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/* ------------------------------------------------------------------ */
|
|
32
|
+
/* Section registry (mirrors sections.jsx: SECTION_GROUPS + names). */
|
|
33
|
+
/* ------------------------------------------------------------------ */
|
|
34
|
+
|
|
35
|
+
var SYSTEM_SETTINGS_GROUPS = exports.SYSTEM_SETTINGS_GROUPS = [{
|
|
36
|
+
id: "administration",
|
|
37
|
+
title: "Administration",
|
|
38
|
+
sections: [{
|
|
39
|
+
id: "general",
|
|
40
|
+
label: "General",
|
|
41
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.GearIcon, null)
|
|
42
|
+
}, {
|
|
43
|
+
id: "security",
|
|
44
|
+
label: "Security",
|
|
45
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.LockIcon, null)
|
|
46
|
+
}]
|
|
47
|
+
}, {
|
|
48
|
+
id: "work",
|
|
49
|
+
title: "Work",
|
|
50
|
+
sections: [{
|
|
51
|
+
id: "project",
|
|
52
|
+
label: "Projects",
|
|
53
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.ProjectsIcon, null)
|
|
54
|
+
}, {
|
|
55
|
+
id: "workday",
|
|
56
|
+
label: "Workday",
|
|
57
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.ClockIcon, null)
|
|
58
|
+
}, {
|
|
59
|
+
id: "calendar",
|
|
60
|
+
label: "Calendar",
|
|
61
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.CalendarIcon, null)
|
|
62
|
+
}]
|
|
63
|
+
}, {
|
|
64
|
+
id: "finances",
|
|
65
|
+
title: "Finances",
|
|
66
|
+
sections: [{
|
|
67
|
+
id: "tracking",
|
|
68
|
+
label: "Time & Expenses",
|
|
69
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.ClockStopwatchIcon, null)
|
|
70
|
+
}, {
|
|
71
|
+
id: "invoice",
|
|
72
|
+
label: "Invoices & Estimates",
|
|
73
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.InvoicesIcon, null)
|
|
74
|
+
}, {
|
|
75
|
+
id: "invoice-designer",
|
|
76
|
+
label: "Invoice Designer",
|
|
77
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.EditIcon, null)
|
|
78
|
+
}]
|
|
79
|
+
}];
|
|
80
|
+
|
|
81
|
+
/* ------------------------------------------------------------------ */
|
|
82
|
+
/* Layout */
|
|
83
|
+
/* Matches SystemSettingsShell.jsx: a 220px rail + 1fr pane that stack */
|
|
84
|
+
/* below the 768px breakpoint, 24px gap (tw-gap-6). */
|
|
85
|
+
/* ------------------------------------------------------------------ */
|
|
86
|
+
|
|
87
|
+
var SHELL_BREAKPOINT = "768px";
|
|
88
|
+
var Shell = _styledComponents.default.div.withConfig({
|
|
89
|
+
displayName: "systemSettingsDialog__Shell",
|
|
90
|
+
componentId: "sc-umcfz2-0"
|
|
91
|
+
})(["display:flex;flex-direction:column;gap:24px;@media (min-width:", "){display:grid;grid-template-columns:220px 1fr;align-items:start;gap:24px;}"], SHELL_BREAKPOINT);
|
|
92
|
+
var Rail = _styledComponents.default.div.withConfig({
|
|
93
|
+
displayName: "systemSettingsDialog__Rail",
|
|
94
|
+
componentId: "sc-umcfz2-1"
|
|
95
|
+
})(["width:100%;.settings-search,.settings-search.c-input-wrapper{width:100%;max-width:100%;margin-bottom:30px;}"]);
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The pane. Cards and the dialog share --page-paper-main, so inside the dialog
|
|
99
|
+
* the section cards take the body surface and drop their shadow, exactly as the
|
|
100
|
+
* app's PANE_SURFACE_IN_DIALOG does. Content column is capped at 850px like the
|
|
101
|
+
* app Page (tw-max-w-[850px] tw-pb-6).
|
|
102
|
+
*/
|
|
103
|
+
var Pane = _styledComponents.default.div.withConfig({
|
|
104
|
+
displayName: "systemSettingsDialog__Pane",
|
|
105
|
+
componentId: "sc-umcfz2-2"
|
|
106
|
+
})(["min-width:0;width:100%;max-width:850px;padding-bottom:24px;--page-paper-main:var(--body-bg-main);--shadow-tertiary:none;--shadow-tertiary-hover:none;"]);
|
|
107
|
+
|
|
108
|
+
/* ------------------------------------------------------------------ */
|
|
109
|
+
/* The dialog */
|
|
110
|
+
/* ------------------------------------------------------------------ */
|
|
111
|
+
|
|
112
|
+
var SystemSettingsDialog = exports.SystemSettingsDialog = function SystemSettingsDialog(_ref) {
|
|
113
|
+
var active = _ref.active,
|
|
114
|
+
children = _ref.children,
|
|
115
|
+
onClose = _ref.onClose;
|
|
116
|
+
var close = onClose !== null && onClose !== void 0 ? onClose : function () {
|
|
117
|
+
return undefined;
|
|
118
|
+
};
|
|
119
|
+
return /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
|
|
120
|
+
open: true,
|
|
121
|
+
size: "xxxl",
|
|
122
|
+
height: "95%",
|
|
123
|
+
onClose: close,
|
|
124
|
+
enableBackgroundClick: true
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Title, {
|
|
126
|
+
onClose: close
|
|
127
|
+
}, "System Settings"), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Content, null, /*#__PURE__*/_react.default.createElement(Shell, null, /*#__PURE__*/_react.default.createElement(Rail, null, /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
128
|
+
className: "settings-search",
|
|
129
|
+
placeholder: "Search settings",
|
|
130
|
+
startAdornment: /*#__PURE__*/_react.default.createElement(_Icons.SearchIcon, {
|
|
131
|
+
width: 16,
|
|
132
|
+
height: 16
|
|
133
|
+
})
|
|
134
|
+
}), /*#__PURE__*/_react.default.createElement(_SideNav.SideNav, {
|
|
135
|
+
ariaLabel: "Settings sections",
|
|
136
|
+
selected: active
|
|
137
|
+
}, SYSTEM_SETTINGS_GROUPS.map(function (group) {
|
|
138
|
+
return /*#__PURE__*/_react.default.createElement(_SideNav.SideNav.Group, {
|
|
139
|
+
key: group.id,
|
|
140
|
+
title: group.title
|
|
141
|
+
}, group.sections.map(function (section) {
|
|
142
|
+
return /*#__PURE__*/_react.default.createElement(_SideNav.SideNav.Item, {
|
|
143
|
+
key: section.id,
|
|
144
|
+
id: section.id,
|
|
145
|
+
icon: section.icon
|
|
146
|
+
}, section.label);
|
|
147
|
+
}));
|
|
148
|
+
}))), /*#__PURE__*/_react.default.createElement(Pane, null, children))));
|
|
149
|
+
};
|
|
150
|
+
//# sourceMappingURL=systemSettingsDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemSettingsDialog.js","names":["_react","_interopRequireDefault","require","_styledComponents","_Dialog","_Icons","_Input","_SideNav","e","__esModule","default","SYSTEM_SETTINGS_GROUPS","exports","id","title","sections","label","icon","createElement","GearIcon","LockIcon","ProjectsIcon","ClockIcon","CalendarIcon","ClockStopwatchIcon","InvoicesIcon","EditIcon","SHELL_BREAKPOINT","Shell","styled","div","withConfig","displayName","componentId","Rail","Pane","SystemSettingsDialog","_ref","active","children","onClose","close","undefined","Dialog","open","size","height","enableBackgroundClick","Title","ContentDivider","Content","Input","className","placeholder","startAdornment","SearchIcon","width","SideNav","ariaLabel","selected","map","group","Group","key","section","Item"],"sources":["../../../../src/presentation/shared/systemSettingsDialog.tsx"],"sourcesContent":["/**\n * Shared chrome for the redesigned System Settings presentation stories\n * (`Presentation/System Settings/*`). The whole feature is now one modal\n * dialog: a `Dialog size=\"xxxl\" height=\"95%\"` titled \"System Settings\" whose\n * content is a two-column shell — a `SideNav` rail (search field + the\n * Administration / Work / Finances groups) on the left, and the active\n * section's pane on the right. Every section story renders this shell with its\n * own `active` id and supplies only the pane content, so the chrome stays\n * identical and lives in one place.\n *\n * Mirrors the app:\n * - components/Settings/SystemSettingsDialog.jsx (Dialog size/height/title)\n * - pages/SystemSettings/SystemSettingsShell.jsx (rail + pane grid, the\n * in-dialog surface overrides, the search field above the SideNav)\n * - pages/SystemSettings/sections.jsx (the groups, ids, icons and labels)\n */\nimport React, { ReactElement, ReactNode } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { Dialog } from \"../../components/Dialog\";\nimport {\n CalendarIcon,\n ClockIcon,\n ClockStopwatchIcon,\n EditIcon,\n GearIcon,\n InvoicesIcon,\n LockIcon,\n ProjectsIcon,\n SearchIcon,\n} from \"../../components/Icons\";\nimport { Input } from \"../../components/Input\";\nimport { SideNav } from \"../../components/SideNav\";\n\n/* ------------------------------------------------------------------ */\n/* Section registry (mirrors sections.jsx: SECTION_GROUPS + names). */\n/* ------------------------------------------------------------------ */\n\nexport type SystemSettingsSectionId =\n | \"general\"\n | \"security\"\n | \"project\"\n | \"workday\"\n | \"calendar\"\n | \"tracking\"\n | \"invoice\"\n | \"invoice-designer\";\n\ninterface SectionDef {\n id: SystemSettingsSectionId;\n label: string;\n icon: ReactElement;\n}\n\ninterface GroupDef {\n id: string;\n title: string;\n sections: SectionDef[];\n}\n\nexport const SYSTEM_SETTINGS_GROUPS: GroupDef[] = [\n {\n id: \"administration\",\n title: \"Administration\",\n sections: [\n { id: \"general\", label: \"General\", icon: <GearIcon /> },\n { id: \"security\", label: \"Security\", icon: <LockIcon /> },\n ],\n },\n {\n id: \"work\",\n title: \"Work\",\n sections: [\n { id: \"project\", label: \"Projects\", icon: <ProjectsIcon /> },\n { id: \"workday\", label: \"Workday\", icon: <ClockIcon /> },\n { id: \"calendar\", label: \"Calendar\", icon: <CalendarIcon /> },\n ],\n },\n {\n id: \"finances\",\n title: \"Finances\",\n sections: [\n {\n id: \"tracking\",\n label: \"Time & Expenses\",\n icon: <ClockStopwatchIcon />,\n },\n { id: \"invoice\", label: \"Invoices & Estimates\", icon: <InvoicesIcon /> },\n { id: \"invoice-designer\", label: \"Invoice Designer\", icon: <EditIcon /> },\n ],\n },\n];\n\n/* ------------------------------------------------------------------ */\n/* Layout */\n/* Matches SystemSettingsShell.jsx: a 220px rail + 1fr pane that stack */\n/* below the 768px breakpoint, 24px gap (tw-gap-6). */\n/* ------------------------------------------------------------------ */\n\nconst SHELL_BREAKPOINT = \"768px\";\n\nconst Shell = styled.div`\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n @media (min-width: ${SHELL_BREAKPOINT}) {\n display: grid;\n grid-template-columns: 220px 1fr;\n align-items: start;\n gap: 24px;\n }\n`;\n\nconst Rail = styled.div`\n width: 100%;\n\n /* The search field fills the rail instead of the DS Input's fixed 360px. */\n .settings-search,\n .settings-search.c-input-wrapper {\n width: 100%;\n max-width: 100%;\n margin-bottom: 30px;\n }\n`;\n\n/**\n * The pane. Cards and the dialog share --page-paper-main, so inside the dialog\n * the section cards take the body surface and drop their shadow, exactly as the\n * app's PANE_SURFACE_IN_DIALOG does. Content column is capped at 850px like the\n * app Page (tw-max-w-[850px] tw-pb-6).\n */\nconst Pane = styled.div`\n min-width: 0;\n width: 100%;\n max-width: 850px;\n padding-bottom: 24px;\n\n --page-paper-main: var(--body-bg-main);\n --shadow-tertiary: none;\n --shadow-tertiary-hover: none;\n`;\n\n/* ------------------------------------------------------------------ */\n/* The dialog */\n/* ------------------------------------------------------------------ */\n\nexport interface SystemSettingsDialogProps {\n /** Which section is open — highlights its SideNav item and shows its pane. */\n active: SystemSettingsSectionId;\n /** The active section's pane content. */\n children: ReactNode;\n /** Optional close handler; defaults to a no-op for the mock. */\n onClose?: () => void;\n}\n\nexport const SystemSettingsDialog = ({\n active,\n children,\n onClose,\n}: SystemSettingsDialogProps): ReactElement => {\n const close = onClose ?? ((): void => undefined);\n\n return (\n <Dialog open size=\"xxxl\" height=\"95%\" onClose={close} enableBackgroundClick>\n <Dialog.Title onClose={close}>System Settings</Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <Shell>\n <Rail>\n <Input\n className=\"settings-search\"\n placeholder=\"Search settings\"\n startAdornment={<SearchIcon width={16} height={16} />}\n />\n {/* SideNav items are visual in the mock — selection is driven by\n the `active` prop; picking another one is a no-op. */}\n <SideNav ariaLabel=\"Settings sections\" selected={active}>\n {SYSTEM_SETTINGS_GROUPS.map((group) => (\n <SideNav.Group key={group.id} title={group.title}>\n {group.sections.map((section) => (\n <SideNav.Item\n key={section.id}\n id={section.id}\n icon={section.icon}\n >\n {section.label}\n </SideNav.Item>\n ))}\n </SideNav.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;IAAG,CAAE;EAAE,CACvD,CAAC,eAGF9C,MAAA,CAAAU,OAAA,CAAAQ,aAAA,CAACX,QAAA,CAAAkD,OAAO;IAACC,SAAS,EAAC,mBAAmB;IAACC,QAAQ,EAAErB;EAAO,GACrD3B,sBAAsB,CAACiD,GAAG,CAAC,UAACC,KAAK;IAAA,oBAChC7D,MAAA,CAAAU,OAAA,CAAAQ,aAAA,CAACX,QAAA,CAAAkD,OAAO,CAACK,KAAK;MAACC,GAAG,EAAEF,KAAK,CAAChD,EAAG;MAACC,KAAK,EAAE+C,KAAK,CAAC/C;IAAM,GAC9C+C,KAAK,CAAC9C,QAAQ,CAAC6C,GAAG,CAAC,UAACI,OAAO;MAAA,oBAC1BhE,MAAA,CAAAU,OAAA,CAAAQ,aAAA,CAACX,QAAA,CAAAkD,OAAO,CAACQ,IAAI;QACXF,GAAG,EAAEC,OAAO,CAACnD,EAAG;QAChBA,EAAE,EAAEmD,OAAO,CAACnD,EAAG;QACfI,IAAI,EAAE+C,OAAO,CAAC/C;MAAK,GAElB+C,OAAO,CAAChD,KACG,CAAC;IAAA,CAChB,CACY,CAAC;EAAA,CACjB,CACM,CACL,CAAC,eACPhB,MAAA,CAAAU,OAAA,CAAAQ,aAAA,CAACiB,IAAI,QAAEI,QAAe,CACjB,CACO,CACV,CAAC;AAEb,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/SourceCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAc,
|
|
1
|
+
{"version":3,"file":"SourceCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/SourceCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAc,EACZ,WAAW,EACX,YAAY,EAIb,MAAM,OAAO,CAAC;AA+Gf,KAAK,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAU1D,UAAU,KAAK;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