@discourser/design-system 0.3.1 → 0.5.0

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 +12 -4
  2. package/dist/styles.css +5126 -0
  3. package/guidelines/Guidelines.md +92 -41
  4. package/guidelines/components/accordion.md +732 -0
  5. package/guidelines/components/avatar.md +1015 -0
  6. package/guidelines/components/badge.md +728 -0
  7. package/guidelines/components/button.md +75 -40
  8. package/guidelines/components/card.md +84 -25
  9. package/guidelines/components/checkbox.md +671 -0
  10. package/guidelines/components/dialog.md +619 -31
  11. package/guidelines/components/drawer.md +1616 -0
  12. package/guidelines/components/heading.md +576 -0
  13. package/guidelines/components/icon-button.md +92 -37
  14. package/guidelines/components/input-addon.md +685 -0
  15. package/guidelines/components/input-group.md +830 -0
  16. package/guidelines/components/input.md +92 -37
  17. package/guidelines/components/popover.md +1271 -0
  18. package/guidelines/components/progress.md +836 -0
  19. package/guidelines/components/radio-group.md +852 -0
  20. package/guidelines/components/select.md +1662 -0
  21. package/guidelines/components/skeleton.md +802 -0
  22. package/guidelines/components/slider.md +911 -0
  23. package/guidelines/components/spinner.md +783 -0
  24. package/guidelines/components/switch.md +105 -38
  25. package/guidelines/components/tabs.md +1488 -0
  26. package/guidelines/components/textarea.md +495 -0
  27. package/guidelines/components/toast.md +784 -0
  28. package/guidelines/components/tooltip.md +912 -0
  29. package/guidelines/design-tokens/colors.md +309 -72
  30. package/guidelines/design-tokens/elevation.md +615 -45
  31. package/guidelines/design-tokens/spacing.md +654 -74
  32. package/guidelines/design-tokens/typography.md +432 -50
  33. package/guidelines/overview-components.md +60 -8
  34. package/guidelines/overview-imports.md +314 -0
  35. package/guidelines/overview-patterns.md +3852 -0
  36. package/package.json +4 -2
@@ -7,29 +7,76 @@ This project uses the `@discourser/design-system` package, a Material Design 3 i
7
7
  Before writing any code, follow these steps IN ORDER:
8
8
 
9
9
  ### Step 1: Read Overview Files (REQUIRED)
10
+
10
11
  Read ALL files with a name that starts with "overview-":
11
- - `overview-components.md` - Available components and usage patterns
12
+
13
+ - **[overview-components.md](overview-components.md)** - Available components with quick reference tables
14
+ - **[overview-imports.md](overview-imports.md)** - Package installation and import patterns
15
+ - **[overview-patterns.md](overview-patterns.md)** - Common UI patterns combining multiple components
12
16
 
13
17
  ### Step 2: Read Design Token Files (REQUIRED)
18
+
14
19
  Read ALL files in the `design-tokens/` folder:
15
- - `design-tokens/colors.md`
16
- - `design-tokens/typography.md`
17
- - `design-tokens/spacing.md`
18
- - `design-tokens/elevation.md`
20
+
21
+ - **[design-tokens/colors.md](design-tokens/colors.md)** - Semantic color tokens and usage
22
+ - **[design-tokens/typography.md](design-tokens/typography.md)** - Typography scale and text styles
23
+ - **[design-tokens/spacing.md](design-tokens/spacing.md)** - Spacing system and layout
24
+ - **[design-tokens/elevation.md](design-tokens/elevation.md)** - Surface elevation and shadows
19
25
 
20
26
  ### Step 3: Plan Components Needed (REQUIRED)
21
- Identify which components you need to use.
27
+
28
+ Identify which components you need to use based on your task.
29
+
30
+ Refer to [overview-components.md](overview-components.md) for the complete list.
22
31
 
23
32
  ### Step 4: Read Component Guidelines BEFORE Using Components (REQUIRED)
33
+
24
34
  BEFORE using ANY component, you MUST read its guidelines file first:
25
- - Using Button? → Read `components/button.md` FIRST
26
- - Using Dialog? → Read `components/dialog.md` FIRST
27
- - Using Input? → Read `components/input.md` FIRST
28
- - Using Card? → Read `components/card.md` FIRST
29
- - Using IconButton? → Read `components/icon-button.md` FIRST
30
- - Using Switch? → Read `components/switch.md` FIRST
31
35
 
