@jamesodwyer/gds-figma-vite 1.0.4 → 1.0.6

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 (95) hide show
  1. package/README.md +86 -8
  2. package/dist/GdsProvider.cjs +48 -0
  3. package/dist/GdsProvider.d.ts +31 -0
  4. package/dist/GdsProvider.js +45 -0
  5. package/dist/index.cjs +2 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.js +2 -0
  8. package/dist/styles/index.css +1 -0
  9. package/guidelines/Guidelines.md +377 -43
  10. package/guidelines/components/Accordion.md +155 -0
  11. package/guidelines/components/AlertBox.md +160 -0
  12. package/guidelines/components/AlertBoxLegacy.md +123 -0
  13. package/guidelines/components/Badge.md +143 -0
  14. package/guidelines/components/BrandLogo.md +81 -0
  15. package/guidelines/components/Button.md +2 -2
  16. package/guidelines/components/Card.md +104 -0
  17. package/guidelines/components/Checkbox.md +154 -0
  18. package/guidelines/components/CircleButton.md +136 -0
  19. package/guidelines/components/Countdown.md +226 -0
  20. package/guidelines/components/CountdownTimer.md +135 -0
  21. package/guidelines/components/CountryPicker.md +157 -0
  22. package/guidelines/components/DateOfBirth.md +122 -0
  23. package/guidelines/components/DisplayHeading.md +77 -0
  24. package/guidelines/components/DoubleRangeInput.md +157 -0
  25. package/guidelines/components/ErrorMessage.md +70 -0
  26. package/guidelines/components/Footer.md +100 -0
  27. package/guidelines/components/Header.md +73 -0
  28. package/guidelines/components/Link.md +125 -0
  29. package/guidelines/components/LoadingSpinner.md +128 -0
  30. package/guidelines/components/Modal.md +160 -0
  31. package/guidelines/components/PaginationButton.md +146 -0
  32. package/guidelines/components/PasswordInput.md +111 -0
  33. package/guidelines/components/PhoneNumber.md +134 -0
  34. package/guidelines/components/PillButton.md +152 -0
  35. package/guidelines/components/RadioButton.md +113 -0
  36. package/guidelines/components/SeatInfo.md +72 -0
  37. package/guidelines/components/SeatInfov2.md +151 -0
  38. package/guidelines/components/SectionHeading.md +66 -0
  39. package/guidelines/components/SelectInput.md +150 -0
  40. package/guidelines/components/ShareCard.md +95 -0
  41. package/guidelines/components/SidePanel.md +184 -0
  42. package/guidelines/components/SimpleSeatInfo.md +124 -0
  43. package/guidelines/components/Skeleton.md +150 -0
  44. package/guidelines/components/SquareButton.md +112 -0
  45. package/guidelines/components/Stepper.md +139 -0
  46. package/guidelines/components/SuccessMessage.md +72 -0
  47. package/guidelines/components/TextArea.md +121 -0
  48. package/guidelines/components/TextAreaLimited.md +98 -0
  49. package/guidelines/components/TextInput.md +126 -0
  50. package/guidelines/components/TextStyle.md +104 -0
  51. package/guidelines/components/TicketCardv2.md +169 -0
  52. package/guidelines/components/TicketDescription.md +170 -0
  53. package/guidelines/components/TicketInfo.md +87 -0
  54. package/guidelines/components/TicketQuantity.md +116 -0
  55. package/guidelines/components/TicketTopSection.md +143 -0
  56. package/guidelines/components/TitleHeading.md +102 -0
  57. package/guidelines/components/Toast.md +153 -0
  58. package/guidelines/components/Toggle.md +113 -0
  59. package/guidelines/components/ToggleSwitch.md +158 -0
  60. package/guidelines/components/Tooltip.md +158 -0
  61. package/guidelines/design-tokens/colors.md +2 -2
  62. package/guidelines/design-tokens/elevation.md +2 -2
  63. package/guidelines/design-tokens/spacing.md +5 -5
  64. package/guidelines/design-tokens/typography.md +2 -2
  65. package/guidelines/overview-components.md +3 -3
  66. package/guidelines/overview-icons.md +314 -39
  67. package/package.json +21 -3
  68. package/.claude/settings.local.json +0 -29
  69. package/.husky/pre-commit +0 -1
  70. package/.mcp.json +0 -8
  71. package/.nvmrc +0 -1
  72. package/.stylelintrc.json +0 -320
  73. package/.vscode/settings.json +0 -3
  74. package/CLAUDE.md +0 -79
  75. package/babel.config.js +0 -15
  76. package/docs/__stories__/accessibility.mdx +0 -183
  77. package/docs/__stories__/cobranding.mdx +0 -165
  78. package/docs/__stories__/component-lifecycle.mdx +0 -53
  79. package/docs/__stories__/disabled-state.mdx +0 -347
  80. package/docs/__stories__/form-validation.mdx +0 -146
  81. package/docs/__stories__/form-validation.stories.tsx +0 -240
  82. package/docs/__stories__/introduction.mdx +0 -89
  83. package/docs/__stories__/local-development.mdx +0 -39
  84. package/docs/__stories__/patterns.mdx +0 -22
  85. package/docs/__stories__/releasing.mdx +0 -155
  86. package/docs/__stories__/right-to-left-language-support.mdx +0 -54
  87. package/eslint.config.mjs +0 -141
  88. package/lint-staged.config.js +0 -11
  89. package/renovate.json +0 -7
  90. package/scripts/add-new-component.js +0 -96
  91. package/scripts/merges-since-last-tag.sh +0 -2
  92. package/scripts/slack-announcement.js +0 -47
  93. package/svgo.config.js +0 -28
  94. package/tsconfig.json +0 -28
  95. package/vite.config.ts +0 -65
