@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
@@ -0,0 +1 @@
1
+ :root{--mt-color-base-white: #ffffff;--mt-color-base-dark-1: #0b0c0e;--mt-color-base-transparent: #ffffff02;--mt-color-icon-gray-2: #757575;--mt-color-icon-gray-3: #525252;--mt-color-gray-13-shadow: #14151a0d;--mt-color-gray-13-shadow-2: #14151a05;--mt-color-red-1-focus: #ffb2b299;--mt-color-gray-1: #f9f9f9;--mt-color-gray-2: #f5f5f5;--mt-color-gray-3: #e9e9ea;--mt-color-gray-4: #d7d7d7;--mt-color-gray-5: #bbbbbc;--mt-color-gray-6: #9b9b9c;--mt-color-gray-7: #78787a;--mt-color-gray-8: #585859;--mt-color-gray-9: #3c3c3d;--mt-color-gray-10: #262727;--mt-color-gray-11: #191a1b;--mt-color-gray-12: #0f1011;--mt-color-gray-13: #0b0c0e;--mt-color-gray-1a: #0b0c0e0a;--mt-color-gray-2a: #0b0c0e14;--mt-color-gray-5a: #0b0c0e40;--mt-color-gray-5a-solid: #c2c2c2;--mt-color-gray-7a: #0b0c0e66;--mt-color-gray-9a: #0b0c0e80;--mt-color-gray-9a-solid: #6d6d6e;--mt-color-white-1: #ffffff14;--mt-color-white-2: #ffffff24;--mt-color-white-3: #ffffff2e;--mt-color-white-4: #ffffff3d;--mt-color-white-5: #ffffff52;--mt-color-white-5-solid: #b2b2b4;--mt-color-white-6: #ffffff66;--mt-color-white-7: #ffffff75;--mt-color-white-9: #ffffff99;--mt-color-white-9-solid: #a0a1a3;--mt-color-white-13: #fffffff2;--mt-color-blue-1: #f0f4fe;--mt-color-blue-2: #e3eafd;--mt-color-blue-6: #7196f4;--mt-color-blue-8: #4778f5;--mt-color-blue-9: #1d54e2;--mt-color-blue-12: #07296a;--mt-color-blue-11: #133a9a;--mt-color-blue-3a: #3368f033;--mt-color-blue-5a: #3368f04d;--mt-color-blue-7a: #3368f080;--mt-color-green-1: #edfdf4;--mt-color-green-2: #d1fae4;--mt-color-green-3: #c3f8dc;--mt-color-green-4: #9af4c3;--mt-color-green-6: #6ae1a1;--mt-color-green-7: #40d986;--mt-color-green-8: #26bd6c;--mt-color-green-9: #21a65e;--mt-color-green-10: #1d9052;--mt-color-green-11: #166e3f;--mt-color-green-12: #0f4c2c;--mt-color-green-13: #072213;--mt-color-green-1a: #26bd6c1a;--mt-color-green-3a: #26bd6c33;--mt-color-green-4a: #26bd6c40;--mt-color-green-5a: #26bd6c4d;--mt-color-green-7a: #26bd6c80;--mt-color-green-11a: #26bd6ce6;--mt-color-orange-1: #fef4ec;--mt-color-orange-2: #fdead8;--mt-color-orange-4: #fad0a9;--mt-color-orange-6: #f8b577;--mt-color-orange-8: #f48e2f;--mt-color-orange-9: #e9760c;--mt-color-orange-11: #ae590a;--mt-color-orange-12: #613105;--mt-color-orange-13: #301903;--mt-color-orange-3a: #f48e2f33;--mt-color-orange-4a: #f48e2f40;--mt-color-orange-5a: #f48e2f4d;--mt-color-orange-7a: #f48e2f80;--mt-color-red-1: #fdf2f1;--mt-color-red-2: #fce5e4;--mt-color-red-4: #f7c3c0;--mt-color-red-5: #f5b2ad;--mt-color-red-6: #f08b85;--mt-color-red-8: #e6483d;--mt-color-red-9: #d9281c;--mt-color-red-11: #9a1c13;--mt-color-red-12: #64120d;--mt-color-red-13: #360a07;--mt-color-red-1a: #e6483d1a;--mt-color-red-2a: #e6483d26;--mt-color-red-3a: #e6483d33;--mt-color-red-4a: #e6483d40;--mt-color-red-5a: #e6483d4d;--mt-color-red-6a: #e6483d66;--mt-color-red-7a: #e6483d80;--mt-color-red-9a: #e6483db3;--mt-color-purple-1: #f7f1fd;--mt-color-purple-2: #ecdffb;--mt-color-purple-6: #b78af0;--mt-color-purple-8: #924fe8;--mt-color-purple-11: #5314a3;--mt-color-purple-12: #3a0f71;--mt-color-purple-13: #1c0736;--mt-color-purple-3a: #873de633;--mt-color-purple-5a: #873de64d;--mt-color-purple-7a: #873de680;--mt-shadow-xs-light: 0px 1px 2px 0px var(--mt-color-gray-13-shadow);--mt-shadow-xs-dark: 0px 1px 2px 0px rgb(255 255 255 / 0%);--mt-shadow-tooltip-sm-light: 0px 10px 16px -3px var(--mt-color-gray-13-shadow), 0px 3px 10px -2px var(--mt-color-gray-13-shadow-2);--mt-shadow-tooltip-sm-dark: 0px 10px 16px -3px rgb(20 21 26 / 5%), 0px 3px 10px -2px rgb(20 21 26 / 2%);--mt-focus-light-light: 0px 0px 0px 2px var(--mt-color-gray-2a);--mt-focus-light-dark: 0px 0px 0px 2px var(--mt-color-white-2);--mt-focus-accent-light: 0px 0px 0px 2px var(--mt-color-green-8);--mt-focus-accent-dark: 0px 0px 0px 2px var(--mt-color-green-8);--mt-focus-light-destructive-light: 0px 0px 0px 2px var(--mt-color-red-1-focus);--mt-focus-light-destructive-dark: 0px 0px 0px 2px var(--mt-color-red-1-focus);--mt-color-brand-7: var(--mt-color-green-7);--mt-color-brand-1a: var(--mt-color-green-1a);--mt-color-brand-10: var(--mt-color-green-10);--mt-color-brand-4a: var(--mt-color-green-4a);--mt-color-brand-11a: var(--mt-color-green-11a);--mt-color-surface-neutral: var(--mt-color-gray-1);--mt-color-surface-neutral-subtle: var(--mt-color-gray-2);--mt-color-surface-warning: var(--mt-color-orange-1);--mt-color-surface-info-accent: var(--mt-color-blue-8);--mt-color-primary-hover: var(--mt-color-gray-12);--mt-color-primary-disabled: var(--mt-color-gray-2);--mt-color-button-secondary: var(--mt-color-base-white);--mt-color-button-secondary-hover: var(--mt-color-gray-1);--mt-color-button-tertiary: var(--mt-color-gray-1a);--mt-color-tertiary-hover: var(--mt-color-gray-2a);--mt-color-ghost: var(--mt-color-base-transparent);--mt-color-ghost-hover: var(--mt-color-gray-1a);--mt-color-destructive-hover: var(--mt-color-red-9);--mt-color-destructive-disabled: var(--mt-color-red-2);--mt-color-destructive-secondary-hover: var(--mt-color-red-1);--mt-color-button-destructive-tertiary: var(--mt-color-red-1a);--mt-color-destructive-tertiary-hover: var(--mt-color-red-2a);--mt-color-destructive-ghost-hover: var(--mt-color-red-1a);--mt-color-badge-gray: var(--mt-color-gray-2);--mt-color-badge-gray-accent: var(--mt-color-gray-9);--mt-color-badge-blue: var(--mt-color-blue-2);--mt-color-badge-blue-disabled: var(--mt-color-blue-1);--mt-color-badge-green: var(--mt-color-green-2);--mt-color-badge-green-disabled: var(--mt-color-green-1);--mt-color-badge-orange: var(--mt-color-orange-2);--mt-color-badge-orange-disabled: var(--mt-color-orange-1);--mt-color-badge-red: var(--mt-color-red-2);--mt-color-badge-red-disabled: var(--mt-color-red-1);--mt-color-badge-purple: var(--mt-color-purple-2);--mt-color-badge-purple-disabled: var(--mt-color-purple-1);--mt-color-badge-purple-accent: var(--mt-color-purple-8);--mt-color-badge-white-disabled: var(--mt-color-base-white);--mt-color-badge-surface: var(--mt-color-base-white);--mt-color-accent-blue-accent: var(--mt-color-blue-8);--mt-color-accent-blue-subtle: var(--mt-color-blue-2);--mt-color-accent-gray-accent: var(--mt-color-gray-8);--mt-color-accent-green: var(--mt-color-green-1);--mt-color-accent-green-accent: var(--mt-color-green-8);--mt-color-accent-green-subtle: var(--mt-color-green-2);--mt-color-accent-orange-subtle: var(--mt-color-orange-2);--mt-color-accent-orange-accent: var(--mt-color-orange-8);--mt-color-accent-red: var(--mt-color-red-1);--mt-color-accent-red-subtle: var(--mt-color-red-2);--mt-color-accent-red-accent: var(--mt-color-red-8);--mt-color-accent-purple: var(--mt-color-purple-1);--mt-color-accent-purple-subtle: var(--mt-color-purple-2);--mt-color-accent-purple-accent: var(--mt-color-purple-8);--mt-color-checkbox-disabled: var(--mt-color-gray-3);--mt-color-toggle-default: var(--mt-color-gray-5);--mt-color-toggle-hover: var(--mt-color-gray-6);--mt-color-toggle-active-hover: var(--mt-color-green-9);--mt-color-toggle-active-disabled: var(--mt-color-green-3);--mt-color-toggle-handle-disabled: var(--mt-color-gray-4);--mt-color-border-action-normal: var(--mt-color-gray-3);--mt-color-border-action-hover: var(--mt-color-gray-4);--mt-color-border-action-focus: var(--mt-color-gray-13);--mt-color-border-action-focus-destructive-light: var(--mt-color-red-6);--mt-color-border-action-destructive: var(--mt-color-red-4);--mt-color-border-action-destructive-hover: var(--mt-color-red-5);--mt-color-border-base-warning: var(--mt-color-orange-4);--mt-color-border-base-destructive: var(--mt-color-red-4);--mt-color-border-base-alpha: var(--mt-color-gray-2a);--mt-color-border-base-alpha-white: var(--mt-color-white-3);--mt-color-text-primary: var(--mt-color-gray-13);--mt-color-text-secondary: var(--mt-color-gray-9a);--mt-color-text-secondary-solid: var(--mt-color-gray-9a-solid);--mt-color-text-tertiary: var(--mt-color-gray-7a);--mt-color-text-quaternary: var(--mt-color-gray-5a);--mt-color-text-quaternary-solid: var(--mt-color-gray-5a-solid);--mt-color-text-inverted: var(--mt-color-base-white);--mt-color-text-static-dark: var(--mt-color-gray-13);--mt-color-text-static-dark-secondary: var(--mt-color-gray-9a);--mt-color-text-destructive: var(--mt-color-red-8);--mt-color-text-destructive-secondary: var(--mt-color-red-9a);--mt-color-text-destructive-tertiary: var(--mt-color-red-5a);--mt-color-text-success: var(--mt-color-green-8);--mt-color-text-warning: var(--mt-color-orange-8);--mt-color-text-accent-blue-inverted: var(--mt-color-blue-11);--mt-color-text-accent-blue-secondary: var(--mt-color-blue-7a);--mt-color-text-accent-blue-tertiary: var(--mt-color-blue-5a);--mt-color-text-accent-green: var(--mt-color-green-11);--mt-color-text-accent-green-inverted: var(--mt-color-green-11);--mt-color-text-accent-green-secondary: var(--mt-color-green-7a);--mt-color-text-accent-orange-inverted: var(--mt-color-orange-11);--mt-color-text-accent-orange-secondary: var(--mt-color-orange-7a);--mt-color-text-accent-red-inverted: var(--mt-color-red-11);--mt-color-text-accent-red-secondary: var(--mt-color-red-7a);--mt-color-text-accent-purple-inverted: var(--mt-color-purple-11);--mt-color-text-accent-purple-secondary: var(--mt-color-purple-7a);--mt-color-icon-tertiary: var(--mt-color-gray-6);--mt-color-icon-quaternary: var(--mt-color-gray-4);--mt-color-shadow-xs: var(--mt-shadow-xs-light);--mt-color-shadow-tooltip-sm: var(--mt-shadow-tooltip-sm-light);--mt-color-focus-light: var(--mt-focus-light-light);--mt-color-focus-accent: var(--mt-focus-accent-light);--mt-color-focus-light-destructive: var(--mt-focus-light-destructive-light)}:is(.dark,.dark-theme){--mt-color-red-1-focus: var(--mt-color-red-1-focus);--mt-color-brand-1a: var(--mt-color-green-1);--mt-color-brand-7: var(--mt-color-green-7);--mt-color-brand-10: var(--mt-color-green-4);--mt-color-brand-4a: var(--mt-color-green-4);--mt-color-brand-11a: var(--mt-color-green-11);--mt-color-surface-inverted: var(--mt-color-base-white);--mt-color-surface-neutral: var(--mt-color-gray-13);--mt-color-surface-neutral-subtle: var(--mt-color-gray-12);--mt-color-surface-warning: var(--mt-color-orange-13);--mt-color-surface-info-accent: var(--mt-color-blue-8);--mt-color-primary-hover: var(--mt-color-gray-2);--mt-color-primary-disabled: var(--mt-color-white-2);--mt-color-button-secondary: var(--mt-color-gray-13);--mt-color-button-secondary-hover: var(--mt-color-gray-12);--mt-color-button-tertiary: var(--mt-color-white-1);--mt-color-tertiary-hover: var(--mt-color-white-2);--mt-color-ghost: var(--mt-color-base-transparent);--mt-color-ghost-hover: var(--mt-color-white-2);--mt-color-destructive-hover: var(--mt-color-red-9);--mt-color-destructive-disabled: var(--mt-color-red-2a);--mt-color-destructive-secondary-hover: var(--mt-color-gray-13);--mt-color-button-destructive-tertiary: var(--mt-color-white-1);--mt-color-destructive-tertiary-hover: var(--mt-color-white-2);--mt-color-destructive-ghost-hover: var(--mt-color-white-1);--mt-color-badge-gray: var(--mt-color-white-3);--mt-color-badge-gray-accent: var(--mt-color-gray-7);--mt-color-badge-blue: var(--mt-color-blue-5a);--mt-color-badge-blue-disabled: var(--mt-color-blue-3a);--mt-color-badge-green: var(--mt-color-green-5a);--mt-color-badge-green-disabled: var(--mt-color-green-3a);--mt-color-badge-orange: var(--mt-color-orange-4a);--mt-color-badge-orange-disabled: var(--mt-color-orange-3a);--mt-color-badge-red: var(--mt-color-red-5a);--mt-color-badge-red-disabled: var(--mt-color-red-3a);--mt-color-badge-purple: var(--mt-color-purple-5a);--mt-color-badge-purple-disabled: var(--mt-color-purple-3a);--mt-color-badge-purple-accent: var(--mt-color-purple-8);--mt-color-badge-white-disabled: var(--mt-color-white-6);--mt-color-badge-surface: var(--mt-color-gray-12);--mt-color-accent-blue-accent: var(--mt-color-blue-9);--mt-color-accent-blue-subtle: var(--mt-color-blue-12);--mt-color-accent-gray-accent: var(--mt-color-gray-9);--mt-color-accent-green: var(--mt-color-green-13);--mt-color-accent-green-accent: var(--mt-color-green-9);--mt-color-accent-green-subtle: var(--mt-color-green-12);--mt-color-accent-orange-subtle: var(--mt-color-orange-12);--mt-color-accent-orange-accent: var(--mt-color-orange-9);--mt-color-accent-red: var(--mt-color-red-13);--mt-color-accent-red-subtle: var(--mt-color-red-12);--mt-color-accent-red-accent: var(--mt-color-red-9);--mt-color-accent-purple: var(--mt-color-purple-13);--mt-color-accent-purple-subtle: var(--mt-color-purple-12);--mt-color-accent-purple-accent: var(--mt-color-purple-8);--mt-color-checkbox-disabled: var(--mt-color-gray-11);--mt-color-toggle-default: var(--mt-color-gray-9);--mt-color-toggle-hover: var(--mt-color-gray-8);--mt-color-toggle-active-hover: var(--mt-color-green-9);--mt-color-toggle-active-disabled: var(--mt-color-green-11);--mt-color-toggle-handle-disabled: var(--mt-color-gray-10);--mt-color-border-action-normal: var(--mt-color-white-3);--mt-color-border-action-hover: var(--mt-color-white-4);--mt-color-border-action-focus: var(--mt-color-white-13);--mt-color-border-action-focus-destructive-light: var(--mt-color-red-6);--mt-color-border-action-destructive: var(--mt-color-red-4a);--mt-color-border-action-destructive-hover: var(--mt-color-red-5a);--mt-color-border-action-success: var(--mt-color-green-4a);--mt-color-border-base-warning: var(--mt-color-orange-4a);--mt-color-border-base-destructive: var(--mt-color-red-4a);--mt-color-border-base-alpha: var(--mt-color-gray-2a);--mt-color-border-base-alpha-white: var(--mt-color-white-3);--mt-color-text-primary: var(--mt-color-base-white);--mt-color-text-secondary: var(--mt-color-gray-4);--mt-color-text-secondary-solid: var(--mt-color-gray-5a-solid);--mt-color-text-tertiary: var(--mt-color-white-7);--mt-color-text-quaternary: var(--mt-color-white-5);--mt-color-text-quaternary-solid: var(--mt-color-white-5-solid);--mt-color-text-inverted: var(--mt-color-base-dark-1);--mt-color-text-static-dark: var(--mt-color-gray-13);--mt-color-text-static-dark-secondary: var(--mt-color-gray-9a);--mt-color-text-destructive: var(--mt-color-red-8);--mt-color-text-destructive-secondary: var(--mt-color-red-9a);--mt-color-text-destructive-tertiary: var(--mt-color-red-6a);--mt-color-text-success: var(--mt-color-green-8);--mt-color-text-warning: var(--mt-color-orange-8);--mt-color-text-accent-blue-inverted: var(--mt-color-blue-6);--mt-color-text-accent-blue-secondary: var(--mt-color-blue-5a);--mt-color-text-accent-blue-tertiary: var(--mt-color-blue-3a);--mt-color-text-accent-green: var(--mt-color-green-9);--mt-color-text-accent-green-inverted: var(--mt-color-green-6);--mt-color-text-accent-green-secondary: var(--mt-color-green-5a);--mt-color-text-accent-orange-inverted: var(--mt-color-orange-6);--mt-color-text-accent-orange-secondary: var(--mt-color-orange-5a);--mt-color-text-accent-red-inverted: var(--mt-color-red-6);--mt-color-text-accent-red-secondary: var(--mt-color-red-5a);--mt-color-text-accent-purple-inverted: var(--mt-color-purple-6);--mt-color-text-accent-purple-secondary: var(--mt-color-purple-5a);--mt-color-icon-tertiary: var(--mt-color-icon-gray-2);--mt-color-icon-quaternary: var(--mt-color-icon-gray-3);--mt-color-shadow-xs: var(--mt-shadow-xs-dark);--mt-color-shadow-tooltip-sm: var(--mt-shadow-tooltip-sm-dark);--mt-color-focus-light: var(--mt-focus-light-dark);--mt-color-focus-accent: var(--mt-focus-accent-dark);--mt-color-focus-light-destructive: var(--mt-focus-light-destructive-dark)}:is(.dark,.dark-theme),:is(.dark,.dark-theme) :where(:root){color-scheme:dark}
@@ -0,0 +1,7 @@
1
+ import n from "clsx";
2
+ function t(...r) {
3
+ return n(r);
4
+ }
5
+ export {
6
+ t as cn
7
+ };
package/package.json CHANGED
@@ -1,107 +1,80 @@
1
1
  {
2
2
  "name": "@mintlify/components",
3
- "version": "0.3.14",
4
- "description": "Open-source library of UI components made with React and TailwindCSS.",
5
- "main": "./dist/index.js",
3
+ "version": "0.4.0",
4
+ "description": "Mintlify Headless UI components",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
6
8
  "types": "./dist/index.d.ts",
7
- "style": "./dist/main.css",
9
+ "sideEffects": false,
10
+ "files": [
11
+ "dist",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
8
15
  "repository": {
9
16
  "type": "git",
10
- "url": "https://github.com/mintlify/components"
17
+ "url": "https://github.com/mintlify/components.git",
18
+ "directory": "components/packages/react"
19
+ },
20
+ "bugs": {
21
+ "url": "https://github.com/mintlify/components/issues"
11
22
  },
23
+ "homepage": "https://github.com/mintlify/components#readme",
24
+ "license": "MIT",
25
+ "author": "Mintlify, Inc.",
12
26
  "keywords": [
13
27
  "react",
28
+ "components",
29
+ "ui",
30
+ "headless",
31
+ "mintlify",
32
+ "design-system",
14
33
  "tailwindcss"
15
34
  ],
16
- "license": "MIT",
17
- "scripts": {
18
- "build": "webpack",
19
- "format": "prettier \"**/*.{css,js,ts,tsx,md}\" --write",
20
- "format:check": "prettier \"**/*.{css,js,ts,tsx,md}\" --check",
21
- "prepare": "husky install && yarn build",
22
- "storybook": "start-storybook -p 6006",
23
- "build-storybook": "build-storybook",
24
- "test-storybook": "test-storybook",
25
- "lint": "eslint src --cache"
35
+ "engines": {
36
+ "node": ">=20.0.0"
26
37
  },
27
- "author": "Mintlify",
28
- "bugs": {
29
- "url": "https://github.com/mintlify/components/issues"
38
+ "scripts": {
39
+ "dev": "pnpm generate:theme && vite build --watch",
40
+ "build": "pnpm generate:theme && tsc && vite build",
41
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
42
+ "lint:css": "stylelint '**/*.css'",
43
+ "lint:all": "pnpm lint && pnpm lint:css",
44
+ "storybook": "storybook dev -p 6006",
45
+ "build-storybook": "storybook build",
46
+ "generate:theme": "tsx scripts/generate-theme-css.ts"
30
47
  },
31
48
  "peerDependencies": {
32
- "@headlessui/react": "^1.7",
33
- "react": "^17.0.0 || ^18.0.0",
34
- "react-dom": "^17.0.0 || ^18.0.0"
35
- },
36
- "devDependencies": {
37
- "@babel/core": "^7.20.5",
38
- "@babel/preset-env": "^7.20.2",
39
- "@babel/preset-react": "^7.18.6",
40
- "@babel/preset-typescript": "^7.18.6",
41
- "@headlessui/react": "^1.7.11",
42
- "@mintlify/eslint-config": "^1.0.3",
43
- "@mintlify/eslint-config-typescript": "^1.0.7",
44
- "@mintlify/prettier-config": "1.0.2",
45
- "@storybook/addon-actions": "^6.5.13",
46
- "@storybook/addon-essentials": "^6.5.13",
47
- "@storybook/addon-interactions": "^6.5.13",
48
- "@storybook/addon-links": "^6.5.13",
49
- "@storybook/addon-postcss": "^2.0.0",
50
- "@storybook/builder-webpack5": "^6.5.13",
51
- "@storybook/jest": "^0.0.10",
52
- "@storybook/manager-webpack5": "^6.5.13",
53
- "@storybook/react": "^6.5.13",
54
- "@storybook/test-runner": "^0.9.4",
55
- "@storybook/testing-library": "^0.0.13",
56
- "@tailwindcss/typography": "^0.5.7",
57
- "@trivago/prettier-plugin-sort-imports": "3.x",
58
- "@types/lodash.set": "^4.3.7",
59
- "@types/react": "^18.0.21",
60
- "@types/uuid": "^9.0.0",
61
- "@typescript-eslint/eslint-plugin": "^5.52.0",
62
- "@typescript-eslint/parser": "^5.52.0",
63
- "autoprefixer": "^10.4.8",
64
- "babel-loader": "^8.3.0",
65
- "chromatic": "^6.9.0",
66
- "css-loader": "^6.7.2",
67
- "cssnano": "^5.1.14",
68
- "eslint": "^8.34.0",
69
- "eslint-config-prettier": "^8.6.0",
70
- "eslint-plugin-react": "^7.32.2",
71
- "eslint-plugin-react-hooks": "^4.6.0",
72
- "eslint-plugin-unused-imports": "^2.0.0",
73
- "glob-parent": "^6.0.2",
74
- "husky": "^8.0.3",
75
- "lint-staged": "^13.1.1",
76
- "mini-css-extract-plugin": "^2.6.1",
77
- "mini-svg-data-uri": "^1.4.4",
78
- "postcss": "^8.4.19",
79
- "postcss-loader": "^7.0.2",
80
- "postcss-preset-env": "^7.8.3",
81
- "prettier": "2.x",
82
- "react": "^18.0.0",
83
- "react-dom": "^18.0.0",
84
- "source-map-loader": "^4.0.0",
85
- "storybook-addon-themes": "^6.1.0",
86
- "style-loader": "^3.3.1",
87
- "tailwind-children": "^0.5.0",
88
- "tailwindcss": "^3.2.4",
89
- "trim": "^1.0.1",
90
- "trim-newlines": "^4.0.2",
91
- "ts-loader": "^9.3.1",
92
- "typescript": "^4.9.4",
93
- "uuid": "^9.0.0",
94
- "webpack": "^5.75.0",
95
- "webpack-cli": "^4.10.0"
49
+ "react": "^18.0.0 || ^19.0.0",
50
+ "react-dom": "^18.0.0 || ^19.0.0"
96
51
  },
97
52
  "dependencies": {
98
- "assert": "^2.0.0",
99
- "clsx": "^1.2.1",
100
- "is-absolute-url": "^4.0.1",
101
- "lodash.set": "^4.3.2"
53
+ "clsx": "^2.1.1"
102
54
  },
103
- "lint-staged": {
104
- "*.+(ts|tsx)": "eslint --cache --fix --max-warnings 0",
105
- "*.{css,js,ts,tsx,md}": "prettier --write"
55
+ "devDependencies": {
56
+ "@storybook/addon-docs": "^10.0.8",
57
+ "@storybook/react-vite": "^10.0.8",
58
+ "@tailwindcss/postcss": "^4.1.17",
59
+ "@types/node": "^22.10.1",
60
+ "@types/react": "^18.3.12",
61
+ "@types/react-dom": "^18.3.1",
62
+ "@typescript-eslint/eslint-plugin": "^8.15.0",
63
+ "@typescript-eslint/parser": "^8.15.0",
64
+ "@vitejs/plugin-react": "^4.3.4",
65
+ "autoprefixer": "^10.4.22",
66
+ "eslint": "^9.15.0",
67
+ "eslint-plugin-react-hooks": "^5.0.0",
68
+ "eslint-plugin-react-refresh": "^0.4.14",
69
+ "eslint-plugin-storybook": "^10.0.8",
70
+ "next-themes": "^0.4.6",
71
+ "postcss": "^8.5.6",
72
+ "react": "^18.3.1",
73
+ "react-dom": "^18.3.1",
74
+ "storybook": "^10.0.8",
75
+ "tailwindcss": "^4.1.17",
76
+ "typescript": "^5.7.2",
77
+ "vite": "^6.0.1",
78
+ "vite-plugin-dts": "^4.3.0"
106
79
  }
107
80
  }
package/.eslintrc.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": [
3
- "eslint:recommended",
4
- "plugin:react/recommended",
5
- "plugin:react-hooks/recommended",
6
- "@mintlify/eslint-config-typescript"
7
- ],
8
- "rules": {
9
- "react/prop-types": "off"
10
- }
11
- }
@@ -1,10 +0,0 @@
1
- # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2
-
3
- version: 2
4
- updates:
5
- - package-ecosystem: "npm" # See documentation for possible values
6
- directory: "/" # Location of package manifests
7
- schedule:
8
- interval: "daily"
9
- allow:
10
- - dependency-name: "@mintlify/*"
@@ -1,27 +0,0 @@
1
- # Workflow name
2
- name: "Chromatic"
3
-
4
- # Event for the workflow
5
- on: push
6
-
7
- # List of jobs
8
- jobs:
9
- chromatic-deployment:
10
- # Operating System
11
- runs-on: ubuntu-latest
12
- # Job steps
13
- steps:
14
- - uses: actions/checkout@v1
15
- - name: Install dependencies
16
- run: yarn
17
- - name: Publish to Chromatic
18
- if: github.ref != 'refs/heads/main'
19
- uses: chromaui/action@v1
20
- with:
21
- projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
22
- - name: Publish to Chromatic auto-accepting changes
23
- if: github.ref == 'refs/heads/main'
24
- uses: chromaui/action@v1
25
- with:
26
- projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
27
- autoAcceptChanges: true
@@ -1,13 +0,0 @@
1
- name: Code Style Checks
2
-
3
- on: push
4
-
5
- jobs:
6
- style-checks:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - uses: actions/checkout@v3
10
- - name: Install modules
11
- run: yarn
12
- - name: Check formatting
13
- run: yarn format:check
@@ -1,13 +0,0 @@
1
- name: Sanity Check
2
-
3
- on: push
4
-
5
- jobs:
6
- sanity-check:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - uses: actions/checkout@v3
10
- - name: Install modules
11
- run: yarn
12
- - name: Check build
13
- run: yarn build
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- yarn lint-staged
package/.prettierignore DELETED
@@ -1,49 +0,0 @@
1
- # we are using yarn in this project
2
- package.lock
3
-
4
- # user editor preferences
5
- /.vscode/
6
- /.idea/
7
-
8
- # dependencies
9
- /node_modules
10
- /.pnp
11
- .pnp.js
12
-
13
- # testing
14
- /coverage
15
-
16
- # next.js
17
- /.next/
18
- /out/
19
- /public/feeds/
20
-
21
- # production
22
- /build
23
- /dist
24
-
25
- # generated files
26
- /public/*
27
- /src/pages/*
28
- !/src/pages/api
29
- /src/pages/api/*.mdx
30
- !/src/pages/*.tsx
31
- !/src/pages/*.ts
32
- /src/config.json
33
- /src/openapi.json
34
-
35
- # misc
36
- .DS_Store
37
-
38
- # debug
39
- npm-debug.log*
40
- yarn-debug.log*
41
- yarn-error.log*
42
- build-storybook.log
43
-
44
- # local env files
45
- .env
46
- .env.local
47
- .env.development.local
48
- .env.test.local
49
- .env.production.local
package/.prettierrc DELETED
@@ -1 +0,0 @@
1
- "@mintlify/prettier-config/config.js"
package/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- * @mintlify/engineering
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Mintlify, Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,18 +0,0 @@
1
- import { ReactNode } from 'react';
2
- declare function Accordion({ title, description, defaultOpen, icon, onChange, variant, children, }: {
3
- /** The main text of the Accordion shown in bold */
4
- title: string;
5
- /** Text under the title */
6
- description?: string;
7
- /** Whether the Accordion is open initially */
8
- defaultOpen?: boolean;
9
- /** Icon to display to the left */
10
- icon?: ReactNode;
11
- /** Callback when the Accordion is clicked with the new open state */
12
- onChange?: (open: boolean) => void;
13
- /** The Accordion UI style */
14
- variant?: 'rounded' | 'minimalist';
15
- /** The Accordion contents */
16
- children: ReactNode;
17
- }): JSX.Element;
18
- export default Accordion;
@@ -1,10 +0,0 @@
1
- import { ReactNode } from 'react';
2
- declare function AccordionItemCover({ title, description, open, setOpen, icon, coverClass, }: {
3
- title: string;
4
- description?: string;
5
- open: boolean;
6
- setOpen: (open: boolean) => any;
7
- icon?: ReactNode;
8
- coverClass: string;
9
- }): JSX.Element;
10
- export default AccordionItemCover;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- declare function AccordionGroup({ children }: {
3
- children: ReactNode;
4
- }): JSX.Element;
5
- export default AccordionGroup;
@@ -1,5 +0,0 @@
1
- export default function getAccordionStyleFromVariant(variant: string): {
2
- parentClass: string;
3
- coverClass: string;
4
- contentClass: string;
5
- };
@@ -1,3 +0,0 @@
1
- import Accordion from './Accordion';
2
- import AccordionGroup from './AccordionGroup';
3
- export { Accordion, AccordionGroup };
@@ -1,22 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { ParamGroup, RequestMethods } from './types';
3
- export declare function ApiPlayground({ method, paramGroups, paramValues, isSendingRequest, onChangeParamValues, onSendRequest, header, response, }: {
4
- /** Request method. */
5
- method: RequestMethods;
6
- /** Array of param groups to show as tabs for input. */
7
- paramGroups: ParamGroup[];
8
- /** Values to show in the ApiInputs. Key is the param group name. */
9
- paramValues: Record<string, Record<string, any>>;
10
- /** Whether you are currently sending a request.
11
- * The Send Request button is disabled and the response is hidden while this is true. */
12
- isSendingRequest: boolean;
13
- /** Callback when the user changes a parameter's value. */
14
- onChangeParamValues: (paramValues: Record<string, Record<string, any>>) => void;
15
- /** Callback when the user clicks the Send Request button. */
16
- onSendRequest: () => void;
17
- /** Header to show above parameter inputs. */
18
- header?: ReactNode;
19
- /** Response to show underneath the playground.
20
- * This component does not automatically syntax highlight code. */
21
- response?: ReactNode;
22
- }): JSX.Element;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function BaseUrlDropdown({ baseUrls, defaultValue, onChange, }: {
3
- /** Array of base URLs to select from. Component is hidden when the array is empty or only has one value. */
4
- baseUrls: string[];
5
- /** Initially selected base URL. */
6
- defaultValue: string | undefined;
7
- /** Function called when the user selects a different base URL. */
8
- onChange: (baseUrl: string) => void;
9
- }): JSX.Element | null;
@@ -1,4 +0,0 @@
1
- import { RequestMethods } from './types';
2
- export declare const RequestMethodBubble: ({ method }: {
3
- method: RequestMethods;
4
- }) => JSX.Element;
@@ -1,13 +0,0 @@
1
- import { RequestMethods } from './types';
2
- export declare const RequestPathHeader: ({ method, path, baseUrls, defaultBaseUrl, onBaseUrlChange, }: {
3
- /** Request method. */
4
- method: RequestMethods;
5
- /** Path text to show beside the request method bubble. */
6
- path: string;
7
- /** Array of baseUrls to select from. Dropdown is hidden when there are zero or one options. */
8
- baseUrls?: string[] | undefined;
9
- /** What value of baseUrl the dropdown should show as selected before the user has changed the selection. */
10
- defaultBaseUrl?: string | undefined;
11
- /** Callback when the user changes the baseUrl in the dropdown. */
12
- onBaseUrlChange: (baseUrl: string) => void;
13
- }) => JSX.Element;
@@ -1,4 +0,0 @@
1
- import { ApiPlayground } from './ApiPlayground';
2
- import { RequestMethodBubble } from './RequestMethodBubble';
3
- import { RequestPathHeader } from './RequestPathHeader';
4
- export { ApiPlayground, RequestMethodBubble, RequestPathHeader };
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function AddArrayItemButton({ onClick }: {
3
- onClick: () => void;
4
- }): JSX.Element;
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- import { ApiInputValue, Param } from '../types';
3
- /**
4
- * ApiInput provides a UI to receive inputs from the user for API calls.
5
- * The user is responsible for updating value when onChangeParam is called.
6
- * ApiInput doesn't store the value internally so components don't work
7
- * when the user doesn't track the state.
8
- */
9
- export declare function ApiInput({ param, value, onChangeParam, onDeleteArrayItem, parentInputs, }: {
10
- param: Param;
11
- value: ApiInputValue;
12
- onChangeParam: (parentInputs: string[], paramName: string, value: ApiInputValue) => void;
13
- onDeleteArrayItem?: () => void;
14
- parentInputs?: string[];
15
- }): JSX.Element;
@@ -1,5 +0,0 @@
1
- export declare const InputDropdown: ({ options, value, onInputChange, }: {
2
- options: string[];
3
- value: string | undefined;
4
- onInputChange: (newValue: string) => void;
5
- }) => JSX.Element;
@@ -1,16 +0,0 @@
1
- export type RequestMethods = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'COPY' | 'HEAD' | 'OPTIONS' | 'LINK' | 'UNLINK' | 'PURGE' | 'LOCK' | 'UNLOCK' | 'PROPFIND' | 'VIEW';
2
- export type ParamGroup = {
3
- name: string;
4
- params: Param[];
5
- };
6
- export type Param = {
7
- name: string;
8
- placeholder?: string;
9
- required?: boolean;
10
- type?: string;
11
- enum?: string[];
12
- format?: string;
13
- group?: string;
14
- properties?: Param[];
15
- };
16
- export type ApiInputValue = string | number | boolean | File | string[] | number[] | boolean[] | File[] | undefined | null;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function AppearFromTop({ show, className, children, }: {
3
- show: boolean;
4
- className?: string;
5
- children: any;
6
- }): JSX.Element;
package/dist/Button.d.ts DELETED
@@ -1,42 +0,0 @@
1
- import { ElementType, ComponentPropsWithoutRef, Ref } from 'react';
2
- type ColorInterface = keyof typeof colors;
3
- declare const colors: {
4
- indigo: string[];
5
- pink: string[];
6
- sky: string[];
7
- blue: string[];
8
- gray: string[];
9
- };
10
- export interface ButtonPropsBase<T> {
11
- /**
12
- * Color of the button. Default is `gray`.
13
- */
14
- color?: ColorInterface;
15
- /**
16
- * Color when in dark mode. Default is the same as the `color` prop.
17
- */
18
- darkColor?: ColorInterface;
19
- /**
20
- * Whether to reverse the layout.
21
- */
22
- reverse?: boolean;
23
- /**
24
- * Type of element to be rendered.
25
- */
26
- as?: T;
27
- /**
28
- * If provided, will render as an anchor element.
29
- */
30
- href?: string;
31
- /**
32
- * Ref of the element to be rendered.
33
- */
34
- mRef?: Ref<T | undefined>;
35
- }
36
- /**
37
- * Props for the `Button` component
38
- * @typeParam T - Type of the Element rendered by the button.
39
- */
40
- export type ButtonProps<T extends ElementType> = ButtonPropsBase<T> & Omit<ComponentPropsWithoutRef<T>, keyof ButtonPropsBase<T>>;
41
- export declare function Button<T extends ElementType = 'button'>({ as, color, darkColor, reverse, children, className, mRef, ...props }: ButtonProps<T>): JSX.Element;
42
- export {};
@@ -1,10 +0,0 @@
1
- import { ReactNode } from 'react';
2
- type CalloutContent = {
3
- children: ReactNode;
4
- };
5
- export declare function Info({ children }: CalloutContent): JSX.Element;
6
- export declare function Warning({ children }: CalloutContent): JSX.Element;
7
- export declare function Note({ children }: CalloutContent): JSX.Element;
8
- export declare function Tip({ children }: CalloutContent): JSX.Element;
9
- export declare function Check({ children }: CalloutContent): JSX.Element;
10
- export {};
package/dist/Card.d.ts DELETED
@@ -1,33 +0,0 @@
1
- import { ComponentPropsWithoutRef, ElementType, ReactNode, Ref } from 'react';
2
- export interface CardPropsBase<T> {
3
- /**
4
- * Large title above children.
5
- */
6
- title?: string;
7
- /**
8
- * Icon to the top-left of the title. Can be a ReactNode or a string equal to an image source.
9
- */
10
- icon?: ReactNode;
11
- /**
12
- * If provided, will render an image to the top of the card.
13
- */
14
- image?: string;
15
- /**
16
- * Type of element to be rendered.
17
- */
18
- as?: T;
19
- /**
20
- * If provided, will render as an anchor element.
21
- */
22
- href?: string;
23
- /**
24
- * Ref of the element to be rendered.
25
- */
26
- mRef?: Ref<T | undefined>;
27
- }
28
- /**
29
- * Props for the `Card` component
30
- * @typeParam T - Type of the Element rendered by the card.
31
- */
32
- export type CardProps<T extends ElementType> = CardPropsBase<T> & Omit<ComponentPropsWithoutRef<T>, keyof CardPropsBase<T>>;
33
- export declare function Card<T extends ElementType = 'div'>({ title, icon, image, className, children, as, mRef, ...props }: CardProps<T>): JSX.Element;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare function CardGroup({ children, cols }: {
3
- children: ReactNode;
4
- cols?: 1 | 2 | 3 | 4;
5
- }): JSX.Element;