@triptease/design-system-mcp 1.0.19 → 1.0.20

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 (205) hide show
  1. package/dist/index.js +28985 -0
  2. package/package.json +20 -13
  3. package/CHANGELOG.md +0 -192
  4. package/dist/package.json +0 -44
  5. package/dist/src/index.d.ts +0 -2
  6. package/dist/src/index.js +0 -66
  7. package/dist/src/index.js.map +0 -1
  8. package/dist/src/manifests/components/entries/badge.d.ts +0 -27
  9. package/dist/src/manifests/components/entries/badge.js +0 -43
  10. package/dist/src/manifests/components/entries/badge.js.map +0 -1
  11. package/dist/src/manifests/components/entries/banner.d.ts +0 -23
  12. package/dist/src/manifests/components/entries/banner.js +0 -68
  13. package/dist/src/manifests/components/entries/banner.js.map +0 -1
  14. package/dist/src/manifests/components/entries/barChart.d.ts +0 -74
  15. package/dist/src/manifests/components/entries/barChart.js +0 -128
  16. package/dist/src/manifests/components/entries/barChart.js.map +0 -1
  17. package/dist/src/manifests/components/entries/button.d.ts +0 -40
  18. package/dist/src/manifests/components/entries/button.js +0 -59
  19. package/dist/src/manifests/components/entries/button.js.map +0 -1
  20. package/dist/src/manifests/components/entries/card.d.ts +0 -25
  21. package/dist/src/manifests/components/entries/card.js +0 -42
  22. package/dist/src/manifests/components/entries/card.js.map +0 -1
  23. package/dist/src/manifests/components/entries/checkbox.d.ts +0 -31
  24. package/dist/src/manifests/components/entries/checkbox.js +0 -64
  25. package/dist/src/manifests/components/entries/checkbox.js.map +0 -1
  26. package/dist/src/manifests/components/entries/combobox.d.ts +0 -65
  27. package/dist/src/manifests/components/entries/combobox.js +0 -177
  28. package/dist/src/manifests/components/entries/combobox.js.map +0 -1
  29. package/dist/src/manifests/components/entries/datePicker.d.ts +0 -35
  30. package/dist/src/manifests/components/entries/datePicker.js +0 -68
  31. package/dist/src/manifests/components/entries/datePicker.js.map +0 -1
  32. package/dist/src/manifests/components/entries/dateRangePicker.d.ts +0 -35
  33. package/dist/src/manifests/components/entries/dateRangePicker.js +0 -111
  34. package/dist/src/manifests/components/entries/dateRangePicker.js.map +0 -1
  35. package/dist/src/manifests/components/entries/dialog.d.ts +0 -39
  36. package/dist/src/manifests/components/entries/dialog.js +0 -74
  37. package/dist/src/manifests/components/entries/dialog.js.map +0 -1
  38. package/dist/src/manifests/components/entries/lineChart.d.ts +0 -87
  39. package/dist/src/manifests/components/entries/lineChart.js +0 -166
  40. package/dist/src/manifests/components/entries/lineChart.js.map +0 -1
  41. package/dist/src/manifests/components/entries/numberinput.d.ts +0 -52
  42. package/dist/src/manifests/components/entries/numberinput.js +0 -64
  43. package/dist/src/manifests/components/entries/numberinput.js.map +0 -1
  44. package/dist/src/manifests/components/entries/radio.d.ts +0 -31
  45. package/dist/src/manifests/components/entries/radio.js +0 -50
  46. package/dist/src/manifests/components/entries/radio.js.map +0 -1
  47. package/dist/src/manifests/components/entries/select.d.ts +0 -16
  48. package/dist/src/manifests/components/entries/select.js +0 -23
  49. package/dist/src/manifests/components/entries/select.js.map +0 -1
  50. package/dist/src/manifests/components/entries/statistic.d.ts +0 -21
  51. package/dist/src/manifests/components/entries/statistic.js +0 -69
  52. package/dist/src/manifests/components/entries/statistic.js.map +0 -1
  53. package/dist/src/manifests/components/entries/table.d.ts +0 -16
  54. package/dist/src/manifests/components/entries/table.js +0 -43
  55. package/dist/src/manifests/components/entries/table.js.map +0 -1
  56. package/dist/src/manifests/components/entries/textarea.d.ts +0 -40
  57. package/dist/src/manifests/components/entries/textarea.js +0 -54
  58. package/dist/src/manifests/components/entries/textarea.js.map +0 -1
  59. package/dist/src/manifests/components/entries/textinput.d.ts +0 -40
  60. package/dist/src/manifests/components/entries/textinput.js +0 -53
  61. package/dist/src/manifests/components/entries/textinput.js.map +0 -1
  62. package/dist/src/manifests/components/entries/toggle.d.ts +0 -23
  63. package/dist/src/manifests/components/entries/toggle.js +0 -30
  64. package/dist/src/manifests/components/entries/toggle.js.map +0 -1
  65. package/dist/src/manifests/components/entries/typography.d.ts +0 -23
  66. package/dist/src/manifests/components/entries/typography.js +0 -32
  67. package/dist/src/manifests/components/entries/typography.js.map +0 -1
  68. package/dist/src/manifests/components/index.d.ts +0 -2
  69. package/dist/src/manifests/components/index.js +0 -43
  70. package/dist/src/manifests/components/index.js.map +0 -1
  71. package/dist/src/manifests/components/types.d.ts +0 -57
  72. package/dist/src/manifests/components/types.js +0 -2
  73. package/dist/src/manifests/components/types.js.map +0 -1
  74. package/dist/src/resources/components/get.d.ts +0 -7
  75. package/dist/src/resources/components/get.js +0 -29
  76. package/dist/src/resources/components/get.js.map +0 -1
  77. package/dist/src/resources/components/index.d.ts +0 -2
  78. package/dist/src/resources/components/index.js +0 -3
  79. package/dist/src/resources/components/index.js.map +0 -1
  80. package/dist/src/resources/components/list.d.ts +0 -7
  81. package/dist/src/resources/components/list.js +0 -19
  82. package/dist/src/resources/components/list.js.map +0 -1
  83. package/dist/src/resources/guides/index.d.ts +0 -2
  84. package/dist/src/resources/guides/index.js +0 -3
  85. package/dist/src/resources/guides/index.js.map +0 -1
  86. package/dist/src/resources/guides/principles.d.ts +0 -60
  87. package/dist/src/resources/guides/principles.js +0 -158
  88. package/dist/src/resources/guides/principles.js.map +0 -1
  89. package/dist/src/resources/guides/setup.d.ts +0 -7
  90. package/dist/src/resources/guides/setup.js +0 -54
  91. package/dist/src/resources/guides/setup.js.map +0 -1
  92. package/dist/src/resources/index.d.ts +0 -3
  93. package/dist/src/resources/index.js +0 -4
  94. package/dist/src/resources/index.js.map +0 -1
  95. package/dist/src/resources/tokens/get.d.ts +0 -7
  96. package/dist/src/resources/tokens/get.js +0 -30
  97. package/dist/src/resources/tokens/get.js.map +0 -1
  98. package/dist/src/resources/tokens/index.d.ts +0 -2
  99. package/dist/src/resources/tokens/index.js +0 -3
  100. package/dist/src/resources/tokens/index.js.map +0 -1
  101. package/dist/src/resources/tokens/list.d.ts +0 -7
  102. package/dist/src/resources/tokens/list.js +0 -21
  103. package/dist/src/resources/tokens/list.js.map +0 -1
  104. package/dist/src/tools/getCSSTokens/handler.d.ts +0 -6
  105. package/dist/src/tools/getCSSTokens/handler.js +0 -29
  106. package/dist/src/tools/getCSSTokens/handler.js.map +0 -1
  107. package/dist/src/tools/getCSSTokens/index.d.ts +0 -12
  108. package/dist/src/tools/getCSSTokens/index.js +0 -14
  109. package/dist/src/tools/getCSSTokens/index.js.map +0 -1
  110. package/dist/src/tools/getCSSTokens/utils.d.ts +0 -5
  111. package/dist/src/tools/getCSSTokens/utils.js +0 -25
  112. package/dist/src/tools/getCSSTokens/utils.js.map +0 -1
  113. package/dist/src/tools/getComponentDocs/handler.d.ts +0 -6
  114. package/dist/src/tools/getComponentDocs/handler.js +0 -27
  115. package/dist/src/tools/getComponentDocs/handler.js.map +0 -1
  116. package/dist/src/tools/getComponentDocs/index.d.ts +0 -12
  117. package/dist/src/tools/getComponentDocs/index.js +0 -14
  118. package/dist/src/tools/getComponentDocs/index.js.map +0 -1
  119. package/dist/src/tools/getSetupGuide/handler.d.ts +0 -6
  120. package/dist/src/tools/getSetupGuide/handler.js +0 -50
  121. package/dist/src/tools/getSetupGuide/handler.js.map +0 -1
  122. package/dist/src/tools/getSetupGuide/index.d.ts +0 -12
  123. package/dist/src/tools/getSetupGuide/index.js +0 -17
  124. package/dist/src/tools/getSetupGuide/index.js.map +0 -1
  125. package/dist/src/tools/getSetupGuide/setupGuides.d.ts +0 -12
  126. package/dist/src/tools/getSetupGuide/setupGuides.js +0 -49
  127. package/dist/src/tools/getSetupGuide/setupGuides.js.map +0 -1
  128. package/dist/src/tools/listCSSTokens/handler.d.ts +0 -3
  129. package/dist/src/tools/listCSSTokens/handler.js +0 -20
  130. package/dist/src/tools/listCSSTokens/handler.js.map +0 -1
  131. package/dist/src/tools/listCSSTokens/index.d.ts +0 -8
  132. package/dist/src/tools/listCSSTokens/index.js +0 -10
  133. package/dist/src/tools/listCSSTokens/index.js.map +0 -1
  134. package/dist/src/tools/listComponents/handler.d.ts +0 -3
  135. package/dist/src/tools/listComponents/handler.js +0 -18
  136. package/dist/src/tools/listComponents/handler.js.map +0 -1
  137. package/dist/src/tools/listComponents/index.d.ts +0 -9
  138. package/dist/src/tools/listComponents/index.js +0 -11
  139. package/dist/src/tools/listComponents/index.js.map +0 -1
  140. package/dist/src/utils/buildCDNUrls.d.ts +0 -3
  141. package/dist/src/utils/buildCDNUrls.js +0 -6
  142. package/dist/src/utils/buildCDNUrls.js.map +0 -1
  143. package/src/index.ts +0 -127
  144. package/src/manifests/components/entries/badge.ts +0 -45
  145. package/src/manifests/components/entries/banner.ts +0 -69
  146. package/src/manifests/components/entries/barChart.ts +0 -135
  147. package/src/manifests/components/entries/button.ts +0 -61
  148. package/src/manifests/components/entries/card.ts +0 -43
  149. package/src/manifests/components/entries/checkbox.ts +0 -68
  150. package/src/manifests/components/entries/combobox.ts +0 -185
  151. package/src/manifests/components/entries/datePicker.ts +0 -74
  152. package/src/manifests/components/entries/dateRangePicker.ts +0 -119
  153. package/src/manifests/components/entries/dialog.ts +0 -78
  154. package/src/manifests/components/entries/lineChart.ts +0 -177
  155. package/src/manifests/components/entries/numberinput.ts +0 -66
  156. package/src/manifests/components/entries/radio.ts +0 -53
  157. package/src/manifests/components/entries/select.ts +0 -24
  158. package/src/manifests/components/entries/statistic.ts +0 -72
  159. package/src/manifests/components/entries/table.ts +0 -44
  160. package/src/manifests/components/entries/textarea.ts +0 -56
  161. package/src/manifests/components/entries/textinput.ts +0 -55
  162. package/src/manifests/components/entries/toggle.ts +0 -31
  163. package/src/manifests/components/entries/typography.ts +0 -33
  164. package/src/manifests/components/index.ts +0 -45
  165. package/src/manifests/components/types.ts +0 -65
  166. package/src/resources/components/get.test.ts +0 -39
  167. package/src/resources/components/get.ts +0 -35
  168. package/src/resources/components/index.ts +0 -2
  169. package/src/resources/components/list.test.ts +0 -40
  170. package/src/resources/components/list.ts +0 -20
  171. package/src/resources/guides/index.ts +0 -2
  172. package/src/resources/guides/principles.ts +0 -160
  173. package/src/resources/guides/setup.test.ts +0 -72
  174. package/src/resources/guides/setup.ts +0 -66
  175. package/src/resources/index.ts +0 -3
  176. package/src/resources/tokens/get.test.ts +0 -41
  177. package/src/resources/tokens/get.ts +0 -36
  178. package/src/resources/tokens/index.ts +0 -2
  179. package/src/resources/tokens/list.test.ts +0 -42
  180. package/src/resources/tokens/list.ts +0 -31
  181. package/src/tools/getCSSTokens/__snapshots__/handler.test.ts.snap +0 -78
  182. package/src/tools/getCSSTokens/handler.test.ts +0 -39
  183. package/src/tools/getCSSTokens/handler.ts +0 -36
  184. package/src/tools/getCSSTokens/index.ts +0 -15
  185. package/src/tools/getCSSTokens/utils.ts +0 -31
  186. package/src/tools/getComponentDocs/__snapshots__/handler.test.ts.snap +0 -23
  187. package/src/tools/getComponentDocs/handler.test.ts +0 -14
  188. package/src/tools/getComponentDocs/handler.ts +0 -34
  189. package/src/tools/getComponentDocs/index.ts +0 -15
  190. package/src/tools/getSetupGuide/__snapshots__/handler.test.ts.snap +0 -34
  191. package/src/tools/getSetupGuide/handler.test.ts +0 -20
  192. package/src/tools/getSetupGuide/handler.ts +0 -59
  193. package/src/tools/getSetupGuide/index.ts +0 -20
  194. package/src/tools/getSetupGuide/setupGuides.ts +0 -62
  195. package/src/tools/listCSSTokens/__snapshots__/handler.test.ts.snap +0 -12
  196. package/src/tools/listCSSTokens/handler.test.ts +0 -9
  197. package/src/tools/listCSSTokens/handler.ts +0 -32
  198. package/src/tools/listCSSTokens/index.ts +0 -12
  199. package/src/tools/listComponents/__snapshots__/handler.test.ts.snap +0 -12
  200. package/src/tools/listComponents/handler.test.ts +0 -9
  201. package/src/tools/listComponents/handler.ts +0 -20
  202. package/src/tools/listComponents/index.ts +0 -12
  203. package/src/utils/buildCDNUrls.ts +0 -7
  204. package/tsconfig.json +0 -12
  205. package/vitest.config.ts +0 -6
