@mintlify/components 0.3.14 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +22 -123
  2. package/dist/components/badge/badge.css +1 -0
  3. package/dist/components/badge/badge.js +52 -0
  4. package/dist/components/icon/icon.css +1 -0
  5. package/dist/components/icon/icon.js +47 -0
  6. package/dist/index.d.ts +401 -17
  7. package/dist/index.js +12 -2
  8. package/dist/styles/design-tokens.js +339 -0
  9. package/dist/styles/theme.css +1 -0
  10. package/dist/utils/cn.js +7 -0
  11. package/package.json +62 -89
  12. package/.eslintrc.json +0 -11
  13. package/.github/dependabot.yml +0 -10
  14. package/.github/workflows/chromatic.yaml +0 -27
  15. package/.github/workflows/code-style-checks.yaml +0 -13
  16. package/.github/workflows/sanity.yml +0 -13
  17. package/.husky/pre-commit +0 -4
  18. package/.prettierignore +0 -49
  19. package/.prettierrc +0 -1
  20. package/CODEOWNERS +0 -1
  21. package/LICENSE +0 -21
  22. package/dist/Accordion/Accordion.d.ts +0 -18
  23. package/dist/Accordion/AccordionCover.d.ts +0 -10
  24. package/dist/Accordion/AccordionGroup.d.ts +0 -5
  25. package/dist/Accordion/getAccordionStyleFromType.d.ts +0 -5
  26. package/dist/Accordion/index.d.ts +0 -3
  27. package/dist/Api/ApiPlayground.d.ts +0 -22
  28. package/dist/Api/BaseUrlDropdown.d.ts +0 -9
  29. package/dist/Api/RequestMethodBubble.d.ts +0 -4
  30. package/dist/Api/RequestPathHeader.d.ts +0 -13
  31. package/dist/Api/index.d.ts +0 -4
  32. package/dist/Api/inputs/AddArrayItemButton.d.ts +0 -4
  33. package/dist/Api/inputs/ApiInput.d.ts +0 -15
  34. package/dist/Api/inputs/InputDropdown.d.ts +0 -5
  35. package/dist/Api/types.d.ts +0 -16
  36. package/dist/AppearFromTop.d.ts +0 -6
  37. package/dist/Button.d.ts +0 -42
  38. package/dist/Callouts.d.ts +0 -10
  39. package/dist/Card.d.ts +0 -33
  40. package/dist/CardGroup.d.ts +0 -5
  41. package/dist/Code/CodeBlock.d.ts +0 -19
  42. package/dist/Code/CodeGroup.d.ts +0 -29
  43. package/dist/Code/CopyToClipboardButton.d.ts +0 -7
  44. package/dist/Code/index.d.ts +0 -4
  45. package/dist/Expandable/Expandable.d.ts +0 -9
  46. package/dist/Expandable/ExpandableCover.d.ts +0 -11
  47. package/dist/Expandable/index.d.ts +0 -2
  48. package/dist/Frame.d.ts +0 -14
  49. package/dist/Param.d.ts +0 -14
  50. package/dist/PillSelect.d.ts +0 -11
  51. package/dist/Tabs/Tab.d.ts +0 -6
  52. package/dist/Tabs/Tabs.d.ts +0 -4
  53. package/dist/Tabs/index.d.ts +0 -3
  54. package/dist/Tooltip.d.ts +0 -5
  55. package/dist/index.js.LICENSE.txt +0 -9
  56. package/dist/main.css +0 -1
  57. package/dist/utils/apiPlaygroundColors.d.ts +0 -4
  58. package/dist/utils/copyToClipboard.d.ts +0 -2
  59. package/dist/utils/delay.d.ts +0 -1
  60. package/dist/utils/getNodeText.d.ts +0 -1
