@stoplight/ui-kit 3.0.0-beta.4 → 3.0.0-beta.40

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 (164) hide show
  1. package/AutoSizer/index.js +3 -2
  2. package/AutoSizer/index.js.map +1 -1
  3. package/CodeEditor/index.d.ts +2 -0
  4. package/CodeEditor/index.js +7 -5
  5. package/CodeEditor/index.js.map +1 -1
  6. package/CodeEditor/utils/highlightCode.js +2 -1
  7. package/CodeEditor/utils/highlightCode.js.map +1 -1
  8. package/CodeViewer/components/BlockCodeViewer/BlockCodeViewer.d.ts +8 -0
  9. package/CodeViewer/components/BlockCodeViewer/BlockCodeViewer.js +51 -0
  10. package/CodeViewer/components/BlockCodeViewer/BlockCodeViewer.js.map +1 -0
  11. package/CodeViewer/components/BlockCodeViewer/ObservableSet.d.ts +5 -0
  12. package/CodeViewer/components/BlockCodeViewer/ObservableSet.js +24 -0
  13. package/CodeViewer/components/BlockCodeViewer/ObservableSet.js.map +1 -0
  14. package/CodeViewer/components/BlockCodeViewer/SingleCodeBlock.d.ts +12 -0
  15. package/CodeViewer/components/BlockCodeViewer/SingleCodeBlock.js +59 -0
  16. package/CodeViewer/components/BlockCodeViewer/SingleCodeBlock.js.map +1 -0
  17. package/CodeViewer/components/BlockCodeViewer/consts.d.ts +1 -0
  18. package/{TableOfContents/types.js → CodeViewer/components/BlockCodeViewer/consts.js} +2 -1
  19. package/CodeViewer/components/BlockCodeViewer/consts.js.map +1 -0
  20. package/CodeViewer/components/BlockCodeViewer/hooks/useSlicedBlocks.d.ts +7 -0
  21. package/CodeViewer/components/BlockCodeViewer/hooks/useSlicedBlocks.js +29 -0
  22. package/CodeViewer/components/BlockCodeViewer/hooks/useSlicedBlocks.js.map +1 -0
  23. package/CodeViewer/components/BlockCodeViewer/index.d.ts +2 -0
  24. package/CodeViewer/components/BlockCodeViewer/index.js +5 -0
  25. package/CodeViewer/components/BlockCodeViewer/index.js.map +1 -0
  26. package/CodeViewer/components/InlineCodeViewer.d.ts +5 -0
  27. package/CodeViewer/components/InlineCodeViewer.js +11 -0
  28. package/CodeViewer/components/InlineCodeViewer.js.map +1 -0
  29. package/CodeViewer/index.d.ts +1 -2
  30. package/CodeViewer/index.js +7 -16
  31. package/CodeViewer/index.js.map +1 -1
  32. package/CodeViewer/utils/astToReact.d.ts +3 -0
  33. package/CodeViewer/utils/astToReact.js +16 -0
  34. package/CodeViewer/utils/astToReact.js.map +1 -0
  35. package/CodeViewer/utils/lineNumberify.d.ts +2 -0
  36. package/CodeViewer/utils/lineNumberify.js +94 -0
  37. package/CodeViewer/utils/lineNumberify.js.map +1 -0
  38. package/CodeViewer/utils/parseCode.d.ts +2 -0
  39. package/CodeViewer/utils/parseCode.js +58 -0
  40. package/CodeViewer/utils/parseCode.js.map +1 -0
  41. package/Dropdown/Dropdown.js +2 -2
  42. package/Dropdown/Dropdown.js.map +1 -1
  43. package/FAIcon/index.js +3 -2
  44. package/FAIcon/index.js.map +1 -1
  45. package/FormButton/index.js +1 -1
  46. package/FormButton/index.js.map +1 -1
  47. package/FormError/index.js +2 -1
  48. package/FormError/index.js.map +1 -1
  49. package/FormInput/index.js +1 -1
  50. package/FormInput/index.js.map +1 -1
  51. package/ScrollContainer/index.js +3 -3
  52. package/ScrollContainer/index.js.map +1 -1
  53. package/ScrollList/index.js +12 -6
  54. package/ScrollList/index.js.map +1 -1
  55. package/SecretInput/index.js +1 -1
  56. package/SecretInput/index.js.map +1 -1
  57. package/SimpleTabs/Tab.js +3 -3
  58. package/SimpleTabs/Tab.js.map +1 -1
  59. package/SimpleTabs/TabList.js +3 -3
  60. package/SimpleTabs/TabList.js.map +1 -1
  61. package/SimpleTabs/TabPanel.js +3 -3
  62. package/SimpleTabs/TabPanel.js.map +1 -1
  63. package/TableOfContents/index.d.ts +61 -10
  64. package/TableOfContents/index.js +171 -62
  65. package/TableOfContents/index.js.map +1 -1
  66. package/ThemeContainer/index.js +4 -3
  67. package/ThemeContainer/index.js.map +1 -1
  68. package/_hooks/useIsMobile.js +2 -1
  69. package/_hooks/useIsMobile.js.map +1 -1
  70. package/_hooks/useValidateSchema.js +2 -1
  71. package/_hooks/useValidateSchema.js.map +1 -1
  72. package/classes.d.ts +3 -1
  73. package/classes.js +1 -1
  74. package/classes.js.map +1 -1
  75. package/index.d.ts +1 -0
  76. package/index.js +1 -0
  77. package/index.js.map +1 -1
  78. package/package.json +10 -8
  79. package/styles/_blueprint.scss +4 -4
  80. package/styles/_components.scss +3 -0
  81. package/styles/blueprint/_variables.scss +3 -1
  82. package/styles/blueprint/select/blueprint-select.scss +8 -0
  83. package/styles/blueprint/select/components/_index.scss +6 -0
  84. package/styles/blueprint/select/components/omnibar/_omnibar.scss +63 -0
  85. package/styles/blueprint/select/components/select/_multi-select.scss +17 -0
  86. package/styles/blueprint/select/components/select/_select.scss +31 -0
  87. package/styles/blueprint/src/_reset.scss +43 -0
  88. package/styles/blueprint/src/_typography.scss +459 -0
  89. package/styles/blueprint/src/accessibility/_focus-states.scss +17 -0
  90. package/styles/blueprint/src/blueprint-hi-contrast.scss +22 -0
  91. package/styles/blueprint/src/blueprint.scss +16 -0
  92. package/styles/blueprint/src/common/_color-aliases.scss +43 -0
  93. package/styles/blueprint/src/common/_colors.scss +116 -0
  94. package/styles/blueprint/src/common/_flex.scss +49 -0
  95. package/styles/blueprint/src/common/_mixins.scss +128 -0
  96. package/styles/blueprint/src/common/_react-transition.scss +117 -0
  97. package/styles/blueprint/src/common/_variables.scss +131 -0
  98. package/styles/blueprint/src/components/_index.scss +38 -0
  99. package/styles/blueprint/src/components/alert/_alert.scss +33 -0
  100. package/styles/blueprint/src/components/breadcrumbs/_breadcrumbs.scss +142 -0
  101. package/styles/blueprint/src/components/button/_button-group.scss +240 -0
  102. package/styles/blueprint/src/components/button/_button.scss +206 -0
  103. package/styles/blueprint/src/components/button/_common.scss +507 -0
  104. package/styles/blueprint/src/components/callout/_callout.scss +99 -0
  105. package/styles/blueprint/src/components/card/_card.scss +91 -0
  106. package/styles/blueprint/src/components/collapse/_collapse.scss +20 -0
  107. package/styles/blueprint/src/components/context-menu/_context-menu.scss +10 -0
  108. package/styles/blueprint/src/components/dialog/_dialog.scss +146 -0
  109. package/styles/blueprint/src/components/divider/_divider.scss +19 -0
  110. package/styles/blueprint/src/components/drawer/_drawer.scss +232 -0
  111. package/styles/blueprint/src/components/editable-text/_editable-text.scss +156 -0
  112. package/styles/blueprint/src/components/forms/_common.scss +239 -0
  113. package/styles/blueprint/src/components/forms/_control-group.scss +276 -0
  114. package/styles/blueprint/src/components/forms/_controls.scss +526 -0
  115. package/styles/blueprint/src/components/forms/_file-input.scss +155 -0
  116. package/styles/blueprint/src/components/forms/_form-group.scss +111 -0
  117. package/styles/blueprint/src/components/forms/_index.scss +20 -0
  118. package/styles/blueprint/src/components/forms/_input-group.scss +247 -0
  119. package/styles/blueprint/src/components/forms/_input.scss +115 -0
  120. package/styles/blueprint/src/components/forms/_label.scss +114 -0
  121. package/styles/blueprint/src/components/forms/_numeric-input.scss +40 -0
  122. package/styles/blueprint/src/components/hotkeys/_hotkeys.scss +50 -0
  123. package/styles/blueprint/src/components/html-select/_common.scss +52 -0
  124. package/styles/blueprint/src/components/html-select/_html-select.scss +104 -0
  125. package/styles/blueprint/src/components/html-table/_html-table.scss +208 -0
  126. package/styles/blueprint/src/components/icon/_icon.scss +79 -0
  127. package/styles/blueprint/src/components/menu/_common.scss +172 -0
  128. package/styles/blueprint/src/components/menu/_menu.scss +197 -0
  129. package/styles/blueprint/src/components/menu/_submenu.scss +41 -0
  130. package/styles/blueprint/src/components/navbar/_navbar.scss +117 -0
  131. package/styles/blueprint/src/components/non-ideal-state/_non-ideal-state.scss +43 -0
  132. package/styles/blueprint/src/components/overflow-list/_overflow-list.scss +13 -0
  133. package/styles/blueprint/src/components/overlay/_overlay.scss +94 -0
  134. package/styles/blueprint/src/components/panel-stack/_panel-stack.scss +103 -0
  135. package/styles/blueprint/src/components/popover/_common.scss +171 -0
  136. package/styles/blueprint/src/components/popover/_popover.scss +127 -0
  137. package/styles/blueprint/src/components/portal/_portal.scss +15 -0
  138. package/styles/blueprint/src/components/progress-bar/_common.scss +9 -0
  139. package/styles/blueprint/src/components/progress-bar/_progress-bar.scss +98 -0
  140. package/styles/blueprint/src/components/skeleton/_common.scss +8 -0
  141. package/styles/blueprint/src/components/skeleton/_skeleton.scss +64 -0
  142. package/styles/blueprint/src/components/slider/_common.scss +48 -0
  143. package/styles/blueprint/src/components/slider/_slider.scss +216 -0
  144. package/styles/blueprint/src/components/spinner/_spinner.scss +65 -0
  145. package/styles/blueprint/src/components/tabs/_tabs.scss +199 -0
  146. package/styles/blueprint/src/components/tag/_common.scss +202 -0
  147. package/styles/blueprint/src/components/tag/_tag.scss +75 -0
  148. package/styles/blueprint/src/components/tag-input/_tag-input.scss +165 -0
  149. package/styles/blueprint/src/components/toast/_toast.scss +203 -0
  150. package/styles/blueprint/src/components/tooltip/_common.scss +11 -0
  151. package/styles/blueprint/src/components/tooltip/_tooltip.scss +61 -0
  152. package/styles/blueprint/src/components/tree/_tree.scss +194 -0
  153. package/styles/components/Code/_base.scss +104 -25
  154. package/styles/components/TableOfContents/_base.scss +50 -43
  155. package/styles/tailwind/_base.scss +15423 -10455
  156. package/styles/tailwind/tailwind.config.js +1 -0
  157. package/CodeViewer/types.d.ts +0 -9
  158. package/CodeViewer/types.js +0 -3
  159. package/CodeViewer/types.js.map +0 -1
  160. package/TableOfContents/types.d.ts +0 -14
  161. package/TableOfContents/types.js.map +0 -1
  162. package/withErrorBoundary.d.ts +0 -104
  163. package/withErrorBoundary.js +0 -51
  164. package/withErrorBoundary.js.map +0 -1
