@jamesodwyer/gds-figma-vite 2.0.7 → 2.0.9

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.
@@ -3,6 +3,17 @@
3
3
  > **IMPORTANT FOR AI AGENTS**: This is the entry point for AI-assisted design-to-code generation.
4
4
  > Read this entire document before generating any code.
5
5
 
6
+ ## ⚠️ CRITICAL: Props That Cause Errors
7
+
8
+ **DO NOT use these props - they cause React DOM warnings:**
9
+
10
+ | DO NOT USE | USE INSTEAD |
11
+ |------------|-------------|
12
+ | `<InputField.Row marginTop="...">` | `<InputField.Row style={{ marginTop: '8px' }}>` |
13
+ | `<Stack marginTop="...">` | `<Stack style={{ marginTop: '8px' }}>` |
14
+
15
+ Always use inline `style` prop for margins instead of custom margin props.
16
+
6
17
  ## Package Information
7
18
 
8
19
  - **Package Name**: `@jamesodwyer/gds-figma-vite`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jamesodwyer/gds-figma-vite",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,399 +0,0 @@
1
- # Ticketmaster Global Design System (GDS) - AI Guidelines
2
-
3
- > **FOR AI AGENTS**: This is the entry point for the GDS design system.
4
-
5
- ## Important: Full Documentation Location
6
-
7
- The complete component documentation, design tokens, and usage guidelines are available in the `@jamesodwyer/gds-figma-vite` npm package under the `guidelines/` folder:
8
-
9
- - `guidelines/Guidelines.md` - Full documentation entry point
10
- - `guidelines/components/` - Detailed docs for each component
11
- - `guidelines/design-tokens/` - Colors, spacing, typography, elevation
12
- - `guidelines/overview-components.md` - Component overview
13
- - `guidelines/overview-icons.md` - Icons and stickers
14
-
15
- **When generating code, reference the guidelines from the npm package for the most accurate and complete information.**
16
-
17
- ## Package Information
18
-
19
- - **Package**: `@jamesodwyer/gds-figma-vite`
20
- - **Framework**: React 18+ with styled-components
21
- - **Themes**: TM (Ticketmaster/blue), LN (Live Nation/red)
22
-
23
- ---
24
-
25
- ## REQUIRED: GdsProvider Wrapper
26
-
27
- Every application MUST wrap components with `GdsProvider`:
28
-
29
- ```tsx
30
- import { GdsProvider, Button } from '@jamesodwyer/gds-figma-vite';
31
-
32
- function App() {
33
- return (
34
- <GdsProvider theme="TM">
35
- <Button colorVariant="primary">Click Me</Button>
36
- </GdsProvider>
37
- );
38
- }
39
- ```
40
-
41
- | Prop | Type | Default | Description |
42
- |------|------|---------|-------------|
43
- | theme | 'TM' \| 'LN' | 'TM' | Brand theme |
44
- | includeGlobalStyles | boolean | true | Include global CSS |
45
-
46
- ---
47
-
48
- ## CRITICAL: Compound Component Pattern
49
-
50
- Many GDS components use **dot notation** for sub-components. These are NOT separate imports.
51
-
52
- ### Correct Usage
53
-
54
- ```tsx
55
- // CORRECT - Use dot notation
56
- <Modal>
57
- <Modal.Header>
58
- <Modal.Title>Title</Modal.Title>
59
- <Modal.CloseButton label="Close" />
60
- </Modal.Header>
61
- <Modal.Content>
62
- <Modal.Description>Content here</Modal.Description>
63
- </Modal.Content>
64
- <Modal.Actions>
65
- <Button colorVariant="secondary">Cancel</Button>
66
- <Button colorVariant="primary">Confirm</Button>
67
- </Modal.Actions>
68
- </Modal>
69
-
70
- <Card>
71
- <Card.Title>Card Title</Card.Title>
72
- <Card.Body>Card content</Card.Body>
73
- </Card>
74
-
75
- <InputField id="email">
76
- <InputField.Label>Email</InputField.Label>
77
- <InputField.Row style={{ marginTop: '8px' }}>
78
- <InputField.Input type="email" />
79
- </InputField.Row>
80
- </InputField>
81
- ```
82
-
83
- ### Components with Sub-components
84
-
85
- | Component | Sub-components (use dot notation) |
86
- |-----------|-----------------------------------|
87
- | `Modal` | `.Header`, `.Title`, `.Content`, `.Description`, `.Image`, `.CloseButton`, `.Actions` |
88
- | `Card` | `.Title`, `.Body` |
89
- | `InputField` | `.Label`, `.Row`, `.Input`, `.Textarea`, `.Select`, `.Checkbox`, `.Radio`, `.StartIcon`, `.EndIcon`, `.Validation` |
90
- | `Accordion` | `.Item`, `.Toggle`, `.Content` |
91
-
92
- ---
93
-
94
- ## CRITICAL: Components That DO NOT Exist
95
-
96
- > **WARNING**: These components are NOT in GDS. Do NOT use them.
97
-
98
- | DO NOT USE | Use Instead |
99
- |------------|-------------|
100
- | `ButtonGroup` | `<div style={{display:'flex',gap:'8px'}}>` or styled div |
101
- | `CardContent` | Put content directly in `Card.Body` |
102
- | `CardHeader` | Use `Card.Title` |
103
- | `CardActions` | Put buttons in `Card.Body` |
104
- | `ModalDescription` | Use `Modal.Description` (dot notation) |
105
- | `ModalHeader` | Use `Modal.Header` (dot notation) |
106
- | `ModalBody` | Use `Modal.Content` (dot notation) |
107
- | `ModalFooter` | Use `Modal.Actions` (dot notation) |
108
- | `FormControl` | Use `InputField` |
109
- | `FormLabel` | Use `InputField.Label` |
110
- | `Grid` | Use CSS Grid or styled div |
111
- | `Box` | Use styled div |
112
- | `Container` | Use styled div |
113
- | `Typography` | Use `TextStyle` |
114
- | `Divider` | Use styled hr or div |
115
- | `Snackbar` | Use `Toast` |
116
- | `Dialog` | Use `Modal` |
117
- | `Drawer` | Use `SidePanel` |
118
-
119
- ### Button Row Example (Instead of ButtonGroup)
120
-
121
- ```tsx
122
- // For horizontal button layouts:
123
- <div style={{ display: 'flex', gap: '8px' }}>
124
- <Button colorVariant="secondary">Cancel</Button>
125
- <Button colorVariant="primary">Confirm</Button>
126
- </div>
127
- ```
128
-
129
- ---
130
-
131
- ## Available Components
132
-
133
- ### Layout
134
- - `Card` - Container with `.Title`, `.Body`
135
- - `Modal` - Dialog with `.Header`, `.Title`, `.Content`, `.Description`, `.CloseButton`, `.Actions`
136
- - `SidePanel` - Slide-in panel
137
- - `Accordion` - Collapsible sections
138
- - `Header` - Page header
139
- - `Footer` - Page footer
140
-
141
- ### Buttons
142
- - `Button` - Primary button (colorVariant: 'primary' | 'secondary' | 'tertiary')
143
- - `CircleButton` - Circular icon button
144
- - `SquareButton` - Square icon button
145
- - `PillButton` - Pill-shaped button
146
-
147
- ### Form Inputs
148
- - `InputField` - Compound form input (see sub-components above)
149
- - `TextInput` - Simple text input
150
- - `TextArea` - Multi-line input
151
- - `Checkbox` - Boolean selection
152
- - `RadioButton` - Single selection
153
- - `SelectInput` - Dropdown
154
- - `ToggleSwitch` - On/off switch
155
- - `PasswordInput` - Password with toggle
156
- - `PhoneNumber` - Phone with country code
157
- - `DateOfBirth` - Date input
158
- - `CountryPicker` - Country dropdown
159
- - `Stepper` - Increment/decrement
160
-
161
- ### Feedback
162
- - `Toast` - Temporary notification
163
- - `AlertBox` - Inline alert (status: 'info' | 'success' | 'warning' | 'danger')
164
- - `LoadingSpinner` - Loading indicator
165
- - `Skeleton` - Loading placeholder
166
- - `ErrorMessage` - Error text
167
- - `SuccessMessage` - Success text
168
- - `Badge` - Status label
169
- - `Tooltip` - Hover tooltip
170
-
171
- ### Typography
172
- - `TextStyle` - Styled text spans
173
- - `TitleHeading` - Page titles
174
- - `DisplayHeading` - Hero text
175
- - `Link` - Styled links
176
-
177
- ---
178
-
179
- ## Spacing Tokens
180
-
181
- Use spacing tokens instead of pixel values:
182
-
183
- ```tsx
184
- import { spacing } from '@jamesodwyer/gds-figma-vite';
185
- ```
186
-
187
- | Token | Value | Usage |
188
- |-------|-------|-------|
189
- | `spacing.lounge` | 4px | Tight spacing, icon gaps |
190
- | `spacing.club` | 8px | Small gaps |
191
- | `spacing.hall` | 12px | Small padding |
192
- | `spacing.auditorium` | 16px | Default padding |
193
- | `spacing.theatre` | 20px | Medium spacing |
194
- | `spacing.amphitheatre` | 24px | Large padding |
195
- | `spacing.arena` | 32px | Section spacing |
196
- | `spacing.stadium` | 48px | Large sections |
197
- | `spacing.dome` | 64px | Page sections |
198
- | `spacing.field` | 88px | Hero spacing |
199
-
200
- ```tsx
201
- import styled from 'styled-components';
202
- import { spacing } from '@jamesodwyer/gds-figma-vite';
203
-
204
- const Container = styled.div`
205
- padding: ${spacing.auditorium};
206
- gap: ${spacing.club};
207
- margin-bottom: ${spacing.arena};
208
- `;
209
- ```
210
-
211
- ---
212
-
213
- ## Typography (textStyle)
214
-
215
- Use `textStyle` for consistent typography:
216
-
217
- ```tsx
218
- import { textStyle } from '@jamesodwyer/gds-figma-vite';
219
- ```
220
-
221
- | Style | Size | Weight | Usage |
222
- |-------|------|--------|-------|
223
- | `textStyle.mauna` | 44-54px | 700 | Hero displays |
224
- | `textStyle.everest` | 32-44px | 700 | Page titles |
225
- | `textStyle.kilimanjaro` | 24-32px | 700 | Section headers |
226
- | `textStyle.matterhorn` | 24-28px | 700 | Large headings |
227
- | `textStyle.vinson` | 22-24px | 700 | Subheadings |
228
- | `textStyle.blanc` | 18-20px | 700 | Small headers |
229
- | `textStyle.fiji` | 18px | 600 | Emphasized body |
230
- | `textStyle.rainier` | 16px | 400 | Body text (default) |
231
- | `textStyle.etna` | 14px | 400 | Small text |
232
- | `textStyle.snowdon` | 12px | 600 | Labels/captions |
233
-
234
- ```tsx
235
- import styled from 'styled-components';
236
- import { textStyle } from '@jamesodwyer/gds-figma-vite';
237
-
238
- const Title = styled.h1`
239
- ${textStyle.everest}
240
- `;
241
-
242
- const Body = styled.p`
243
- ${textStyle.rainier}
244
- `;
245
- ```
246
-
247
- ---
248
-
249
- ## Elevation (Shadows)
250
-
251
- ```tsx
252
- import { elevation } from '@jamesodwyer/gds-figma-vite';
253
- ```
254
-
255
- | Level | Usage |
256
- |-------|-------|
257
- | `elevation.level0` | Default (no shadow) |
258
- | `elevation.level1` | Cards, content blocks |
259
- | `elevation.level2` | Sticky headers |
260
- | `elevation.level3` | Multiple sticky elements |
261
- | `elevation.level4` | Modals, dialogs |
262
-
263
- ```tsx
264
- const Card = styled.div`
265
- ${elevation.level1}
266
- background: white;
267
- `;
268
- ```
269
-
270
- ---
271
-
272
- ## Theme Colors
273
-
274
- Access colors through theme props:
275
-
276
- ```tsx
277
- const Component = styled.div`
278
- background: ${props => props.theme.base.bg};
279
- color: ${props => props.theme.text.primary};
280
- border-color: ${props => props.theme.base.border};
281
-
282
- &.error { color: ${props => props.theme.status.danger}; }
283
- &.success { color: ${props => props.theme.status.success}; }
284
- `;
285
- ```
286
-
287
- ### Theme Color Categories
288
- - `theme.base.primary` - Brand primary color
289
- - `theme.base.bg` - Background
290
- - `theme.base.border` - Border color
291
- - `theme.text.primary` - Primary text
292
- - `theme.text.secondary` - Secondary text
293
- - `theme.status.success` - Success green
294
- - `theme.status.danger` - Error red
295
- - `theme.status.warning` - Warning yellow
296
-
297
- ---
298
-
299
- ## Icons
300
-
301
- Import icons directly:
302
-
303
- ```tsx
304
- import { HeartIcon, CheckmarkIcon, CloseIcon } from '@jamesodwyer/gds-figma-vite';
305
-
306
- // Usage
307
- <HeartIcon size="24" />
308
- <Button startIcon={<CheckmarkIcon />}>Confirm</Button>
309
- ```
310
-
311
- Icon props: `size` (string like "24" or "1.5rem"), `fillColor` (optional)
312
-
313
- ---
314
-
315
- ## Button Props
316
-
317
- ```tsx
318
- <Button
319
- colorVariant="primary" // 'primary' | 'secondary' | 'tertiary'
320
- fullWidth={false} // boolean
321
- disabled={false} // boolean
322
- startIcon={<Icon />} // ReactNode
323
- endIcon={<Icon />} // ReactNode
324
- onClick={() => {}} // function
325
- >
326
- Button Text
327
- </Button>
328
- ```
329
-
330
- ---
331
-
332
- ## Modal Props
333
-
334
- ```tsx
335
- <Modal
336
- isOpen={true} // boolean
337
- onClose={() => setOpen(false)} // function (required)
338
- ariaLabel="Modal title" // string (required)
339
- mobileMaxViewportWidth="768px" // string (required)
340
- role="dialog" // 'dialog' | 'alertdialog'
341
- size="standard" // 'standard' | 'large'
342
- variant="default" // 'default' | 'danger'
343
- >
344
- <Modal.Header>
345
- <Modal.Title>Title</Modal.Title>
346
- <Modal.CloseButton label="Close modal" />
347
- </Modal.Header>
348
- <Modal.Content>
349
- <Modal.Description>Content</Modal.Description>
350
- </Modal.Content>
351
- <Modal.Actions>
352
- <Button colorVariant="secondary">Cancel</Button>
353
- <Button colorVariant="primary">Confirm</Button>
354
- </Modal.Actions>
355
- </Modal>
356
- ```
357
-
358
- ---
359
-
360
- ## InputField Props
361
-
362
- ```tsx
363
- <InputField id="fieldId"> {/* id is required */}
364
- <InputField.Label>Label Text</InputField.Label>
365
- <InputField.Row style={{ marginTop: '8px' }}>
366
- <InputField.Input
367
- type="text" // 'text' | 'email' | 'password' | etc.
368
- placeholder="..."
369
- isErrored={false} // boolean - shows error styling
370
- />
371
- </InputField.Row>
372
- <InputField.Validation
373
- type="error" // 'error' | 'success'
374
- screenReaderErrorPrefix="Error:"
375
- >
376
- Error message here
377
- </InputField.Validation>
378
- </InputField>
379
- ```
380
-
381
- > **Note**: Use inline `style={{ marginTop: '8px' }}` instead of the `marginTop` prop to avoid React DOM warnings.
382
-
383
- ---
384
-
385
- ## Code Generation Rules
386
-
387
- ### DO:
388
- - Wrap with `GdsProvider`
389
- - Use compound component syntax (`Modal.Header`, `Card.Body`)
390
- - Use spacing tokens (`spacing.auditorium`)
391
- - Use textStyle for typography
392
- - Use theme colors (`props.theme.base.primary`)
393
-
394
- ### DO NOT:
395
- - Import sub-components separately (use dot notation)
396
- - Use components that don't exist (ButtonGroup, CardContent, etc.)
397
- - Hardcode hex colors
398
- - Hardcode pixel values for spacing
399
- - Skip the GdsProvider wrapper