package/dist/index.d.ts CHANGED
@@ -1,17 +1,401 @@
1
- import { Accordion, AccordionGroup } from './Accordion';
2
- import { ApiPlayground, RequestMethodBubble, RequestPathHeader } from './Api';
3
- import { AppearFromTop } from './AppearFromTop';
4
- import { Button, ButtonProps, ButtonPropsBase } from './Button';
5
- import { Info, Warning, Note, Tip, Check } from './Callouts';
6
- import { Card, CardProps, CardPropsBase } from './Card';
7
- import { CardGroup } from './CardGroup';
8
- import { CodeBlock, CodeBlockProps, CodeBlockPropsBase, CodeGroup, CodeGroupProps, CodeGroupPropsBase } from './Code';
9
- import { Expandable } from './Expandable';
10
- import { Frame } from './Frame';
11
- import { Param } from './Param';
12
- import { PillSelect } from './PillSelect';
13
- import { Tab, Tabs } from './Tabs';
14
- import { Tooltip } from './Tooltip';
15
- import './css/globals.css';
16
- export type { CardProps, ButtonProps, ButtonPropsBase, CardPropsBase, CodeGroupPropsBase, CodeBlockPropsBase, CodeGroupProps, CodeBlockProps, };
17
- export { Accordion, AccordionGroup, AppearFromTop, ApiPlayground, Button, Card, CardGroup, CodeBlock, CodeGroup, Check, Expandable, Frame, Info, Warning, Note, Param, PillSelect, RequestMethodBubble, RequestPathHeader, Tabs, Tip, Tab, Tooltip, };
1
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ export declare function Badge({ children, color, shape, size, stroke, disabled, icon, iconType, className, }: BadgeProps): JSX_2.Element;
5
+
6
+ export declare interface BadgeProps {
7
+ /**
8
+ * @default "gray"
9
+ */
10
+ color?: "gray" | "blue" | "green" | "orange" | "red" | "purple" | "white" | "surface" | "white-destructive" | "surface-destructive";
11
+ /**
12
+ * Badge border radius shape.
13
+ * @default "rounded"
14
+ */
15
+ shape?: "rounded" | "pill";
16
+ /**
17
+ * @default "md"
18
+ */
19
+ size?: "xs" | "sm" | "md" | "lg";
20
+ /**
21
+ * Whether to display a border stroke outline.
22
+ * @default false
23
+ */
24
+ stroke?: boolean;
25
+ /**
26
+ * Whether the badge is disabled.
27
+ * @default false
28
+ */
29
+ disabled?: boolean;
30
+ /**
31
+ * Optional icon before content. String (icon name) or React node.
32
+ * see {@link Icon} for available icon sets.
33
+ * @example
34
+ * ```tsx
35
+ * <Badge icon="check" iconType="lucide">Verified</Badge>
36
+ * ```
37
+ */
38
+ icon?: ReactNode | string;
39
+ /**
40
+ * Icon set type when `icon` is a string.
41
+ * @see {@link IconType}
42
+ */
43
+ iconType?: IconType;
44
+ className?: string;
45
+ children: ReactNode;
46
+ }
47
+
48
+ export declare const colors: {
49
+ "base-white": string;
50
+ "base-dark-1": string;
51
+ "base-transparent": string;
52
+ "icon-gray-2": string;
53
+ "icon-gray-3": string;
54
+ "gray-13-shadow": string;
55
+ "gray-13-shadow-2": string;
56
+ "red-1-focus": string;
57
+ "gray-1": string;
58
+ "gray-2": string;
59
+ "gray-3": string;
60
+ "gray-4": string;
61
+ "gray-5": string;
62
+ "gray-6": string;
63
+ "gray-7": string;
64
+ "gray-8": string;
65
+ "gray-9": string;
66
+ "gray-10": string;
67
+ "gray-11": string;
68
+ "gray-12": string;
69
+ "gray-13": string;
70
+ "gray-1a": string;
71
+ "gray-2a": string;
72
+ "gray-5a": string;
73
+ "gray-5a-solid": string;
74
+ "gray-7a": string;
75
+ "gray-9a": string;
76
+ "gray-9a-solid": string;
77
+ "white-1": string;
78
+ "white-2": string;
79
+ "white-3": string;
80
+ "white-4": string;
81
+ "white-5": string;
82
+ "white-5-solid": string;
83
+ "white-6": string;
84
+ "white-7": string;
85
+ "white-9": string;
86
+ "white-9-solid": string;
87
+ "white-13": string;
88
+ "blue-1": string;
89
+ "blue-2": string;
90
+ "blue-6": string;
91
+ "blue-8": string;
92
+ "blue-9": string;
93
+ "blue-12": string;
94
+ "blue-11": string;
95
+ "blue-3a": string;
96
+ "blue-5a": string;
97
+ "blue-7a": string;
98
+ "green-1": string;
99
+ "green-2": string;
100
+ "green-3": string;
101
+ "green-4": string;
102
+ "green-6": string;
103
+ "green-7": string;
104
+ "green-8": string;
105
+ "green-9": string;
106
+ "green-10": string;
107
+ "green-11": string;
108
+ "green-12": string;
109
+ "green-13": string;
110
+ "green-1a": string;
111
+ "green-3a": string;
112
+ "green-4a": string;
113
+ "green-5a": string;
114
+ "green-7a": string;
115
+ "green-11a": string;
116
+ "orange-1": string;
117
+ "orange-2": string;
118
+ "orange-4": string;
119
+ "orange-6": string;
120
+ "orange-8": string;
121
+ "orange-9": string;
122
+ "orange-11": string;
123
+ "orange-12": string;
124
+ "orange-13": string;
125
+ "orange-3a": string;
126
+ "orange-4a": string;
127
+ "orange-5a": string;
128
+ "orange-7a": string;
129
+ "red-1": string;
130
+ "red-2": string;
131
+ "red-4": string;
132
+ "red-5": string;
133
+ "red-6": string;
134
+ "red-8": string;
135
+ "red-9": string;
136
+ "red-11": string;
137
+ "red-12": string;
138
+ "red-13": string;
139
+ "red-1a": string;
140
+ "red-2a": string;
141
+ "red-3a": string;
142
+ "red-4a": string;
143
+ "red-5a": string;
144
+ "red-6a": string;
145
+ "red-7a": string;
146
+ "red-9a": string;
147
+ "purple-1": string;
148
+ "purple-2": string;
149
+ "purple-6": string;
150
+ "purple-8": string;
151
+ "purple-11": string;
152
+ "purple-12": string;
153
+ "purple-13": string;
154
+ "purple-3a": string;
155
+ "purple-5a": string;
156
+ "purple-7a": string;
157
+ };
158
+
159
+ export declare const designTokens: {
160
+ light: {
161
+ "red-1-focus": string;
162
+ "brand-7": string;
163
+ "brand-1a": string;
164
+ "brand-10": string;
165
+ "brand-4a": string;
166
+ "brand-11a": string;
167
+ "surface-neutral": string;
168
+ "surface-neutral-subtle": string;
169
+ "surface-warning": string;
170
+ "surface-info-accent": string;
171
+ "primary-hover": string;
172
+ "primary-disabled": string;
173
+ "button-secondary": string;
174
+ "button-secondary-hover": string;
175
+ "button-tertiary": string;
176
+ "tertiary-hover": string;
177
+ ghost: string;
178
+ "ghost-hover": string;
179
+ "destructive-hover": string;
180
+ "destructive-disabled": string;
181
+ "destructive-secondary-hover": string;
182
+ "button-destructive-tertiary": string;
183
+ "destructive-tertiary-hover": string;
184
+ "destructive-ghost-hover": string;
185
+ "badge-gray": string;
186
+ "badge-gray-accent": string;
187
+ "badge-blue": string;
188
+ "badge-blue-disabled": string;
189
+ "badge-green": string;
190
+ "badge-green-disabled": string;
191
+ "badge-orange": string;
192
+ "badge-orange-disabled": string;
193
+ "badge-red": string;
194
+ "badge-red-disabled": string;
195
+ "badge-purple": string;
196
+ "badge-purple-disabled": string;
197
+ "badge-purple-accent": string;
198
+ "badge-white-disabled": string;
199
+ "badge-surface": string;
200
+ "accent-blue-accent": string;
201
+ "accent-blue-subtle": string;
202
+ "accent-gray-accent": string;
203
+ "accent-green": string;
204
+ "accent-green-accent": string;
205
+ "accent-green-subtle": string;
206
+ "accent-orange-subtle": string;
207
+ "accent-orange-accent": string;
208
+ "accent-red": string;
209
+ "accent-red-subtle": string;
210
+ "accent-red-accent": string;
211
+ "accent-purple": string;
212
+ "accent-purple-subtle": string;
213
+ "accent-purple-accent": string;
214
+ "checkbox-disabled": string;
215
+ "toggle-default": string;
216
+ "toggle-hover": string;
217
+ "toggle-active-hover": string;
218
+ "toggle-active-disabled": string;
219
+ "toggle-handle-disabled": string;
220
+ "border-action-normal": string;
221
+ "border-action-hover": string;
222
+ "border-action-focus": string;
223
+ "border-action-focus-destructive-light": string;
224
+ "border-action-destructive": string;
225
+ "border-action-destructive-hover": string;
226
+ "border-base-warning": string;
227
+ "border-base-destructive": string;
228
+ "border-base-alpha": string;
229
+ "border-base-alpha-white": string;
230
+ "text-primary": string;
231
+ "text-secondary": string;
232
+ "text-secondary-solid": string;
233
+ "text-tertiary": string;
234
+ "text-quaternary": string;
235
+ "text-quaternary-solid": string;
236
+ "text-inverted": string;
237
+ "text-static-dark": string;
238
+ "text-static-dark-secondary": string;
239
+ "text-destructive": string;
240
+ "text-destructive-secondary": string;
241
+ "text-destructive-tertiary": string;
242
+ "text-success": string;
243
+ "text-warning": string;
244
+ "text-accent-blue-inverted": string;
245
+ "text-accent-blue-secondary": string;
246
+ "text-accent-blue-tertiary": string;
247
+ "text-accent-green": string;
248
+ "text-accent-green-inverted": string;
249
+ "text-accent-green-secondary": string;
250
+ "text-accent-orange-inverted": string;
251
+ "text-accent-orange-secondary": string;
252
+ "text-accent-red-inverted": string;
253
+ "text-accent-red-secondary": string;
254
+ "text-accent-purple-inverted": string;
255
+ "text-accent-purple-secondary": string;
256
+ "icon-tertiary": string;
257
+ "icon-quaternary": string;
258
+ "shadow-xs": string;
259
+ "shadow-tooltip-sm": string;
260
+ "focus-light": string;
261
+ "focus-accent": string;
262
+ "focus-light-destructive": string;
263
+ };
264
+ dark: {
265
+ "red-1-focus": string;
266
+ "brand-1a": string;
267
+ "brand-7": string;
268
+ "brand-10": string;
269
+ "brand-4a": string;
270
+ "brand-11a": string;
271
+ "surface-inverted": string;
272
+ "surface-neutral": string;
273
+ "surface-neutral-subtle": string;
274
+ "surface-warning": string;
275
+ "surface-info-accent": string;
276
+ "primary-hover": string;
277
+ "primary-disabled": string;
278
+ "button-secondary": string;
279
+ "button-secondary-hover": string;
280
+ "button-tertiary": string;
281
+ "tertiary-hover": string;
282
+ ghost: string;
283
+ "ghost-hover": string;
284
+ "destructive-hover": string;
285
+ "destructive-disabled": string;
286
+ "destructive-secondary-hover": string;
287
+ "button-destructive-tertiary": string;
288
+ "destructive-tertiary-hover": string;
289
+ "destructive-ghost-hover": string;
290
+ "badge-gray": string;
291
+ "badge-gray-accent": string;
292
+ "badge-blue": string;
293
+ "badge-blue-disabled": string;
294
+ "badge-green": string;
295
+ "badge-green-disabled": string;
296
+ "badge-orange": string;
297
+ "badge-orange-disabled": string;
298
+ "badge-red": string;
299
+ "badge-red-disabled": string;
300
+ "badge-purple": string;
301
+ "badge-purple-disabled": string;
302
+ "badge-purple-accent": string;
303
+ "badge-white-disabled": string;
304
+ "badge-surface": string;
305
+ "accent-blue-accent": string;
306
+ "accent-blue-subtle": string;
307
+ "accent-gray-accent": string;
308
+ "accent-green": string;
309
+ "accent-green-accent": string;
310
+ "accent-green-subtle": string;
311
+ "accent-orange-subtle": string;
312
+ "accent-orange-accent": string;
313
+ "accent-red": string;
314
+ "accent-red-subtle": string;
315
+ "accent-red-accent": string;
316
+ "accent-purple": string;
317
+ "accent-purple-subtle": string;
318
+ "accent-purple-accent": string;
319
+ "checkbox-disabled": string;
320
+ "toggle-default": string;
321
+ "toggle-hover": string;
322
+ "toggle-active-hover": string;
323
+ "toggle-active-disabled": string;
324
+ "toggle-handle-disabled": string;
325
+ "border-action-normal": string;
326
+ "border-action-hover": string;
327
+ "border-action-focus": string;
328
+ "border-action-focus-destructive-light": string;
329
+ "border-action-destructive": string;
330
+ "border-action-destructive-hover": string;
331
+ "border-action-success": string;
332
+ "border-base-warning": string;
333
+ "border-base-destructive": string;
334
+ "border-base-alpha": string;
335
+ "border-base-alpha-white": string;
336
+ "text-primary": string;
337
+ "text-secondary": string;
338
+ "text-secondary-solid": string;
339
+ "text-tertiary": string;
340
+ "text-quaternary": string;
341
+ "text-quaternary-solid": string;
342
+ "text-inverted": string;
343
+ "text-static-dark": string;
344
+ "text-static-dark-secondary": string;
345
+ "text-destructive": string;
346
+ "text-destructive-secondary": string;
347
+ "text-destructive-tertiary": string;
348
+ "text-success": string;
349
+ "text-warning": string;
350
+ "text-accent-blue-inverted": string;
351
+ "text-accent-blue-secondary": string;
352
+ "text-accent-blue-tertiary": string;
353
+ "text-accent-green": string;
354
+ "text-accent-green-inverted": string;
355
+ "text-accent-green-secondary": string;
356
+ "text-accent-orange-inverted": string;
357
+ "text-accent-orange-secondary": string;
358
+ "text-accent-red-inverted": string;
359
+ "text-accent-red-secondary": string;
360
+ "text-accent-purple-inverted": string;
361
+ "text-accent-purple-secondary": string;
362
+ "icon-tertiary": string;
363
+ "icon-quaternary": string;
364
+ "shadow-xs": string;
365
+ "shadow-tooltip-sm": string;
366
+ "focus-light": string;
367
+ "focus-accent": string;
368
+ "focus-light-destructive": string;
369
+ };
370
+ };
371
+
372
+ declare const focus_2: {
373
+ "light-light": string;
374
+ "light-dark": string;
375
+ "accent-light": string;
376
+ "accent-dark": string;
377
+ "light-destructive-light": string;
378
+ "light-destructive-dark": string;
379
+ };
380
+ export { focus_2 as focus }
381
+
382
+ export declare function Icon({ icon, iconType, color, size, className, }: IconProps): JSX_2.Element;
383
+
384
+ export declare interface IconProps {
385
+ icon: string;
386
+ iconType?: IconType;
387
+ color?: string;
388
+ size?: number;
389
+ className?: string;
390
+ }
391
+
392
+ export declare type IconType = "regular" | "solid" | "light" | "thin" | "sharp-solid" | "duotone" | "brands";
393
+
394
+ export declare const shadows: {
395
+ "xs-light": string;
396
+ "xs-dark": string;
397
+ "tooltip-sm-light": string;
398
+ "tooltip-sm-dark": string;
399
+ };
400
+
401
+ export { }