@discourser/design-system 0.3.1 → 0.4.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.
@@ -7,27 +7,66 @@ 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-":
12
+
11
13
  - `overview-components.md` - Available components and usage patterns
12
14
 
13
15
  ### Step 2: Read Design Token Files (REQUIRED)
16
+
14
17
  Read ALL files in the `design-tokens/` folder:
18
+
15
19
  - `design-tokens/colors.md`
16
20
  - `design-tokens/typography.md`
17
21
  - `design-tokens/spacing.md`
18
22
  - `design-tokens/elevation.md`
19
23
 
20
24
  ### Step 3: Plan Components Needed (REQUIRED)
25
+
21
26
  Identify which components you need to use.
22
27
 
23
28
  ### Step 4: Read Component Guidelines BEFORE Using Components (REQUIRED)
29
+
24
30
  BEFORE using ANY component, you MUST read its guidelines file first:
31
+
32
+ **Interactive Elements:**
33
+
25
34
  - 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
35
  - Using IconButton? → Read `components/icon-button.md` FIRST
30
36
  - Using Switch? → Read `components/switch.md` FIRST
37
+ - Using Checkbox? → Read `components/checkbox.md` FIRST
38
+ - Using RadioGroup? → Read `components/radio-group.md` FIRST
39
+
40
+ **Form Elements:**
41
+
42
+ - Using Input? → Read `components/input.md` FIRST
43
+ - Using Textarea? → Read `components/textarea.md` FIRST
44
+ - Using Select? → Read `components/select.md` FIRST
45
+
46
+ **Layout & Container:**
47
+
48
+ - Using Card? → Read `components/card.md` FIRST
49
+ - Using Accordion? → Read `components/accordion.md` FIRST
50
+ - Using Tabs? → Read `components/tabs.md` FIRST
51
+ - Using Drawer? → Read `components/drawer.md` FIRST
52
+
53
+ **Overlay Elements:**
54
+
55
+ - Using Dialog? → Read `components/dialog.md` FIRST
56
+ - Using Popover? → Read `components/popover.md` FIRST
57
+ - Using Tooltip? → Read `components/tooltip.md` FIRST
58
+
59
+ **Feedback & Status:**
60
+
61
+ - Using Badge? → Read `components/badge.md` FIRST
62
+ - Using Avatar? → Read `components/avatar.md` FIRST
63
+ - Using Toast? → Read `components/toast.md` FIRST
64
+ - Using Progress? → Read `components/progress.md` FIRST
65
+ - Using Skeleton? → Read `components/skeleton.md` FIRST
66
+
67
+ **Typography:**
68
+
69
+ - Using Heading? → Read `components/heading.md` FIRST
31
70
 
32
71
  DO NOT write code using a component until you have read its specific guidelines.
33
72
 
@@ -48,8 +87,33 @@ npm install @discourser/design-system react react-dom
48
87
  ## Package Imports
49
88
 
50
89
  ```typescript
51
- // Components
52
- import { Button, Card, Dialog, Input, IconButton, Switch } from '@discourser/design-system';
90
+ // Simple Components (exported directly)
91
+ import {
92
+ Button,
93
+ Card,
94
+ Input,
95
+ Textarea,
96
+ Heading,
97
+ Badge,
98
+ Toaster,
99
+ toaster,
100
+ } from '@discourser/design-system';
101
+
102
+ // Compound Components (exported as namespaces)
103
+ import * as Checkbox from '@discourser/design-system';
104
+ import * as RadioGroup from '@discourser/design-system';
105
+ import * as Select from '@discourser/design-system';
106
+ import * as Dialog from '@discourser/design-system';
107
+ import * as Drawer from '@discourser/design-system';
108
+ import * as Popover from '@discourser/design-system';
109
+ import * as Tooltip from '@discourser/design-system';
110
+ import * as Accordion from '@discourser/design-system';
111
+ import * as Tabs from '@discourser/design-system';
112
+ import * as Avatar from '@discourser/design-system';
113
+ import * as Progress from '@discourser/design-system';
114
+ import * as Skeleton from '@discourser/design-system';
115
+ import * as IconButton from '@discourser/design-system';
116
+ import * as Switch from '@discourser/design-system';
53
117
 
54
118
  // For advanced styling (use sparingly)
55
119
  import { css } from '@discourser/design-system/styled-system/css';
@@ -58,14 +122,56 @@ import { button } from '@discourser/design-system/styled-system/recipes';
58
122
 
59
123
  ## Quick Reference
60
124
 
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` |
125
+ **Interactive Elements:**
126
+
127
+ | Component | Key Variants | Guidelines |
128
+ | ---------- | --------------------------------------- | --------------------------- |
129
+ | Button | filled, outlined, text, elevated, tonal | `components/button.md` |
130
+ | IconButton | standard, filled, tonal, outlined | `components/icon-button.md` |
131
+ | Switch | - | `components/switch.md` |
132
+ | Checkbox | solid, outline, subtle | `components/checkbox.md` |
133
+ | RadioGroup | solid | `components/radio-group.md` |
134
+
135
+ **Form Elements:**
136
+
137
+ | Component | Key Variants | Guidelines |
138
+ | --------- | --------------------------------- | ------------------------ |
139
+ | Input | surface, outline, subtle | `components/input.md` |
140
+ | Textarea | surface, outline, subtle, flushed | `components/textarea.md` |
141
+ | Select | outline, surface | `components/select.md` |
142
+
143
+ **Layout & Containers:**
144
+
145
+ | Component | Key Variants | Guidelines |
146
+ | --------- | ----------------------------------- | ------------------------- |
147
+ | Card | elevated, filled, outlined | `components/card.md` |
148
+ | Accordion | outline, plain | `components/accordion.md` |
149
+ | Tabs | line, subtle, enclosed | `components/tabs.md` |
150
+ | Drawer | Placements: start, end, top, bottom | `components/drawer.md` |
151
+
152
+ **Overlays:**
153
+
154
+ | Component | Key Features | Guidelines |
155
+ | --------- | ----------------------------- | ----------------------- |
156
+ | Dialog | Sizes: sm, md, lg, fullscreen | `components/dialog.md` |
157
+ | Popover | 12 positioning options | `components/popover.md` |
158
+ | Tooltip | Lightweight contextual help | `components/tooltip.md` |
159
+
160
+ **Feedback & Status:**
161
+
162
+ | Component | Key Variants | Guidelines |
163
+ | --------- | ------------------------------------------------ | ------------------------ |
164
+ | Badge | subtle, solid, surface, outline | `components/badge.md` |
165
+ | Avatar | Sizes: 2xs to 2xl, Shapes: full, rounded, square | `components/avatar.md` |
166
+ | Toast | Types: success, error, warning, loading | `components/toast.md` |
167
+ | Progress | Shapes: linear, circular | `components/progress.md` |
168
+ | Skeleton | Animations: pulse, shine, none | `components/skeleton.md` |
169
+
170
+ **Typography:**
171
+
172
+ | Component | Key Features | Guidelines |
173
+ | --------- | --------------------------------- | ----------------------- |
174
+ | Heading | Sizes: xs to 7xl (M3 text styles) | `components/heading.md` |
69
175
 
70
176
  ## Theme Support
71
177
 
@@ -84,5 +190,6 @@ All semantic color tokens automatically adapt to the current theme.
84
190
  ## Getting Help
85
191
 
86
192
  For questions or issues, visit:
193
+
87
194
  - GitHub: https://github.com/Tasty-Maker-Studio/Discourser-Design-System
88
195
  - Documentation: Read the overview and component-specific guidelines in this folder