@agentskillmania/skill-ui-shared 0.1.0 → 0.1.3

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 (29) hide show
  1. package/dist/components/SplitDivider.d.ts.map +1 -1
  2. package/dist/components/SplitDivider.js +3 -0
  3. package/dist/components/SplitDivider.js.map +1 -1
  4. package/dist/tsconfig.tsbuildinfo +1 -0
  5. package/package.json +3 -3
  6. package/dist/components/CollapsibleCard.stories.d.ts +0 -16
  7. package/dist/components/CollapsibleCard.stories.d.ts.map +0 -1
  8. package/dist/components/CollapsibleCard.stories.js +0 -57
  9. package/dist/components/CollapsibleCard.stories.js.map +0 -1
  10. package/dist/components/EmptyState.stories.d.ts +0 -15
  11. package/dist/components/EmptyState.stories.d.ts.map +0 -1
  12. package/dist/components/EmptyState.stories.js +0 -45
  13. package/dist/components/EmptyState.stories.js.map +0 -1
  14. package/dist/components/ExpandableItem.stories.d.ts +0 -14
  15. package/dist/components/ExpandableItem.stories.d.ts.map +0 -1
  16. package/dist/components/ExpandableItem.stories.js +0 -178
  17. package/dist/components/ExpandableItem.stories.js.map +0 -1
  18. package/dist/components/SectionHeader.stories.d.ts +0 -13
  19. package/dist/components/SectionHeader.stories.d.ts.map +0 -1
  20. package/dist/components/SectionHeader.stories.js +0 -32
  21. package/dist/components/SectionHeader.stories.js.map +0 -1
  22. package/dist/components/SplitDivider.stories.d.ts +0 -12
  23. package/dist/components/SplitDivider.stories.d.ts.map +0 -1
  24. package/dist/components/SplitDivider.stories.js +0 -62
  25. package/dist/components/SplitDivider.stories.js.map +0 -1
  26. package/dist/components/sidebar/Sidebar.stories.d.ts +0 -14
  27. package/dist/components/sidebar/Sidebar.stories.d.ts.map +0 -1
  28. package/dist/components/sidebar/Sidebar.stories.js +0 -92
  29. package/dist/components/sidebar/Sidebar.stories.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentskillmania/skill-ui-shared",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "Shared UI components and utilities for @agentskillmania skill-ui packages.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,7 +31,7 @@
31
31
  "directory": "packages/shared"
32
32
  },
33
33
  "dependencies": {
34
- "@agentskillmania/skill-ui-theme": "0.1.0"
34
+ "@agentskillmania/skill-ui-theme": "0.1.3"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "antd": "^6.0.0",
@@ -68,7 +68,7 @@
68
68
  "node": ">=18.0.0"
69
69
  },
