@triptease/design-system-mcp 0.0.3

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 (162) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +340 -0
  3. package/dist/package.json +41 -0
  4. package/dist/src/index.d.ts +2 -0
  5. package/dist/src/index.js +39 -0
  6. package/dist/src/index.js.map +1 -0
  7. package/dist/src/manifests/components/entries/badge.d.ts +27 -0
  8. package/dist/src/manifests/components/entries/badge.js +43 -0
  9. package/dist/src/manifests/components/entries/badge.js.map +1 -0
  10. package/dist/src/manifests/components/entries/barChart.d.ts +73 -0
  11. package/dist/src/manifests/components/entries/barChart.js +125 -0
  12. package/dist/src/manifests/components/entries/barChart.js.map +1 -0
  13. package/dist/src/manifests/components/entries/button.d.ts +40 -0
  14. package/dist/src/manifests/components/entries/button.js +59 -0
  15. package/dist/src/manifests/components/entries/button.js.map +1 -0
  16. package/dist/src/manifests/components/entries/card.d.ts +20 -0
  17. package/dist/src/manifests/components/entries/card.js +34 -0
  18. package/dist/src/manifests/components/entries/card.js.map +1 -0
  19. package/dist/src/manifests/components/entries/checkbox.d.ts +31 -0
  20. package/dist/src/manifests/components/entries/checkbox.js +64 -0
  21. package/dist/src/manifests/components/entries/checkbox.js.map +1 -0
  22. package/dist/src/manifests/components/entries/combobox.d.ts +64 -0
  23. package/dist/src/manifests/components/entries/combobox.js +176 -0
  24. package/dist/src/manifests/components/entries/combobox.js.map +1 -0
  25. package/dist/src/manifests/components/entries/datePicker.d.ts +34 -0
  26. package/dist/src/manifests/components/entries/datePicker.js +67 -0
  27. package/dist/src/manifests/components/entries/datePicker.js.map +1 -0
  28. package/dist/src/manifests/components/entries/dateRangePicker.d.ts +34 -0
  29. package/dist/src/manifests/components/entries/dateRangePicker.js +110 -0
  30. package/dist/src/manifests/components/entries/dateRangePicker.js.map +1 -0
  31. package/dist/src/manifests/components/entries/dialog.d.ts +38 -0
  32. package/dist/src/manifests/components/entries/dialog.js +73 -0
  33. package/dist/src/manifests/components/entries/dialog.js.map +1 -0
  34. package/dist/src/manifests/components/entries/lineChart.d.ts +76 -0
  35. package/dist/src/manifests/components/entries/lineChart.js +141 -0
  36. package/dist/src/manifests/components/entries/lineChart.js.map +1 -0
  37. package/dist/src/manifests/components/entries/numberinput.d.ts +52 -0
  38. package/dist/src/manifests/components/entries/numberinput.js +64 -0
  39. package/dist/src/manifests/components/entries/numberinput.js.map +1 -0
  40. package/dist/src/manifests/components/entries/radio.d.ts +31 -0
  41. package/dist/src/manifests/components/entries/radio.js +50 -0
  42. package/dist/src/manifests/components/entries/radio.js.map +1 -0
  43. package/dist/src/manifests/components/entries/select.d.ts +16 -0
  44. package/dist/src/manifests/components/entries/select.js +23 -0
  45. package/dist/src/manifests/components/entries/select.js.map +1 -0
  46. package/dist/src/manifests/components/entries/table.d.ts +16 -0
  47. package/dist/src/manifests/components/entries/table.js +43 -0
  48. package/dist/src/manifests/components/entries/table.js.map +1 -0
  49. package/dist/src/manifests/components/entries/textarea.d.ts +40 -0
  50. package/dist/src/manifests/components/entries/textarea.js +54 -0
  51. package/dist/src/manifests/components/entries/textarea.js.map +1 -0
  52. package/dist/src/manifests/components/entries/textinput.d.ts +40 -0
  53. package/dist/src/manifests/components/entries/textinput.js +53 -0
  54. package/dist/src/manifests/components/entries/textinput.js.map +1 -0
  55. package/dist/src/manifests/components/entries/toggle.d.ts +23 -0
  56. package/dist/src/manifests/components/entries/toggle.js +30 -0
  57. package/dist/src/manifests/components/entries/toggle.js.map +1 -0
  58. package/dist/src/manifests/components/entries/typography.d.ts +23 -0
  59. package/dist/src/manifests/components/entries/typography.js +32 -0
  60. package/dist/src/manifests/components/entries/typography.js.map +1 -0
  61. package/dist/src/manifests/components/index.d.ts +2 -0
  62. package/dist/src/manifests/components/index.js +39 -0
  63. package/dist/src/manifests/components/index.js.map +1 -0
  64. package/dist/src/manifests/components/types.d.ts +56 -0
  65. package/dist/src/manifests/components/types.js +2 -0
  66. package/dist/src/manifests/components/types.js.map +1 -0
  67. package/dist/src/tools/getCSSTokens/handler.d.ts +6 -0
  68. package/dist/src/tools/getCSSTokens/handler.js +29 -0
  69. package/dist/src/tools/getCSSTokens/handler.js.map +1 -0
  70. package/dist/src/tools/getCSSTokens/index.d.ts +12 -0
  71. package/dist/src/tools/getCSSTokens/index.js +14 -0
  72. package/dist/src/tools/getCSSTokens/index.js.map +1 -0
  73. package/dist/src/tools/getCSSTokens/utils.d.ts +5 -0
  74. package/dist/src/tools/getCSSTokens/utils.js +25 -0
  75. package/dist/src/tools/getCSSTokens/utils.js.map +1 -0
  76. package/dist/src/tools/getComponentDocs/handler.d.ts +6 -0
  77. package/dist/src/tools/getComponentDocs/handler.js +27 -0
  78. package/dist/src/tools/getComponentDocs/handler.js.map +1 -0
  79. package/dist/src/tools/getComponentDocs/index.d.ts +12 -0
  80. package/dist/src/tools/getComponentDocs/index.js +14 -0
  81. package/dist/src/tools/getComponentDocs/index.js.map +1 -0
  82. package/dist/src/tools/getSetupGuide/handler.d.ts +6 -0
  83. package/dist/src/tools/getSetupGuide/handler.js +50 -0
  84. package/dist/src/tools/getSetupGuide/handler.js.map +1 -0
  85. package/dist/src/tools/getSetupGuide/index.d.ts +12 -0
  86. package/dist/src/tools/getSetupGuide/index.js +17 -0
  87. package/dist/src/tools/getSetupGuide/index.js.map +1 -0
  88. package/dist/src/tools/getSetupGuide/setupGuides.d.ts +12 -0
  89. package/dist/src/tools/getSetupGuide/setupGuides.js +49 -0
  90. package/dist/src/tools/getSetupGuide/setupGuides.js.map +1 -0
  91. package/dist/src/tools/listCSSTokens/handler.d.ts +3 -0
  92. package/dist/src/tools/listCSSTokens/handler.js +20 -0
  93. package/dist/src/tools/listCSSTokens/handler.js.map +1 -0
  94. package/dist/src/tools/listCSSTokens/index.d.ts +8 -0
  95. package/dist/src/tools/listCSSTokens/index.js +10 -0
  96. package/dist/src/tools/listCSSTokens/index.js.map +1 -0
  97. package/dist/src/tools/listComponents/handler.d.ts +3 -0
  98. package/dist/src/tools/listComponents/handler.js +18 -0
  99. package/dist/src/tools/listComponents/handler.js.map +1 -0
  100. package/dist/src/tools/listComponents/index.d.ts +9 -0
  101. package/dist/src/tools/listComponents/index.js +11 -0
  102. package/dist/src/tools/listComponents/index.js.map +1 -0
  103. package/dist/src/tools/searchComponents/handler.d.ts +6 -0
  104. package/dist/src/tools/searchComponents/handler.js +29 -0
  105. package/dist/src/tools/searchComponents/handler.js.map +1 -0
  106. package/dist/src/tools/searchComponents/index.d.ts +12 -0
  107. package/dist/src/tools/searchComponents/index.js +14 -0
  108. package/dist/src/tools/searchComponents/index.js.map +1 -0
  109. package/dist/src/utils/buildCDNUrls.d.ts +3 -0
  110. package/dist/src/utils/buildCDNUrls.js +6 -0
  111. package/dist/src/utils/buildCDNUrls.js.map +1 -0
  112. package/package.json +43 -0
  113. package/src/index.ts +46 -0
  114. package/src/manifests/components/entries/badge.ts +45 -0
  115. package/src/manifests/components/entries/barChart.ts +132 -0
  116. package/src/manifests/components/entries/button.ts +61 -0
  117. package/src/manifests/components/entries/card.ts +35 -0
  118. package/src/manifests/components/entries/checkbox.ts +68 -0
  119. package/src/manifests/components/entries/combobox.ts +184 -0
  120. package/src/manifests/components/entries/datePicker.ts +73 -0
  121. package/src/manifests/components/entries/dateRangePicker.ts +118 -0
  122. package/src/manifests/components/entries/dialog.ts +77 -0
  123. package/src/manifests/components/entries/lineChart.ts +150 -0
  124. package/src/manifests/components/entries/numberinput.ts +66 -0
  125. package/src/manifests/components/entries/radio.ts +53 -0
  126. package/src/manifests/components/entries/select.ts +24 -0
  127. package/src/manifests/components/entries/table.ts +44 -0
  128. package/src/manifests/components/entries/textarea.ts +56 -0
  129. package/src/manifests/components/entries/textinput.ts +55 -0
  130. package/src/manifests/components/entries/toggle.ts +31 -0
  131. package/src/manifests/components/entries/typography.ts +33 -0
  132. package/src/manifests/components/index.ts +41 -0
  133. package/src/manifests/components/types.ts +64 -0
  134. package/src/tools/getCSSTokens/__snapshots__/handler.test.ts.snap +78 -0
  135. package/src/tools/getCSSTokens/handler.test.ts +39 -0
  136. package/src/tools/getCSSTokens/handler.ts +36 -0
  137. package/src/tools/getCSSTokens/index.ts +15 -0
  138. package/src/tools/getCSSTokens/utils.ts +31 -0
  139. package/src/tools/getComponentDocs/__snapshots__/handler.test.ts.snap +23 -0
  140. package/src/tools/getComponentDocs/handler.test.ts +14 -0
  141. package/src/tools/getComponentDocs/handler.ts +34 -0
  142. package/src/tools/getComponentDocs/index.ts +15 -0
  143. package/src/tools/getSetupGuide/__snapshots__/handler.test.ts.snap +34 -0
  144. package/src/tools/getSetupGuide/handler.test.ts +20 -0
  145. package/src/tools/getSetupGuide/handler.ts +59 -0
  146. package/src/tools/getSetupGuide/index.ts +20 -0
  147. package/src/tools/getSetupGuide/setupGuides.ts +62 -0
  148. package/src/tools/listCSSTokens/__snapshots__/handler.test.ts.snap +12 -0
  149. package/src/tools/listCSSTokens/handler.test.ts +9 -0
  150. package/src/tools/listCSSTokens/handler.ts +32 -0
  151. package/src/tools/listCSSTokens/index.ts +12 -0
  152. package/src/tools/listComponents/__snapshots__/handler.test.ts.snap +12 -0
  153. package/src/tools/listComponents/handler.test.ts +9 -0
  154. package/src/tools/listComponents/handler.ts +20 -0
  155. package/src/tools/listComponents/index.ts +12 -0
  156. package/src/tools/searchComponents/__snapshots__/handler.test.ts.snap +23 -0
  157. package/src/tools/searchComponents/handler.test.ts +14 -0
  158. package/src/tools/searchComponents/handler.ts +36 -0
  159. package/src/tools/searchComponents/index.ts +15 -0
  160. package/src/utils/buildCDNUrls.ts +7 -0
  161. package/tsconfig.json +12 -0
  162. package/vitest.config.ts +6 -0
