@discourser/design-system 0.22.1 → 0.22.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 (106) hide show
  1. package/dist/{chunk-VJN7TIGL.js → chunk-GLPWI7OF.js} +3 -3
  2. package/dist/chunk-GLPWI7OF.js.map +1 -0
  3. package/dist/{chunk-IGCGVSG4.cjs → chunk-NN4YW27E.cjs} +3 -3
  4. package/dist/chunk-NN4YW27E.cjs.map +1 -0
  5. package/dist/figma-codex.json +2 -2
  6. package/dist/index.cjs +4 -4
  7. package/dist/index.js +1 -1
  8. package/dist/languages/transform.d.ts +1 -1
  9. package/dist/preset/index.cjs +2 -2
  10. package/dist/preset/index.js +1 -1
  11. package/dist/stories/foundations/components/ColorSwatch.d.ts +1 -15
  12. package/dist/stories/foundations/components/ColorSwatch.d.ts.map +1 -1
  13. package/dist/stories/foundations/components/ElevationCard.d.ts +3 -6
  14. package/dist/stories/foundations/components/ElevationCard.d.ts.map +1 -1
  15. package/dist/stories/foundations/components/SpacingBox.d.ts.map +1 -1
  16. package/dist/stories/foundations/components/TypeSpecimen.d.ts +2 -1
  17. package/dist/stories/foundations/components/TypeSpecimen.d.ts.map +1 -1
  18. package/docs/CSS_USAGE.md +235 -0
  19. package/docs/FIGMA_MAKE_SETUP.md +339 -0
  20. package/docs/GUIDELINES_REVIEW.md +728 -0
  21. package/docs/MAINTAINER_CHECKLIST.md +265 -0
  22. package/docs/TESTING_QUICK_REFERENCE.md +159 -0
  23. package/docs/TESTING_TOKENS.md +340 -0
  24. package/docs/active-stories/README.md +29 -0
  25. package/docs/active-stories/STORY-006a-figma-translation-foundations.md +324 -0
  26. package/docs/active-stories/STORY-006b-figma-translation-components.md +201 -0
  27. package/docs/active-stories/STORY-006c-figma-translation-layout-extension.md +258 -0
  28. package/docs/active-stories/STORY-008-kai-sidecar-fragments.md +137 -0
  29. package/docs/active-stories/STORY-011-verify-translation-docs.md +182 -0
  30. package/docs/archive/ARCHITECTURE-discourser-design-system.md +448 -0
  31. package/docs/claude-feed-back/ARCHITECTURE_DIAGRAM.md +243 -0
  32. package/docs/claude-feed-back/STYLING_VERIFICATION.md +89 -0
  33. package/docs/claude-feed-back/TEST_RESULTS.md +182 -0
  34. package/docs/context-share/ELEVATION_FIX_PLAN.md +903 -0
  35. package/docs/context-share/STORY-001-VALIDATION-PASSED.md +192 -0
  36. package/docs/context-share/STORY-002-IMPLEMENTATION-COMPLETE.md +161 -0
  37. package/docs/context-share/STORYBOOK_MCP_STRATEGY.md +867 -0
  38. package/docs/context-share/TESTING_GAPS_FILLED.md +353 -0
  39. package/docs/context-share/TOKEN_TESTING_SUMMARY.md +388 -0
  40. package/docs/context-share/code-connect-prompt.md +90 -0
  41. package/docs/context-share/dds-autonomous-pipeline.md +765 -0
  42. package/docs/context-share/fix-checkbox-radio-tokens.md +145 -0
  43. package/docs/context-share/icon-component-prompt.md +154 -0
  44. package/docs/context-share/icons/Audience.svg +3 -0
  45. package/docs/context-share/icons/AudioSpeaker.svg +3 -0
  46. package/docs/context-share/icons/BookmarkPlus.svg +3 -0
  47. package/docs/context-share/icons/ClipBoard.svg +8 -0
  48. package/docs/context-share/icons/DiscourserLogo.svg +4 -0
  49. package/docs/context-share/icons/ExitStudio.svg +4 -0
  50. package/docs/context-share/icons/Microphone.svg +5 -0
  51. package/docs/context-share/icons/NotebookPen.svg +3 -0
  52. package/docs/context-share/icons/PausePlay.svg +5 -0
  53. package/docs/context-share/icons/Play.svg +4 -0
  54. package/docs/context-share/icons/Record.svg +6 -0
  55. package/docs/context-share/icons/RepeatQuestion.svg +3 -0
  56. package/docs/context-share/icons/ScrollText.svg +3 -0
  57. package/docs/context-share/icons/Sparkles.svg +3 -0
  58. package/docs/context-share/icons/Speech.svg +3 -0
  59. package/docs/context-share/icons/StopPlay.svg +4 -0
  60. package/docs/context-share/icons/Timer.svg +3 -0
  61. package/docs/context-share/icons/UserProfile.svg +3 -0
  62. package/docs/context-share/m3-token-pipeline-audit.md +125 -0
  63. package/docs/context-share/storybook-mcp-kai-agent-revised-summary.md +211 -0
  64. package/docs/discourser-design-system-prd.md +3698 -0
  65. package/docs/figma-captures/01-typography.png +0 -0
  66. package/docs/figma-captures/02-button-iconbutton.png +0 -0
  67. package/docs/figma-captures/03-form-inputs.png +0 -0
  68. package/docs/figma-captures/04-form-controls.png +0 -0
  69. package/docs/figma-captures/05-data-display.png +0 -0
  70. package/docs/figma-captures/06-feedback.png +0 -0
  71. package/docs/figma-captures/07-overlays.png +0 -0
  72. package/docs/figma-captures/08-navigation-layout.png +0 -0
  73. package/docs/figma-captures/09-custom-components.png +0 -0
  74. package/docs/figma-captures/10-scenario-queue.png +0 -0
  75. package/docs/figma-captures/11-icon-library.png +0 -0
  76. package/docs/figma-make-docs/01-understanding-templates.md +235 -0
  77. package/docs/figma-make-docs/02-prerequisites.md +266 -0
  78. package/docs/figma-make-docs/03-creating-template.md +306 -0
  79. package/docs/figma-make-docs/04-adding-guidelines.md +448 -0
  80. package/docs/figma-make-docs/05-example-starter-code.md +590 -0
  81. package/docs/figma-make-docs/06-publishing-template.md +417 -0
  82. package/docs/figma-make-docs/07-maintenance.md +536 -0
  83. package/docs/figma-make-docs/08-faq.md +490 -0
  84. package/docs/figma-make-docs/README.md +95 -0
  85. package/docs/material-theme.json +418 -0
  86. package/docs/plans/2026-03-12-figma-token-export-rewrite.md +504 -0
  87. package/docs/plans/2026-03-12-step7-panda-token-resolution-design.md +119 -0
  88. package/docs/plans/2026-03-12-step7-panda-token-resolution.md +993 -0
  89. package/docs/token-name-mapping.json +850 -0
  90. package/docs/token-name-mapping.md +251 -0
  91. package/package.json +6 -4
  92. package/src/languages/transform.ts +1 -1
  93. package/src/stories/foundations/Borders.stories.tsx +138 -0
  94. package/src/stories/foundations/ColorScale.stories.tsx +737 -0
  95. package/src/stories/foundations/Colors.mdx +2 -131
  96. package/src/stories/foundations/Elevation.mdx +26 -45
  97. package/src/stories/foundations/Motion.stories.tsx +306 -0
  98. package/src/stories/foundations/Shape.stories.tsx +159 -0
  99. package/src/stories/foundations/Spacing.mdx +24 -25
  100. package/src/stories/foundations/Typography.mdx +93 -79
  101. package/src/stories/foundations/components/ColorSwatch.tsx +72 -109
  102. package/src/stories/foundations/components/ElevationCard.tsx +19 -22
  103. package/src/stories/foundations/components/SpacingBox.tsx +15 -2
  104. package/src/stories/foundations/components/TypeSpecimen.tsx +20 -21
  105. package/dist/chunk-IGCGVSG4.cjs.map +0 -1
  106. package/dist/chunk-VJN7TIGL.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": "1.0.0",