70
70
  "scripts": {
71
- "build": "tsc",
71
+ "build": "rm -rf dist && tsc",
72
72
  "dev": "tsc --watch",
73
73
  "test": "vitest run",
74
74
  "test:unit": "vitest run test/unit",
@@ -1,16 +0,0 @@
1
- /** @jsxImportSource @emotion/react */
2
- import type { Meta, StoryObj } from '@storybook/react-vite';
3
- import { CollapsibleCard } from './CollapsibleCard.js';
4
- import type { CollapsibleCardProps } from './CollapsibleCard.js';
5
- declare const meta: Meta<typeof CollapsibleCard>;
6
- export default meta;
7
- type Story = StoryObj<CollapsibleCardProps>;
8
- /** Expanded card showing session overview data. */
9
- export declare const Expanded: Story;
10
- /** Collapsed card — content hidden, only header visible. */
11
- export declare const Collapsed: Story;
12
- /** Card with a status badge in the header. */
13
- export declare const WithBadge: Story;
14
- /** Multiple cards stacked to demonstrate a dashboard-like layout. */
15
- export declare const MultipleCards: Story;
16
- //# sourceMappingURL=CollapsibleCard.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollapsibleCard.stories.d.ts","sourceRoot":"","sources":["../../src/components/CollapsibleCard.stories.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAItC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAAC;AAqC5C,mDAAmD;AACnD,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,SAAS,EAAE,KAuBvB,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,aAAa,EAAE,KAkC3B,CAAC"}
@@ -1,57 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
- import { css, useTheme } from '@emotion/react';
3
- import { CollapsibleCard } from './CollapsibleCard.js';
4
- const meta = {
5
- title: 'Shared/CollapsibleCard',
6
- component: CollapsibleCard,
7
- tags: ['autodocs'],
8
- };
9
- export default meta;
10
- /** Helper to render a key-value row inside a card. */
11
- function KVRow({ label, value }) {
12
- const theme = useTheme();
13
- return (_jsxs("div", { css: css `
14
- display: flex;
15
- justify-content: space-between;
16
- padding: ${theme.spacing[1]} 0;
17
- &:not(:last-child) {
18
- border-bottom: 1px solid ${theme.color.borderSecondary};
19
- }
20
- `, children: [_jsx("span", { css: css `
21
- font-size: ${theme.font.size.sm};
22
- color: ${theme.color.textSecondary};
23
- `, children: label }), _jsx("span", { css: css `
24
- font-size: ${theme.font.size.sm};
25
- color: ${theme.color.text};
26
- font-weight: ${theme.font.weight.medium};
27
- `, children: value })] }));
28
- }
29
- /** Expanded card showing session overview data. */
30
- export const Expanded = {
31
- render: () => (_jsxs(CollapsibleCard, { title: "Session Overview", defaultCollapsed: false, children: [_jsx(KVRow, { label: "Session ID", value: "sess-abc123" }), _jsx(KVRow, { label: "Agent", value: "Code Assistant" }), _jsx(KVRow, { label: "Status", value: "Running" }), _jsx(KVRow, { label: "Duration", value: "2m 34s" })] })),
32
- };
33
- /** Collapsed card — content hidden, only header visible. */
34
- export const Collapsed = {
35
- render: () => (_jsxs(CollapsibleCard, { title: "Session Overview", defaultCollapsed: true, children: [_jsx(KVRow, { label: "Session ID", value: "sess-abc123" }), _jsx(KVRow, { label: "Agent", value: "Code Assistant" })] })),
36
- };
37
- /** Card with a status badge in the header. */
38
- export const WithBadge = {
39
- render: () => (_jsxs(CollapsibleCard, { title: "Agent State", badge: _jsx("span", { style: {
40
- fontSize: '11px',
41
- padding: '1px 8px',
42
- borderRadius: '4px',
43
- background: 'rgba(67,97,238,0.08)',
44
- color: '#4361ee',
45
- }, children: "Running" }), children: [_jsx(KVRow, { label: "Model", value: "claude-sonnet-4" }), _jsx(KVRow, { label: "Tokens Used", value: "12,847" }), _jsx(KVRow, { label: "Tools Available", value: "8" })] })),
46
- };
47
- /** Multiple cards stacked to demonstrate a dashboard-like layout. */
48
- export const MultipleCards = {
49
- render: () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '12px' }, children: [_jsxs(CollapsibleCard, { title: "Session Overview", defaultCollapsed: false, children: [_jsx(KVRow, { label: "Session ID", value: "sess-abc123" }), _jsx(KVRow, { label: "Agent", value: "Code Assistant" }), _jsx(KVRow, { label: "Status", value: "Running" })] }), _jsxs(CollapsibleCard, { title: "Agent State", defaultCollapsed: true, children: [_jsx(KVRow, { label: "Model", value: "claude-sonnet-4" }), _jsx(KVRow, { label: "Tokens Used", value: "12,847" })] }), _jsxs(CollapsibleCard, { title: "Skills", defaultCollapsed: false, badge: _jsx("span", { style: {
50
- fontSize: '11px',
51
- padding: '1px 8px',
52
- borderRadius: '4px',
53
- background: 'rgba(34,197,94,0.08)',
54
- color: '#16a34a',
55
- }, children: "5 loaded" }), children: [_jsx(KVRow, { label: "Active Skills", value: "browse, code-review, ship" }), _jsx(KVRow, { label: "Last Updated", value: "2 hours ago" })] })] })),
56
- };
57
- //# sourceMappingURL=CollapsibleCard.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,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QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,aACnE,MAAC,eAAe,IAAC,KAAK,EAAC,kBAAkB,EAAC,gBAAgB,EAAE,KAAK,aAC/D,KAAC,KAAK,IAAC,KAAK,EAAC,YAAY,EAAC,KAAK,EAAC,aAAa,GAAG,EAChD,KAAC,KAAK,IAAC,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,gBAAgB,GAAG,EAC9C,KAAC,KAAK,IAAC,KAAK,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,GAAG,IACxB,EAClB,MAAC,eAAe,IAAC,KAAK,EAAC,aAAa,EAAC,gBAAgB,mBACnD,KAAC,KAAK,IAAC,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,iBAAiB,GAAG,EAC/C,KAAC,KAAK,IAAC,KAAK,EAAC,aAAa,EAAC,KAAK,EAAC,QAAQ,GAAG,IAC5B,EAClB,MAAC,eAAe,IACd,KAAK,EAAC,QAAQ,EACd,gBAAgB,EAAE,KAAK,EACvB,KAAK,EACH,eACE,KAAK,EAAE;wBACL,QAAQ,EAAE,MAAM;wBAChB,OAAO,EAAE,SAAS;wBAClB,YAAY,EAAE,KAAK;wBACnB,UAAU,EAAE,sBAAsB;wBAClC,KAAK,EAAE,SAAS;qBACjB,yBAGI,aAGT,KAAC,KAAK,IAAC,KAAK,EAAC,eAAe,EAAC,KAAK,EAAC,2BAA2B,GAAG,EACjE,KAAC,KAAK,IAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAC,aAAa,GAAG,IAClC,IACd,CACP;CACF,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite';
2
- import { EmptyState } from './EmptyState.js';
3
- import type { EmptyStateProps } from './EmptyState.js';
4
- declare const meta: Meta<typeof EmptyState>;
5
- export default meta;
6
- type Story = StoryObj<EmptyStateProps>;
7
- /** Default empty state with title and description. */
8
- export declare const Default: Story;
9
- /** Empty state with a call-to-action button. */
10
- export declare const WithAction: Story;
11
- /** Compact inline variant with reduced padding and horizontal layout. */
12
- export declare const Compact: Story;
13
- /** Empty state with a custom icon instead of the default antd Empty. */
14
- export declare const CustomIcon: Story;
15
- //# sourceMappingURL=EmptyState.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmptyState.stories.d.ts","sourceRoot":"","sources":["../../src/components/EmptyState.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAIjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEvC,sDAAsD;AACtD,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,UAAU,EAAE,KAmBxB,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC"}
@@ -1,45 +0,0 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
- import { EmptyState } from './EmptyState.js';
3
- const meta = {
4
- title: 'Shared/EmptyState',
5
- component: EmptyState,
6
- tags: ['autodocs'],
7
- };
8
- export default meta;
9
- /** Default empty state with title and description. */
10
- export const Default = {
11
- args: {
12
- title: 'No Data',
13
- description: 'There are no items to display.',
14
- },
15
- };
16
- /** Empty state with a call-to-action button. */
17
- export const WithAction = {
18
- args: {
19
- title: 'No Sessions',
20
- description: 'Start a new session to begin.',
21
- action: (_jsx("button", { style: {
22
- padding: '4px 16px',
23
- borderRadius: '6px',
24
- background: '#4361ee',
25
- color: '#fff',
26
- border: 'none',
27
- cursor: 'pointer',
28
- }, children: "New Session" })),
29
- },
30
- };
31
- /** Compact inline variant with reduced padding and horizontal layout. */
32
- export const Compact = {
33
- args: {
34
- compact: true,
35
- description: 'No matching results',
36
- },
37
- };
38
- /** Empty state with a custom icon instead of the default antd Empty. */
39
- export const CustomIcon = {
40
- args: {
41
- title: 'Not Found',
42
- icon: _jsx("span", { style: { fontSize: '48px' }, children: '🔍' }),
43
- },
44
- };
45
- //# sourceMappingURL=EmptyState.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmptyState.stories.js","sourceRoot":"","sources":["../../src/components/EmptyState.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,MAAM,IAAI,GAA4B;IACpC,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,CAAC,UAAU,CAAC;CACnB,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,sDAAsD;AACtD,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,gCAAgC;KAC9C;CACF,CAAC;AAEF,gDAAgD;AAChD,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,+BAA+B;QAC5C,MAAM,EAAE,CACN,iBACE,KAAK,EAAE;gBACL,OAAO,EAAE,UAAU;gBACnB,YAAY,EAAE,KAAK;gBACnB,UAAU,EAAE,SAAS;gBACrB,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,SAAS;aAClB,4BAGM,CACV;KACF;CACF,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,qBAAqB;KACnC;CACF,CAAC;AAEF,wEAAwE;AACxE,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,eAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAG,IAAI,GAAQ;KACvD;CACF,CAAC"}
@@ -1,14 +0,0 @@
1
- /** @jsxImportSource @emotion/react */
2
- import type { Meta, StoryObj } from '@storybook/react-vite';
3
- import { ExpandableItem } from './ExpandableItem.js';
4
- import type { ExpandableItemProps } from './ExpandableItem.js';
5
- declare const meta: Meta<typeof ExpandableItem>;
6
- export default meta;
7
- type Story = StoryObj<ExpandableItemProps>;
8
- /** A list of expandable event log rows with colored type tags and JSON details. */
9
- export declare const EventLogItems: Story;
10
- /** Test case rows — passed items not expandable, failed ones show error details. */
11
- export declare const TestCaseItems: Story;
12
- /** Single expandable item with controlled state via React.useState. */
13
- export declare const SingleItem: Story;
14
- //# sourceMappingURL=ExpandableItem.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpandableItem.stories.d.ts","sourceRoot":"","sources":["../../src/components/ExpandableItem.stories.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAyB,MAAM,qBAAqB,CAAC;AAEtF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAQrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAyH3C,mFAAmF;AACnF,eAAO,MAAM,aAAa,EAAE,KA2D3B,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,aAAa,EAAE,KA8E3B,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,UAAU,EAAE,KA0ExB,CAAC"}
@@ -1,178 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
- import { css, useTheme } from '@emotion/react';
3
- import { useState } from 'react';
4
- import { ChevronDown, ChevronRight } from 'lucide-react';
5
- import { ExpandableItem } from './ExpandableItem.js';
6
- const meta = {
7
- title: 'Shared/ExpandableItem',
8
- component: ExpandableItem,
9
- tags: ['autodocs'],
10
- argTypes: {
11
- renderSummary: { control: false },
12
- renderDetail: { control: false },
13
- },
14
- };
15
- export default meta;
16
- /** Colored type tag for event log entries. */
17
- function EventTypeTag({ type }) {
18
- const theme = useTheme();
19
- const colorMap = {
20
- agent: { bg: 'rgba(34,197,94,0.1)', text: theme.color.success },
21
- tool: { bg: 'rgba(67,97,238,0.1)', text: theme.color.primary },
22
- context: { bg: 'rgba(234,179,8,0.1)', text: theme.color.warning },
23
- error: { bg: 'rgba(239,68,68,0.1)', text: theme.color.error },
24
- info: { bg: theme.color.fillSecondary, text: theme.color.textSecondary },
25
- };
26
- const colors = colorMap[type] || colorMap.info;
27
- return (_jsx("span", { css: css `
28
- font-size: ${theme.font.size.xs};
29
- padding: 1px 8px;
30
- border-radius: ${theme.radius.sm};
31
- background: ${colors.bg};
32
- color: ${colors.text};
33
- font-weight: ${theme.font.weight.medium};
34
- flex-shrink: 0;
35
- `, children: type.charAt(0).toUpperCase() + type.slice(1) }));
36
- }
37
- /** Event log row with type tag, content, and timestamp. */
38
- function EventLogRow({ type, label, time, ctx, }) {
39
- const theme = useTheme();
40
- return (_jsxs("div", { css: css `
41
- display: flex;
42
- align-items: center;
43
- gap: ${theme.spacing[2]};
44
- padding: ${theme.spacing[2]} ${theme.spacing[3]};
45
- cursor: pointer;
46
- transition: background ${theme.motion.duration.fast};
47
- &:hover {
48
- background: ${theme.color.fillTertiary};
49
- }
50
- `, onClick: ctx.toggle, children: [_jsx("span", { css: css `
51
- font-size: 10px;
52
- color: ${theme.color.textTertiary};
53
- width: 16px;
54
- text-align: center;
55
- transition: transform 150ms ${theme.motion.easing.out};
56
- transform: rotate(${ctx.expanded ? 90 : 0}deg);
57
- flex-shrink: 0;
58
- `, children: "\u25B6" }), _jsx(EventTypeTag, { type: type }), _jsx("span", { css: css `
59
- font-size: ${theme.font.size.sm};
60
- color: ${theme.color.text};
61
- flex: 1;
62
- min-width: 0;
63
- overflow: hidden;
64
- text-overflow: ellipsis;
65
- white-space: nowrap;
66
- `, children: label }), _jsx("span", { css: css `
67
- font-size: ${theme.font.size.xs};
68
- color: ${theme.color.textTertiary};
69
- flex-shrink: 0;
70
- `, children: time })] }));
71
- }
72
- /** JSON detail block with monospace formatting. */
73
- function JsonDetail({ data }) {
74
- const theme = useTheme();
75
- return (_jsx("pre", { css: css `
76
- margin: 0;
77
- padding: ${theme.spacing[2]} ${theme.spacing[4]} ${theme.spacing[2]} 44px;
78
- font-size: ${theme.font.size.xs};
79
- background: ${theme.color.fillSecondary};
80
- color: ${theme.color.textSecondary};
81
- line-height: 1.5;
82
- overflow-x: auto;
83
- border-top: 1px solid ${theme.color.borderSecondary};
84
- `, children: JSON.stringify(data, null, 2) }));
85
- }
86
- /** A list of expandable event log rows with colored type tags and JSON details. */
87
- export const EventLogItems = {
88
- render: () => (_jsxs("div", { style: {
89
- width: '100%',
90
- border: '1px solid #e5e7eb',
91
- borderRadius: '6px',
92
- overflow: 'hidden',
93
- }, children: [_jsx(ExpandableItem, { renderSummary: (ctx) => (_jsx(EventLogRow, { type: "agent", label: "Agent started", time: "10:01:23", ctx: ctx })), renderDetail: () => (_jsx(JsonDetail, { data: { pid: 8492, runtime: 'colts', version: '0.3.0' } })) }), _jsx(ExpandableItem, { renderSummary: (ctx) => (_jsx(EventLogRow, { type: "tool", label: "readFile('src/runner.ts')", time: "10:01:25", ctx: ctx })), renderDetail: () => (_jsx(JsonDetail, { data: { tool: 'readFile', args: { path: 'src/runner.ts' }, result: '142 lines' } })) }), _jsx(ExpandableItem, { renderSummary: (ctx) => (_jsx(EventLogRow, { type: "context", label: "Context compressed 12.4k \u2192 3.2k", time: "10:01:30", ctx: ctx })), renderDetail: () => (_jsx(JsonDetail, { data: {
94
- anchor: 'user-request-refactor',
95
- removed: 9200,
96
- summary: 'User requested JWT refactoring...',
97
- } })) }), _jsx(ExpandableItem, { renderSummary: (ctx) => (_jsx(EventLogRow, { type: "error", label: "Tool execution failed", time: "10:01:35", ctx: ctx })), renderDetail: () => (_jsx(JsonDetail, { data: { tool: 'runCommand', exitCode: 1, stderr: 'Permission denied' } })) }), _jsx(ExpandableItem, { renderSummary: (ctx) => (_jsx(EventLogRow, { type: "info", label: "Session completed", time: "10:02:01", ctx: ctx })) })] })),
98
- };
99
- /** Test case rows — passed items not expandable, failed ones show error details. */
100
- export const TestCaseItems = {
101
- render: () => {
102
- const theme = useTheme();
103
- const tests = [
104
- { name: 'should render header', passed: true },
105
- { name: 'should apply theme colors', passed: true },
106
- { name: 'should handle empty input', passed: false },
107
- { name: 'should debounce onChange', passed: true },
108
- ];
109
- return (_jsx("div", { style: {
110
- width: '100%',
111
- border: '1px solid #e5e7eb',
112
- borderRadius: '6px',
113
- overflow: 'hidden',
114
- }, children: tests.map((test, i) => (_jsx(ExpandableItem, { expandable: !test.passed, renderSummary: (ctx) => (_jsxs("div", { css: css `
115
- display: flex;
116
- align-items: center;
117
- gap: ${theme.spacing[2]};
118
- padding: ${theme.spacing[2]} ${theme.spacing[3]};
119
- font-size: ${theme.font.size.sm};
120
- color: ${test.passed ? theme.color.text : theme.color.error};
121
- cursor: ${test.passed ? 'default' : 'pointer'};
122
- &:hover {
123
- background: ${test.passed ? 'transparent' : theme.color.fillTertiary};
124
- }
125
- `, children: [_jsx("span", { css: css `
126
- width: 20px;
127
- text-align: center;
128
- color: ${test.passed ? theme.color.success : theme.color.error};
129
- font-weight: ${theme.font.weight.bold};
130
- `, children: test.passed ? '✓' : '✗' }), _jsx("span", { css: css `flex: 1; color: ${test.passed ? theme.color.text : theme.color.error};`, children: test.name })] })), renderDetail: test.passed
131
- ? undefined
132
- : () => (_jsxs("div", { css: css `
133
- padding: ${theme.spacing[2]} ${theme.spacing[4]};
134
- font-size: ${theme.font.size.xs};
135
- color: ${theme.color.error};
136
- background: rgba(239, 68, 68, 0.04);
137
- border-top: 1px solid rgba(239, 68, 68, 0.1);
138
- font-family: ${theme.font.familyMono};
139
- `, children: ["AssertionError: expected \"\" to equal \"undefined\"", _jsx("br", {}), "at Context.<anonymous> (test/unit/input.test.ts:42:18)"] })) }, i))) }));
140
- },
141
- };
142
- /** Single expandable item with controlled state via React.useState. */
143
- export const SingleItem = {
144
- render: () => {
145
- // eslint-disable-next-line react-hooks/rules-of-hooks
146
- const [expanded, setExpanded] = useState(false);
147
- const theme = useTheme();
148
- return (_jsx("div", { css: css `
149
- border: 1px solid ${theme.color.border};
150
- border-radius: ${theme.radius.md};
151
- overflow: hidden;
152
- width: 100%;
153
- `, children: _jsx(ExpandableItem, { expanded: expanded, onToggle: (next) => setExpanded(next), renderSummary: (ctx) => (_jsxs("div", { css: css `
154
- display: flex;
155
- align-items: center;
156
- justify-content: space-between;
157
- padding: ${theme.spacing[2]} ${theme.spacing[3]};
158
- cursor: pointer;
159
- transition: background ${theme.motion.duration.fast};
160
- &:hover {
161
- background: ${theme.color.fillTertiary};
162
- }
163
- `, onClick: ctx.toggle, children: [_jsxs("div", { css: css `display: flex; align-items: center; gap: ${theme.spacing[2]};`, children: [ctx.expanded ? (_jsx(ChevronDown, { size: 14, css: css `color: ${theme.color.textTertiary};` })) : (_jsx(ChevronRight, { size: 14, css: css `color: ${theme.color.textTertiary};` })), _jsxs("span", { css: css `font-size: ${theme.font.size.sm}; color: ${theme.color.text};`, children: ["Click to ", ctx.expanded ? 'collapse' : 'expand'] })] }), _jsx("span", { css: css `
164
- font-size: ${theme.font.size.xs};
165
- color: ${theme.color.textTertiary};
166
- background: ${theme.color.fillSecondary};
167
- padding: 2px 8px;
168
- border-radius: ${theme.radius.sm};
169
- `, children: expanded ? 'OPEN' : 'CLOSED' })] })), renderDetail: () => (_jsxs("div", { css: css `
170
- padding: ${theme.spacing[3]};
171
- background: ${theme.color.fillSecondary};
172
- font-size: ${theme.font.size.sm};
173
- color: ${theme.color.textSecondary};
174
- border-top: 1px solid ${theme.color.borderSecondary};
175
- `, children: ["This content is controlled via React.useState. The expanded state is:", ' ', _jsx("strong", { children: expanded ? 'true' : 'false' }), "."] })) }) }));
176
- },
177
- };
178
- //# sourceMappingURL=ExpandableItem.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpandableItem.stories.js","sourceRoot":"","sources":["../../src/components/ExpandableItem.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,MAAM,IAAI,GAAgC;IACxC,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,cAAc;IACzB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,aAAa,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;QACjC,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;KACjC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,8CAA8C;AAC9C,SAAS,YAAY,CAAC,EAAE,IAAI,EAAoB;IAC9C,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAiD;QAC7D,KAAK,EAAE,EAAE,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE;QAC/D,IAAI,EAAE,EAAE,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE;QAC9D,O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EAAE,GAAG,CAAA,UAAU,KAAK,CAAC,KAAK,CAAC,YAAY,GAAG,GAAI,CACzE,CAAC,CAAC,CAAC,CACF,KAAC,YAAY,IAAC,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAA,UAAU,KAAK,CAAC,KAAK,CAAC,YAAY,GAAG,GAAI,CAC1E,EACD,gBAAM,GAAG,EAAE,GAAG,CAAA,cAAc,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,0BACjE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,IACzC,IACH,EACN,eACE,GAAG,EAAE,GAAG,CAAA;+BACO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;2BACtB,KAAK,CAAC,KAAK,CAAC,YAAY;gCACnB,KAAK,CAAC,KAAK,CAAC,aAAa;;mCAEtB,KAAK,CAAC,MAAM,CAAC,EAAE;iBACjC,YAEA,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,GACxB,IACH,CACP,EACD,YAAY,EAAE,GAAG,EAAE,CAAC,CAClB,eACE,GAAG,EAAE,GAAG,CAAA;2BACK,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;8BACb,KAAK,CAAC,KAAK,CAAC,aAAa;6BAC1B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;yBACtB,KAAK,CAAC,KAAK,CAAC,aAAa;wCACV,KAAK,CAAC,KAAK,CAAC,eAAe;eACpD,sFAEqE,GAAG,EACzE,2BAAS,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,GAAU,SAC1C,CACP,GACD,GACE,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite';
2
- import { SectionHeader } from './SectionHeader.js';
3
- import type { SectionHeaderProps } from './SectionHeader.js';
4
- declare const meta: Meta<typeof SectionHeader>;
5
- export default meta;
6
- type Story = StoryObj<SectionHeaderProps>;
7
- /** Default section header with icon and title. */
8
- export declare const Default: Story;
9
- /** Section header with extra content aligned to the right. */
10
- export declare const WithExtra: Story;
11
- /** Multiple headers stacked to demonstrate the divider pattern. */
12
- export declare const MultipleHeaders: Story;
13
- //# sourceMappingURL=SectionHeader.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SectionHeader.stories.d.ts","sourceRoot":"","sources":["../../src/components/SectionHeader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAOpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAE1C,kDAAkD;AAClD,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,eAAe,EAAE,KAQ7B,CAAC"}
@@ -1,32 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
- import { Cpu, Wrench, Settings } from 'lucide-react';
3
- import { SectionHeader } from './SectionHeader.js';
4
- const meta = {
5
- title: 'Shared/SectionHeader',
6
- component: SectionHeader,
7
- tags: ['autodocs'],
8
- argTypes: {
9
- icon: { control: false },
10
- },
11
- };
12
- export default meta;
13
- /** Default section header with icon and title. */
14
- export const Default = {
15
- args: {
16
- icon: Cpu,
17
- title: 'Agent State',
18
- },
19
- };
20
- /** Section header with extra content aligned to the right. */
21
- export const WithExtra = {
22
- args: {
23
- icon: Wrench,
24
- title: 'Skills',
25
- extra: _jsx("span", { children: "3 active" }),
26
- },
27
- };
28
- /** Multiple headers stacked to demonstrate the divider pattern. */
29
- export const MultipleHeaders = {
30
- render: () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: [_jsx(SectionHeader, { icon: Cpu, title: "Agent State" }), _jsx(SectionHeader, { icon: Wrench, title: "Skills", extra: _jsx("span", { children: "3 active" }) }), _jsx(SectionHeader, { icon: Settings, title: "Configuration" })] })),
31
- };
32
- //# sourceMappingURL=SectionHeader.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SectionHeader.stories.js","sourceRoot":"","sources":["../../src/components/SectionHeader.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,IAAI,GAA+B;IACvC,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;KACzB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,kDAAkD;AAClD,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,aAAa;KACrB;CACF,CAAC;AAEF,8DAA8D;AAC9D,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,sCAAqB;KAC7B;CACF,CAAC;AAEF,mEAAmE;AACnE,MAAM,CAAC,MAAM,eAAe,GAAU;IACpC,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,aACnE,KAAC,aAAa,IAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAC,aAAa,GAAG,EAChD,KAAC,aAAa,IAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAC,QAAQ,EAAC,KAAK,EAAE,sCAAqB,GAAI,EAC5E,KAAC,aAAa,IAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAC,eAAe,GAAG,IACnD,CACP;CACF,CAAC"}
@@ -1,12 +0,0 @@
1
- /** @jsxImportSource @emotion/react */
2
- import type { Meta, StoryObj } from '@storybook/react-vite';
3
- import { SplitDivider } from './SplitDivider.js';
4
- import type { SplitDividerProps } from './SplitDivider.js';
5
- declare const meta: Meta<typeof SplitDivider>;
6
- export default meta;
7
- type Story = StoryObj<SplitDividerProps>;
8
- /** Default split layout with a draggable divider between left and right panels. */
9
- export declare const Default: Story;
10
- /** Disabled divider — no drag interaction, appears as a static separator. */
11
- export declare const Disabled: Story;
12
- //# sourceMappingURL=SplitDivider.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SplitDivider.stories.d.ts","sourceRoot":"","sources":["../../src/components/SplitDivider.stories.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAInC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAEzC,mFAAmF;AACnF,eAAO,MAAM,OAAO,EAAE,KAuDrB,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,QAAQ,EAAE,KAoCtB,CAAC"}
@@ -1,62 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
- import { css, useTheme } from '@emotion/react';
3
- import { useState } from 'react';
4
- import { SplitDivider } from './SplitDivider.js';
5
- const meta = {
6
- title: 'Shared/SplitDivider',
7
- component: SplitDivider,
8
- tags: ['autodocs'],
9
- };
10
- export default meta;
11
- /** Default split layout with a draggable divider between left and right panels. */
12
- export const Default = {
13
- render: () => {
14
- // eslint-disable-next-line react-hooks/rules-of-hooks
15
- const [rightWidth, setRightWidth] = useState(280);
16
- const theme = useTheme();
17
- return (_jsxs("div", { css: css `
18
- height: 300px;
19
- display: flex;
20
- border: 1px solid ${theme.color.border};
21
- border-radius: ${theme.radius.md};
22
- overflow: hidden;
23
- `, children: [_jsxs("div", { css: css `
24
- flex: 1;
25
- background: ${theme.color.fillSecondary};
26
- padding: ${theme.spacing[4]};
27
- display: flex;
28
- flex-direction: column;
29
- gap: ${theme.spacing[2]};
30
- `, children: [_jsx("span", { css: css `font-size: ${theme.font.size.base}; font-weight: ${theme.font.weight.semibold};`, children: "Left Panel" }), _jsx("span", { css: css `font-size: ${theme.font.size.sm}; color: ${theme.color.textSecondary};`, children: "This panel takes remaining space. Drag the divider to resize." })] }), _jsx(SplitDivider, { onResize: setRightWidth }), _jsxs("div", { css: css `
31
- width: ${rightWidth}px;
32
- background: ${theme.color.bgBase};
33
- padding: ${theme.spacing[4]};
34
- display: flex;
35
- flex-direction: column;
36
- gap: ${theme.spacing[2]};
37
- overflow: hidden;
38
- `, children: [_jsx("span", { css: css `font-size: ${theme.font.size.base}; font-weight: ${theme.font.weight.semibold};`, children: "Right Panel" }), _jsxs("span", { css: css `font-size: ${theme.font.size.sm}; color: ${theme.color.textSecondary};`, children: ["Width: ", rightWidth, "px"] })] })] }));
39
- },
40
- };
41
- /** Disabled divider — no drag interaction, appears as a static separator. */
42
- export const Disabled = {
43
- render: () => {
44
- const theme = useTheme();
45
- return (_jsxs("div", { css: css `
46
- height: 300px;
47
- display: flex;
48
- border: 1px solid ${theme.color.border};
49
- border-radius: ${theme.radius.md};
50
- overflow: hidden;
51
- `, children: [_jsx("div", { css: css `
52
- flex: 1;
53
- background: ${theme.color.fillSecondary};
54
- padding: ${theme.spacing[4]};
55
- `, children: _jsx("span", { css: css `font-size: ${theme.font.size.base};`, children: "Left Panel" }) }), _jsx(SplitDivider, { onResize: () => { }, disabled: true }), _jsx("div", { css: css `
56
- width: 200px;
57
- background: ${theme.color.bgBase};
58
- padding: ${theme.spacing[4]};
59
- `, children: _jsx("span", { css: css `font-size: ${theme.font.size.base};`, children: "Right Panel" }) })] }));
60
- },
61
- };
62
- //# sourceMappingURL=SplitDivider.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SplitDivider.stories.js","sourceRoot":"","sources":["../../src/components/SplitDivider.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,MAAM,IAAI,GAA8B;IACtC,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,CAAC,UAAU,CAAC;CACnB,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,mFAAmF;AACnF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,MAAM,EAAE,GAAG,EAAE;QACX,sDAAsD;QACtD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;QAClD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;QAEzB,OAAO,CACL,eACE,GAAG,EAAE,GAAG,CAAA;;;8BAGc,KAAK,CAAC,KAAK,CAAC,MAAM;2BACrB,KAAK,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BAGc,KAAK,CAAC,KAAK,CAAC,MAAM;2BACrB,KAAK,CAAC,MAAM,CAAC,EAAE;;SAEjC,aAED,cACE,GAAG,EAAE,GAAG,CAAA;;0BAEQ,KAAK,CAAC,KAAK,CAAC,aAAa;uBAC5B,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;WAC5B,YAED,eAAM,GAAG,EAAE,GAAG,CAAA,cAAc,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,2BAAmB,GAClE,EACN,KAAC,YAAY,IAAC,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,QAAQ,SAAG,EAC7C,cACE,GAAG,EAAE,GAAG,CAAA;;0BAEQ,KAAK,CAAC,KAAK,CAAC,MAAM;uBACrB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;WAC5B,YAED,eAAM,GAAG,EAAE,GAAG,CAAA,cAAc,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,4BAAoB,GACnE,IACF,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -1,14 +0,0 @@
1
- /** @jsxImportSource @emotion/react */
2
- import type { Meta, StoryObj } from '@storybook/react-vite';
3
- import { Sidebar } from './Sidebar.js';
4
- import type { SidebarProps } from './Sidebar.js';
5
- declare const meta: Meta<typeof Sidebar>;
6
- export default meta;
7
- type Story = StoryObj<SidebarProps>;
8
- /** Fully expanded sidebar with panel content and icon bar. */
9
- export declare const Expanded: Story;
10
- /** Collapsed sidebar — only icon bar visible, panel content hidden. */
11
- export declare const Collapsed: Story;
12
- /** Fully interactive sidebar with collapse toggle, panel switching, and a split layout. */
13
- export declare const Interactive: Story;
14
- //# sourceMappingURL=Sidebar.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Sidebar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/Sidebar.stories.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAgB9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;AAuDpC,8DAA8D;AAC9D,eAAO,MAAM,QAAQ,EAAE,KAoBtB,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,SAAS,EAAE,KAevB,CAAC;AAEF,2FAA2F;AAC3F,eAAO,MAAM,WAAW,EAAE,KA4DzB,CAAC"}