@@ -1,119 +0,0 @@
1
- import { ComponentManifest } from '@/manifests/components/types.js';
2
- import { buildCDNUrl, buildMajorVersion } from '@/utils/buildCDNUrls.js';
3
- import packageJson from '@/../package.json' with { type: 'json' };
4
-
5
- const version = packageJson.dependencies['@triptease/tt-date-range-picker'];
6
-
7
- export default {
8
- 'date-range-picker': {
9
- name: 'Date Range Picker',
10
- description:
11
- 'Date range picker for selecting start and end dates, available as both React component and Web Component',
12
- ssrSafe: true,
13
- element: 'DateRangePicker (React) / tt-date-range-picker (Web Component)',
14
- usageGuidance: {
15
- whenToUse: [
16
- 'Users need to select a date range (bookings, reports, filters)',
17
- 'Start and end dates need to be validated together',
18
- 'Range constraints are important (min/max days in range)',
19
- 'Visual calendar helps users understand date spans',
20
- ],
21
- avoid: [
22
- 'Only a single date is needed (use date picker)',
23
- 'Dates are independent of each other (use two separate date pickers)',
24
- ],
25
- },
26
- installationOptions: {
27
- npm: [{ name: '@triptease/react/date-range-picker', includesTypes: true, optional: false }],
28
- cdn: [
29
- {
30
- name: '@triptease/tt-date-range-picker',
31
- includesTypes: false,
32
- optional: false,
33
- moduleFormat: 'esm',
34
- latestVersionUrl: buildCDNUrl('tt-date-range-picker', 'latest'),
35
- pinnedMajorVersionUrl: buildCDNUrl('tt-date-range-picker', buildMajorVersion(version)),
36
- pinnedVersionUrl: buildCDNUrl('tt-date-range-picker', version),
37
- guidance:
38
- 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
39
- },
40
- ],
41
- },
42
- examples: [
43
- {
44
- title: 'React - Basic',
45
- description:
46
- 'Uncontrolled date range picker. Dates are in ISO format (YYYY-MM-DD). Use start and end props for default values. Use minDate and maxDate props to restrict dates. Use disabled prop to disable. Use openLeft prop for pickers near right edge.',
47
- code: `import { DateRangePicker } from '@triptease/react/date-range-picker';
48
-
49
- <label htmlFor="daterange">Select date range</label>
50
- <DateRangePicker id="daterange" />`,
51
- },
52
- {
53
- title: 'React - Controlled',
54
- description:
55
- 'Use controlled component with React state for dynamic behavior. Access picker.start and picker.end from onChange event.',
56
- code: `import { DateRangePicker } from '@triptease/react/date-range-picker';
57
-
58
- const [startDate, setStartDate] = useState('');
59
- const [endDate, setEndDate] = useState('');
60
-
61
- const handleChange = (e) => {
62
- const picker = e.target;
63
- setStartDate(picker.start || '');
64
- setEndDate(picker.end || '');
65
- };
66
-
67
- <label htmlFor="daterange">Booking dates</label>
68
- <DateRangePicker id="daterange" start={startDate} end={endDate} onChange={handleChange} />`,
69
- },
70
- {
71
- title: 'React - With presets',
72
- description:
73
- 'Use PresetButton component for quick date range selection. Pass Preset enum values for common ranges. PresetButton must be child of DateRangePicker with slot="preset".',
74
- code: `import { DateRangePicker, PresetButton, Preset } from '@triptease/react/date-range-picker';
75
-
76
- <label htmlFor="daterange">Travel dates</label>
77
- <DateRangePicker id="daterange">
78
- <PresetButton slot="preset" preset={Preset.ThisWeek}>This Week</PresetButton>
79
- <PresetButton slot="preset" preset={Preset.ThisMonth}>This Month</PresetButton>
80
- <PresetButton slot="preset" preset={Preset.Next1Month}>Next Month</PresetButton>
81
- </DateRangePicker>`,
82
- },
83
- {
84
- title: 'Web Component - Basic',
85
- description:
86
- 'Web component date range picker. Dates are in ISO format (YYYY-MM-DD). Use start and end attributes for default values. Use mindate and maxdate attributes to restrict dates. Use disabled attribute to disable. Use open-left attribute for pickers near right edge.',
87
- code: `import '@triptease/tt-date-range-picker';
88
-
89
- <label for="daterange">Select date range</label>
90
- <tt-date-range-picker id="daterange"></tt-date-range-picker>`,
91
- },
92
- {
93
- title: 'Web Component - In form',
94
- description: `Use with HTML forms via name attribute. Form value is JSON string: {"startDate": "2025-01-01", "endDate": "2025-01-10"}. Parse JSON to access dates.`,
95
- code: `import '@triptease/tt-date-range-picker';
96
-
97
- <form onsubmit="handleSubmit(event)">
98
- <label for="booking-dates">Booking dates</label>
99
- <tt-date-range-picker id="booking-dates" name="booking-dates"></tt-date-range-picker>
100
- <button type="submit">Submit</button>
101
- </form>`,
102
- },
103
- {
104
- title: 'Web Component - With presets',
105
- description: `Use tt-preset-button for quick date range selection. Place inside tt-date-range-picker with slot="preset". Set preset attribute to range type: "this-week", "next-week", "this-month", "next-month", etc.`,
106
- code: `import '@triptease/tt-date-range-picker';
107
- import '@triptease/tt-preset-button';
108
-
109
- <label for="daterange">Travel dates</label>
110
- <tt-date-range-picker id="daterange">
111
- <tt-preset-button slot="preset" preset="this-week">This Week</tt-preset-button>
112
- <tt-preset-button slot="preset" preset="next-week">Next Week</tt-preset-button>
113
- <tt-preset-button slot="preset" preset="this-month">This Month</tt-preset-button>
114
- <tt-preset-button slot="preset" preset="next-month">Next Month</tt-preset-button>
115
- </tt-date-range-picker>`,
116
- },
117
- ],
118
- },
119
- } satisfies ComponentManifest;
@@ -1,78 +0,0 @@
1
- import { ComponentManifest } from '@/manifests/components/types.js';
2
- import packageJson from '@/../package.json' with { type: 'json' };
3
- import { buildCDNUrl, buildMajorVersion } from '@/utils/buildCDNUrls.js';
4
-
5
- const version = packageJson.dependencies['@triptease/tt-dialog'];
6
-
7
- export default {
8
- dialog: {
9
- name: 'Dialog - Web Component',
10
- description: 'Dialog component that displays content in a layer above the page',
11
- ssrSafe: true,
12
- element: 'tt-dialog',
13
- usageGuidance: {
14
- whenToUse: [
15
- 'User interaction is required to proceed',
16
- "The task is short, self-contained or doesn't fit naturally into a page",
17
- 'The underlying page content should remain visible',
18
- "Intentionally disrupting the user's flow is beneficial (e.g. confirmations, critical notifications)",
19
- ],
20
- avoid: [
21
- 'The content is long, complex, or scrollable (e.g. multi-step forms, detailed instructions)',
22
- 'The content should be shareable or linkable (prefer a dedicated page)',
23
- 'The information is not time-sensitive or critical (prefer toasts or inline disclosures)',
24
- 'The user did not initiate the interaction (unsolicited pop-ups can be frustrating)',
25
- ],
26
- },
27
- installationOptions: {
28
- npm: [{ name: '@triptease/tt-dialog', includesTypes: true, optional: false }],
29
- cdn: [
30
- {
31
- name: 'tt-dialog',
32
- includesTypes: false,
33
- optional: false,
34
- moduleFormat: 'esm',
35
- pinnedVersionUrl: buildCDNUrl('tt-dialog', version),
36
- pinnedMajorVersionUrl: buildCDNUrl('tt-dialog', buildMajorVersion(version)),
37
- latestVersionUrl: buildCDNUrl('tt-dialog', 'latest'),
38
- guidance:
39
- 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
40
- },
41
- ],
42
- },
43
- examples: [
44
- {
45
- title: 'Basic usage',
46
- code: `<button data-theme="primary" onclick="document.querySelector('#my-dialog').show()">
47
- Open Dialog
48
- </button>
49
- <tt-dialog id="my-dialog" aria-label="Example dialog">
50
- <div class="container">
51
- <h2>Dialog Title</h2>
52
- <p>This is a basic dialog with some content.</p>
53
- <button data-theme="primary" onclick="document.querySelector('#my-dialog').hide()">
54
- Close
55
- </button>
56
- </div>
57
- </tt-dialog>`,
58
- },
59
- {
60
- title: 'With CSS custom properties',
61
- description:
62
- 'Use CSS custom properties to customize dialog positioning:\n\n- `--dialog-left-distance`: Control the horizontal position of the dialog.',
63
- code: `<button data-theme="primary" onclick="document.querySelector('#positioned-dialog').show()">
64
- Open Dialog
65
- </button>
66
- <tt-dialog id="positioned-dialog" aria-label="Positioned dialog" style="--dialog-left-distance: 100px;">
67
- <div class="container">
68
- <h2>Custom Positioned Dialog</h2>
69
- <p>This dialog has custom positioning using CSS custom properties.</p>
70
- <button data-theme="primary" onclick="document.querySelector('#positioned-dialog').hide()">
71
- Close
72
- </button>
73
- </div>
74
- </tt-dialog>`,
75
- },
76
- ],
77
- },
78
- } satisfies ComponentManifest;
@@ -1,177 +0,0 @@
1
- import { ComponentManifest } from '@/manifests/components/types.js';
2
- import { buildCDNUrl, buildMajorVersion } from '@/utils/buildCDNUrls.js';
3
- import packageJson from '@/../package.json' with { type: 'json' };
4
-
5
- const latestLineChartVersion = packageJson.dependencies['@triptease/tt-line-chart'];
6
- const latestDatasetVersion = packageJson.dependencies['@triptease/tt-dataset'];
7
- const latestDataPointVersion = packageJson.dependencies['@triptease/tt-data-point'];
8
- const latestHighlightVersion = packageJson.dependencies['@triptease/tt-highlight'];
9
- const latestMilestoneVersion = packageJson.dependencies['@triptease/tt-milestone'];
10
-
11
- export default {
12
- 'line-chart': {
13
- name: 'Line Chart - Web Component',
14
- description: 'Line chart for visualizing trends over continuous data',
15
- ssrSafe: true,
16
- element: 'tt-line-chart',
17
- usageGuidance: {
18
- whenToUse: [
19
- 'To visualize trends along a continuous x-axis',
20
- 'To compare how multiple datasets for the same measure change relative to each other',
21
- ],
22
- avoid: [
23
- 'When the x-axis does not represent a continuous range (use a bar chart instead)',
24
- 'When there are too few data points to form a meaningful trend (use a bar chart instead)',
25
- 'When comparing datasets that do not have a meaningful or explainable relationship',
26
- ],
27
- },
28
- installationOptions: {
29
- npm: [
30
- { name: '@triptease/tt-line-chart', includesTypes: true, optional: false },
31
- { name: '@triptease/tt-dataset', includesTypes: true, optional: false },
32
- { name: '@triptease/tt-data-point', includesTypes: true, optional: false },
33
- { name: '@triptease/tt-highlight', includesTypes: true, optional: true },
34
- { name: '@triptease/tt-milestone', includesTypes: true, optional: true },
35
- ],
36
- cdn: [
37
- {
38
- name: 'tt-line-chart',
39
- includesTypes: false,
40
- optional: false,
41
- pinnedVersionUrl: buildCDNUrl('tt-line-chart', latestLineChartVersion),
42
- pinnedMajorVersionUrl: buildCDNUrl('tt-line-chart', buildMajorVersion(latestLineChartVersion)),
43
- latestVersionUrl: buildCDNUrl('tt-line-chart', 'latest'),
44
- guidance:
45
- 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
46
- },
47
- {
48
- name: 'tt-dataset',
49
- includesTypes: false,
50
- optional: false,
51
- moduleFormat: 'esm',
52
- pinnedVersionUrl: buildCDNUrl('tt-dataset', latestDatasetVersion),
53
- pinnedMajorVersionUrl: buildCDNUrl('tt-dataset', buildMajorVersion(latestDatasetVersion)),
54
- latestVersionUrl: buildCDNUrl('tt-dataset', 'latest'),
55
- guidance:
56
- 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
57
- },
58
- {
59
- name: 'tt-data-point',
60
- includesTypes: false,
61
- optional: false,
62
- pinnedVersionUrl: buildCDNUrl('tt-data-point', latestDataPointVersion),
63
- pinnedMajorVersionUrl: buildCDNUrl('tt-data-point', buildMajorVersion(latestDataPointVersion)),
64
- latestVersionUrl: buildCDNUrl('tt-data-point', 'latest'),
65
- guidance:
66
- 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
67
- },
68
- {
69
- name: 'tt-highlight',
70
- includesTypes: false,
71
- optional: true,
72
- pinnedVersionUrl: buildCDNUrl('tt-highlight', latestHighlightVersion),
73
- pinnedMajorVersionUrl: buildCDNUrl('tt-highlight', buildMajorVersion(latestHighlightVersion)),
74
- latestVersionUrl: buildCDNUrl('tt-highlight', 'latest'),
75
- guidance:
76
- 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
77
- },
78
- {
79
- name: 'tt-milestone',
80
- includesTypes: false,
81
- optional: true,
82
- pinnedVersionUrl: buildCDNUrl('tt-milestone', latestMilestoneVersion),
83
- pinnedMajorVersionUrl: buildCDNUrl('tt-milestone', buildMajorVersion(latestMilestoneVersion)),
84
- latestVersionUrl: buildCDNUrl('tt-milestone', 'latest'),
85
- guidance:
86
- 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
87
- },
88
- ],
89
- },
90
- attributes: {
91
- width: {
92
- type: 'string',
93
- description: 'Width of chart (any CSS value). Defaults to 100% to fill container.',
94
- },
95
- height: {
96
- type: 'string',
97
- description: 'Height of chart (any CSS value). Defaults to 100% to fill container.',
98
- },
99
- 'x-axis-title': {
100
- type: 'string',
101
- description: 'Title for x-axis. Use to clarify units of measurement. Keep concise.',
102
- },
103
- 'y-axis-title': {
104
- type: 'string',
105
- description: 'Title for y-axis. Use to clarify units of measurement. Keep concise.',
106
- },
107
- loading: {
108
- type: 'boolean',
109
- description: 'Show loading state while data fetches. Component handles aria-busy automatically.',
110
- },
111
- 'hide-numbers': {
112
- type: 'boolean',
113
- description:
114
- 'Hide y-axis numbers and tooltips. Use when numbers could mislead. Removes ARIA labels, so provide trend description.',
115
- },
116
- },
117
- examples: [
118
- {
119
- title: 'Basic line chart',
120
- code: `import '@triptease/tt-line-chart';
121
- import '@triptease/tt-dataset';
122
- import '@triptease/tt-data-point';
123
-
124
- <tt-line-chart id="basic-chart">
125
- <tt-dataset label="2024">
126
- <tt-data-point label="Jan 1" value={45}></tt-data-point>
127
- <tt-data-point label="Jan 2" value={48}></tt-data-point>
128
- <tt-data-point label="Jan 3" value={52}></tt-data-point>
129
- </tt-dataset>
130
- </tt-line-chart>`,
131
- },
132
- {
133
- title: 'Multiple datasets',
134
- description:
135
- 'Use multiple datasets to compare trends of the same measure for different groups. Limit datasets to a maximum of 4, as more datasets make the chart difficult to read and compare. The component automatically uses symbols to help identify each dataset without relying on color.',
136
- code: `<tt-line-chart id="multiple-datasets" height="20rem">
137
- <tt-dataset label="2025">
138
- <tt-data-point label="Jan 1" value={45}></tt-data-point>
139
- <tt-data-point label="Jan 2" value={48}></tt-data-point>
140
- </tt-dataset>
141
- <tt-dataset label="2024">
142
- <tt-data-point label="Jan 1" value={42}></tt-data-point>
143
- <tt-data-point label="Jan 2" value={44}></tt-data-point>
144
- </tt-dataset>
145
- </tt-line-chart>`,
146
- },
147
- {
148
- title: 'With highlighted regions',
149
- description:
150
- 'Use highlighted regions to draw attention to and label significant intervals. Only use when something significant occurs that may have affected the data. Use sparingly and highlight only the most important intervals to avoid clutter. Avoid overlapping regions as this can make it difficult to see where each interval starts and ends. Do not use when displaying multiple datasets if the highlight applies to only one dataset, as users may assume it applies to all.',
151
- code: `import '@triptease/tt-highlight';
152
-
153
- <tt-line-chart id="highlighted-chart" height="20rem">
154
- <tt-dataset label="2025">
155
- <tt-data-point label="Jan 1" value={45}></tt-data-point>
156
- <tt-data-point label="Jan 2" value={48}></tt-data-point>
157
- </tt-dataset>
158
- <tt-highlight label="Easter Boost" from="15 Mar" to="5 Apr"></tt-highlight>
159
- </tt-line-chart>;`,
160
- },
161
- {
162
- title: 'With milestones',
163
- description:
164
- 'Use milestones to draw attention to and label significant points in time on a chart. Only use when something significant occurred that may have affected the data, or to mark an important point in time (e.g. today, start, finish). Use sparingly and highlight only the most important events to avoid clutter. Avoid positioning milestones too close together as labels may overlap and become difficult to read. Do not use when displaying multiple datasets if the milestone applies to only one dataset, as users may assume it applies to all.',
165
- code: `import '@triptease/tt-milestone';
166
-
167
- <tt-line-chart id="highlighted-chart" height="20rem">
168
- <tt-dataset label="2025">
169
- <tt-data-point label="Jan 1" value={45}></tt-data-point>
170
- <tt-data-point label="Jan 2" value={48}></tt-data-point>
171
- </tt-dataset>
172
- <tt-milestone label="Todayt" value="Jan 2"></tt-milestone>
173
- </tt-line-chart>;`,
174
- },
175
- ],
176
- },
177
- } satisfies ComponentManifest;
@@ -1,66 +0,0 @@
1
- import { ComponentManifest } from '@/manifests/components/types.js';
2
-
3
- export default {
4
- numberinput: {
5
- name: 'Number Input',
6
- description: 'Number input field with browser-provided increment/decrement controls',
7
- element: "input[type='number']",
8
- usageGuidance: {
9
- whenToUse: [
10
- 'Collecting numeric data (age, quantity, price)',
11
- 'Values have clear min/max bounds',
12
- 'Users benefit from increment/decrement buttons',
13
- ],
14
- avoid: [
15
- 'Numbers containing formatting (phone numbers, credit cards - use text input)',
16
- 'Complex number validation needed',
17
- ],
18
- },
19
- attributes: {
20
- type: {
21
- values: ['number'],
22
- default: 'number',
23
- },
24
- 'aria-invalid': {
25
- type: 'boolean',
26
- description:
27
- 'Marks input as invalid for error styling. Pair with aria-describedby to associate error messages.',
28
- },
29
- disabled: {
30
- type: 'boolean',
31
- description: 'Disables the input',
32
- },
33
- placeholder: {
34
- type: 'string',
35
- description: 'Placeholder text. Should not replace label - always provide visible label element.',
36
- },
37
- min: {
38
- type: 'number',
39
- description: 'Minimum allowed value',
40
- },
41
- max: {
42
- type: 'number',
43
- description: 'Maximum allowed value',
44
- },
45
- step: {
46
- type: 'number',
47
- description: 'Increment/decrement step size',
48
- },
49
- },
50
- states: ['default', 'hover', 'focus', 'disabled', 'invalid'],
51
- examples: [
52
- {
53
- title: 'Basic usage',
54
- code: `<label for="hotel-count">Number of Hotels</label>
55
- <input id="hotel-count" type="number" />`,
56
- },
57
- {
58
- title: 'Error state',
59
- description: 'Use aria-invalid with aria-describedby to associate error messages for screen readers',
60
- code: `<label for="quantity">Quantity</label>
61
- <input id="quantity" type="number" min="1" max="10" aria-invalid aria-describedby="quantity-error" />
62
- <span id="quantity-error" class="text-error">Please enter a number between 1 and 10</span>`,
63
- },
64
- ],
65
- },
66
- } satisfies ComponentManifest;
@@ -1,53 +0,0 @@
1
- import { ComponentManifest } from '@/manifests/components/types.js';
2
-
3
- export default {
4
- radio: {
5
- name: 'Radio',
6
- description: 'Radio button for selecting exactly one option from mutually exclusive choices',
7
- element: "input[type='radio']",
8
- usageGuidance: {
9
- whenToUse: [
10
- 'Only one option can be selected from a small set',
11
- 'All options need to be visible at once',
12
- 'Comparing options side-by-side is important',
13
- 'Default selection is recommended',
14
- ],
15
- avoid: [
16
- 'Multiple selections allowed (use checkboxes)',
17
- 'Long lists of options (consider select dropdown or combobox)',
18
- 'Immediate action expected (use toggle or button)',
19
- ],
20
- },
21
- attributes: {
22
- name: {
23
- type: 'string',
24
- description: 'Groups radio buttons together. All radio buttons in a group must have the same name.',
25
- },
26
- checked: {
27
- type: 'boolean',
28
- description: 'Marks radio button as selected by default. Only one radio in a group should be checked.',
29
- },
30
- disabled: {
31
- type: 'boolean',
32
- description:
33
- 'Disables the radio button. Can be applied to individual inputs or to parent fieldset to disable all radios.',
34
- },
35
- },
36
- examples: [
37
- {
38
- title: 'Radio group',
39
- description:
40
- 'Use fieldset and legend for grouped radio buttons. All radios must share the same name attribute.',
41
- code: `<fieldset>
42
- <legend>Choose a color:</legend>
43
- <input type="radio" id="radio-red" name="color" value="red" />
44
- <label for="radio-red">Red</label>
45
- <input type="radio" id="radio-green" name="color" value="green" />
46
- <label for="radio-green">Green</label>
47
- <input type="radio" id="radio-blue" name="color" value="blue" />
48
- <label for="radio-blue">Blue</label>
49
- </fieldset>`,
50
- },
51
- ],
52
- },
53
- } satisfies ComponentManifest;
@@ -1,24 +0,0 @@
1
- import { ComponentManifest } from '@/manifests/components/types.js';
2
-
3
- export default {
4
- select: {
5
- name: 'Select Input',
6
- description: 'Dropdown list for selecting a single option',
7
- element: 'select',
8
- usageGuidance: {
9
- whenToUse: ['Selecting from a list of predefined options', 'Limited screen space'],
10
- avoid: ['Multiple selections (use the Combobox webcomponent)'],
11
- },
12
- examples: [
13
- {
14
- title: 'Basic select',
15
- code: `<label for="reports">Select report frequency</label>
16
- <select name="reports">
17
- <option value="daily">Daily Report</option>
18
- <option value="weekly">Weekly Report</option>
19
- <option value="monthly">Monthly Report</option>
20
- </select>`,
21
- },
22
- ],
23
- },
24
- } satisfies ComponentManifest;
@@ -1,72 +0,0 @@
1
- import { ComponentManifest } from '@/manifests/components/types.js';
2
-
3
- export default {
4
- statistic: {
5
- name: 'Statistic',
6
- description: 'A consistent, structured layout for displaying a statistic or a few statistics.',
7
- element: 'div',
8
- usageGuidance: {
9
- whenToUse: [
10
- 'Highlight a single key metric with a label (e.g. "All Sessions: 3,000").',
11
- 'Surface at-a-glance KPIs on dashboards or summary cards.',
12
- 'Show a value alongside a status indicator (e.g. "Good", "+3 vs last month").',
13
- 'Provide brief contextual notes about how a value was calculated.',
14
- ],
15
- avoid: [
16
- 'When comparing multiple attributes across items, so use a Table instead.',
17
- 'When showing trends over time, use a chart or graph.',
18
- 'When the value requires significant explanation, use a more detailed content component.',
19
- ],
20
- },
21
- examples: [
22
- {
23
- title: 'Basic statistic',
24
- code: `
25
- <div class="card">
26
- <div class="statistic">
27
- <p class="statistic--label">Booked Room Nights</p>
28
- <p class="statistic--value">30</p>
29
- </div>
30
- </div>`,
31
- },
32
- {
33
- title: 'With Indicator',
34
- description:
35
- 'Use to highlight the status of a statistic or a change in its value. Use a badge to communicate overall status, such as “Good”, “Warning”, or “OK”. Use text to indicate change compared to a previous period, such as “+3 vs last month”. When showing change, apply the appropriate CSS color tokens to signal whether the value is positive or negative. Keep the indicator concise and directly related to the primary statistic.',
36
- code: `
37
- <div>
38
- <div class="card">
39
- <div class="statistic">
40
- <p class="statistic--label">Booked Room Nights</p>
41
- <p class="statistic--value">30</p>
42
- <p class="badge statistic--indicator" data-theme="success">
43
- Good
44
- </p>
45
- </div>
46
- <div class="statistic">
47
- <p class="statistic--label">Sessions with Search</p>
48
- <p class="statistic--value">5,937</p>
49
- <p class="statistic--indicator" style="color: var(--color-success-500)">
50
- +30 vs last month
51
- </p>
52
- </div>
53
- </div>
54
- </div>
55
- `,
56
- },
57
- {
58
- title: 'With Context',
59
- description:
60
- 'Use to provide brief explanatory information about the statistic. Example scenarios: To clarify what the statistic represents, how it was calculated or how it relates to other information on the page. Keep context concise and supplementary; it should clarify the value, not compete with it. Do not recolor the value as this can draw undue attention.',
61
- code: `
62
- <div class="card">
63
- <div class="statistic">
64
- <p class="statistic--label">Booked Room Nights</p>
65
- <p class="statistic--value">30</p>
66
- <p class="statistic--context">Includes canceled stays</p>
67
- </div>
68
- </div>`,
69
- },
70
- ],
71
- },
72
- } satisfies ComponentManifest;
@@ -1,44 +0,0 @@
1
- import { ComponentManifest } from '@/manifests/components/types.js';
2
-
3
- export default {
4
- table: {
5
- name: 'Table',
6
- description: 'Organize and display data in rows and columns',
7
- element: 'table',
8
- usageGuidance: {
9
- whenToUse: [
10
- 'Display structured data with multiple attributes',
11
- 'Enable comparison across data rows',
12
- 'Present numerical or tabular information',
13
- 'Show data relationships clearly',
14
- ],
15
- avoid: [
16
- 'For layout purposes (use CSS Grid or Flexbox)',
17
- 'When data is better visualized as a chart',
18
- 'For small amounts of data that could be in a list',
19
- "On small screens where columns won't fit (consider alternative layouts)",
20
- ],
21
- },
22
- examples: [
23
- {
24
- title: 'Basic table',
25
- code: `<table>
26
- <thead>
27
- <tr>
28
- <th>Property Name</th>
29
- <th>Impressions</th>
30
- <th>Revenue</th>
31
- </tr>
32
- </thead>
33
- <tbody>
34
- <tr>
35
- <td>Downtown Suites</td>
36
- <td>12,450</td>
37
- <td>$5,760.00</td>
38
- </tr>
39
- </tbody>
40
- </table>`,
41
- },
42
- ],
43
- },
44
- } satisfies ComponentManifest;