@@ -68,6 +68,7 @@ module.exports = {
68
68
  '48': '12rem',
69
69
  '56': '14rem',
70
70
  '64': '16rem',
71
+ '72': '18rem',
71
72
  '80': '20rem',
72
73
  '96': '24rem',
73
74
  '128': '32rem',
@@ -1,9 +0,0 @@
1
- import { ReactHTML } from 'react';
2
- import { Dictionary } from '../types';
3
- export declare type ASTNode = Partial<{
4
- type: string;
5
- tagName: keyof ReactHTML;
6
- children?: ASTNode[];
7
- properties: Dictionary<any>;
8
- value?: string;
9
- }>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/CodeViewer/types.ts"],"names":[],"mappings":""}
@@ -1,14 +0,0 @@
1
- import { IconName } from '@blueprintjs/icons';
2
- export interface IContentsNode {
3
- name: string;
4
- depth: number;
5
- isActive?: boolean;
6
- href?: string;
7
- meta?: string;
8
- type?: 'divider' | 'group' | 'item';
9
- icon?: IconName;
10
- }
11
- export declare type IconMapType = 'group' | 'divider' | 'item';
12
- export declare type NodeIconMapping = {
13
- [type in IconMapType]?: IconName;
14
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/TableOfContents/types.ts"],"names":[],"mappings":""}
@@ -1,104 +0,0 @@
1
- import * as React from 'react';
2
- export declare type FallbackComponent = React.ComponentType<{
3
- error: Error | null;
4
- }>;
5
- export interface IErrorBoundary {
6
- FallbackComponent?: FallbackComponent;
7
- }
8
- export declare function withErrorBoundary<T extends IErrorBoundary>(WrappedComponent: React.ComponentType<Omit<T, 'FallbackComponent'>>, props?: Array<keyof T>, displayName?: string): {
9
- new (props: Readonly<T>): {
10
- state: {
11
- error: null;
12
- };
13
- componentDidUpdate(prevProps: Readonly<T>): void;
14
- render(): JSX.Element;
15
- context: any;
16
- setState<K extends "error">(state: {
17
- error: Error | null;
18
- } | ((prevState: Readonly<{
19
- error: Error | null;
20
- }>, props: Readonly<T>) => {
21
- error: Error | null;
22
- } | Pick<{
23
- error: Error | null;
24
- }, K> | null) | Pick<{
25
- error: Error | null;
26
- }, K> | null, callback?: (() => void) | undefined): void;
27
- forceUpdate(callback?: (() => void) | undefined): void;
28
- readonly props: Readonly<T> & Readonly<{
29
- children?: React.ReactNode;
30
- }>;
31
- refs: {
32
- [key: string]: React.ReactInstance;
33
- };
34
- componentDidMount?(): void;
35
- shouldComponentUpdate?(nextProps: Readonly<T>, nextState: Readonly<{
36
- error: Error | null;
37
- }>, nextContext: any): boolean;
38
- componentWillUnmount?(): void;
39
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
40
- getSnapshotBeforeUpdate?(prevProps: Readonly<T>, prevState: Readonly<{
41
- error: Error | null;
42
- }>): any;
43
- componentWillMount?(): void;
44
- UNSAFE_componentWillMount?(): void;
45
- componentWillReceiveProps?(nextProps: Readonly<T>, nextContext: any): void;
46
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<T>, nextContext: any): void;
47
- componentWillUpdate?(nextProps: Readonly<T>, nextState: Readonly<{
48
- error: Error | null;
49
- }>, nextContext: any): void;
50
- UNSAFE_componentWillUpdate?(nextProps: Readonly<T>, nextState: Readonly<{
51
- error: Error | null;
52
- }>, nextContext: any): void;
53
- };
54
- new (props: T, context?: any): {
55
- state: {
56
- error: null;
57
- };
58
- componentDidUpdate(prevProps: Readonly<T>): void;
59
- render(): JSX.Element;
60
- context: any;
61
- setState<K extends "error">(state: {
62
- error: Error | null;
63
- } | ((prevState: Readonly<{
64
- error: Error | null;
65
- }>, props: Readonly<T>) => {
66
- error: Error | null;
67
- } | Pick<{
68
- error: Error | null;
69
- }, K> | null) | Pick<{
70
- error: Error | null;
71
- }, K> | null, callback?: (() => void) | undefined): void;
72
- forceUpdate(callback?: (() => void) | undefined): void;
73
- readonly props: Readonly<T> & Readonly<{
74
- children?: React.ReactNode;
75
- }>;
76
- refs: {
77
- [key: string]: React.ReactInstance;
78
- };
79
- componentDidMount?(): void;
80
- shouldComponentUpdate?(nextProps: Readonly<T>, nextState: Readonly<{
81
- error: Error | null;
82
- }>, nextContext: any): boolean;
83
- componentWillUnmount?(): void;
84
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
85
- getSnapshotBeforeUpdate?(prevProps: Readonly<T>, prevState: Readonly<{
86
- error: Error | null;
87
- }>): any;
88
- componentWillMount?(): void;
89
- UNSAFE_componentWillMount?(): void;
90
- componentWillReceiveProps?(nextProps: Readonly<T>, nextContext: any): void;
91
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<T>, nextContext: any): void;
92
- componentWillUpdate?(nextProps: Readonly<T>, nextState: Readonly<{
93
- error: Error | null;
94
- }>, nextContext: any): void;
95
- UNSAFE_componentWillUpdate?(nextProps: Readonly<T>, nextState: Readonly<{
96
- error: Error | null;
97
- }>, nextContext: any): void;
98
- };
99
- displayName: string | undefined;
100
- getDerivedStateFromError(error: Error): {
101
- error: Error;
102
- };
103
- contextType?: React.Context<any> | undefined;
104
- };
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const lodash_1 = require("lodash");
5
- const React = require("react");
6
- const FallbackComponent = ({ error }) => {
7
- return (React.createElement("div", { className: "p-4" },
8
- React.createElement("b", null, "Error"),
9
- error && `: ${error.message}`));
10
- };
11
- function withErrorBoundary(WrappedComponent, props, displayName) {
12
- var _a;
13
- return _a = class ErrorBoundary extends React.PureComponent {
14
- constructor() {
15
- super(...arguments);
16
- this.state = {
17
- error: null,
18
- };
19
- }
20
- componentDidUpdate(prevProps) {
21
- if (this.state.error !== null) {
22
- if (!props || !props.length) {
23
- if (!lodash_1.isEqual(this.props, prevProps)) {
24
- this.setState({ error: null });
25
- }
26
- }
27
- else {
28
- for (const prop of props) {
29
- if (!lodash_1.isEqual(this.props[prop], prevProps[prop])) {
30
- this.setState({ error: null });
31
- }
32
- }
33
- }
34
- }
35
- }
36
- static getDerivedStateFromError(error) {
37
- return { error };
38
- }
39
- render() {
40
- const _a = this.props, { FallbackComponent: Fallback = FallbackComponent } = _a, props = tslib_1.__rest(_a, ["FallbackComponent"]);
41
- if (this.state.error) {
42
- return React.createElement(Fallback, { error: this.state.error });
43
- }
44
- return React.createElement(WrappedComponent, Object.assign({}, props));
45
- }
46
- },
47
- _a.displayName = displayName,
48
- _a;
49
- }
50
- exports.withErrorBoundary = withErrorBoundary;
51
- //# sourceMappingURL=withErrorBoundary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withErrorBoundary.js","sourceRoot":"","sources":["../src/withErrorBoundary.tsx"],"names":[],"mappings":";;;AAAA,mCAAiC;AACjC,+BAA+B;AAE/B,MAAM,iBAAiB,GAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzD,OAAO,CACL,6BAAK,SAAS,EAAC,KAAK;QAClB,uCAAY;QACX,KAAK,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAC1B,CACP,CAAC;AACJ,CAAC,CAAC;AAQF,SAAgB,iBAAiB,CAC/B,gBAAmE,EACnE,KAAsB,EACtB,WAAoB;;IAEpB,YAAO,MAAM,aAAc,SAAQ,KAAK,CAAC,aAAyC;YAA3E;;gBACE,UAAK,GAAG;oBACb,KAAK,EAAE,IAAI;iBACZ,CAAC;YAiCJ,CAAC;YA7BQ,kBAAkB,CAAC,SAAsB;gBAC9C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,EAAE;oBAC7B,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;wBAC3B,IAAI,CAAC,gBAAO,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE;4BACnC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;yBAChC;qBACF;yBAAM;wBACL,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;4BACxB,IAAI,CAAC,gBAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE;gCAC/C,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;6BAChC;yBACF;qBACF;iBACF;YACH,CAAC;YAGM,MAAM,CAAC,wBAAwB,CAAC,KAAY;gBACjD,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,CAAC;YAEM,MAAM;gBACX,MAAM,eAA0E,EAA1E,EAAE,iBAAiB,EAAE,QAAQ,GAAG,iBAAiB,OAAyB,EAAvB,iDAAuB,CAAC;gBACjF,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;oBACpB,OAAO,oBAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI,CAAC;iBAC9C;gBAED,OAAO,oBAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAC;YACzC,CAAC;SACF;QA/Be,cAAW,GAAG,WAAY;WA+BxC;AACJ,CAAC;AA1CD,8CA0CC"}