3
3
  "packageName": "@discourser/design-system",
4
- "generatedAt": "2026-03-12T17:23:35.829Z",
5
- "gitHash": "fd5ff6cc",
4
+ "generatedAt": "2026-03-13T05:28:53.666Z",
5
+ "gitHash": "c6e59461",
6
6
  "figmaFiles": {
7
7
  "GaHmFfmvO4loUzuZS4TgEz": {
8
8
  "fileKey": "GaHmFfmvO4loUzuZS4TgEz"
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkIGCGVSG4_cjs = require('./chunk-IGCGVSG4.cjs');
3
+ var chunkNN4YW27E_cjs = require('./chunk-NN4YW27E.cjs');
4
4
  var chunkWSJLKVXZ_cjs = require('./chunk-WSJLKVXZ.cjs');
5
5
  require('./chunk-EARF7VDF.cjs');
6
6
  var clsx = require('clsx');
@@ -11,15 +11,15 @@ function cn(...inputs) {
11
11
 
12
12
  Object.defineProperty(exports, "activeLanguage", {
13
13
  enumerable: true,
14
- get: function () { return chunkIGCGVSG4_cjs.material3Language; }
14
+ get: function () { return chunkNN4YW27E_cjs.material3Language; }
15
15
  });
16
16
  Object.defineProperty(exports, "discourserPandaPreset", {
17
17
  enumerable: true,
18
- get: function () { return chunkIGCGVSG4_cjs.discourserPandaPreset; }
18
+ get: function () { return chunkNN4YW27E_cjs.discourserPandaPreset; }
19
19
  });
20
20
  Object.defineProperty(exports, "transformToPandaTheme", {
21
21
  enumerable: true,
22
- get: function () { return chunkIGCGVSG4_cjs.transformToPandaTheme; }
22
+ get: function () { return chunkNN4YW27E_cjs.transformToPandaTheme; }
23
23
  });
24
24
  Object.defineProperty(exports, "AbsoluteCenter", {
25
25
  enumerable: true,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { material3Language as activeLanguage, discourserPandaPreset, transformToPandaTheme } from './chunk-VJN7TIGL.js';
1
+ export { material3Language as activeLanguage, discourserPandaPreset, transformToPandaTheme } from './chunk-GLPWI7OF.js';
2
2
  export { AbsoluteCenter_exports as AbsoluteCenter, Accordion_exports as Accordion, AccountIcon, AddScenarioDialog, AudienceIcon, AudioSpeakerIcon, Avatar_exports as Avatar, Badge, BookmarkPlusIcon, Breadcrumb_exports as Breadcrumb, Button, ButtonGroup, Card_exports as Card, Checkbox_exports as Checkbox, ChevronUpIcon, ClipBoardIcon, ClockIcon, CloseButton_exports as CloseButton, ContentCard_exports as ContentCard, DashboardIcon, Dialog_exports as Dialog, DiscourserLogo, Drawer_exports as Drawer, ExitStudioIcon, GripDotsVerticalIcon, Group_exports as Group, Header, HelpIcon, Icon_exports as Icon, IconButton, Input, InputAddon, InputGroup, MicrophoneIcon, NavigationMenu, NotebookIcon, NotebookPenIcon, PausePlayIcon, PlayIcon, Popover_exports as Popover, Progress_exports as Progress, RadioGroup_exports as RadioGroup, RecordIcon, RepeatQuestionIcon, RightArrowIcon, ScenarioCard, ScenarioIcon, ScenarioQueue, ScenarioSettings, ScrollTextIcon, Select_exports as Select, Skeleton_exports as Skeleton, Slider_exports as Slider, SparklesIcon, SpeechIcon, Spinner, Stepper, StopPlayIcon, Switch_exports as Switch, Tabs_exports as Tabs, Textarea, TimerIcon, Toaster, Tooltip_exports as Tooltip, UserProfileIcon, difficultyColorMap, difficultyLabel, toaster } from './chunk-NU6GI57K.js';
3
3
  import './chunk-WR5Z5QMQ.js';
4
4
  import { clsx } from 'clsx';
@@ -79,7 +79,7 @@ export declare function transformToPandaTheme(language: DesignLanguageContract):
79
79
  textStyles: {
80
80
  [k: string]: {
81
81
  value: {
82
- fontFamily: any;
82
+ fontFamily: string;
83
83
  fontSize: any;
84
84
  lineHeight: any;
85
85
  fontWeight: any;
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkIGCGVSG4_cjs = require('../chunk-IGCGVSG4.cjs');
3
+ var chunkNN4YW27E_cjs = require('../chunk-NN4YW27E.cjs');
4
4
  require('../chunk-EARF7VDF.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "discourserPandaPreset", {
9
9
  enumerable: true,
10
- get: function () { return chunkIGCGVSG4_cjs.discourserPandaPreset; }
10
+ get: function () { return chunkNN4YW27E_cjs.discourserPandaPreset; }
11
11
  });
12
12
  //# sourceMappingURL=index.cjs.map
13
13
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,4 @@
1
- export { discourserPandaPreset } from '../chunk-VJN7TIGL.js';
1
+ export { discourserPandaPreset } from '../chunk-GLPWI7OF.js';
2
2
  import '../chunk-WR5Z5QMQ.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,21 +1,7 @@
1
- interface ColorSwatchProps {
2
- name: string;
3
- value: string;
4
- description?: string;
5
- }
6
- export declare const ColorSwatch: ({ name, value, description }: ColorSwatchProps) => import("react/jsx-runtime").JSX.Element;
7
- interface TonalSwatchProps {
8
- paletteName: string;
9
- tone: number;
10
- value: string;
11
- }
12
- export declare const TonalSwatch: ({ paletteName, tone, value }: TonalSwatchProps) => import("react/jsx-runtime").JSX.Element;
13
1
  interface SemanticSwatchProps {
14
2
  name: string;
15
- lightValue: string;
16
- darkValue: string;
17
3
  description?: string;
18
4
  }
19
- export declare const SemanticSwatch: ({ name, lightValue, darkValue, description, }: SemanticSwatchProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const SemanticSwatch: ({ name, description }: SemanticSwatchProps) => import("react/jsx-runtime").JSX.Element;
20
6
  export {};
21
7
  //# sourceMappingURL=ColorSwatch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorSwatch.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/ColorSwatch.tsx"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,GAAI,8BAA8B,gBAAgB,4CA2CzE,CAAC;AAEF,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,GAAI,8BAA8B,gBAAgB,4CAyBzE,CAAC;AAEF,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,GAAI,+CAK5B,mBAAmB,4CAmErB,CAAC"}
1
+ {"version":3,"file":"ColorSwatch.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/ColorSwatch.tsx"],"names":[],"mappings":"AAoDA,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,GAAI,uBAAuB,mBAAmB,4CAuExE,CAAC"}
@@ -1,11 +1,8 @@
1
+ export declare const elevationClasses: Record<string, string>;
1
2
  interface ElevationCardProps {
2
3
  level: string;
3
- shadow: string;
4
4
  }
5
- export declare const ElevationCard: ({ level, shadow }: ElevationCardProps) => import("react/jsx-runtime").JSX.Element;
6
- interface ElevationGridProps {
7
- elevations: Record<string, string>;
8
- }
9
- export declare const ElevationGrid: ({ elevations }: ElevationGridProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const ElevationCard: ({ level }: ElevationCardProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const ElevationGrid: () => import("react/jsx-runtime").JSX.Element;
10
7
  export {};
11
8
  //# sourceMappingURL=ElevationCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ElevationCard.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/ElevationCard.tsx"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,GAAI,mBAAmB,kBAAkB,4CAiDlE,CAAC;AAEF,UAAU,kBAAkB;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,aAAa,GAAI,gBAAgB,kBAAkB,4CAkB/D,CAAC"}
1
+ {"version":3,"file":"ElevationCard.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/ElevationCard.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOnD,CAAC;AAEF,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,aAAa,GAAI,WAAW,kBAAkB,4CAsC1D,CAAC;AAEF,eAAO,MAAM,aAAa,+CAoBzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SpacingBox.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/SpacingBox.tsx"],"names":[],"mappings":"AAEA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,UAAU,GAAI,iBAAiB,eAAe,4CAiE1D,CAAC;AAEF,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,WAAW,GAAI,cAAc,gBAAgB,4CAezD,CAAC"}
1
+ {"version":3,"file":"SpacingBox.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/SpacingBox.tsx"],"names":[],"mappings":"AAgBA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,UAAU,GAAI,iBAAiB,eAAe,4CAgE1D,CAAC;AAEF,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,WAAW,GAAI,cAAc,gBAAgB,4CAezD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  interface TypeSpecimenProps {
2
+ styleName: string;
2
3
  name: string;
3
4
  fontSize: string;
4
5
  lineHeight: string;
@@ -7,6 +8,6 @@ interface TypeSpecimenProps {
7
8
  fontFamily: string;
8
9
  sampleText?: string;
9
10
  }
10
- export declare const TypeSpecimen: ({ name, fontSize, lineHeight, fontWeight, letterSpacing, fontFamily, sampleText, }: TypeSpecimenProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const TypeSpecimen: ({ styleName: _styleName, name, fontSize, lineHeight, fontWeight, letterSpacing, fontFamily, sampleText, }: TypeSpecimenProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export {};
12
13
  //# sourceMappingURL=TypeSpecimen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TypeSpecimen.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/TypeSpecimen.tsx"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,GAAI,oFAQ1B,iBAAiB,4CAsFnB,CAAC"}
1
+ {"version":3,"file":"TypeSpecimen.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/TypeSpecimen.tsx"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,GAAI,2GAS1B,iBAAiB,4CA6FnB,CAAC"}
@@ -0,0 +1,235 @@
1
+ # Using Pre-compiled CSS
2
+
3
+ As of version 0.4.1, `@discourser/design-system` ships with pre-compiled CSS for easy integration with any project.
4
+
5
+ ## Quick Start
6
+
7
+ ### Installation
8
+
9
+ ```bash
10
+ npm install @discourser/design-system react react-dom
11
+ ```
12
+
13
+ ### Basic Usage
14
+
15
+ Simply import the pre-compiled CSS and start using components:
16
+
17
+ ```tsx
18
+ // Import the pre-compiled CSS (do this once in your app entry point)
19
+ import '@discourser/design-system/styles.css';
20
+
21
+ // Import components
22
+ import { Button, Card, Input } from '@discourser/design-system';
23
+
24
+ function App() {
25
+ return (
26
+ <div>
27
+ <Card variant="elevated">
28
+ <h1>Welcome</h1>
29
+ <Input label="Email" type="email" />
30
+ <Button variant="filled">Submit</Button>
31
+ </Card>
32
+ </div>
33
+ );
34
+ }
35
+ ```
36
+
37
+ ### Theme Support
38
+
39
+ The pre-compiled CSS includes both light and dark theme support. Set the `data-theme` attribute on your HTML element:
40
+
41
+ ```tsx
42
+ // Light theme (default)
43
+ <html data-theme="light">
44
+ <body>
45
+ <App />
46
+ </body>
47
+ </html>
48
+
49
+ // Dark theme
50
+ <html data-theme="dark">
51
+ <body>
52
+ <App />
53
+ </body>
54
+ </html>
55
+ ```
56
+
57
+ You can toggle themes dynamically:
58
+
59
+ ```tsx
60
+ function ThemeToggle() {
61
+ const [theme, setTheme] = useState<'light' | 'dark'>('light');
62
+
63
+ useEffect(() => {
64
+ document.documentElement.setAttribute('data-theme', theme);
65
+ }, [theme]);
66
+
67
+ return (
68
+ <Button onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}>
69
+ Toggle Theme
70
+ </Button>
71
+ );
72
+ }
73
+ ```
74
+
75
+ ## What's Included
76
+
77
+ The pre-compiled `styles.css` file (144KB) includes:
78
+
79
+ - ✅ All semantic color tokens (primary, surface, onPrimary, etc.)
80
+ - ✅ All typography tokens (displayLarge through labelSmall)
81
+ - ✅ All spacing tokens (none through xxxl)
82
+ - ✅ All component recipes (button, card, dialog, input, etc.)
83
+ - ✅ Light and dark theme support via `[data-theme="light"]` and `[data-theme="dark"]`
84
+ - ✅ CSS reset and base styles
85
+ - ✅ Material Design 3 design tokens
86
+
87
+ ## Advanced Usage
88
+
89
+ ### Using Styled System (Advanced)
90
+
91
+ For advanced styling needs, you can still import the Panda CSS styled system:
92
+
93
+ ```tsx
94
+ import { css } from '@discourser/design-system/styled-system/css';
95
+ import { Button } from '@discourser/design-system';
96
+
97
+ const customStyle = css({
98
+ bg: 'primary',
99
+ color: 'onPrimary',
100
+ padding: 'lg',
101
+ borderRadius: 'md'
102
+ });
103
+
104
+ function CustomButton() {
105
+ return <Button className={customStyle}>Custom Styled Button</Button>;
106
+ }
107
+ ```
108
+
109
+ ### Without Pre-compiled CSS
110
+
111
+ If you prefer to use Panda CSS's runtime styles (for dynamic styling), you can skip importing `styles.css` and use the styled system directly. However, you'll need to set up Panda CSS in your project with `panda codegen`.
112
+
113
+ ## Integration Examples
114
+
115
+ ### Vite
116
+
117
+ ```tsx
118
+ // main.tsx
119
+ import '@discourser/design-system/styles.css';
120
+ import { createRoot } from 'react-dom/client';
121
+ import App from './App';
122
+
123
+ createRoot(document.getElementById('root')!).render(<App />);
124
+ ```
125
+
126
+ ### Next.js (App Router)
127
+
128
+ ```tsx
129
+ // app/layout.tsx
130
+ import '@discourser/design-system/styles.css';
131
+
132
+ export default function RootLayout({
133
+ children,
134
+ }: {
135
+ children: React.ReactNode;
136
+ }) {
137
+ return (
138
+ <html lang="en" data-theme="light">
139
+ <body>{children}</body>
140
+ </html>
141
+ );
142
+ }
143
+ ```
144
+
145
+ ### Next.js (Pages Router)
146
+
147
+ ```tsx
148
+ // pages/_app.tsx
149
+ import '@discourser/design-system/styles.css';
150
+ import type { AppProps } from 'next/app';
151
+
152
+ export default function App({ Component, pageProps }: AppProps) {
153
+ return <Component {...pageProps} />;
154
+ }
155
+ ```
156
+
157
+ ## Figma Make Integration
158
+
159
+ The pre-compiled CSS enables seamless integration with Figma Make. Simply install the package and it will automatically use the pre-compiled styles for AI-generated designs.
160
+
161
+ ## File Size
162
+
163
+ The pre-compiled CSS file is optimized and includes only the styles you need:
164
+
165
+ - **Size**: 144KB (uncompressed)
166
+ - **Gzipped**: ~20-25KB (estimated)
167
+ - **Includes**: All tokens, recipes, and theme styles
168
+
169
+ ## Migration from Runtime CSS
170
+
171
+ If you were previously using runtime Panda CSS:
172
+
173
+ **Before:**
174
+ ```tsx
175
+ // Had to run panda codegen
176
+ import { css } from '../styled-system/css';
177
+ ```
178
+
179
+ **After:**
180
+ ```tsx
181
+ // Just import the pre-compiled CSS
182
+ import '@discourser/design-system/styles.css';
183
+ import { Button } from '@discourser/design-system';
184
+ ```
185
+
186
+ No more build step required!
187
+
188
+ ## Troubleshooting
189
+
190
+ ### Components don't have styles
191
+
192
+ Make sure you've imported the CSS at the top of your application:
193
+
194
+ ```tsx
195
+ import '@discourser/design-system/styles.css'; // Add this!
196
+ ```
197
+
198
+ ### Theme not working
199
+
200
+ Ensure the `data-theme` attribute is set on your HTML element:
201
+
202
+ ```html
203
+ <html data-theme="light"> <!-- or "dark" -->
204
+ ```
205
+
206
+ ### CSS conflicts with other libraries
207
+
208
+ The design system uses CSS layers to prevent conflicts:
209
+
210
+ ```css
211
+ @layer reset, base, tokens, recipes, utilities;
212
+ ```
213
+
214
+ If you still have conflicts, you may need to adjust your CSS loading order.
215
+
216
+ ## Package Exports
217
+
218
+ The package exports the following:
219
+
220
+ ```json
221
+ {
222
+ ".": "./dist/index.js",
223
+ "./styles.css": "./dist/styles.css",
224
+ "./styled-system": "./styled-system/index.mjs",
225
+ "./styled-system/css": "./styled-system/css/index.mjs",
226
+ "./styled-system/tokens": "./styled-system/tokens/index.mjs",
227
+ "./styled-system/recipes": "./styled-system/recipes/index.mjs"
228
+ }
229
+ ```
230
+
231
+ ## Questions?
232
+
233
+ - **Documentation**: See the [guidelines folder](./guidelines/) for complete component documentation
234
+ - **GitHub**: https://github.com/Tasty-Maker-Studio/Discourser-Design-System
235
+ - **Issues**: https://github.com/Tasty-Maker-Studio/Discourser-Design-System/issues