@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.
- package/AutoSizer/index.js +3 -2
- package/AutoSizer/index.js.map +1 -1
- package/CodeEditor/index.d.ts +2 -0
- package/CodeEditor/index.js +7 -5
- package/CodeEditor/index.js.map +1 -1
- package/CodeEditor/utils/highlightCode.js +2 -1
- package/CodeEditor/utils/highlightCode.js.map +1 -1
- package/CodeViewer/components/BlockCodeViewer/BlockCodeViewer.d.ts +8 -0
- package/CodeViewer/components/BlockCodeViewer/BlockCodeViewer.js +51 -0
- package/CodeViewer/components/BlockCodeViewer/BlockCodeViewer.js.map +1 -0
- package/CodeViewer/components/BlockCodeViewer/ObservableSet.d.ts +5 -0
- package/CodeViewer/components/BlockCodeViewer/ObservableSet.js +24 -0
- package/CodeViewer/components/BlockCodeViewer/ObservableSet.js.map +1 -0
- package/CodeViewer/components/BlockCodeViewer/SingleCodeBlock.d.ts +12 -0
- package/CodeViewer/components/BlockCodeViewer/SingleCodeBlock.js +59 -0
- package/CodeViewer/components/BlockCodeViewer/SingleCodeBlock.js.map +1 -0
- package/CodeViewer/components/BlockCodeViewer/consts.d.ts +1 -0
- package/{TableOfContents/types.js → CodeViewer/components/BlockCodeViewer/consts.js} +2 -1
- package/CodeViewer/components/BlockCodeViewer/consts.js.map +1 -0
- package/CodeViewer/components/BlockCodeViewer/hooks/useSlicedBlocks.d.ts +7 -0
- package/CodeViewer/components/BlockCodeViewer/hooks/useSlicedBlocks.js +29 -0
- package/CodeViewer/components/BlockCodeViewer/hooks/useSlicedBlocks.js.map +1 -0
- package/CodeViewer/components/BlockCodeViewer/index.d.ts +2 -0
- package/CodeViewer/components/BlockCodeViewer/index.js +5 -0
- package/CodeViewer/components/BlockCodeViewer/index.js.map +1 -0
- package/CodeViewer/components/InlineCodeViewer.d.ts +5 -0
- package/CodeViewer/components/InlineCodeViewer.js +11 -0
- package/CodeViewer/components/InlineCodeViewer.js.map +1 -0
- package/CodeViewer/index.d.ts +1 -2
- package/CodeViewer/index.js +7 -16
- package/CodeViewer/index.js.map +1 -1
- package/CodeViewer/utils/astToReact.d.ts +3 -0
- package/CodeViewer/utils/astToReact.js +16 -0
- package/CodeViewer/utils/astToReact.js.map +1 -0
- package/CodeViewer/utils/lineNumberify.d.ts +2 -0
- package/CodeViewer/utils/lineNumberify.js +94 -0
- package/CodeViewer/utils/lineNumberify.js.map +1 -0
- package/CodeViewer/utils/parseCode.d.ts +2 -0
- package/CodeViewer/utils/parseCode.js +58 -0
- package/CodeViewer/utils/parseCode.js.map +1 -0
- package/Dropdown/Dropdown.js +2 -2
- package/Dropdown/Dropdown.js.map +1 -1
- package/FAIcon/index.js +3 -2
- package/FAIcon/index.js.map +1 -1
- package/FormButton/index.js +1 -1
- package/FormButton/index.js.map +1 -1
- package/FormError/index.js +2 -1
- package/FormError/index.js.map +1 -1
- package/FormInput/index.js +1 -1
- package/FormInput/index.js.map +1 -1
- package/ScrollContainer/index.js +3 -3
- package/ScrollContainer/index.js.map +1 -1
- package/ScrollList/index.js +12 -6
- package/ScrollList/index.js.map +1 -1
- package/SecretInput/index.js +1 -1
- package/SecretInput/index.js.map +1 -1
- package/SimpleTabs/Tab.js +3 -3
- package/SimpleTabs/Tab.js.map +1 -1
- package/SimpleTabs/TabList.js +3 -3
- package/SimpleTabs/TabList.js.map +1 -1
- package/SimpleTabs/TabPanel.js +3 -3
- package/SimpleTabs/TabPanel.js.map +1 -1
- package/TableOfContents/index.d.ts +61 -10
- package/TableOfContents/index.js +171 -62
- package/TableOfContents/index.js.map +1 -1
- package/ThemeContainer/index.js +4 -3
- package/ThemeContainer/index.js.map +1 -1
- package/_hooks/useIsMobile.js +2 -1
- package/_hooks/useIsMobile.js.map +1 -1
- package/_hooks/useValidateSchema.js +2 -1
- package/_hooks/useValidateSchema.js.map +1 -1
- package/classes.d.ts +3 -1
- package/classes.js +1 -1
- package/classes.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +10 -8
- package/styles/_blueprint.scss +4 -4
- package/styles/_components.scss +3 -0
- package/styles/blueprint/_variables.scss +3 -1
- package/styles/blueprint/select/blueprint-select.scss +8 -0
- package/styles/blueprint/select/components/_index.scss +6 -0
- package/styles/blueprint/select/components/omnibar/_omnibar.scss +63 -0
- package/styles/blueprint/select/components/select/_multi-select.scss +17 -0
- package/styles/blueprint/select/components/select/_select.scss +31 -0
- package/styles/blueprint/src/_reset.scss +43 -0
- package/styles/blueprint/src/_typography.scss +459 -0
- package/styles/blueprint/src/accessibility/_focus-states.scss +17 -0
- package/styles/blueprint/src/blueprint-hi-contrast.scss +22 -0
- package/styles/blueprint/src/blueprint.scss +16 -0
- package/styles/blueprint/src/common/_color-aliases.scss +43 -0
- package/styles/blueprint/src/common/_colors.scss +116 -0
- package/styles/blueprint/src/common/_flex.scss +49 -0
- package/styles/blueprint/src/common/_mixins.scss +128 -0
- package/styles/blueprint/src/common/_react-transition.scss +117 -0
- package/styles/blueprint/src/common/_variables.scss +131 -0
- package/styles/blueprint/src/components/_index.scss +38 -0
- package/styles/blueprint/src/components/alert/_alert.scss +33 -0
- package/styles/blueprint/src/components/breadcrumbs/_breadcrumbs.scss +142 -0
- package/styles/blueprint/src/components/button/_button-group.scss +240 -0
- package/styles/blueprint/src/components/button/_button.scss +206 -0
- package/styles/blueprint/src/components/button/_common.scss +507 -0
- package/styles/blueprint/src/components/callout/_callout.scss +99 -0
- package/styles/blueprint/src/components/card/_card.scss +91 -0
- package/styles/blueprint/src/components/collapse/_collapse.scss +20 -0
- package/styles/blueprint/src/components/context-menu/_context-menu.scss +10 -0
- package/styles/blueprint/src/components/dialog/_dialog.scss +146 -0
- package/styles/blueprint/src/components/divider/_divider.scss +19 -0
- package/styles/blueprint/src/components/drawer/_drawer.scss +232 -0
- package/styles/blueprint/src/components/editable-text/_editable-text.scss +156 -0
- package/styles/blueprint/src/components/forms/_common.scss +239 -0
- package/styles/blueprint/src/components/forms/_control-group.scss +276 -0
- package/styles/blueprint/src/components/forms/_controls.scss +526 -0
- package/styles/blueprint/src/components/forms/_file-input.scss +155 -0
- package/styles/blueprint/src/components/forms/_form-group.scss +111 -0
- package/styles/blueprint/src/components/forms/_index.scss +20 -0
- package/styles/blueprint/src/components/forms/_input-group.scss +247 -0
- package/styles/blueprint/src/components/forms/_input.scss +115 -0
- package/styles/blueprint/src/components/forms/_label.scss +114 -0
- package/styles/blueprint/src/components/forms/_numeric-input.scss +40 -0
- package/styles/blueprint/src/components/hotkeys/_hotkeys.scss +50 -0
- package/styles/blueprint/src/components/html-select/_common.scss +52 -0
- package/styles/blueprint/src/components/html-select/_html-select.scss +104 -0
- package/styles/blueprint/src/components/html-table/_html-table.scss +208 -0
- package/styles/blueprint/src/components/icon/_icon.scss +79 -0
- package/styles/blueprint/src/components/menu/_common.scss +172 -0
- package/styles/blueprint/src/components/menu/_menu.scss +197 -0
- package/styles/blueprint/src/components/menu/_submenu.scss +41 -0
- package/styles/blueprint/src/components/navbar/_navbar.scss +117 -0
- package/styles/blueprint/src/components/non-ideal-state/_non-ideal-state.scss +43 -0
- package/styles/blueprint/src/components/overflow-list/_overflow-list.scss +13 -0
- package/styles/blueprint/src/components/overlay/_overlay.scss +94 -0
- package/styles/blueprint/src/components/panel-stack/_panel-stack.scss +103 -0
- package/styles/blueprint/src/components/popover/_common.scss +171 -0
- package/styles/blueprint/src/components/popover/_popover.scss +127 -0
- package/styles/blueprint/src/components/portal/_portal.scss +15 -0
- package/styles/blueprint/src/components/progress-bar/_common.scss +9 -0
- package/styles/blueprint/src/components/progress-bar/_progress-bar.scss +98 -0
- package/styles/blueprint/src/components/skeleton/_common.scss +8 -0
- package/styles/blueprint/src/components/skeleton/_skeleton.scss +64 -0
- package/styles/blueprint/src/components/slider/_common.scss +48 -0
- package/styles/blueprint/src/components/slider/_slider.scss +216 -0
- package/styles/blueprint/src/components/spinner/_spinner.scss +65 -0
- package/styles/blueprint/src/components/tabs/_tabs.scss +199 -0
- package/styles/blueprint/src/components/tag/_common.scss +202 -0
- package/styles/blueprint/src/components/tag/_tag.scss +75 -0
- package/styles/blueprint/src/components/tag-input/_tag-input.scss +165 -0
- package/styles/blueprint/src/components/toast/_toast.scss +203 -0
- package/styles/blueprint/src/components/tooltip/_common.scss +11 -0
- package/styles/blueprint/src/components/tooltip/_tooltip.scss +61 -0
- package/styles/blueprint/src/components/tree/_tree.scss +194 -0
- package/styles/components/Code/_base.scss +104 -25
- package/styles/components/TableOfContents/_base.scss +50 -43
- package/styles/tailwind/_base.scss +15423 -10455
- package/styles/tailwind/tailwind.config.js +1 -0
- package/CodeViewer/types.d.ts +0 -9
- package/CodeViewer/types.js +0 -3
- package/CodeViewer/types.js.map +0 -1
- package/TableOfContents/types.d.ts +0 -14
- package/TableOfContents/types.js.map +0 -1
- package/withErrorBoundary.d.ts +0 -104
- package/withErrorBoundary.js +0 -51
- package/withErrorBoundary.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
@import 'theme-light';
|
|
2
2
|
@import 'theme-dark';
|
|
3
|
+
@import '../../blueprint/colors.scss';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
$line-number-char-width: 10px;
|
|
6
|
+
$line-padding-left: 10px;
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
@keyframes set-color {
|
|
9
|
+
0% {
|
|
10
|
+
color: inherit;
|
|
10
11
|
}
|
|
12
|
+
}
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
}
|
|
14
|
+
|
|
15
|
+
.CodeEditor,
|
|
16
|
+
.CodeViewer {
|
|
17
|
+
@include lightCodeTheme;
|
|
18
18
|
|
|
19
19
|
font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace;
|
|
20
20
|
background: var(--code-bg);
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
hyphens: none;
|
|
25
25
|
direction: ltr;
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
data
|
|
27
|
+
.#{$ns}-dark &,
|
|
28
|
+
[data-theme="dark"] & {
|
|
29
29
|
@include darkCodeTheme;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -34,23 +34,37 @@
|
|
|
34
34
|
background: var(--code-selection-bg);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
left: 5px;
|
|
42
|
-
opacity: 0.4;
|
|
43
|
-
user-select: none;
|
|
37
|
+
&--inline {
|
|
38
|
+
margin: 0 2px;
|
|
39
|
+
border-radius: 2px;
|
|
40
|
+
}
|
|
44
41
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
&--line-numbers {
|
|
43
|
+
.line-number {
|
|
44
|
+
position: relative;
|
|
45
|
+
display: block;
|
|
46
|
+
|
|
47
|
+
&::before {
|
|
48
|
+
display: inline-block;
|
|
49
|
+
position: absolute;
|
|
50
|
+
left: 0;
|
|
51
|
+
opacity: 0.4;
|
|
52
|
+
user-select: none;
|
|
53
|
+
text-align: right;
|
|
54
|
+
padding-right: $line-number-char-width;
|
|
55
|
+
}
|
|
49
56
|
}
|
|
50
57
|
}
|
|
51
58
|
|
|
52
|
-
|
|
59
|
+
&--error {
|
|
60
|
+
outline: 1px solid $pt-intent-danger;
|
|
61
|
+
}
|
|
53
62
|
|
|
63
|
+
&--warning {
|
|
64
|
+
outline: 1px solid $pt-intent-warning;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Tokens
|
|
54
68
|
.token {
|
|
55
69
|
&.important,
|
|
56
70
|
&.bold {
|
|
@@ -171,3 +185,68 @@
|
|
|
171
185
|
}
|
|
172
186
|
}
|
|
173
187
|
}
|
|
188
|
+
|
|
189
|
+
.CodeEditor {
|
|
190
|
+
&--line-numbers {
|
|
191
|
+
textarea {
|
|
192
|
+
outline: none;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@for $i from 1 through 6 {
|
|
196
|
+
&--#{$i} {
|
|
197
|
+
pre {
|
|
198
|
+
padding-left: $line-number-char-width * $i + $line-number-char-width + $line-padding-left !important;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
textarea {
|
|
202
|
+
// Need to use margin here since CodeEditor supports padding: https://github.com/stoplightio/ui-kit/blob/fd1334753a22d527b803b8554bc51761c348d319/src/CodeEditor/index.tsx#L13
|
|
203
|
+
margin-left: $line-number-char-width * $i + $line-number-char-width + $line-padding-left !important;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.line-number {
|
|
207
|
+
margin-left: -$line-number-char-width * $i - $line-number-char-width;
|
|
208
|
+
|
|
209
|
+
&::before {
|
|
210
|
+
width: $line-number-char-width * $i + $line-number-char-width;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.line-number {
|
|
218
|
+
&::before {
|
|
219
|
+
counter-increment: line;
|
|
220
|
+
content: counter(line);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.CodeViewer {
|
|
226
|
+
.token {
|
|
227
|
+
animation: set-color 0.3s ease-out;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&--line-numbers {
|
|
231
|
+
@for $i from 1 through 6 {
|
|
232
|
+
&--#{$i} {
|
|
233
|
+
padding-left: $line-number-char-width * $i + $line-number-char-width + $line-padding-left !important;
|
|
234
|
+
|
|
235
|
+
.line-number {
|
|
236
|
+
margin-left: -$line-number-char-width * $i - $line-number-char-width;
|
|
237
|
+
padding-left: $line-number-char-width * $i + $line-number-char-width;
|
|
238
|
+
|
|
239
|
+
&::before {
|
|
240
|
+
width: $line-number-char-width * $i + $line-number-char-width;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.line-number {
|
|
248
|
+
&::before {
|
|
249
|
+
content: attr(data-node-index);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
@@ -1,43 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
.TableOfContentsItem {
|
|
2
|
+
&__name {
|
|
3
|
+
word-break: break-all;
|
|
4
|
+
line-height: 1.5;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
&__icon {
|
|
8
|
+
color: #9daab6;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&__inner {
|
|
12
|
+
padding: 6px 16px 6px;
|
|
13
|
+
margin-top: 1px;
|
|
14
|
+
margin-bottom: 1px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
&:hover {
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&--active {
|
|
24
|
+
&--child {
|
|
25
|
+
border-left: none;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--child {
|
|
30
|
+
.TableOfContentsItem__inner {
|
|
31
|
+
padding-left: 15px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&--divider {
|
|
36
|
+
&:first-child {
|
|
37
|
+
margin-top: -5px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:not(:first-child) {
|
|
41
|
+
margin-top: 12px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.TableOfContentsItem__name {
|
|
45
|
+
line-height: 1.2;
|
|
46
|
+
text-transform: uppercase;
|
|
47
|
+
font-size: 12px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|