@stratum-hq/react 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/components/ConfigDriftIndicator.d.ts +9 -0
  2. package/dist/components/ConfigDriftIndicator.d.ts.map +1 -0
  3. package/dist/components/ConfigDriftIndicator.js +24 -0
  4. package/dist/components/ConfigDriftIndicator.js.map +1 -0
  5. package/dist/components/DraggableTenantTree.d.ts +18 -11
  6. package/dist/components/DraggableTenantTree.d.ts.map +1 -1
  7. package/dist/components/DraggableTenantTree.js +99 -37
  8. package/dist/components/DraggableTenantTree.js.map +1 -1
  9. package/dist/components/EmptyState.d.ts +12 -0
  10. package/dist/components/EmptyState.d.ts.map +1 -0
  11. package/dist/components/EmptyState.js +5 -0
  12. package/dist/components/EmptyState.js.map +1 -0
  13. package/dist/components/TenantHealthCard.d.ts +15 -0
  14. package/dist/components/TenantHealthCard.d.ts.map +1 -0
  15. package/dist/components/TenantHealthCard.js +12 -0
  16. package/dist/components/TenantHealthCard.js.map +1 -0
  17. package/dist/components/TenantThemeProvider.d.ts +14 -0
  18. package/dist/components/TenantThemeProvider.d.ts.map +1 -0
  19. package/dist/components/TenantThemeProvider.js +19 -0
  20. package/dist/components/TenantThemeProvider.js.map +1 -0
  21. package/dist/index.d.ts +8 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +4 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/styles/default.css +1143 -0
  26. package/package.json +2 -1
  27. package/dist/components/ConfigEditor.stories.d.ts +0 -35
  28. package/dist/components/ConfigEditor.stories.d.ts.map +0 -1
  29. package/dist/components/ConfigEditor.stories.js +0 -73
  30. package/dist/components/ConfigEditor.stories.js.map +0 -1
  31. package/dist/components/PermissionEditor.stories.d.ts +0 -34
  32. package/dist/components/PermissionEditor.stories.d.ts.map +0 -1
  33. package/dist/components/PermissionEditor.stories.js +0 -90
  34. package/dist/components/PermissionEditor.stories.js.map +0 -1
  35. package/dist/components/Skeleton.stories.d.ts +0 -46
  36. package/dist/components/Skeleton.stories.d.ts.map +0 -1
  37. package/dist/components/Skeleton.stories.js +0 -125
  38. package/dist/components/Skeleton.stories.js.map +0 -1
  39. package/dist/components/TenantSwitcher.stories.d.ts +0 -30
  40. package/dist/components/TenantSwitcher.stories.d.ts.map +0 -1
  41. package/dist/components/TenantSwitcher.stories.js +0 -76
  42. package/dist/components/TenantSwitcher.stories.js.map +0 -1
  43. package/dist/components/TenantTree.stories.d.ts +0 -28
  44. package/dist/components/TenantTree.stories.d.ts.map +0 -1
  45. package/dist/components/TenantTree.stories.js +0 -71
  46. package/dist/components/TenantTree.stories.js.map +0 -1
  47. package/dist/components/Toast.stories.d.ts +0 -36
  48. package/dist/components/Toast.stories.d.ts.map +0 -1
  49. package/dist/components/Toast.stories.js +0 -105
  50. package/dist/components/Toast.stories.js.map +0 -1
  51. package/dist/components/storybook-helpers.d.ts +0 -96
  52. package/dist/components/storybook-helpers.d.ts.map +0 -1
  53. package/dist/components/storybook-helpers.js +0 -473
  54. package/dist/components/storybook-helpers.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stratum-hq/react",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "description": "Stratum React UI components for multi-tenant administration",
6
6
  "main": "./dist/index.js",
@@ -20,6 +20,7 @@
20
20
  ],