@@ -0,0 +1,176 @@
1
+ import { buildCDNUrl, buildMajorVersion } from '../../../utils/buildCDNUrls.js';
2
+ import packageJson from '../../../../package.json' with { type: 'json' };
3
+ const version = packageJson.dependencies['@triptease/tt-combobox'];
4
+ export default {
5
+ combobox: {
6
+ name: 'Combobox',
7
+ description: 'Searchable dropdown that combines a text input with a list, available as both React component and Web Component',
8
+ ssrSafe: true,
9
+ element: 'Combobox (React) / tt-combobox (Web Component)',
10
+ usageGuidance: {
11
+ whenToUse: [
12
+ 'Lists with many options where typing to filter is helpful',
13
+ 'Users need to search/filter through options quickly',
14
+ 'Space is limited for displaying all options at once',
15
+ 'Single or multiple selection needed',
16
+ ],
17
+ avoid: [
18
+ 'Small lists where all options should be visible (consider radio buttons)',
19
+ 'Users would benefit from seeing all options simultaneously for comparison',
20
+ ],
21
+ },
22
+ installation: {
23
+ npm: [{ name: '@triptease/tt-combobox', includesTypes: true, optional: false }],
24
+ cdn: [
25
+ {
26
+ name: '@triptease/tt-combobox',
27
+ includesTypes: false,
28
+ optional: false,
29
+ latestVersionUrl: buildCDNUrl('tt-combobox', 'latest'),
30
+ pinnedMajorVersionUrl: buildCDNUrl('tt-combobox', buildMajorVersion(version)),
31
+ pinnedVersionUrl: buildCDNUrl('tt-combobox', version),
32
+ guidance: 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
33
+ },
34
+ ],
35
+ },
36
+ attributes: {
37
+ multiselect: {
38
+ type: 'boolean',
39
+ description: 'Enable multi-select mode where multiple options can be selected. Value is array of strings, serialized as JSON in forms.',
40
+ },
41
+ 'display-select-all': {
42
+ type: 'boolean',
43
+ description: 'Show a "Select All" option in multi-select mode. Only valid when multiselect is true.',
44
+ },
45
+ placeholder: {
46
+ type: 'string',
47
+ description: 'Placeholder text shown when no option is selected.',
48
+ },
49
+ disabled: {
50
+ type: 'boolean',
51
+ description: 'Disable the combobox. Use disabled attribute on option elements to disable specific options.',
52
+ },
53
+ invalid: {
54
+ type: 'boolean',
55
+ description: 'Mark the combobox as invalid for validation. Use with error slot to display error message.',
56
+ },
57
+ 'open-upward': {
58
+ type: 'boolean',
59
+ description: 'Make the dropdown open upward instead of downward. Use when combobox is near bottom of viewport.',
60
+ },
61
+ },
62
+ examples: [
63
+ {
64
+ title: 'React - Single select',
65
+ code: `import { Combobox } from '@triptease/react/combobox';
66
+
67
+ <label htmlFor="country">Country</label>
68
+ <Combobox id="country">
69
+ <option value="us" slot="option">United States</option>
70
+ <option value="uk" slot="option">United Kingdom</option>
71
+ <option value="ca" slot="option">Canada</option>
72
+ </Combobox>`,
73
+ },
74
+ {
75
+ title: 'React - Multi select',
76
+ description: 'Use multiselect and displaySelectAll props for multi-select with "Select All" option. Set value prop with array for default selections.',
77
+ code: `import { Combobox } from '@triptease/react/combobox';
78
+
79
+ <label htmlFor="frameworks">Frameworks</label>
80
+ <Combobox id="frameworks" multiselect displaySelectAll>
81
+ <option value="react" slot="option">React</option>
82
+ <option value="vue" slot="option">Vue.js</option>
83
+ <option value="angular" slot="option">Angular</option>
84
+ </Combobox>`,
85
+ },
86
+ {
87
+ title: 'Web Component - Single select',
88
+ description: 'Basic single-select allows typing to filter options. Set value with .value property. Use disabled attribute on options to prevent selection while keeping them visible. Use placeholder attribute for guidance text.',
89
+ code: `import '@triptease/tt-combobox';
90
+
91
+ <label for="country">Country</label>
92
+ <tt-combobox id="country">
93
+ <option value="us" slot="option">United States</option>
94
+ <option value="uk" slot="option">United Kingdom</option>
95
+ <option value="ca" slot="option">Canada</option>
96
+ </tt-combobox>`,
97
+ },
98
+ {
99
+ title: 'Web Component - With icon slot',
100
+ description: 'Use icon slot to add leading icon for visual context.',
101
+ code: `import '@triptease/tt-combobox';
102
+
103
+ <label for="search-country">Search country</label>
104
+ <tt-combobox id="search-country" placeholder="Type to search">
105
+ <span slot="icon">🔍</span>
106
+ <option value="us" slot="option">United States</option>
107
+ <option value="uk" slot="option">United Kingdom</option>
108
+ <option value="ca" slot="option">Canada</option>
109
+ </tt-combobox>`,
110
+ },
111
+ {
112
+ title: 'Web Component - With error slot',
113
+ description: 'Use invalid attribute with error slot to display validation errors.',
114
+ code: `import '@triptease/tt-combobox';
115
+
116
+ <label for="country">Country</label>
117
+ <tt-combobox id="country" invalid>
118
+ <option value="us" slot="option">United States</option>
119
+ <option value="uk" slot="option">United Kingdom</option>
120
+ <option value="ca" slot="option">Canada</option>
121
+ <span slot="error">Please select a valid country</span>
122
+ </tt-combobox>`,
123
+ },
124
+ {
125
+ title: 'Web Component - In form',
126
+ description: `Use with HTML forms via name attribute. Form value is JSON string (e.g., ["united-states"]). Add required for validation. Listen to change event for real-time updates.`,
127
+ code: `import '@triptease/tt-combobox';
128
+
129
+ <form onsubmit="handleSubmit(event)">
130
+ <label for="country">Country</label>
131
+ <tt-combobox id="country" name="country" required>
132
+ <option value="us" slot="option">United States</option>
133
+ <option value="uk" slot="option">United Kingdom</option>
134
+ <option value="ca" slot="option">Canada</option>
135
+ </tt-combobox>
136
+ <button type="submit">Submit</button>
137
+ </form>`,
138
+ },
139
+ {
140
+ title: 'Web Component - Multi select with select all',
141
+ description: 'Use multiselect and display-select-all attributes for multi-select. Set value with array. Use hidden attribute on options to hide from list.',
142
+ code: `import '@triptease/tt-combobox';
143
+
144
+ <label for="frameworks">Frameworks</label>
145
+ <tt-combobox id="frameworks" multiselect display-select-all>
146
+ <option value="react" slot="option">React</option>
147
+ <option value="vue" slot="option">Vue.js</option>
148
+ <option value="angular" slot="option">Angular</option>
149
+ <option value="svelte" slot="option">Svelte</option>
150
+ </tt-combobox>`,
151
+ },
152
+ {
153
+ title: 'Web Component - CSS customization',
154
+ description: `Use CSS custom properties to customize appearance: --tt-combobox-min-width / --tt-combobox-max-width, --tt-combobox-background-color, --tt-combobox-border-color / --tt-combobox-border-width, --tt-combobox-placeholder-color, --tt-combobox-hover-background-color, --tt-combobox-option-background-color-hover, --tt-combobox-option-color-hover.`,
155
+ code: `import '@triptease/tt-combobox';
156
+
157
+ <label for="country">Country</label>
158
+ <tt-combobox
159
+ id="country"
160
+ placeholder="Select..."
161
+ style="
162
+ --tt-combobox-min-width: 150px;
163
+ --tt-combobox-max-width: 150px;
164
+ --tt-combobox-background-color: var(--color-surface-600);
165
+ --tt-combobox-border-color: var(--color-primary-500);
166
+ --tt-combobox-border-width: 2px;
167
+ ">
168
+ <option value="us" slot="option">United States</option>
169
+ <option value="uk" slot="option">United Kingdom</option>
170
+ <option value="ca" slot="option">Canada</option>
171
+ </tt-combobox>`,
172
+ },
173
+ ],
174
+ },
175
+ };
176
+ //# sourceMappingURL=combobox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox.js","sourceRoot":"","sources":["../../../../../src/manifests/components/entries/combobox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,WAAW,MAAM,mBAAmB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAElE,MAAM,OAAO,GAAG,WAAW,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;AAEnE,eAAe;IACb,QAAQ,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,WAAW,EACT,iHAAiH;QACnH,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,gDAAgD;QACzD,aAAa,EAAE;YACb,SAAS,EAAE;gBACT,2DAA2D;gBAC3D,qDAAqD;gBACrD,qDAAqD;gBACrD,qCAAqC;aACtC;YACD,KAAK,EAAE;gBACL,0EAA0E;gBAC1E,2EAA2E;aAC5E;SACF;QACD,YAAY,EAAE;YACZ,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC/E,GAAG,EAAE;gBACH;oBACE,IAAI,EAAE,wBAAwB;oBAC9B,aAAa,EAAE,KAAK;oBACpB,QAAQ,EAAE,KAAK;oBACf,gBAAgB,EAAE,WAAW,CAAC,aAAa,EAAE,QAAQ,CAAC;oBACtD,qBAAqB,EAAE,WAAW,CAAC,aAAa,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;oBAC7E,gBAAgB,EAAE,WAAW,CAAC,aAAa,EAAE,OAAO,CAAC;oBACrD,QAAQ,EACN,yHAAyH;iBAC5H;aACF;SACF;QACD,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,0HAA0H;aAC7H;YACD,oBAAoB,EAAE;gBACpB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,uFAAuF;aACrG;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oDAAoD;aAClE;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,8FAA8F;aAC5G;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,4FAA4F;aAC1G;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,kGAAkG;aAChH;SACF;QACD,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,uBAAuB;gBAC9B,IAAI,EAAE;;;;;;;YAOF;aACL;YACD;gBACE,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EACT,yIAAyI;gBAC3I,IAAI,EAAE;;;;;;;YAOF;aACL;YACD;gBACE,KAAK,EAAE,+BAA+B;gBACtC,WAAW,EACT,sNAAsN;gBACxN,IAAI,EAAE;;;;;;;eAOC;aACR;YACD;gBACE,KAAK,EAAE,gCAAgC;gBACvC,WAAW,EAAE,uDAAuD;gBACpE,IAAI,EAAE;;;;;;;;eAQC;aACR;YACD;gBACE,KAAK,EAAE,iCAAiC;gBACxC,WAAW,EAAE,qEAAqE;gBAClF,IAAI,EAAE;;;;;;;;eAQC;aACR;YACD;gBACE,KAAK,EAAE,yBAAyB;gBAChC,WAAW,EAAE,yKAAyK;gBACtL,IAAI,EAAE;;;;;;;;;;QAUN;aACD;YACD;gBACE,KAAK,EAAE,8CAA8C;gBACrD,WAAW,EACT,8IAA8I;gBAChJ,IAAI,EAAE;;;;;;;;eAQC;aACR;YACD;gBACE,KAAK,EAAE,mCAAmC;gBAC1C,WAAW,EAAE,sVAAsV;gBACnW,IAAI,EAAE;;;;;;;;;;;;;;;;eAgBC;aACR;SACF;KACF;CAC0B,CAAC","sourcesContent":["import { ComponentManifest } from '@/manifests/components/types.js';\nimport { buildCDNUrl, buildMajorVersion } from '@/utils/buildCDNUrls.js';\nimport packageJson from '@/../package.json' with { type: 'json' };\n\nconst version = packageJson.dependencies['@triptease/tt-combobox'];\n\nexport default {\n combobox: {\n name: 'Combobox',\n description:\n 'Searchable dropdown that combines a text input with a list, available as both React component and Web Component',\n ssrSafe: true,\n element: 'Combobox (React) / tt-combobox (Web Component)',\n usageGuidance: {\n whenToUse: [\n 'Lists with many options where typing to filter is helpful',\n 'Users need to search/filter through options quickly',\n 'Space is limited for displaying all options at once',\n 'Single or multiple selection needed',\n ],\n avoid: [\n 'Small lists where all options should be visible (consider radio buttons)',\n 'Users would benefit from seeing all options simultaneously for comparison',\n ],\n },\n installation: {\n npm: [{ name: '@triptease/tt-combobox', includesTypes: true, optional: false }],\n cdn: [\n {\n name: '@triptease/tt-combobox',\n includesTypes: false,\n optional: false,\n latestVersionUrl: buildCDNUrl('tt-combobox', 'latest'),\n pinnedMajorVersionUrl: buildCDNUrl('tt-combobox', buildMajorVersion(version)),\n pinnedVersionUrl: buildCDNUrl('tt-combobox', version),\n guidance:\n 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',\n },\n ],\n },\n attributes: {\n multiselect: {\n type: 'boolean',\n description:\n 'Enable multi-select mode where multiple options can be selected. Value is array of strings, serialized as JSON in forms.',\n },\n 'display-select-all': {\n type: 'boolean',\n description: 'Show a \"Select All\" option in multi-select mode. Only valid when multiselect is true.',\n },\n placeholder: {\n type: 'string',\n description: 'Placeholder text shown when no option is selected.',\n },\n disabled: {\n type: 'boolean',\n description: 'Disable the combobox. Use disabled attribute on option elements to disable specific options.',\n },\n invalid: {\n type: 'boolean',\n description: 'Mark the combobox as invalid for validation. Use with error slot to display error message.',\n },\n 'open-upward': {\n type: 'boolean',\n description: 'Make the dropdown open upward instead of downward. Use when combobox is near bottom of viewport.',\n },\n },\n examples: [\n {\n title: 'React - Single select',\n code: `import { Combobox } from '@triptease/react/combobox';\n\n<label htmlFor=\"country\">Country</label>\n<Combobox id=\"country\">\n <option value=\"us\" slot=\"option\">United States</option>\n <option value=\"uk\" slot=\"option\">United Kingdom</option>\n <option value=\"ca\" slot=\"option\">Canada</option>\n</Combobox>`,\n },\n {\n title: 'React - Multi select',\n description:\n 'Use multiselect and displaySelectAll props for multi-select with \"Select All\" option. Set value prop with array for default selections.',\n code: `import { Combobox } from '@triptease/react/combobox';\n\n<label htmlFor=\"frameworks\">Frameworks</label>\n<Combobox id=\"frameworks\" multiselect displaySelectAll>\n <option value=\"react\" slot=\"option\">React</option>\n <option value=\"vue\" slot=\"option\">Vue.js</option>\n <option value=\"angular\" slot=\"option\">Angular</option>\n</Combobox>`,\n },\n {\n title: 'Web Component - Single select',\n description:\n 'Basic single-select allows typing to filter options. Set value with .value property. Use disabled attribute on options to prevent selection while keeping them visible. Use placeholder attribute for guidance text.',\n code: `import '@triptease/tt-combobox';\n\n<label for=\"country\">Country</label>\n<tt-combobox id=\"country\">\n <option value=\"us\" slot=\"option\">United States</option>\n <option value=\"uk\" slot=\"option\">United Kingdom</option>\n <option value=\"ca\" slot=\"option\">Canada</option>\n</tt-combobox>`,\n },\n {\n title: 'Web Component - With icon slot',\n description: 'Use icon slot to add leading icon for visual context.',\n code: `import '@triptease/tt-combobox';\n\n<label for=\"search-country\">Search country</label>\n<tt-combobox id=\"search-country\" placeholder=\"Type to search\">\n <span slot=\"icon\">🔍</span>\n <option value=\"us\" slot=\"option\">United States</option>\n <option value=\"uk\" slot=\"option\">United Kingdom</option>\n <option value=\"ca\" slot=\"option\">Canada</option>\n</tt-combobox>`,\n },\n {\n title: 'Web Component - With error slot',\n description: 'Use invalid attribute with error slot to display validation errors.',\n code: `import '@triptease/tt-combobox';\n\n<label for=\"country\">Country</label>\n<tt-combobox id=\"country\" invalid>\n <option value=\"us\" slot=\"option\">United States</option>\n <option value=\"uk\" slot=\"option\">United Kingdom</option>\n <option value=\"ca\" slot=\"option\">Canada</option>\n <span slot=\"error\">Please select a valid country</span>\n</tt-combobox>`,\n },\n {\n title: 'Web Component - In form',\n description: `Use with HTML forms via name attribute. Form value is JSON string (e.g., [\"united-states\"]). Add required for validation. Listen to change event for real-time updates.`,\n code: `import '@triptease/tt-combobox';\n\n<form onsubmit=\"handleSubmit(event)\">\n <label for=\"country\">Country</label>\n <tt-combobox id=\"country\" name=\"country\" required>\n <option value=\"us\" slot=\"option\">United States</option>\n <option value=\"uk\" slot=\"option\">United Kingdom</option>\n <option value=\"ca\" slot=\"option\">Canada</option>\n </tt-combobox>\n <button type=\"submit\">Submit</button>\n</form>`,\n },\n {\n title: 'Web Component - Multi select with select all',\n description:\n 'Use multiselect and display-select-all attributes for multi-select. Set value with array. Use hidden attribute on options to hide from list.',\n code: `import '@triptease/tt-combobox';\n\n<label for=\"frameworks\">Frameworks</label>\n<tt-combobox id=\"frameworks\" multiselect display-select-all>\n <option value=\"react\" slot=\"option\">React</option>\n <option value=\"vue\" slot=\"option\">Vue.js</option>\n <option value=\"angular\" slot=\"option\">Angular</option>\n <option value=\"svelte\" slot=\"option\">Svelte</option>\n</tt-combobox>`,\n },\n {\n title: 'Web Component - CSS customization',\n description: `Use CSS custom properties to customize appearance: --tt-combobox-min-width / --tt-combobox-max-width, --tt-combobox-background-color, --tt-combobox-border-color / --tt-combobox-border-width, --tt-combobox-placeholder-color, --tt-combobox-hover-background-color, --tt-combobox-option-background-color-hover, --tt-combobox-option-color-hover.`,\n code: `import '@triptease/tt-combobox';\n\n<label for=\"country\">Country</label>\n<tt-combobox\n id=\"country\"\n placeholder=\"Select...\"\n style=\"\n --tt-combobox-min-width: 150px;\n --tt-combobox-max-width: 150px;\n --tt-combobox-background-color: var(--color-surface-600);\n --tt-combobox-border-color: var(--color-primary-500);\n --tt-combobox-border-width: 2px;\n \">\n <option value=\"us\" slot=\"option\">United States</option>\n <option value=\"uk\" slot=\"option\">United Kingdom</option>\n <option value=\"ca\" slot=\"option\">Canada</option>\n</tt-combobox>`,\n },\n ],\n },\n} satisfies ComponentManifest;\n"]}
@@ -0,0 +1,34 @@
1
+ declare const _default: {
2
+ 'date-picker': {
3
+ name: string;
4
+ description: string;
5
+ ssrSafe: true;
6
+ element: string;
7
+ usageGuidance: {
8
+ whenToUse: string[];
9
+ avoid: string[];
10
+ };
11
+ installation: {
12
+ npm: {
13
+ name: string;
14
+ includesTypes: true;
15
+ optional: false;
16
+ }[];
17
+ cdn: {
18
+ name: string;
19
+ includesTypes: false;
20
+ optional: false;
21
+ latestVersionUrl: string;
22
+ pinnedMajorVersionUrl: string;
23
+ pinnedVersionUrl: string;
24
+ guidance: string;
25
+ }[];
26
+ };
27
+ examples: {
28
+ title: string;
29
+ description: string;
30
+ code: string;
31
+ }[];
32
+ };
33
+ };
34
+ export default _default;
@@ -0,0 +1,67 @@
1
+ import { buildCDNUrl, buildMajorVersion } from '../../../utils/buildCDNUrls.js';
2
+ import packageJson from '../../../../package.json' with { type: 'json' };
3
+ const version = packageJson.dependencies['@triptease/tt-date-picker'];
4
+ export default {
5
+ 'date-picker': {
6
+ name: 'Date Picker',
7
+ description: 'Date picker for selecting a single date, available as both React component and Web Component',
8
+ ssrSafe: true,
9
+ element: 'DatePicker (React) / tt-date-picker (Web Component)',
10
+ usageGuidance: {
11
+ whenToUse: [
12
+ 'Users need to select a specific single date',
13
+ 'Date format needs to be consistent',
14
+ 'Calendar visualization helps users pick dates',
15
+ 'Date constraints are needed (min/max dates)',
16
+ ],
17
+ avoid: ['Date ranges are needed (use date range picker)'],
18
+ },
19
+ installation: {
20
+ npm: [{ name: '@triptease/tt-date-picker', includesTypes: true, optional: false }],
21
+ cdn: [
22
+ {
23
+ name: '@triptease/tt-date-picker',
24
+ includesTypes: false,
25
+ optional: false,
26
+ latestVersionUrl: buildCDNUrl('tt-date-picker', 'latest'),
27
+ pinnedMajorVersionUrl: buildCDNUrl('tt-date-picker', buildMajorVersion(version)),
28
+ pinnedVersionUrl: buildCDNUrl('tt-date-picker', version),
29
+ guidance: 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
30
+ },
31
+ ],
32
+ },
33
+ examples: [
34
+ {
35
+ title: 'React - Basic',
36
+ description: 'Uncontrolled date picker. Value is in ISO format (YYYY-MM-DD). Use minDate and maxDate props to restrict selectable dates. Use disabled prop to disable. Use openLeft prop for pickers near right edge.',
37
+ code: `import { DatePicker } from '@triptease/react/date-picker';
38
+
39
+ <label htmlFor="date">Select a date</label>
40
+ <DatePicker id="date" />`,
41
+ },
42
+ {
43
+ title: 'React - Controlled',
44
+ description: 'Use controlled component with React state for dynamic behavior. Value prop and onChange handler manage the selection.',
45
+ code: `import { DatePicker } from '@triptease/react/date-picker';
46
+
47
+ const [selectedDate, setSelectedDate] = useState('');
48
+
49
+ <label htmlFor="date">Event date</label>
50
+ <DatePicker
51
+ id="date"
52
+ value={selectedDate}
53
+ onChange={(e) => setSelectedDate(e.target.value)}
54
+ />`,
55
+ },
56
+ {
57
+ title: 'Web Component - Basic',
58
+ description: 'Web component date picker. Value is in ISO format (YYYY-MM-DD). Use mindate and maxdate attributes to restrict dates. Use disabled attribute to disable. Use open-left attribute for pickers near right edge.',
59
+ code: `import '@triptease/tt-date-picker';
60
+
61
+ <label for="date">Select a date</label>
62
+ <tt-date-picker id="date"></tt-date-picker>`,
63
+ },
64
+ ],
65
+ },
66
+ };
67
+ //# sourceMappingURL=datePicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datePicker.js","sourceRoot":"","sources":["../../../../../src/manifests/components/entries/datePicker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,WAAW,MAAM,mBAAmB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAElE,MAAM,OAAO,GAAG,WAAW,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC;AAEtE,eAAe;IACb,aAAa,EAAE;QACb,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,8FAA8F;QAC3G,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,qDAAqD;QAC9D,aAAa,EAAE;YACb,SAAS,EAAE;gBACT,6CAA6C;gBAC7C,oCAAoC;gBACpC,+CAA+C;gBAC/C,6CAA6C;aAC9C;YACD,KAAK,EAAE,CAAC,gDAAgD,CAAC;SAC1D;QACD,YAAY,EAAE;YACZ,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAClF,GAAG,EAAE;gBACH;oBACE,IAAI,EAAE,2BAA2B;oBACjC,aAAa,EAAE,KAAK;oBACpB,QAAQ,EAAE,KAAK;oBACf,gBAAgB,EAAE,WAAW,CAAC,gBAAgB,EAAE,QAAQ,CAAC;oBACzD,qBAAqB,EAAE,WAAW,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;oBAChF,gBAAgB,EAAE,WAAW,CAAC,gBAAgB,EAAE,OAAO,CAAC;oBACxD,QAAQ,EACN,yHAAyH;iBAC5H;aACF;SACF;QACD,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,eAAe;gBACtB,WAAW,EACT,yMAAyM;gBAC3M,IAAI,EAAE;;;yBAGW;aAClB;YACD;gBACE,KAAK,EAAE,oBAAoB;gBAC3B,WAAW,EACT,uHAAuH;gBACzH,IAAI,EAAE;;;;;;;;;GASX;aACI;YACD;gBACE,KAAK,EAAE,uBAAuB;gBAC9B,WAAW,EACT,+MAA+M;gBACjN,IAAI,EAAE;;;4CAG8B;aACrC;SACF;KACF;CAC0B,CAAC","sourcesContent":["import { ComponentManifest } from '@/manifests/components/types.js';\nimport { buildCDNUrl, buildMajorVersion } from '@/utils/buildCDNUrls.js';\nimport packageJson from '@/../package.json' with { type: 'json' };\n\nconst version = packageJson.dependencies['@triptease/tt-date-picker'];\n\nexport default {\n 'date-picker': {\n name: 'Date Picker',\n description: 'Date picker for selecting a single date, available as both React component and Web Component',\n ssrSafe: true,\n element: 'DatePicker (React) / tt-date-picker (Web Component)',\n usageGuidance: {\n whenToUse: [\n 'Users need to select a specific single date',\n 'Date format needs to be consistent',\n 'Calendar visualization helps users pick dates',\n 'Date constraints are needed (min/max dates)',\n ],\n avoid: ['Date ranges are needed (use date range picker)'],\n },\n installation: {\n npm: [{ name: '@triptease/tt-date-picker', includesTypes: true, optional: false }],\n cdn: [\n {\n name: '@triptease/tt-date-picker',\n includesTypes: false,\n optional: false,\n latestVersionUrl: buildCDNUrl('tt-date-picker', 'latest'),\n pinnedMajorVersionUrl: buildCDNUrl('tt-date-picker', buildMajorVersion(version)),\n pinnedVersionUrl: buildCDNUrl('tt-date-picker', version),\n guidance:\n 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',\n },\n ],\n },\n examples: [\n {\n title: 'React - Basic',\n description:\n 'Uncontrolled date picker. Value is in ISO format (YYYY-MM-DD). Use minDate and maxDate props to restrict selectable dates. Use disabled prop to disable. Use openLeft prop for pickers near right edge.',\n code: `import { DatePicker } from '@triptease/react/date-picker';\n\n<label htmlFor=\"date\">Select a date</label>\n<DatePicker id=\"date\" />`,\n },\n {\n title: 'React - Controlled',\n description:\n 'Use controlled component with React state for dynamic behavior. Value prop and onChange handler manage the selection.',\n code: `import { DatePicker } from '@triptease/react/date-picker';\n\nconst [selectedDate, setSelectedDate] = useState('');\n\n<label htmlFor=\"date\">Event date</label>\n<DatePicker\n id=\"date\"\n value={selectedDate}\n onChange={(e) => setSelectedDate(e.target.value)}\n/>`,\n },\n {\n title: 'Web Component - Basic',\n description:\n 'Web component date picker. Value is in ISO format (YYYY-MM-DD). Use mindate and maxdate attributes to restrict dates. Use disabled attribute to disable. Use open-left attribute for pickers near right edge.',\n code: `import '@triptease/tt-date-picker';\n\n<label for=\"date\">Select a date</label>\n<tt-date-picker id=\"date\"></tt-date-picker>`,\n },\n ],\n },\n} satisfies ComponentManifest;\n"]}
@@ -0,0 +1,34 @@
1
+ declare const _default: {
2
+ 'date-range-picker': {
3
+ name: string;
4
+ description: string;
5
+ ssrSafe: true;
6
+ element: string;
7
+ usageGuidance: {
8
+ whenToUse: string[];
9
+ avoid: string[];
10
+ };
11
+ installation: {
12
+ npm: {
13
+ name: string;
14
+ includesTypes: true;
15
+ optional: false;
16
+ }[];
17
+ cdn: {
18
+ name: string;
19
+ includesTypes: false;
20
+ optional: false;
21
+ latestVersionUrl: string;
22
+ pinnedMajorVersionUrl: string;
23
+ pinnedVersionUrl: string;
24
+ guidance: string;
25
+ }[];
26
+ };
27
+ examples: {
28
+ title: string;
29
+ description: string;
30
+ code: string;
31
+ }[];
32
+ };
33
+ };
34
+ export default _default;
@@ -0,0 +1,110 @@
1
+ import { buildCDNUrl, buildMajorVersion } from '../../../utils/buildCDNUrls.js';
2
+ import packageJson from '../../../../package.json' with { type: 'json' };
3
+ const version = packageJson.dependencies['@triptease/tt-date-range-picker'];
4
+ export default {
5
+ 'date-range-picker': {
6
+ name: 'Date Range Picker',
7
+ description: 'Date range picker for selecting start and end dates, available as both React component and Web Component',
8
+ ssrSafe: true,
9
+ element: 'DateRangePicker (React) / tt-date-range-picker (Web Component)',
10
+ usageGuidance: {
11
+ whenToUse: [
12
+ 'Users need to select a date range (bookings, reports, filters)',
13
+ 'Start and end dates need to be validated together',
14
+ 'Range constraints are important (min/max days in range)',
15
+ 'Visual calendar helps users understand date spans',
16
+ ],
17
+ avoid: [
18
+ 'Only a single date is needed (use date picker)',
19
+ 'Dates are independent of each other (use two separate date pickers)',
20
+ ],
21
+ },
22
+ installation: {
23
+ npm: [{ name: '@triptease/react/date-range-picker', includesTypes: true, optional: false }],
24
+ cdn: [
25
+ {
26
+ name: '@triptease/tt-date-range-picker',
27
+ includesTypes: false,
28
+ optional: false,
29
+ latestVersionUrl: buildCDNUrl('tt-date-range-picker', 'latest'),
30
+ pinnedMajorVersionUrl: buildCDNUrl('tt-date-range-picker', buildMajorVersion(version)),
31
+ pinnedVersionUrl: buildCDNUrl('tt-date-range-picker', version),
32
+ guidance: 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
33
+ },
34
+ ],
35
+ },
36
+ examples: [
37
+ {
38
+ title: 'React - Basic',
39
+ description: '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.',
40
+ code: `import { DateRangePicker } from '@triptease/react/date-range-picker';
41
+
42
+ <label htmlFor="daterange">Select date range</label>
43
+ <DateRangePicker id="daterange" />`,
44
+ },
45
+ {
46
+ title: 'React - Controlled',
47
+ description: 'Use controlled component with React state for dynamic behavior. Access picker.start and picker.end from onChange event.',
48
+ code: `import { DateRangePicker } from '@triptease/react/date-range-picker';
49
+
50
+ const [startDate, setStartDate] = useState('');
51
+ const [endDate, setEndDate] = useState('');
52
+
53
+ const handleChange = (e) => {
54
+ const picker = e.target;
55
+ setStartDate(picker.start || '');
56
+ setEndDate(picker.end || '');
57
+ };
58
+
59
+ <label htmlFor="daterange">Booking dates</label>
60
+ <DateRangePicker id="daterange" start={startDate} end={endDate} onChange={handleChange} />`,
61
+ },
62
+ {
63
+ title: 'React - With presets',
64
+ description: 'Use PresetButton component for quick date range selection. Pass Preset enum values for common ranges. PresetButton must be child of DateRangePicker with slot="preset".',
65
+ code: `import { DateRangePicker, PresetButton, Preset } from '@triptease/react/date-range-picker';
66
+
67
+ <label htmlFor="daterange">Travel dates</label>
68
+ <DateRangePicker id="daterange">
69
+ <PresetButton slot="preset" preset={Preset.ThisWeek}>This Week</PresetButton>
70
+ <PresetButton slot="preset" preset={Preset.ThisMonth}>This Month</PresetButton>
71
+ <PresetButton slot="preset" preset={Preset.Next1Month}>Next Month</PresetButton>
72
+ </DateRangePicker>`,
73
+ },
74
+ {
75
+ title: 'Web Component - Basic',
76
+ description: '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.',
77
+ code: `import '@triptease/tt-date-range-picker';
78
+
79
+ <label for="daterange">Select date range</label>
80
+ <tt-date-range-picker id="daterange"></tt-date-range-picker>`,
81
+ },
82
+ {
83
+ title: 'Web Component - In form',
84
+ 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.`,
85
+ code: `import '@triptease/tt-date-range-picker';
86
+
87
+ <form onsubmit="handleSubmit(event)">
88
+ <label for="booking-dates">Booking dates</label>
89
+ <tt-date-range-picker id="booking-dates" name="booking-dates"></tt-date-range-picker>
90
+ <button type="submit">Submit</button>
91
+ </form>`,
92
+ },
93
+ {
94
+ title: 'Web Component - With presets',
95
+ 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.`,
96
+ code: `import '@triptease/tt-date-range-picker';
97
+ import '@triptease/tt-preset-button';
98
+
99
+ <label for="daterange">Travel dates</label>
100
+ <tt-date-range-picker id="daterange">
101
+ <tt-preset-button slot="preset" preset="this-week">This Week</tt-preset-button>
102
+ <tt-preset-button slot="preset" preset="next-week">Next Week</tt-preset-button>
103
+ <tt-preset-button slot="preset" preset="this-month">This Month</tt-preset-button>
104
+ <tt-preset-button slot="preset" preset="next-month">Next Month</tt-preset-button>
105
+ </tt-date-range-picker>`,
106
+ },
107
+ ],
108
+ },
109
+ };
110
+ //# sourceMappingURL=dateRangePicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateRangePicker.js","sourceRoot":"","sources":["../../../../../src/manifests/components/entries/dateRangePicker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,WAAW,MAAM,mBAAmB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAElE,MAAM,OAAO,GAAG,WAAW,CAAC,YAAY,CAAC,iCAAiC,CAAC,CAAC;AAE5E,eAAe;IACb,mBAAmB,EAAE;QACnB,IAAI,EAAE,mBAAmB;QACzB,WAAW,EACT,0GAA0G;QAC5G,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,gEAAgE;QACzE,aAAa,EAAE;YACb,SAAS,EAAE;gBACT,gEAAgE;gBAChE,mDAAmD;gBACnD,yDAAyD;gBACzD,mDAAmD;aACpD;YACD,KAAK,EAAE;gBACL,gDAAgD;gBAChD,qEAAqE;aACtE;SACF;QACD,YAAY,EAAE;YACZ,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,oCAAoC,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC3F,GAAG,EAAE;gBACH;oBACE,IAAI,EAAE,iCAAiC;oBACvC,aAAa,EAAE,KAAK;oBACpB,QAAQ,EAAE,KAAK;oBACf,gBAAgB,EAAE,WAAW,CAAC,sBAAsB,EAAE,QAAQ,CAAC;oBAC/D,qBAAqB,EAAE,WAAW,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;oBACtF,gBAAgB,EAAE,WAAW,CAAC,sBAAsB,EAAE,OAAO,CAAC;oBAC9D,QAAQ,EACN,yHAAyH;iBAC5H;aACF;SACF;QACD,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,eAAe;gBACtB,WAAW,EACT,iPAAiP;gBACnP,IAAI,EAAE;;;mCAGqB;aAC5B;YACD;gBACE,KAAK,EAAE,oBAAoB;gBAC3B,WAAW,EACT,yHAAyH;gBAC3H,IAAI,EAAE;;;;;;;;;;;;2FAY6E;aACpF;YACD;gBACE,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EACT,yKAAyK;gBAC3K,IAAI,EAAE;;;;;;;mBAOK;aACZ;YACD;gBACE,KAAK,EAAE,uBAAuB;gBAC9B,WAAW,EACT,uQAAuQ;gBACzQ,IAAI,EAAE;;;6DAG+C;aACtD;YACD;gBACE,KAAK,EAAE,yBAAyB;gBAChC,WAAW,EAAE,sJAAsJ;gBACnK,IAAI,EAAE;;;;;;QAMN;aACD;YACD;gBACE,KAAK,EAAE,8BAA8B;gBACrC,WAAW,EAAE,2MAA2M;gBACxN,IAAI,EAAE;;;;;;;;;wBASU;aACjB;SACF;KACF;CAC0B,CAAC","sourcesContent":["import { ComponentManifest } from '@/manifests/components/types.js';\nimport { buildCDNUrl, buildMajorVersion } from '@/utils/buildCDNUrls.js';\nimport packageJson from '@/../package.json' with { type: 'json' };\n\nconst version = packageJson.dependencies['@triptease/tt-date-range-picker'];\n\nexport default {\n 'date-range-picker': {\n name: 'Date Range Picker',\n description:\n 'Date range picker for selecting start and end dates, available as both React component and Web Component',\n ssrSafe: true,\n element: 'DateRangePicker (React) / tt-date-range-picker (Web Component)',\n usageGuidance: {\n whenToUse: [\n 'Users need to select a date range (bookings, reports, filters)',\n 'Start and end dates need to be validated together',\n 'Range constraints are important (min/max days in range)',\n 'Visual calendar helps users understand date spans',\n ],\n avoid: [\n 'Only a single date is needed (use date picker)',\n 'Dates are independent of each other (use two separate date pickers)',\n ],\n },\n installation: {\n npm: [{ name: '@triptease/react/date-range-picker', includesTypes: true, optional: false }],\n cdn: [\n {\n name: '@triptease/tt-date-range-picker',\n includesTypes: false,\n optional: false,\n latestVersionUrl: buildCDNUrl('tt-date-range-picker', 'latest'),\n pinnedMajorVersionUrl: buildCDNUrl('tt-date-range-picker', buildMajorVersion(version)),\n pinnedVersionUrl: buildCDNUrl('tt-date-range-picker', version),\n guidance:\n 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',\n },\n ],\n },\n examples: [\n {\n title: 'React - Basic',\n description:\n '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.',\n code: `import { DateRangePicker } from '@triptease/react/date-range-picker';\n\n<label htmlFor=\"daterange\">Select date range</label>\n<DateRangePicker id=\"daterange\" />`,\n },\n {\n title: 'React - Controlled',\n description:\n 'Use controlled component with React state for dynamic behavior. Access picker.start and picker.end from onChange event.',\n code: `import { DateRangePicker } from '@triptease/react/date-range-picker';\n\nconst [startDate, setStartDate] = useState('');\nconst [endDate, setEndDate] = useState('');\n\nconst handleChange = (e) => {\n const picker = e.target;\n setStartDate(picker.start || '');\n setEndDate(picker.end || '');\n};\n\n<label htmlFor=\"daterange\">Booking dates</label>\n<DateRangePicker id=\"daterange\" start={startDate} end={endDate} onChange={handleChange} />`,\n },\n {\n title: 'React - With presets',\n description:\n 'Use PresetButton component for quick date range selection. Pass Preset enum values for common ranges. PresetButton must be child of DateRangePicker with slot=\"preset\".',\n code: `import { DateRangePicker, PresetButton, Preset } from '@triptease/react/date-range-picker';\n\n<label htmlFor=\"daterange\">Travel dates</label>\n<DateRangePicker id=\"daterange\">\n <PresetButton slot=\"preset\" preset={Preset.ThisWeek}>This Week</PresetButton>\n <PresetButton slot=\"preset\" preset={Preset.ThisMonth}>This Month</PresetButton>\n <PresetButton slot=\"preset\" preset={Preset.Next1Month}>Next Month</PresetButton>\n</DateRangePicker>`,\n },\n {\n title: 'Web Component - Basic',\n description:\n '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.',\n code: `import '@triptease/tt-date-range-picker';\n\n<label for=\"daterange\">Select date range</label>\n<tt-date-range-picker id=\"daterange\"></tt-date-range-picker>`,\n },\n {\n title: 'Web Component - In form',\n 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.`,\n code: `import '@triptease/tt-date-range-picker';\n\n<form onsubmit=\"handleSubmit(event)\">\n <label for=\"booking-dates\">Booking dates</label>\n <tt-date-range-picker id=\"booking-dates\" name=\"booking-dates\"></tt-date-range-picker>\n <button type=\"submit\">Submit</button>\n</form>`,\n },\n {\n title: 'Web Component - With presets',\n 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.`,\n code: `import '@triptease/tt-date-range-picker';\nimport '@triptease/tt-preset-button';\n\n<label for=\"daterange\">Travel dates</label>\n<tt-date-range-picker id=\"daterange\">\n <tt-preset-button slot=\"preset\" preset=\"this-week\">This Week</tt-preset-button>\n <tt-preset-button slot=\"preset\" preset=\"next-week\">Next Week</tt-preset-button>\n <tt-preset-button slot=\"preset\" preset=\"this-month\">This Month</tt-preset-button>\n <tt-preset-button slot=\"preset\" preset=\"next-month\">Next Month</tt-preset-button>\n</tt-date-range-picker>`,\n },\n ],\n },\n} satisfies ComponentManifest;\n"]}
@@ -0,0 +1,38 @@
1
+ declare const _default: {
2
+ dialog: {
3
+ name: string;
4
+ description: string;
5
+ ssrSafe: true;
6
+ element: string;
7
+ usageGuidance: {
8
+ whenToUse: string[];
9
+ avoid: string[];
10
+ };
11
+ installation: {
12
+ npm: {
13
+ name: string;
14
+ includesTypes: true;
15
+ optional: false;
16
+ }[];
17
+ cdn: {
18
+ name: string;
19
+ includesTypes: false;
20
+ optional: false;
21
+ pinnedVersionUrl: string;
22
+ pinnedMajorVersionUrl: string;
23
+ latestVersionUrl: string;
24
+ guidance: string;
25
+ }[];
26
+ };
27
+ examples: ({
28
+ title: string;
29
+ code: string;
30
+ description?: undefined;
31
+ } | {
32
+ title: string;
33
+ description: string;
34
+ code: string;
35
+ })[];
36
+ };
37
+ };
38
+ export default _default;
@@ -0,0 +1,73 @@
1
+ import packageJson from '../../../../package.json' with { type: 'json' };
2
+ import { buildCDNUrl, buildMajorVersion } from '../../../utils/buildCDNUrls.js';
3
+ const version = packageJson.dependencies['@triptease/tt-dialog'];
4
+ export default {
5
+ dialog: {
6
+ name: 'Dialog - Web Component',
7
+ description: 'Dialog component that displays content in a layer above the page',
8
+ ssrSafe: true,
9
+ element: 'tt-dialog',
10
+ usageGuidance: {
11
+ whenToUse: [
12
+ 'User interaction is required to proceed',
13
+ "The task is short, self-contained or doesn't fit naturally into a page",
14
+ 'The underlying page content should remain visible',
15
+ "Intentionally disrupting the user's flow is beneficial (e.g. confirmations, critical notifications)",
16
+ ],
17
+ avoid: [
18
+ 'The content is long, complex, or scrollable (e.g. multi-step forms, detailed instructions)',
19
+ 'The content should be shareable or linkable (prefer a dedicated page)',
20
+ 'The information is not time-sensitive or critical (prefer toasts or inline disclosures)',
21
+ 'The user did not initiate the interaction (unsolicited pop-ups can be frustrating)',
22
+ ],
23
+ },
24
+ installation: {
25
+ npm: [{ name: '@triptease/tt-dialog', includesTypes: true, optional: false }],
26
+ cdn: [
27
+ {
28
+ name: 'tt-dialog',
29
+ includesTypes: false,
30
+ optional: false,
31
+ pinnedVersionUrl: buildCDNUrl('tt-dialog', version),
32
+ pinnedMajorVersionUrl: buildCDNUrl('tt-dialog', buildMajorVersion(version)),
33
+ latestVersionUrl: buildCDNUrl('tt-dialog', 'latest'),
34
+ guidance: 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',
35
+ },
36
+ ],
37
+ },
38
+ examples: [
39
+ {
40
+ title: 'Basic usage',
41
+ code: `<button data-theme="primary" onclick="document.querySelector('#my-dialog').show()">
42
+ Open Dialog
43
+ </button>
44
+ <tt-dialog id="my-dialog" aria-label="Example dialog">
45
+ <div class="container">
46
+ <h2>Dialog Title</h2>
47
+ <p>This is a basic dialog with some content.</p>
48
+ <button data-theme="primary" onclick="document.querySelector('#my-dialog').hide()">
49
+ Close
50
+ </button>
51
+ </div>
52
+ </tt-dialog>`,
53
+ },
54
+ {
55
+ title: 'With CSS custom properties',
56
+ description: 'Use CSS custom properties to customize dialog positioning:\n\n- `--dialog-left-distance`: Control the horizontal position of the dialog.',
57
+ code: `<button data-theme="primary" onclick="document.querySelector('#positioned-dialog').show()">
58
+ Open Dialog
59
+ </button>
60
+ <tt-dialog id="positioned-dialog" aria-label="Positioned dialog" style="--dialog-left-distance: 100px;">
61
+ <div class="container">
62
+ <h2>Custom Positioned Dialog</h2>
63
+ <p>This dialog has custom positioning using CSS custom properties.</p>
64
+ <button data-theme="primary" onclick="document.querySelector('#positioned-dialog').hide()">
65
+ Close
66
+ </button>
67
+ </div>
68
+ </tt-dialog>`,
69
+ },
70
+ ],
71
+ },
72
+ };
73
+ //# sourceMappingURL=dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../../../src/manifests/components/entries/dialog.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,mBAAmB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,OAAO,GAAG,WAAW,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;AAEjE,eAAe;IACb,MAAM,EAAE;QACN,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,kEAAkE;QAC/E,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,WAAW;QACpB,aAAa,EAAE;YACb,SAAS,EAAE;gBACT,yCAAyC;gBACzC,wEAAwE;gBACxE,mDAAmD;gBACnD,qGAAqG;aACtG;YACD,KAAK,EAAE;gBACL,4FAA4F;gBAC5F,uEAAuE;gBACvE,yFAAyF;gBACzF,oFAAoF;aACrF;SACF;QACD,YAAY,EAAE;YACZ,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC7E,GAAG,EAAE;gBACH;oBACE,IAAI,EAAE,WAAW;oBACjB,aAAa,EAAE,KAAK;oBACpB,QAAQ,EAAE,KAAK;oBACf,gBAAgB,EAAE,WAAW,CAAC,WAAW,EAAE,OAAO,CAAC;oBACnD,qBAAqB,EAAE,WAAW,CAAC,WAAW,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;oBAC3E,gBAAgB,EAAE,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC;oBACpD,QAAQ,EACN,yHAAyH;iBAC5H;aACF;SACF;QACD,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,aAAa;gBACpB,IAAI,EAAE;;;;;;;;;;;aAWD;aACN;YACD;gBACE,KAAK,EAAE,4BAA4B;gBACnC,WAAW,EACT,0IAA0I;gBAC5I,IAAI,EAAE;;;;;;;;;;;aAWD;aACN;SACF;KACF;CAC0B,CAAC","sourcesContent":["import { ComponentManifest } from '@/manifests/components/types.js';\nimport packageJson from '@/../package.json' with { type: 'json' };\nimport { buildCDNUrl, buildMajorVersion } from '@/utils/buildCDNUrls.js';\n\nconst version = packageJson.dependencies['@triptease/tt-dialog'];\n\nexport default {\n dialog: {\n name: 'Dialog - Web Component',\n description: 'Dialog component that displays content in a layer above the page',\n ssrSafe: true,\n element: 'tt-dialog',\n usageGuidance: {\n whenToUse: [\n 'User interaction is required to proceed',\n \"The task is short, self-contained or doesn't fit naturally into a page\",\n 'The underlying page content should remain visible',\n \"Intentionally disrupting the user's flow is beneficial (e.g. confirmations, critical notifications)\",\n ],\n avoid: [\n 'The content is long, complex, or scrollable (e.g. multi-step forms, detailed instructions)',\n 'The content should be shareable or linkable (prefer a dedicated page)',\n 'The information is not time-sensitive or critical (prefer toasts or inline disclosures)',\n 'The user did not initiate the interaction (unsolicited pop-ups can be frustrating)',\n ],\n },\n installation: {\n npm: [{ name: '@triptease/tt-dialog', includesTypes: true, optional: false }],\n cdn: [\n {\n name: 'tt-dialog',\n includesTypes: false,\n optional: false,\n pinnedVersionUrl: buildCDNUrl('tt-dialog', version),\n pinnedMajorVersionUrl: buildCDNUrl('tt-dialog', buildMajorVersion(version)),\n latestVersionUrl: buildCDNUrl('tt-dialog', 'latest'),\n guidance:\n 'Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code.',\n },\n ],\n },\n examples: [\n {\n title: 'Basic usage',\n code: `<button data-theme=\"primary\" onclick=\"document.querySelector('#my-dialog').show()\">\n Open Dialog\n</button>\n<tt-dialog id=\"my-dialog\" aria-label=\"Example dialog\">\n <div class=\"container\">\n <h2>Dialog Title</h2>\n <p>This is a basic dialog with some content.</p>\n <button data-theme=\"primary\" onclick=\"document.querySelector('#my-dialog').hide()\">\n Close\n </button>\n </div>\n</tt-dialog>`,\n },\n {\n title: 'With CSS custom properties',\n description:\n 'Use CSS custom properties to customize dialog positioning:\\n\\n- `--dialog-left-distance`: Control the horizontal position of the dialog.',\n code: `<button data-theme=\"primary\" onclick=\"document.querySelector('#positioned-dialog').show()\">\n Open Dialog\n</button>\n<tt-dialog id=\"positioned-dialog\" aria-label=\"Positioned dialog\" style=\"--dialog-left-distance: 100px;\">\n <div class=\"container\">\n <h2>Custom Positioned Dialog</h2>\n <p>This dialog has custom positioning using CSS custom properties.</p>\n <button data-theme=\"primary\" onclick=\"document.querySelector('#positioned-dialog').hide()\">\n Close\n </button>\n </div>\n</tt-dialog>`,\n },\n ],\n },\n} satisfies ComponentManifest;\n"]}