@appdirect/design-system 0.0.18 → 0.0.20

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 (36) hide show
  1. package/README.md +21 -0
  2. package/bin/ad-sync-agents.mjs +542 -0
  3. package/dist/ComplexComponents/DashboardWidget/DashboardWidget.js +15 -51
  4. package/dist/ComplexComponents/DashboardWidget/DashboardWidget.tsx +91 -139
  5. package/dist/ComplexComponents/KeyInsight/index.ts +1 -1
  6. package/dist/DESIGN.md +49 -7
  7. package/dist/agent-kit/README.md +11 -0
  8. package/dist/agent-kit/manifest.json +81 -0
  9. package/dist/agent-kit/micro-ui/CLAUDE.md +1 -0
  10. package/dist/agent-kit/micro-ui/micro-ui.AGENTS.md +62 -0
  11. package/dist/agent-kit/rules/accessibility.mdc +46 -0
  12. package/dist/agent-kit/rules/module-federation.mdc +30 -0
  13. package/dist/agent-kit/rules/react-stack.mdc +73 -0
  14. package/dist/agent-kit/rules/testing.mdc +44 -0
  15. package/dist/agent-kit/skills/design-feature/SKILL.md +205 -0
  16. package/dist/agent-kit/skills/developer-handoff/SKILL.md +192 -0
  17. package/dist/agent-kit/skills/figma-mcp-integration/SKILL.md +134 -0
  18. package/dist/agent-kit/skills/figma-to-page/SKILL.md +24 -0
  19. package/dist/agent-kit/skills/mantine-combobox/SKILL.md +73 -0
  20. package/dist/agent-kit/skills/mantine-combobox/references/api.md +199 -0
  21. package/dist/agent-kit/skills/mantine-combobox/references/patterns.md +279 -0
  22. package/dist/agent-kit/skills/mantine-custom-components/SKILL.md +112 -0
  23. package/dist/agent-kit/skills/mantine-custom-components/references/api.md +407 -0
  24. package/dist/agent-kit/skills/mantine-custom-components/references/patterns.md +431 -0
  25. package/dist/agent-kit/skills/mantine-form/SKILL.md +103 -0
  26. package/dist/agent-kit/skills/mantine-form/references/api.md +313 -0
  27. package/dist/agent-kit/skills/mantine-form/references/patterns.md +310 -0
  28. package/dist/agent-kit/skills/prototype-page/SKILL.md +82 -0
  29. package/dist/contracts/DashboardWidget.json +92 -0
  30. package/dist/contracts/index.json +6 -1
  31. package/dist/css/mantine.css +172 -6
  32. package/dist/css/tokens.css +54 -4
  33. package/dist/skills/design-feature/SKILL.md +205 -0
  34. package/dist/stories/ComplexComponents/DashboardWidget/DashboardWidget.stories.tsx +76 -1
  35. package/dist/stories/index.json +4 -1
  36. package/package.json +8 -4
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
- import { DashboardWidget, Text, Title, Stack, SimpleGrid, List, Table, Pill, KeyInsight } from '@appdirect/design-system';
2
+ import { DashboardWidget, Text, Title, Stack, SimpleGrid, Box, List, Table, Pill, KeyInsight } from '@appdirect/design-system';
3
3
  import { useState } from 'react';
4
4
 
5
5
  const meta: Meta<typeof DashboardWidget> = {
@@ -32,6 +32,14 @@ Built on top of our Card component with consistent Design System styling.
32
32
  options: ['xs', 'sm', 'md', 'lg', 'xl'],
33
33
  description: 'Internal spacing between elements',
34
34
  },
35
+ interactive: {
36
+ control: 'boolean',
37
+ description: 'Hover shadow and pointer cursor',
38
+ },
39
+ selected: {
40
+ control: 'boolean',
41
+ description: 'Selected surface (brand light background, focus border)',
42
+ },
35
43
  },
36
44
  };
37
45
 
@@ -557,6 +565,73 @@ Try scrolling in the right widget to see the footer behavior in action.
557
565
  },
558
566
  };
559
567
 