package/README.md CHANGED
@@ -1,17 +1,95 @@
1
- # Global Design System Component Library
1
+ # Global Design System (GDS)
2
2
 
3
- View the latest build of the GDS documentation site at: <http://global-design-system.git.tmaws.io/gds>
3
+ A shared React component library built with styled-components, optimized for Figma Make integration.
4
4
 
5
- ## Contributing
5
+ **Package:** `@jamesodwyer/gds-figma-vite`
6
6
 
7
- ### Icons
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @jamesodwyer/gds-figma-vite styled-components
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ All components must be wrapped with `GdsProvider`:
16
+
17
+ ```tsx
18
+ import { GdsProvider, Button } from '@jamesodwyer/gds-figma-vite';
19
+
20
+ function App() {
21
+ return (
22
+ <GdsProvider theme="TM">
23
+ <Button colorVariant="primary">Click Me</Button>
24
+ </GdsProvider>
25
+ );
26
+ }
27
+ ```
28
+
29
+ ## Themes
30
+
31
+ Two brand themes are available:
8
32
 
9
- View the instructions on adding new icons at: <http://global-design-system.git.tmaws.io/gds/?path=/docs/icons--docs#adding-new-themeable-icons>
33
+ - **TM** (Ticketmaster) - Blue primary color (#024ddf)
34
+ - **LN** (Live Nation) - Red primary color (#e21836)
35
+
36
+ ```tsx
37
+ <GdsProvider theme="TM"> {/* or "LN" */}
38
+ {/* your components */}
39
+ </GdsProvider>
40
+ ```
10
41
 
11
- ## Storybook
42
+ ## Components
12
43
 
13
- Start Storybook locally to preview your components:
44
+ 52 components available including:
45
+
46
+ - **Layout:** Card, Modal, SidePanel, Accordion, Header, Footer
47
+ - **Buttons:** Button, CircleButton, SquareButton, PillButton
48
+ - **Forms:** InputField, TextInput, Checkbox, RadioButton, SelectInput, ToggleSwitch
49
+ - **Feedback:** Toast, AlertBox, LoadingSpinner, Skeleton, Badge, Tooltip
50
+ - **Typography:** DisplayHeading, TitleHeading, SectionHeading, TextStyle, Link
51
+
52
+ ## Design Tokens
53
+
54
+ ```tsx
55
+ import { spacing, fontSize, elevation } from '@jamesodwyer/gds-figma-vite';
56
+
57
+ // Spacing (venue-themed): lounge(4px), club(8px), hall(12px), arena(32px), stadium(48px)
58
+ // Typography (mountain-themed): everest, kilimanjaro, rainier, etc.
59
+ ```
60
+
61
+ ## Icons
62
+
63
+ 153 themeable icons, 35 payment icons, 201 country flags, and 67 stickers included.
64
+
65
+ ```tsx
66
+ import { HeartIcon, CheckmarkIcon, ChevronIcon } from '@jamesodwyer/gds-figma-vite';
67
+
68
+ <Button startIcon={<HeartIcon />}>Like</Button>
69
+ ```
70
+
71
+ ## Figma Make Integration
72
+
73
+ The `guidelines/` folder contains AI-readable documentation:
74
+
75
+ - `guidelines/Guidelines.md` - Entry point for AI agents
76
+ - `guidelines/components/*.md` - Component documentation (52 files)
77
+ - `guidelines/design-tokens/*.md` - Colors, typography, spacing, elevation
78
+
79
+ ## NPM
80
+
81
+ https://www.npmjs.com/package/@jamesodwyer/gds-figma-vite
82
+
83
+ ## Development
14
84
 
15
85
  ```bash
16
- npm start
86
+ npm start # Start Storybook (port 6060)
87
+ npm run build # Build the package
88
+ npm test # Run tests
17
89
  ```
90
+
91
+ ## Contributing
92
+
93
+ ### Icons
94
+
95
+ View the instructions on adding new icons in the Storybook documentation.
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ const React = require('react');
4
+ const styledComponents = require('styled-components');
5
+
6
+ // Import directly from source files to avoid circular dependency
7
+ const TM = require('./index132.cjs');
8
+ const LN = require('./index133.cjs');
9
+ const getGlobalStyles = require('./index118.cjs');
10
+ const typography = require('./index520.cjs');
11
+
12
+ const GlobalStyles = styledComponents.createGlobalStyle`
13
+ ${getGlobalStyles.default()}
14
+
15
+ html {
16
+ ${typography.textStyleMobileCustomProperties};
17
+
18
+ @media (min-width: 900px) {
19
+ ${typography.textStyleDesktopCustomProperties};
20
+ }
21
+ }
22
+ `;
23
+
24
+ const themes = {
25
+ TM: TM.default,
26
+ LN: LN.default
27
+ };
28
+
29
+ /**
30
+ * GdsProvider - Wrapper component that provides theme context and global styles
31
+ */
32
+ const GdsProvider = ({
33
+ children,
34
+ theme = 'TM',
35
+ includeGlobalStyles = true,
36
+ }) => {
37
+ const selectedTheme = themes[theme] || themes.TM;
38
+
39
+ return React.createElement(
40
+ styledComponents.ThemeProvider,
41
+ { theme: selectedTheme },
42
+ includeGlobalStyles ? React.createElement(GlobalStyles) : null,
43
+ children
44
+ );
45
+ };
46
+
47
+ exports.GdsProvider = GdsProvider;
48
+ exports.default = GdsProvider;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+
3
+ export interface GdsProviderProps {
4
+ /** Child components to wrap */
5
+ children: React.ReactNode;
6
+ /** Theme to use - 'TM' for Ticketmaster, 'LN' for Live Nation */
7
+ theme?: 'TM' | 'LN';
8
+ /** Whether to include global styles (default: true) */
9
+ includeGlobalStyles?: boolean;
10
+ }
11
+
12
+ /**
13
+ * GdsProvider - Wrapper component that provides theme context and global styles
14
+ *
15
+ * Combines styled-components ThemeProvider with GDS global styles for easy setup.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * import { GdsProvider, Button } from '@jamesodwyer/gds-figma-vite';
20
+ *
21
+ * function App() {
22
+ * return (
23
+ * <GdsProvider theme="TM">
24
+ * <Button colorVariant="primary">Click Me</Button>
25
+ * </GdsProvider>
26
+ * );
27
+ * }
28
+ * ```
29
+ */
30
+ export declare const GdsProvider: React.FC<GdsProviderProps>;
31
+ export default GdsProvider;
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { ThemeProvider, createGlobalStyle } from 'styled-components';
3
+ import TM from './index132.js';
4
+ import LN from './index133.js';
5
+ import getGlobalStyles from './index118.js';
6
+ import { textStyleMobileCustomProperties, textStyleDesktopCustomProperties } from './index520.js';
7
+
8
+ const GlobalStyles = createGlobalStyle`
9
+ ${getGlobalStyles()}
10
+
11
+ html {
12
+ ${textStyleMobileCustomProperties};
13
+
14
+ @media (min-width: 900px) {
15
+ ${textStyleDesktopCustomProperties};
16
+ }
17
+ }
18
+ `;
19
+
20
+ const themes = { TM, LN };
21
+
22
+ /**
23
+ * GdsProvider - Wrapper component that provides theme context and global styles
24
+ *
25
+ * @param {Object} props
26
+ * @param {React.ReactNode} props.children - Child components
27
+ * @param {'TM' | 'LN'} props.theme - Theme to use (default: 'TM')
28
+ * @param {boolean} props.includeGlobalStyles - Whether to include global styles (default: true)
29
+ */
30
+ export const GdsProvider = ({
31
+ children,
32
+ theme = 'TM',
33
+ includeGlobalStyles = true,
34
+ }) => {
35
+ const selectedTheme = themes[theme] || themes.TM;
36
+
37
+ return React.createElement(
38
+ ThemeProvider,
39
+ { theme: selectedTheme },
40
+ includeGlobalStyles ? React.createElement(GlobalStyles) : null,
41
+ children
42
+ );
43
+ };
44
+
45
+ export default GdsProvider;
package/dist/index.cjs CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const Accordion = require("./index2.cjs");
4
+ const GdsProviderModule = require("./GdsProvider.cjs");
4
5
  const index = require("./index3.cjs");
5
6
  const index$1 = require("./index4.cjs");
6
7
  const index$2 = require("./index5.cjs");
@@ -646,6 +647,7 @@ exports.VenueSticker = VenueSticker.default;
646
647
  exports.WalletTicketStickerOnDark = WalletTicketStickerOnDark.default;
647
648
  exports.WalletTicketSticker = WalletTicketSticker.default;
648
649
  exports.getGlobalStyles = getGlobalStyles.default;
650
+ exports.GdsProvider = GdsProviderModule.GdsProvider;
649
651
  exports.browserDefaultFocus = focus.browserDefaultFocus;
650
652
  exports.buttonreset = snippets.buttonreset;
651
653
  exports.inputReset = snippets.inputReset;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as Accordion } from './components/Accordion/Accordion';
2
+ export { GdsProvider, GdsProviderProps } from './GdsProvider';
2
3
  export { default as AlertBox } from './components/AlertBox';
3
4
  export { default as AlertBoxLegacy } from './components/AlertBoxLegacy';
4
5
  export { default as Badge } from './components/Badge';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { default as default2 } from "./index2.js";
2
+ import { GdsProvider } from "./GdsProvider.js";
2
3
  import { default as default3 } from "./index3.js";
3
4
  import { default as default4 } from "./index4.js";
4
5
  import { default as default5 } from "./index5.js";
@@ -1056,6 +1057,7 @@ export {
1056
1057
  elevation,
1057
1058
  fontSize,
1058
1059
  default115 as getGlobalStyles,
1060
+ GdsProvider,
1059
1061
  grid,
1060
1062
  iconSize,
1061
1063
  inputReset,
@@ -0,0 +1 @@
1
+ /* GDS uses styled-components - no standalone CSS needed */