32
- DO NOT write code using a component until you have read its specific guidelines.
36
+ **Interactive Elements:**
37
+
38
+ - Using Button? → Read **[components/button.md](components/button.md)** FIRST
39
+ - Using IconButton? → Read **[components/icon-button.md](components/icon-button.md)** FIRST
40
+ - Using Switch? → Read **[components/switch.md](components/switch.md)** FIRST
41
+ - Using Checkbox? → Read **[components/checkbox.md](components/checkbox.md)** FIRST
42
+ - Using RadioGroup? → Read **[components/radio-group.md](components/radio-group.md)** FIRST
43
+
44
+ **Form Elements:**
45
+
46
+ - Using Input? → Read **[components/input.md](components/input.md)** FIRST
47
+ - Using InputAddon? → Read **[components/input-addon.md](components/input-addon.md)** FIRST
48
+ - Using InputGroup? → Read **[components/input-group.md](components/input-group.md)** FIRST
49
+ - Using Textarea? → Read **[components/textarea.md](components/textarea.md)** FIRST
50
+ - Using Select? → Read **[components/select.md](components/select.md)** FIRST
51
+ - Using Slider? → Read **[components/slider.md](components/slider.md)** FIRST
52
+
53
+ **Layout & Container:**
54
+
55
+ - Using Card? → Read **[components/card.md](components/card.md)** FIRST
56
+ - Using Accordion? → Read **[components/accordion.md](components/accordion.md)** FIRST
57
+ - Using Tabs? → Read **[components/tabs.md](components/tabs.md)** FIRST
58
+ - Using Drawer? → Read **[components/drawer.md](components/drawer.md)** FIRST
59
+
60
+ **Overlay Elements:**
61
+
62
+ - Using Dialog? → Read **[components/dialog.md](components/dialog.md)** FIRST
63
+ - Using Popover? → Read **[components/popover.md](components/popover.md)** FIRST
64
+ - Using Tooltip? → Read **[components/tooltip.md](components/tooltip.md)** FIRST
65
+
66
+ **Feedback & Status:**
67
+
68
+ - Using Badge? → Read **[components/badge.md](components/badge.md)** FIRST
69
+ - Using Avatar? → Read **[components/avatar.md](components/avatar.md)** FIRST
70
+ - Using Toast? → Read **[components/toast.md](components/toast.md)** FIRST
71
+ - Using Progress? → Read **[components/progress.md](components/progress.md)** FIRST
72
+ - Using Skeleton? → Read **[components/skeleton.md](components/skeleton.md)** FIRST
73
+ - Using Spinner? → Read **[components/spinner.md](components/spinner.md)** FIRST
74
+
75
+ **Typography:**
76
+
77
+ - Using Heading? → Read **[components/heading.md](components/heading.md)** FIRST
78
+
79
+ **DO NOT write code using a component until you have read its specific guidelines.**
33
80
 
34
81
  ## Core Principles
35
82
 
@@ -38,34 +85,16 @@ DO NOT write code using a component until you have read its specific guidelines.
38
85
  - **Follow M3 patterns** for variants, sizing, and state layers
39
86
  - **Do not override styles** unless absolutely necessary
40
87
  - **Never use inline styles** with raw color values
88
+ - **Read component guidelines** before using any component
89
+ - **Follow common patterns** documented in overview-patterns.md
41
90
 
42
- ## Package Installation
43
-
44
- ```bash
45
- npm install @discourser/design-system react react-dom
46
- ```
47
-
48
- ## Package Imports
91
+ ## Quick Start
49
92
 
50
- ```typescript
51
- // Components
52
- import { Button, Card, Dialog, Input, IconButton, Switch } from '@discourser/design-system';
53
-
54
- // For advanced styling (use sparingly)
55
- import { css } from '@discourser/design-system/styled-system/css';
56
- import { button } from '@discourser/design-system/styled-system/recipes';
57
- ```
58
-
59
- ## Quick Reference
60
-
61
- | Component | Variants | Sizes | Guidelines |
62
- |-----------|----------|-------|------------|
63
- | Button | filled, outlined, text, elevated, tonal | sm, md, lg | `components/button.md` |
64
- | Card | elevated, filled, outlined | - | `components/card.md` |
65
- | IconButton | standard, filled, tonal, outlined | sm, md, lg | `components/icon-button.md` |
66
- | Input | filled, outlined | sm, md | `components/input.md` |
67
- | Dialog | - | sm, md, lg, fullscreen | `components/dialog.md` |
68
- | Switch | - | sm, md | `components/switch.md` |
93
+ 1. Install the package (see [overview-imports.md](overview-imports.md))
94
+ 2. Import components you need
95
+ 3. Use components with their documented variants and props
96
+ 4. Apply semantic tokens for custom styling
97
+ 5. Follow accessibility best practices from component guidelines
69
98
 
70
99
  ## Theme Support
71
100
 
@@ -81,8 +110,30 @@ The design system supports light and dark themes. The theme is controlled by the
81
110
 
82
111
  All semantic color tokens automatically adapt to the current theme.
83
112
 
113
+ ## Documentation Structure
114
+
115
+ ```
116
+ guidelines/
117
+ ├── Guidelines.md (this file) # Main navigation
118
+ ├── overview-components.md # Component catalog
119
+ ├── overview-imports.md # Installation & imports
120
+ ├── overview-patterns.md # Common UI patterns
121
+ ├── design-tokens/
122
+ │ ├── colors.md # Color system
123
+ │ ├── typography.md # Type scale
124
+ │ ├── spacing.md # Spacing system
125
+ │ └── elevation.md # Elevation system
126
+ └── components/
127
+ ├── button.md # Component guidelines
128
+ ├── input.md
129
+ └── ... # (25 total components)
130
+ ```
131
+
84
132
  ## Getting Help
85
133
 
86
134
  For questions or issues, visit:
87
- - GitHub: https://github.com/Tasty-Maker-Studio/Discourser-Design-System
88
- - Documentation: Read the overview and component-specific guidelines in this folder
135
+
136
+ - **GitHub:** https://github.com/Tasty-Maker-Studio/Discourser-Design-System
137
+ - **Documentation:** Read the overview and component-specific guidelines in this folder
138
+ - **Component Reference:** See [overview-components.md](overview-components.md)
139
+ - **Patterns:** See [overview-patterns.md](overview-patterns.md)