568
+ // ========================== FIGMA FRAME + EQUAL HEIGHT ==========================
569
+
570
+ const periodSelect = {
571
+ data: [{ value: '7d', label: 'Last 7 days' }],
572
+ value: '7d' as string | null,
573
+ onChange: () => {},
574
+ };
575
+
576
+ export const FigmaSize: Story = {
577
+ render: () => (
578
+ <Box w={387}>
579
+ <DashboardWidget
580
+ title="A widget title"
581
+ switch={{
582
+ label: '',
583
+ checked: true,
584
+ onChange: () => {},
585
+ }}
586
+ headerSelect={periodSelect}
587
+ >
588
+ <Title order={1} ta="center">0</Title>
589
+ </DashboardWidget>
590
+ </Box>
591
+ ),
592
+ parameters: {
593
+ docs: {
594
+ description: {
595
+ story: 'Compact metric frame: 387px wide, no footer links. The footer spacer stays in flow. The value is Title order 1 (KeyInsights/level-1 is 34px bold).',
596
+ },
597
+ },
598
+ },
599
+ };
600
+
601
+ export const EqualHeightGrid: Story = {
602
+ render: () => (
603
+ <SimpleGrid cols={3} spacing="md" h={280} style={{ gridAutoRows: '1fr' }}>
604
+ <DashboardWidget
605
+ title="With links"
606
+ footerLinks={[
607
+ { label: 'View details', onClick: () => {} },
608
+ { label: 'Export', onClick: () => {} },
609
+ ]}
610
+ >
611
+ <KeyInsight value="0" title="Total" size="lg" />
612
+ </DashboardWidget>
613
+ <DashboardWidget title="No links">
614
+ <KeyInsight value="12" title="Open" size="lg" />
615
+ </DashboardWidget>
616
+ <DashboardWidget
617
+ title="Selected"
618
+ interactive
619
+ selected
620
+ headerSelect={periodSelect}
621
+ >
622
+ <KeyInsight value="4" title="New" size="lg" />
623
+ </DashboardWidget>
624
+ </SimpleGrid>
625
+ ),
626
+ parameters: {
627
+ docs: {
628
+ description: {
629
+ story: 'Three widgets in one row. One has footer links, two do not. The selected card uses interactive + selected. Footers sit on the same baseline because each card is a flex column and the footer is the last in-flow child.',
630
+ },
631
+ },
632
+ },
633
+ };
634
+
560
635
  // ========================== SALES DASHBOARD ==========================
561
636
 
562
637
  export const SalesDashboard: Story = {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.18",
2
+ "version": "0.0.20",
3
3
  "stories": [
4
4
  {
5
5
  "title": "Design System/Buttons/ActionIcon",
@@ -225,10 +225,13 @@
225
225
  "WithActionsMenuOnly",
226
226
  "ConsistentFooterSpacing",
227
227
  "ScrollableContent",
228
+ "FigmaSize",
229
+ "EqualHeightGrid",
228
230
  "SalesDashboard"
229
231
  ],
230
232
  "file": "ComplexComponents/DashboardWidget/DashboardWidget.stories.tsx",
231
233
  "designSystem": [
234
+ "Box",
232
235
  "DashboardWidget",
233
236
  "KeyInsight",
234
237
  "List",
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@appdirect/design-system",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "AppDirect Design System components. Wraps Mantine v9 with standardized props, variants, and tokens.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.ts",
7
7
  "bin": {
8
8
  "ds-audit": "./dist/bin/ds-audit.js",
9
- "ad-sync-design-md": "./bin/ad-sync-design-md.mjs"
9
+ "ad-sync-design-md": "./bin/ad-sync-design-md.mjs",
10
+ "ad-sync-agents": "./bin/ad-sync-agents.mjs"
10
11
  },
11
12
  "exports": {
12
13
  ".": {
@@ -29,10 +30,12 @@
29
30
  "./contracts": "./dist/contracts/index.json",
30
31
  "./contracts/*": "./dist/contracts/*",
31
32
  "./stories": "./dist/stories/index.json",
32
- "./stories/*": "./dist/stories/*"
33
+ "./stories/*": "./dist/stories/*",
34
+ "./agent-kit/*": "./dist/agent-kit/*"
33
35
  },
34
36
  "files": [
35
37
  "bin/ad-sync-design-md.mjs",
38
+ "bin/ad-sync-agents.mjs",
36
39
  "dist",
37
40
  "README.md"
38
41
  ],
@@ -41,11 +44,12 @@
41
44
  "build": "node scripts/build.js",
42
45
  "tarball": "npm run build && npm pack",
43
46
  "test:sync-design-md": "node --test bin/ad-sync-design-md.test.mjs",
47
+ "test:sync-agents": "node --test bin/ad-sync-agents.test.mjs",
44
48
  "verify:package": "npm pack --dry-run --ignore-scripts",
45
49
  "prepublishOnly": "npm run build"
46
50
  },
47
51
  "dependencies": {
48
- "@appdirect/ad-design-tokens": "0.0.18",
52
+ "@appdirect/ad-design-tokens": "0.0.20",
49
53
  "@mantine/dropzone": "^9.6.0",
50
54
  "@remixicon/react": "^4.6.0",
51
55
  "@tabler/icons-react": "^3.33.0",