21
21
  "scripts": {
22
22
  "build": "tsc",
23
+ "postbuild": "cp -r src/styles dist/styles",
23
24
  "test": "vitest run --passWithNoTests",
24
25
  "lint": "tsc --noEmit",
25
26
  "clean": "rm -rf dist",
@@ -1,35 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { ConfigEditor } from "./ConfigEditor.js";
3
- declare const meta: Meta<typeof ConfigEditor>;
4
- export default meta;
5
- type Story = StoryObj<typeof ConfigEditor>;
6
- /**
7
- * Default state with a mix of own, inherited, and locked configuration
8
- * values. Represents a typical mid-level tenant (CyberShield MSP) that
9
- * inherits SSO and MFA settings from Acme Corp but sets its own billing plan.
10
- */
11
- export declare const Default: Story;
12
- /**
13
- * Loading state shown while config entries are being resolved.
14
- * In production this shows "Loading config..." while the API
15
- * resolves the full inheritance chain.
16
- */
17
- export declare const Loading: Story;
18
- /**
19
- * Empty state when the tenant has no configuration values set
20
- * and nothing is inherited from parent tenants.
21
- */
22
- export declare const Empty: Story;
23
- /**
24
- * All values locked by a parent tenant (e.g., Acme Corp enforcing
25
- * organization-wide policy). No edit or delete actions are available.
26
- * The rows are highlighted with a warning background.
27
- */
28
- export declare const AllLocked: Story;
29
- /**
30
- * Configuration that includes sensitive values like webhook URLs
31
- * and API secret keys. These are typically locked and inherited
32
- * from the root tenant.
33
- */
34
- export declare const WithSensitiveValues: Story;
35
- //# sourceMappingURL=ConfigEditor.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConfigEditor.stories.d.ts","sourceRoot":"","sources":["../../src/components/ConfigEditor.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAuBnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAcvB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAcjC,CAAC"}
@@ -1,73 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { ConfigEditor } from "./ConfigEditor.js";
3
- import { MockStratumProvider, mockLockedConfigEntries, mockSensitiveConfigEntries, } from "./storybook-helpers.js";
4
- const meta = {
5
- title: "Components/ConfigEditor",
6
- component: ConfigEditor,
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: "Table-based editor for tenant configuration values. " +
11
- "Displays each key's value, source tenant, and inheritance status " +
12
- "(Own, Inherited, Locked). Inherited values show the source tenant ID. " +
13
- "Locked values cannot be edited or deleted.",
14
- },
15
- },
16
- },
17
- decorators: [
18
- (Story) => (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", children: _jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(Story, {}) }) })),
19
- ],
20
- };
21
- export default meta;
22
- /**
23
- * Default state with a mix of own, inherited, and locked configuration
24
- * values. Represents a typical mid-level tenant (CyberShield MSP) that
25
- * inherits SSO and MFA settings from Acme Corp but sets its own billing plan.
26
- */
27
- export const Default = {
28
- args: {},
29
- };
30
- /**
31
- * Loading state shown while config entries are being resolved.
32
- * In production this shows "Loading config..." while the API
33
- * resolves the full inheritance chain.
34
- */
35
- export const Loading = {
36
- args: {},
37
- decorators: [
38
- (Story) => (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", loading: true, children: _jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(Story, {}) }) })),
39
- ],
40
- };
41
- /**
42
- * Empty state when the tenant has no configuration values set
43
- * and nothing is inherited from parent tenants.
44
- */
45
- export const Empty = {
46
- args: {},
47
- decorators: [
48
- (Story) => (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", configEntries: [], children: _jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(Story, {}) }) })),
49
- ],
50
- };
51
- /**
52
- * All values locked by a parent tenant (e.g., Acme Corp enforcing
53
- * organization-wide policy). No edit or delete actions are available.
54
- * The rows are highlighted with a warning background.
55
- */
56
- export const AllLocked = {
57
- args: {},
58
- decorators: [
59
- (Story) => (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", configEntries: mockLockedConfigEntries, children: _jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(Story, {}) }) })),
60
- ],
61
- };
62
- /**
63
- * Configuration that includes sensitive values like webhook URLs
64
- * and API secret keys. These are typically locked and inherited
65
- * from the root tenant.
66
- */
67
- export const WithSensitiveValues = {
68
- args: {},
69
- decorators: [
70
- (Story) => (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", configEntries: mockSensitiveConfigEntries, children: _jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(Story, {}) }) })),
71
- ],
72
- };
73
- //# sourceMappingURL=ConfigEditor.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConfigEditor.stories.js","sourceRoot":"","sources":["../../src/components/ConfigEditor.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,mBAAmB,EAEnB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,IAAI,GAA8B;IACtC,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,SAAS,EACP,sDAAsD;oBACtD,mEAAmE;oBACnE,wEAAwE;oBACxE,4CAA4C;aAC/C;SACF;KACF;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,KAAC,mBAAmB,IAAC,eAAe,EAAC,sCAAsC,YACzE,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,YAC5C,KAAC,KAAK,KAAG,GACL,GACc,CACvB;KACF;CACF,CAAC;AAE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E,CAAC,CACT,KAAC,mBAAmB,IAClB,eAAe,EAAC,sCAAsC,EACtD,aAAa,EAAE,0BAA0B,YAEzC,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,YAC5C,KAAC,KAAK,KAAG,GACL,GACc,CACvB;KACF;CACF,CAAC"}
@@ -1,34 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { PermissionEditor } from "./PermissionEditor.js";
3
- declare const meta: Meta<typeof PermissionEditor>;
4
- export default meta;
5
- type Story = StoryObj<typeof PermissionEditor>;
6
- /**
7
- * Default state with a realistic mix of permission modes.
8
- * - LOCKED: tenant.manage and audit.read (set by root, cannot be changed)
9
- * - INHERITED: config.write and users.invite (flow from ancestor)
10
- * - DELEGATED: billing.view and webhooks.manage (delegated to this tenant)
11
- */
12
- export declare const Default: Story;
13
- /**
14
- * Loading state while permissions are being resolved through
15
- * the inheritance chain.
16
- */
17
- export declare const Loading: Story;
18
- /**
19
- * Empty state when no permission policies have been defined.
20
- * Only the table headers and the "Add" form are visible.
21
- */
22
- export declare const Empty: Story;
23
- /**
24
- * All permissions locked by the root tenant. No "Remove" actions
25
- * are available. This represents a leaf tenant with fully restricted
26
- * permission management.
27
- */
28
- export declare const AllLocked: Story;
29
- /**
30
- * All permissions delegated to this tenant, meaning the tenant
31
- * has full control and can remove any of them.
32
- */
33
- export declare const AllDelegated: Story;
34
- //# sourceMappingURL=PermissionEditor.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PermissionEditor.stories.d.ts","sourceRoot":"","sources":["../../src/components/PermissionEditor.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAuBvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAuBvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAuB1B,CAAC"}
@@ -1,90 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { PermissionEditor } from "./PermissionEditor.js";
3
- import { MockStratumProvider, mockPermissions } from "./storybook-helpers.js";
4
- const meta = {
5
- title: "Components/PermissionEditor",
6
- component: PermissionEditor,
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: "Table-based editor for tenant permission policies. " +
11
- "Shows each permission's key, value, mode (LOCKED / INHERITED / DELEGATED), " +
12
- "source tenant, and status badges. Locked permissions cannot be removed. " +
13
- "Supports adding new permissions with configurable mode and revocation policy.",
14
- },
15
- },
16
- },
17
- decorators: [
18
- (Story) => (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", children: _jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(Story, {}) }) })),
19
- ],
20
- };
21
- export default meta;
22
- /**
23
- * Default state with a realistic mix of permission modes.
24
- * - LOCKED: tenant.manage and audit.read (set by root, cannot be changed)
25
- * - INHERITED: config.write and users.invite (flow from ancestor)
26
- * - DELEGATED: billing.view and webhooks.manage (delegated to this tenant)
27
- */
28
- export const Default = {
29
- args: {},
30
- };
31
- /**
32
- * Loading state while permissions are being resolved through
33
- * the inheritance chain.
34
- */
35
- export const Loading = {
36
- args: {},
37
- decorators: [
38
- (Story) => (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", loading: true, children: _jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(Story, {}) }) })),
39
- ],
40
- };
41
- /**
42
- * Empty state when no permission policies have been defined.
43
- * Only the table headers and the "Add" form are visible.
44
- */
45
- export const Empty = {
46
- args: {},
47
- decorators: [
48
- (Story) => (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", permissions: [], children: _jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(Story, {}) }) })),
49
- ],
50
- };
51
- /**
52
- * All permissions locked by the root tenant. No "Remove" actions
53
- * are available. This represents a leaf tenant with fully restricted
54
- * permission management.
55
- */
56
- export const AllLocked = {
57
- args: {},
58
- decorators: [
59
- (Story) => {
60
- const allLocked = mockPermissions.map((p) => ({
61
- ...p,
62
- mode: "LOCKED",
63
- locked: true,
64
- delegated: false,
65
- source_tenant_id: "00000000-0000-0000-0000-000000000001",
66
- }));
67
- return (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", permissions: allLocked, children: _jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(Story, {}) }) }));
68
- },
69
- ],
70
- };
71
- /**
72
- * All permissions delegated to this tenant, meaning the tenant
73
- * has full control and can remove any of them.
74
- */
75
- export const AllDelegated = {
76
- args: {},
77
- decorators: [
78
- (Story) => {
79
- const allDelegated = mockPermissions.map((p) => ({
80
- ...p,
81
- mode: "DELEGATED",
82
- locked: false,
83
- delegated: true,
84
- source_tenant_id: "00000000-0000-0000-0000-000000000003",
85
- }));
86
- return (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", permissions: allDelegated, children: _jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(Story, {}) }) }));
87
- },
88
- ],
89
- };
90
- //# sourceMappingURL=PermissionEditor.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PermissionEditor.stories.js","sourceRoot":"","sources":["../../src/components/PermissionEditor.stories.tsx"],"names":[],"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AE,YAC5C,KAAC,KAAK,KAAG,GACL,GACc,CACvB,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
@@ -1,46 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Skeleton } from "./Skeleton.js";
3
- import { TableSkeleton } from "./TableSkeleton.js";
4
- declare const meta: Meta<typeof Skeleton>;
5
- export default meta;
6
- type Story = StoryObj<typeof Skeleton>;
7
- /**
8
- * Text variant — default skeleton for loading text lines.
9
- * Full width, 13px height matching the base font size.
10
- */
11
- export declare const Text: Story;
12
- /**
13
- * Multiple text lines simulating a paragraph or list loading state.
14
- */
15
- export declare const TextMultipleLines: Story;
16
- /**
17
- * Rectangle variant — for cards, images, or block-level placeholders.
18
- */
19
- export declare const Rect: Story;
20
- /**
21
- * Circle variant — for avatar or icon placeholders.
22
- */
23
- export declare const Circle: Story;
24
- /**
25
- * Composite layout: avatar circle next to text lines,
26
- * simulating a tenant detail card loading state.
27
- */
28
- export declare const CompositeLayout: Story;
29
- /**
30
- * Custom sizing with small dimensions for inline placeholders.
31
- */
32
- export declare const CustomSizing: Story;
33
- /**
34
- * Default TableSkeleton with 5 rows and 4 columns, matching the
35
- * ConfigEditor table layout.
36
- */
37
- export declare const TableDefault: StoryObj<typeof TableSkeleton>;
38
- /**
39
- * Config-style table skeleton with 5 columns (Key, Value, Source, Status, Actions).
40
- */
41
- export declare const TableConfigLayout: StoryObj<typeof TableSkeleton>;
42
- /**
43
- * Minimal skeleton — 2 rows, 2 columns.
44
- */
45
- export declare const TableMinimal: StoryObj<typeof TableSkeleton>;
46
- //# sourceMappingURL=Skeleton.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Skeleton.stories.d.ts","sourceRoot":"","sources":["../../src/components/Skeleton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAa/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,KAWlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,KAalB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,KAapB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAgB7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAa1B,CAAC;AAwBF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,OAAO,aAAa,CAMvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,OAAO,aAAa,CAM5D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,OAAO,aAAa,CAMvD,CAAC"}
@@ -1,125 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Skeleton } from "./Skeleton.js";
3
- import { TableSkeleton } from "./TableSkeleton.js";
4
- const meta = {
5
- title: "Components/Skeleton",
6
- component: Skeleton,
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: "Placeholder loading skeleton used while data is being fetched. " +
11
- "Supports text, rectangle, and circle variants with customizable " +
12
- "dimensions and count. Used internally by TableSkeleton.",
13
- },
14
- },
15
- },
16
- };
17
- export default meta;
18
- /**
19
- * Text variant — default skeleton for loading text lines.
20
- * Full width, 13px height matching the base font size.
21
- */
22
- export const Text = {
23
- args: {
24
- variant: "text",
25
- },
26
- decorators: [
27
- (Story) => (_jsx("div", { style: { padding: "24px", maxWidth: 400 }, children: _jsx(Story, {}) })),
28
- ],
29
- };
30
- /**
31
- * Multiple text lines simulating a paragraph or list loading state.
32
- */
33
- export const TextMultipleLines = {
34
- args: {
35
- variant: "text",
36
- count: 4,
37
- },
38
- decorators: [
39
- (Story) => (_jsx("div", { style: { padding: "24px", maxWidth: 400 }, children: _jsx(Story, {}) })),
40
- ],
41
- };
42
- /**
43
- * Rectangle variant — for cards, images, or block-level placeholders.
44
- */
45
- export const Rect = {
46
- args: {
47
- variant: "rect",
48
- width: "300px",
49
- height: "120px",
50
- },
51
- decorators: [
52
- (Story) => (_jsx("div", { style: { padding: "24px" }, children: _jsx(Story, {}) })),
53
- ],
54
- };
55
- /**
56
- * Circle variant — for avatar or icon placeholders.
57
- */
58
- export const Circle = {
59
- args: {
60
- variant: "circle",
61
- width: "48px",
62
- height: "48px",
63
- },
64
- decorators: [
65
- (Story) => (_jsx("div", { style: { padding: "24px" }, children: _jsx(Story, {}) })),
66
- ],
67
- };
68
- /**
69
- * Composite layout: avatar circle next to text lines,
70
- * simulating a tenant detail card loading state.
71
- */
72
- export const CompositeLayout = {
73
- render: () => (_jsxs("div", { style: { padding: "24px", maxWidth: 400 }, children: [_jsxs("div", { style: { display: "flex", gap: "12px", alignItems: "flex-start" }, children: [_jsx(Skeleton, { variant: "circle", width: "40px", height: "40px" }), _jsxs("div", { style: { flex: 1 }, children: [_jsx(Skeleton, { variant: "text", width: "60%" }), _jsx("div", { style: { height: "8px" } }), _jsx(Skeleton, { variant: "text", width: "40%" })] })] }), _jsx("div", { style: { marginTop: "16px" }, children: _jsx(Skeleton, { variant: "rect", height: "80px" }) })] })),
74
- };
75
- /**
76
- * Custom sizing with small dimensions for inline placeholders.
77
- */
78
- export const CustomSizing = {
79
- args: {
80
- variant: "text",
81
- width: "120px",
82
- height: "10px",
83
- },
84
- decorators: [
85
- (Story) => (_jsx("div", { style: { padding: "24px" }, children: _jsx(Story, {}) })),
86
- ],
87
- };
88
- // ---------------------------------------------------------------------------
89
- // TableSkeleton stories
90
- // ---------------------------------------------------------------------------
91
- const tableMeta = {
92
- title: "Components/TableSkeleton",
93
- component: TableSkeleton,
94
- parameters: {
95
- docs: {
96
- description: {
97
- component: "Table placeholder shown while config or permission data is loading. " +
98
- "Uses Skeleton components in a table layout with configurable row and column counts.",
99
- },
100
- },
101
- },
102
- };
103
- // We export the table stories under a second meta via a named story export
104
- // pattern. Storybook CSF only supports one default export per file, so
105
- // TableSkeleton stories are included here as additional stories.
106
- /**
107
- * Default TableSkeleton with 5 rows and 4 columns, matching the
108
- * ConfigEditor table layout.
109
- */
110
- export const TableDefault = {
111
- render: () => (_jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(TableSkeleton, { rows: 5, columns: 4 }) })),
112
- };
113
- /**
114
- * Config-style table skeleton with 5 columns (Key, Value, Source, Status, Actions).
115
- */
116
- export const TableConfigLayout = {
117
- render: () => (_jsx("div", { style: { padding: "24px", maxWidth: 900 }, children: _jsx(TableSkeleton, { rows: 7, columns: 5 }) })),
118
- };
119
- /**
120
- * Minimal skeleton — 2 rows, 2 columns.
121
- */
122
- export const TableMinimal = {
123
- render: () => (_jsx("div", { style: { padding: "24px", maxWidth: 400 }, children: _jsx(TableSkeleton, { rows: 2, columns: 2 }) })),
124
- };
125
- //# sourceMappingURL=Skeleton.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Skeleton.stories.js","sourceRoot":"","sources":["../../src/components/Skeleton.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,IAAI,GAA0B;IAClC,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,SAAS,EACP,iEAAiE;oBACjE,kEAA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,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,SAAS,EACP,sEAAsE;oBACtE,qFAAqF;aACxF;SACF;KACF;CACF,CAAC;AAEF,2EAA2E;AAC3E,uEAAuE;AACvE,iEAAiE;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAmC;IAC1D,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,YAC5C,KAAC,aAAa,IAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAI,GAClC,CACP;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAmC;IAC/D,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,YAC5C,KAAC,aAAa,IAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAI,GAClC,CACP;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAmC;IAC1D,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,YAC5C,KAAC,aAAa,IAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAI,GAClC,CACP;CACF,CAAC"}
@@ -1,30 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { TenantSwitcher } from "./TenantSwitcher.js";
3
- declare const meta: Meta<typeof TenantSwitcher>;
4
- export default meta;
5
- type Story = StoryObj<typeof TenantSwitcher>;
6
- /**
7
- * Default state with a realistic MSSP/MSP/client hierarchy.
8
- * Click the trigger to open the dropdown and browse the tenant tree.
9
- */
10
- export declare const Default: Story;
11
- /**
12
- * Loading state shown while tenant list is being fetched.
13
- */
14
- export declare const Loading: Story;
15
- /**
16
- * Empty state when no tenants exist yet.
17
- * The dropdown opens but shows an empty list.
18
- */
19
- export declare const Empty: Story;
20
- /**
21
- * Stress test with 25+ tenants to verify scrolling, search filtering,
22
- * and performance with a large tenant list.
23
- */
24
- export declare const ManyTenants: Story;
25
- /**
26
- * With a pre-selected tenant. The trigger shows "CyberShield MSP"
27
- * and the dropdown highlights it as the active selection.
28
- */
29
- export declare const WithSelectedTenant: Story;
30
- //# sourceMappingURL=TenantSwitcher.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TenantSwitcher.stories.d.ts","sourceRoot":"","sources":["../../src/components/TenantSwitcher.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAiCrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAWnB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAazB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAahC,CAAC"}
@@ -1,76 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TenantSwitcher } from "./TenantSwitcher.js";
3
- import { MockStratumProvider, mockTenants, generateManyTenants, } from "./storybook-helpers.js";
4
- const meta = {
5
- title: "Components/TenantSwitcher",
6
- component: TenantSwitcher,
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: "Dropdown for switching between tenants in a hierarchical tree. " +
11
- "Shows tenant names indented by depth with a search filter. " +
12
- "Connects to the Stratum API via StratumProvider context.",
13
- },
14
- },
15
- },
16
- decorators: [
17
- (Story, context) => {
18
- const { tenants = mockTenants, initialTenantId, loading = false, } = context.args ?? {};
19
- return (_jsx(MockStratumProvider, { tenants: tenants, initialTenantId: initialTenantId, loading: loading, children: _jsx("div", { style: { padding: "24px", maxWidth: 400 }, children: _jsx(Story, {}) }) }));
20
- },
21
- ],
22
- };
23
- export default meta;
24
- /**
25
- * Default state with a realistic MSSP/MSP/client hierarchy.
26
- * Click the trigger to open the dropdown and browse the tenant tree.
27
- */
28
- export const Default = {
29
- args: {
30
- onTenantChange: (id) => console.log("Switched to:", id),
31
- },
32
- };
33
- /**
34
- * Loading state shown while tenant list is being fetched.
35
- */
36
- export const Loading = {
37
- args: {},
38
- decorators: [
39
- (Story) => (_jsx(MockStratumProvider, { loading: true, children: _jsx("div", { style: { padding: "24px", maxWidth: 400 }, children: _jsx(Story, {}) }) })),
40
- ],
41
- };
42
- /**
43
- * Empty state when no tenants exist yet.
44
- * The dropdown opens but shows an empty list.
45
- */
46
- export const Empty = {
47
- args: {},
48
- decorators: [
49
- (Story) => (_jsx(MockStratumProvider, { tenants: [], children: _jsx("div", { style: { padding: "24px", maxWidth: 400 }, children: _jsx(Story, {}) }) })),
50
- ],
51
- };
52
- /**
53
- * Stress test with 25+ tenants to verify scrolling, search filtering,
54
- * and performance with a large tenant list.
55
- */
56
- export const ManyTenants = {
57
- args: {
58
- onTenantChange: (id) => console.log("Switched to:", id),
59
- },
60
- decorators: [
61
- (Story) => (_jsx(MockStratumProvider, { tenants: generateManyTenants(25), children: _jsx("div", { style: { padding: "24px", maxWidth: 400 }, children: _jsx(Story, {}) }) })),
62
- ],
63
- };
64
- /**
65
- * With a pre-selected tenant. The trigger shows "CyberShield MSP"
66
- * and the dropdown highlights it as the active selection.
67
- */
68
- export const WithSelectedTenant = {
69
- args: {
70
- onTenantChange: (id) => console.log("Switched to:", id),
71
- },
72
- decorators: [
73
- (Story) => (_jsx(MockStratumProvider, { initialTenantId: "00000000-0000-0000-0000-000000000003", children: _jsx("div", { style: { padding: "24px", maxWidth: 400 }, children: _jsx(Story, {}) }) })),
74
- ],
75
- };
76
- //# sourceMappingURL=TenantSwitcher.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TenantSwitcher.stories.js","sourceRoot":"","sources":["../../src/components/TenantSwitcher.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,IAAI,GAAgC;IACxC,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,SAAS,EACP,iEAAiE;oBACjE,6DAA6D;oBAC7D,0DAA0D;aAC7D;SACF;KACF;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YACjB,MAAM,EACJ,OAAO,GAAG,WAAW,EACrB,eAAe,EACf,OAAO,GAAG,KAAK,GAChB,GAAI,OAAO,CAAC,IAAgC,IAAI,EAAE,CAAC;YACpD,OAAO,CACL,KAAC,mBAAmB,IAClB,OAAO,EAAE,OAA6B,EACtC,eAAe,EAAE,eAAqC,EACtD,OAAO,EAAE,OAAkB,YAE3B,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,YAC5C,KAAC,KAAK,KAAG,GACL,GACc,CACvB,CAAC;QACJ,CAAC;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,cAAc,EAAE,CAAC,EAAU,EAAE,EAA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AC,GAAG,CAAC,cAAc,EAAE,EAAE,CAAC;KAChE;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,KAAC,mBAAmB,IAAC,eAAe,EAAC,sCAAsC,YACzE,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,YAC5C,KAAC,KAAK,KAAG,GACL,GACc,CACvB;KACF;CACF,CAAC"}
@@ -1,28 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { TenantTree } from "./TenantTree.js";
3
- declare const meta: Meta<typeof TenantTree>;
4
- export default meta;
5
- type Story = StoryObj<typeof TenantTree>;
6
- /**
7
- * Default 3-level hierarchy: Acme Corp -> MSSP/Direct channels ->
8
- * MSPs and clients. Expand nodes to browse the tree.
9
- */
10
- export declare const Default: Story;
11
- /**
12
- * Loading state while the tenant tree is being fetched from the API.
13
- */
14
- export declare const Loading: Story;
15
- /**
16
- * Empty state when no tenants exist in the hierarchy.
17
- */
18
- export declare const Empty: Story;
19
- /**
20
- * Deep 5-level hierarchy: Global Platform -> Region -> MSSP -> MSP -> Client.
21
- * Tests indentation and readability at deep nesting levels.
22
- */
23
- export declare const DeepHierarchy: Story;
24
- /**
25
- * Single root node with no children. Minimal tree display.
26
- */
27
- export declare const SingleRootNode: Story;
28
- //# sourceMappingURL=TenantTree.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TenantTree.stories.d.ts","sourceRoot":"","sources":["../../src/components/TenantTree.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQ7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAsBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAWnB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAa3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAa5B,CAAC"}