@redocly/theme 0.16.0 → 0.17.1
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/lib/components/CodeBlock/CodeBlock.d.ts +29 -1
- package/lib/components/CodeBlock/CodeBlock.js +56 -94
- package/lib/components/CodeBlock/CodeBlockContainer.d.ts +3 -0
- package/lib/components/CodeBlock/CodeBlockContainer.js +120 -0
- package/lib/components/CodeBlock/CodeBlockControlButton.d.ts +5 -0
- package/lib/components/CodeBlock/CodeBlockControlButton.js +63 -0
- package/lib/components/CodeBlock/CodeBlockControls.d.ts +33 -0
- package/lib/components/CodeBlock/CodeBlockControls.js +56 -0
- package/lib/components/CodeBlock/index.d.ts +3 -0
- package/lib/components/CodeBlock/index.js +3 -0
- package/lib/components/CopyButton/CopyButton.d.ts +12 -3
- package/lib/components/CopyButton/CopyButton.js +30 -26
- package/lib/components/CopyButton/index.d.ts +0 -1
- package/lib/components/CopyButton/index.js +0 -1
- package/lib/components/Feedback/useReportDialog.d.ts +12 -6
- package/lib/components/Feedback/useReportDialog.js +13 -5
- package/lib/components/JsonViewer/JsonViewer.d.ts +0 -1
- package/lib/components/JsonViewer/JsonViewer.js +100 -119
- package/lib/components/Markdown/MarkdownWrapper.d.ts +5 -1
- package/lib/components/Markdown/MarkdownWrapper.js +59 -53
- package/lib/components/Menu/MobileMenu.js +2 -2
- package/lib/components/Menu/MobileMenuGroup.js +1 -1
- package/lib/components/Panel/PanelHeader.js +0 -1
- package/lib/components/Tooltip/Tooltip.js +2 -0
- package/lib/components/index.d.ts +0 -3
- package/lib/components/index.js +0 -3
- package/lib/config.d.ts +526 -24
- package/lib/config.js +150 -4
- package/lib/globalStyle.js +50 -7
- package/lib/icons/ArrowIcon/ArrowIcon.d.ts +3 -3
- package/lib/icons/ArrowIcon/ArrowIcon.js +33 -6
- package/lib/icons/CollapseIcon/CollapseIcon.d.ts +7 -0
- package/lib/icons/CollapseIcon/CollapseIcon.js +22 -0
- package/lib/icons/CollapseIcon/index.d.ts +1 -0
- package/lib/{components/SourceCode → icons/CollapseIcon}/index.js +1 -1
- package/lib/icons/CopyIcon/CopyIcon.d.ts +7 -0
- package/lib/icons/CopyIcon/CopyIcon.js +17 -0
- package/lib/icons/CopyIcon/index.d.ts +1 -0
- package/lib/{components/CodeSample → icons/CopyIcon}/index.js +1 -1
- package/lib/icons/DeselectIcon/DeselectIcon.d.ts +7 -0
- package/lib/icons/DeselectIcon/DeselectIcon.js +19 -0
- package/lib/icons/DeselectIcon/index.d.ts +1 -0
- package/lib/{components/SamplesPanelControls → icons/DeselectIcon}/index.js +1 -1
- package/lib/icons/ExpandIcon/ExpandIcon.d.ts +5 -6
- package/lib/icons/ExpandIcon/ExpandIcon.js +10 -19
- package/lib/icons/FileIcon/FileIcon.d.ts +7 -0
- package/lib/icons/FileIcon/FileIcon.js +17 -0
- package/lib/icons/FileIcon/index.d.ts +1 -0
- package/lib/icons/FileIcon/index.js +18 -0
- package/lib/icons/ReportIcon/ReportIcon.d.ts +7 -0
- package/lib/icons/ReportIcon/ReportIcon.js +19 -0
- package/lib/icons/ReportIcon/index.d.ts +1 -0
- package/lib/icons/ReportIcon/index.js +18 -0
- package/lib/icons/SelectIcon/SelectIcon.d.ts +7 -0
- package/lib/icons/SelectIcon/SelectIcon.js +19 -0
- package/lib/icons/SelectIcon/index.d.ts +1 -0
- package/lib/icons/SelectIcon/index.js +18 -0
- package/lib/icons/index.d.ts +7 -1
- package/lib/icons/index.js +7 -1
- package/lib/layouts/Forbidden.js +2 -2
- package/lib/ui/darkColors.js +4 -4
- package/lib/utils/highlight.d.ts +1 -0
- package/lib/utils/highlight.js +1 -0
- package/package.json +2 -2
- package/src/components/CodeBlock/CodeBlock.tsx +100 -0
- package/src/components/CodeBlock/{CodeBlock.ts → CodeBlockContainer.tsx} +23 -6
- package/src/components/CodeBlock/CodeBlockControlButton.tsx +38 -0
- package/src/components/CodeBlock/CodeBlockControls.tsx +182 -0
- package/src/components/CodeBlock/index.ts +3 -0
- package/src/components/CopyButton/CopyButton.tsx +71 -19
- package/src/components/CopyButton/index.ts +0 -1
- package/src/components/Feedback/useReportDialog.ts +24 -14
- package/src/components/JsonViewer/JsonViewer.tsx +112 -142
- package/src/components/Markdown/MarkdownWrapper.tsx +65 -54
- package/src/components/Menu/MobileMenu.tsx +3 -3
- package/src/components/Menu/MobileMenuGroup.tsx +4 -2
- package/src/components/Panel/PanelHeader.ts +0 -1
- package/src/components/Tooltip/Tooltip.tsx +2 -0
- package/src/components/index.ts +0 -3
- package/src/config.ts +168 -8
- package/src/globalStyle.ts +50 -7
- package/src/icons/ArrowIcon/ArrowIcon.tsx +37 -14
- package/src/icons/CollapseIcon/CollapseIcon.tsx +40 -0
- package/src/icons/CollapseIcon/index.tsx +1 -0
- package/src/icons/CopyIcon/CopyIcon.tsx +26 -0
- package/src/icons/CopyIcon/index.ts +1 -0
- package/src/icons/DeselectIcon/DeselectIcon.tsx +28 -0
- package/src/icons/DeselectIcon/index.ts +1 -0
- package/src/icons/ExpandIcon/ExpandIcon.tsx +28 -34
- package/src/icons/FileIcon/FileIcon.tsx +29 -0
- package/src/icons/FileIcon/index.ts +1 -0
- package/src/icons/ReportIcon/ReportIcon.tsx +36 -0
- package/src/icons/ReportIcon/index.ts +1 -0
- package/src/icons/SelectIcon/SelectIcon.tsx +31 -0
- package/src/icons/SelectIcon/index.ts +1 -0
- package/src/icons/index.ts +7 -1
- package/src/layouts/Forbidden.tsx +1 -1
- package/src/ui/darkColors.tsx +4 -4
- package/src/utils/highlight.ts +1 -0
- package/lib/components/CodeSample/CodeSample.d.ts +0 -10
- package/lib/components/CodeSample/CodeSample.js +0 -226
- package/lib/components/CodeSample/index.d.ts +0 -1
- package/lib/components/CopyButton/CopyButtonWrapper.d.ts +0 -11
- package/lib/components/CopyButton/CopyButtonWrapper.js +0 -53
- package/lib/components/SamplesPanelControls/SamplesPanelControls.d.ts +0 -4
- package/lib/components/SamplesPanelControls/SamplesPanelControls.js +0 -76
- package/lib/components/SamplesPanelControls/index.d.ts +0 -1
- package/lib/components/SourceCode/SourceCode.d.ts +0 -33
- package/lib/components/SourceCode/SourceCode.js +0 -60
- package/lib/components/SourceCode/index.d.ts +0 -1
- package/src/components/CodeSample/CodeSample.tsx +0 -257
- package/src/components/CodeSample/index.ts +0 -1
- package/src/components/CopyButton/CopyButtonWrapper.tsx +0 -55
- package/src/components/SamplesPanelControls/SamplesPanelControls.ts +0 -76
- package/src/components/SamplesPanelControls/index.ts +0 -1
- package/src/components/SourceCode/SourceCode.tsx +0 -128
- package/src/components/SourceCode/index.ts +0 -1
package/src/config.ts
CHANGED
|
@@ -111,6 +111,139 @@ const markdownConfigSchema = {
|
|
|
111
111
|
default: {},
|
|
112
112
|
} as const;
|
|
113
113
|
|
|
114
|
+
const amplitudeAnalyticsConfigSchema = {
|
|
115
|
+
type: 'object',
|
|
116
|
+
properties: {
|
|
117
|
+
includeInDevelopment: { type: 'boolean' },
|
|
118
|
+
apiKey: { type: 'string' },
|
|
119
|
+
head: { type: 'boolean' },
|
|
120
|
+
respectDNT: { type: 'boolean' },
|
|
121
|
+
exclude: { type: 'array', items: { type: 'string' } },
|
|
122
|
+
outboundClickEventName: { type: 'string' },
|
|
123
|
+
pageViewEventName: { type: 'string' },
|
|
124
|
+
amplitudeConfig: { type: 'object', additionalProperties: true },
|
|
125
|
+
},
|
|
126
|
+
additionalProperties: false,
|
|
127
|
+
required: ['apiKey'],
|
|
128
|
+
} as const;
|
|
129
|
+
|
|
130
|
+
const fullstoryAnalyticsConfigSchema = {
|
|
131
|
+
type: 'object',
|
|
132
|
+
properties: {
|
|
133
|
+
includeInDevelopment: { type: 'boolean' },
|
|
134
|
+
orgId: { type: 'string' },
|
|
135
|
+
},
|
|
136
|
+
additionalProperties: false,
|
|
137
|
+
required: ['orgId'],
|
|
138
|
+
} as const;
|
|
139
|
+
|
|
140
|
+
const heapAnalyticsConfigSchema = {
|
|
141
|
+
type: 'object',
|
|
142
|
+
properties: {
|
|
143
|
+
includeInDevelopment: { type: 'boolean' },
|
|
144
|
+
appId: { type: 'string' },
|
|
145
|
+
},
|
|
146
|
+
additionalProperties: false,
|
|
147
|
+
required: ['appId'],
|
|
148
|
+
} as const;
|
|
149
|
+
|
|
150
|
+
const rudderstackAnalyticsConfigSchema = {
|
|
151
|
+
type: 'object',
|
|
152
|
+
properties: {
|
|
153
|
+
includeInDevelopment: { type: 'boolean' },
|
|
154
|
+
writeKey: { type: 'string', minLength: 10 },
|
|
155
|
+
trackPage: { type: 'boolean' },
|
|
156
|
+
dataPlaneUrl: { type: 'string' },
|
|
157
|
+
controlPlaneUrl: { type: 'string' },
|
|
158
|
+
sdkUrl: { type: 'string' },
|
|
159
|
+
loadOptions: { type: 'object', additionalProperties: true },
|
|
160
|
+
},
|
|
161
|
+
additionalProperties: false,
|
|
162
|
+
required: ['writeKey'],
|
|
163
|
+
} as const;
|
|
164
|
+
|
|
165
|
+
const segmentAnalyticsConfigSchema = {
|
|
166
|
+
type: 'object',
|
|
167
|
+
properties: {
|
|
168
|
+
includeInDevelopment: { type: 'boolean' },
|
|
169
|
+
writeKey: { type: 'string', minLength: 10 },
|
|
170
|
+
trackPage: { type: 'boolean' },
|
|
171
|
+
includeTitleInPageCall: { type: 'boolean' },
|
|
172
|
+
host: { type: 'string' },
|
|
173
|
+
},
|
|
174
|
+
additionalProperties: false,
|
|
175
|
+
required: ['writeKey'],
|
|
176
|
+
} as const;
|
|
177
|
+
|
|
178
|
+
const gtmAnalyticsConfigSchema = {
|
|
179
|
+
type: 'object',
|
|
180
|
+
properties: {
|
|
181
|
+
includeInDevelopment: { type: 'boolean' },
|
|
182
|
+
trackingId: { type: 'string' },
|
|
183
|
+
gtmAuth: { type: 'string' },
|
|
184
|
+
gtmPreview: { type: 'string' },
|
|
185
|
+
defaultDataLayer: {},
|
|
186
|
+
dataLayerName: { type: 'string' },
|
|
187
|
+
enableWebVitalsTracking: { type: 'boolean' },
|
|
188
|
+
selfHostedOrigin: { type: 'string' },
|
|
189
|
+
pageViewEventName: { type: 'string' },
|
|
190
|
+
},
|
|
191
|
+
additionalProperties: false,
|
|
192
|
+
required: ['trackingId'],
|
|
193
|
+
} as const;
|
|
194
|
+
|
|
195
|
+
const googleAnalyticsConfigSchema = {
|
|
196
|
+
type: 'object',
|
|
197
|
+
properties: {
|
|
198
|
+
includeInDevelopment: { type: 'boolean' },
|
|
199
|
+
trackingId: { type: 'string' },
|
|
200
|
+
head: { type: 'boolean' },
|
|
201
|
+
respectDNT: { type: 'boolean' },
|
|
202
|
+
anonymize: { type: 'boolean' },
|
|
203
|
+
exclude: { type: 'array', items: { type: 'string' } },
|
|
204
|
+
optimizeId: { type: 'string' },
|
|
205
|
+
experimentId: { type: 'string' },
|
|
206
|
+
variationId: { type: 'string' },
|
|
207
|
+
enableWebVitalsTracking: { type: 'boolean' },
|
|
208
|
+
|
|
209
|
+
defer: { type: 'boolean' },
|
|
210
|
+
sampleRate: { type: 'number' },
|
|
211
|
+
name: { type: 'string' },
|
|
212
|
+
clientId: { type: 'string' },
|
|
213
|
+
siteSpeedSampleRate: { type: 'number' },
|
|
214
|
+
alwaysSendReferrer: { type: 'boolean' },
|
|
215
|
+
allowAnchor: { type: 'boolean' },
|
|
216
|
+
cookieName: { type: 'string' },
|
|
217
|
+
cookieFlags: { type: 'string' },
|
|
218
|
+
cookieDomain: { type: 'string' },
|
|
219
|
+
cookieExpires: { type: 'number' },
|
|
220
|
+
storeGac: { type: 'boolean' },
|
|
221
|
+
legacyCookieDomain: { type: 'string' },
|
|
222
|
+
legacyHistoryImport: { type: 'boolean' },
|
|
223
|
+
allowLinker: { type: 'boolean' },
|
|
224
|
+
storage: { type: 'string' },
|
|
225
|
+
|
|
226
|
+
allowAdFeatures: { type: 'boolean' },
|
|
227
|
+
dataSource: { type: 'string' },
|
|
228
|
+
queueTime: { type: 'number' },
|
|
229
|
+
forceSSL: { type: 'boolean' },
|
|
230
|
+
transport: { type: 'string' },
|
|
231
|
+
},
|
|
232
|
+
additionalProperties: false,
|
|
233
|
+
required: ['trackingId'],
|
|
234
|
+
} as const;
|
|
235
|
+
|
|
236
|
+
const adobeAnalyticsConfigSchema = {
|
|
237
|
+
type: 'object',
|
|
238
|
+
properties: {
|
|
239
|
+
includeInDevelopment: { type: 'boolean' },
|
|
240
|
+
scriptUrl: { type: 'string' },
|
|
241
|
+
pageViewEventName: { type: 'string' },
|
|
242
|
+
},
|
|
243
|
+
additionalProperties: false,
|
|
244
|
+
required: ['scriptUrl'],
|
|
245
|
+
} as const;
|
|
246
|
+
|
|
114
247
|
const navItemSchema = {
|
|
115
248
|
type: 'object',
|
|
116
249
|
properties: {
|
|
@@ -301,28 +434,39 @@ export const themeConfigSchema = {
|
|
|
301
434
|
codeSnippet: {
|
|
302
435
|
type: 'object',
|
|
303
436
|
properties: {
|
|
437
|
+
controlsStyle: { type: 'string', default: 'icon' },
|
|
304
438
|
copy: {
|
|
305
439
|
type: 'object',
|
|
306
440
|
properties: {
|
|
307
|
-
buttonText: { type: 'string', default: 'Copy' },
|
|
308
|
-
tooltipText: { type: 'string', default: 'Copy to clipboard' },
|
|
309
|
-
toasterText: { type: 'string', default: 'Copied!' },
|
|
310
|
-
toasterDuration: { type: 'number', default: 1500 },
|
|
311
441
|
...hideConfigSchema.properties,
|
|
312
442
|
},
|
|
313
443
|
additionalProperties: false,
|
|
314
|
-
default: {},
|
|
444
|
+
default: { hide: false },
|
|
315
445
|
},
|
|
316
446
|
report: {
|
|
317
447
|
type: 'object',
|
|
318
448
|
properties: {
|
|
319
|
-
tooltipText: { type: 'string', default: 'Report a problem' },
|
|
320
|
-
label: { type: 'string' },
|
|
321
449
|
...hideConfigSchema.properties,
|
|
322
450
|
},
|
|
323
451
|
additionalProperties: false,
|
|
324
452
|
default: { hide: true },
|
|
325
453
|
},
|
|
454
|
+
expand: {
|
|
455
|
+
type: 'object',
|
|
456
|
+
properties: {
|
|
457
|
+
...hideConfigSchema.properties,
|
|
458
|
+
},
|
|
459
|
+
additionalProperties: false,
|
|
460
|
+
default: { hide: false },
|
|
461
|
+
},
|
|
462
|
+
collapse: {
|
|
463
|
+
type: 'object',
|
|
464
|
+
properties: {
|
|
465
|
+
...hideConfigSchema.properties,
|
|
466
|
+
},
|
|
467
|
+
additionalProperties: false,
|
|
468
|
+
default: { hide: false },
|
|
469
|
+
},
|
|
326
470
|
},
|
|
327
471
|
additionalProperties: false,
|
|
328
472
|
default: {},
|
|
@@ -331,7 +475,17 @@ export const themeConfigSchema = {
|
|
|
331
475
|
openapi: { type: 'object', additionalProperties: true },
|
|
332
476
|
graphql: { type: 'object', additionalProperties: true },
|
|
333
477
|
analytics: {
|
|
334
|
-
type:
|
|
478
|
+
type: 'object',
|
|
479
|
+
properties: {
|
|
480
|
+
adobe: adobeAnalyticsConfigSchema,
|
|
481
|
+
amplitude: amplitudeAnalyticsConfigSchema,
|
|
482
|
+
fullstory: fullstoryAnalyticsConfigSchema,
|
|
483
|
+
heap: heapAnalyticsConfigSchema,
|
|
484
|
+
rudderstack: rudderstackAnalyticsConfigSchema,
|
|
485
|
+
segment: segmentAnalyticsConfigSchema,
|
|
486
|
+
gtm: gtmAnalyticsConfigSchema,
|
|
487
|
+
ga: googleAnalyticsConfigSchema,
|
|
488
|
+
},
|
|
335
489
|
},
|
|
336
490
|
userProfile: {
|
|
337
491
|
type: 'object',
|
|
@@ -408,3 +562,9 @@ export type ThemeUIConfig = ThemeConfig & {
|
|
|
408
562
|
};
|
|
409
563
|
|
|
410
564
|
export type MarkdownConfig = FromSchema<typeof markdownConfigSchema>;
|
|
565
|
+
|
|
566
|
+
export type AmplitudeAnalyticsConfig = FromSchema<typeof amplitudeAnalyticsConfigSchema>;
|
|
567
|
+
export type RudderstackAnalyticsConfig = FromSchema<typeof rudderstackAnalyticsConfigSchema>;
|
|
568
|
+
export type SegmentAnalyticsConfig = FromSchema<typeof segmentAnalyticsConfigSchema>;
|
|
569
|
+
export type GtmAnalyticsConfig = FromSchema<typeof gtmAnalyticsConfigSchema>;
|
|
570
|
+
export type GoogleAnalyticsConfig = FromSchema<typeof googleAnalyticsConfigSchema>;
|
package/src/globalStyle.ts
CHANGED
|
@@ -878,6 +878,41 @@ const apiReferencePanels = css`
|
|
|
878
878
|
--panel-samples-heading-background-color: #323f4b; // @presenter Color
|
|
879
879
|
--panel-samples-heading-border: unset; // @presenter Border
|
|
880
880
|
|
|
881
|
+
/**
|
|
882
|
+
* @tokens Panel samples default
|
|
883
|
+
*/
|
|
884
|
+
.panel-samples-default {
|
|
885
|
+
--text-color: var(--panel-samples-text-color);
|
|
886
|
+
--panel-text-color: var(--panel-samples-text-color); // @presenter Color
|
|
887
|
+
--panel-font-family-local: var(--panel-samples-font-family);
|
|
888
|
+
--panel-font-size-local: var(--panel-samples-font-size);
|
|
889
|
+
--panel-font-weight-local: var(--panel-samples-font-weight);
|
|
890
|
+
--panel-background-color: var(--panel-samples-background-color); // @presenter Color
|
|
891
|
+
--panel-border-local: var(--panel-samples-border);
|
|
892
|
+
--panel-border-radius-local: calc(1px + var(--panel-border-radius));
|
|
893
|
+
--panel-chevron-icon-color: var(--panel-samples-chevron-icon-color); // @presenter Color
|
|
894
|
+
|
|
895
|
+
--panel-body-text-color: var(--panel-samples-body-text-color); // @presenter Color
|
|
896
|
+
--panel-body-background-color: var(--panel-samples-body-background-color); // @presenter Color
|
|
897
|
+
|
|
898
|
+
--panel-body-font-family-local: var(--panel-samples-body-font-family);
|
|
899
|
+
--panel-body-font-size-local: var(--panel-samples-body-font-size);
|
|
900
|
+
--panel-body-font-weight-local: var(--panel-samples-body-font-weight);
|
|
901
|
+
--panel-body-padding-local: 0;
|
|
902
|
+
--panel-body-border-local: var(--panel-samples-body-border);
|
|
903
|
+
|
|
904
|
+
--panel-heading-text-color: var(--panel-samples-heading-text-color); // @presenter Color
|
|
905
|
+
--panel-heading-background-color: var(--panel-samples-heading-background-color); // @presenter Color
|
|
906
|
+
|
|
907
|
+
--panel-heading-font-family-local: var(--panel-samples-heading-font-family);
|
|
908
|
+
--panel-heading-font-size-local: var(--panel-samples-heading-font-size);
|
|
909
|
+
--panel-heading-font-weight-local: var(--panel-samples-heading-font-weight);
|
|
910
|
+
--panel-heading-line-height-local: var(--panel-samples-heading-line-height);
|
|
911
|
+
--panel-heading-padding-local: var(--panel-samples-heading-padding);
|
|
912
|
+
|
|
913
|
+
--panel-heading-border: var(--panel-samples-heading-border); // @presenter Border
|
|
914
|
+
}
|
|
915
|
+
|
|
881
916
|
/**
|
|
882
917
|
* @tokens Panel try-it, request-samples, response-samples, callback samples
|
|
883
918
|
*/
|
|
@@ -907,7 +942,7 @@ const apiReferencePanels = css`
|
|
|
907
942
|
--panel-body-border-local: var(--panel-samples-body-border);
|
|
908
943
|
|
|
909
944
|
--panel-heading-text-color: var(--panel-samples-heading-text-color); // @presenter Color
|
|
910
|
-
--panel-heading-background-color: var(
|
|
945
|
+
--panel-heading-background-color: var(--panel-samples-heading-background-color); // @presenter Color
|
|
911
946
|
|
|
912
947
|
--panel-heading-font-family-local: var(--panel-samples-heading-font-family);
|
|
913
948
|
--panel-heading-font-size-local: var(--panel-samples-heading-font-size);
|
|
@@ -1122,9 +1157,14 @@ const apiReferencePanels = css`
|
|
|
1122
1157
|
* @tokens Panel samples other styles
|
|
1123
1158
|
*/
|
|
1124
1159
|
|
|
1125
|
-
--panel-samples-controls-background-color: var(--panel-samples-heading-background-color);
|
|
1126
|
-
|
|
1160
|
+
--panel-samples-controls-background-color: var(--panel-samples-heading-background-color);
|
|
1161
|
+
|
|
1162
|
+
--panel-samples-icon-controls-background-color: var(--panel-samples-heading-background-color); // @presenter Color
|
|
1163
|
+
--panel-samples-text-controls-background-color: var(--color-secondary-900); // @presenter Color
|
|
1164
|
+
|
|
1165
|
+
--panel-samples-controls-hover-background-color: #606e7b; // @presenter Color
|
|
1127
1166
|
--panel-samples-controls-text-color: var(--text-color-inverse); // @presenter Color
|
|
1167
|
+
--panel-samples-controls-border: 1px solid var(--color-secondary-900); // @presenter Color
|
|
1128
1168
|
|
|
1129
1169
|
--panel-samples-dropdown-background-color: var(--panel-samples-heading-background-color); // @presenter Color
|
|
1130
1170
|
--panel-samples-dropdown-color: var(--text-color-inverse); // @presenter Color
|
|
@@ -1186,6 +1226,7 @@ const code = css`
|
|
|
1186
1226
|
--code-font-size: 13px; // @presenter FontSize
|
|
1187
1227
|
--code-font-family: var(--font-family-monospaced); // @presenter FontFamily
|
|
1188
1228
|
--code-font-weight: 400; // @presenter FontWeight
|
|
1229
|
+
--code-line-height: 18px; // @presenter LineHeight
|
|
1189
1230
|
--code-wrap: pre;
|
|
1190
1231
|
--code-word-break: break-word;
|
|
1191
1232
|
|
|
@@ -1207,7 +1248,9 @@ const code = css`
|
|
|
1207
1248
|
--code-block-text-color: #fff; // @presenter Color
|
|
1208
1249
|
--code-block-background-color: #323f4b; // @presenter Color
|
|
1209
1250
|
--code-block-border-color: var(--border-color); // @presenter Color
|
|
1210
|
-
--code-block-border-radius: var(--border-radius
|
|
1251
|
+
--code-block-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
1252
|
+
--code-block-padding: calc(var(--spacing-unit) * 2);
|
|
1253
|
+
--code-block-margin: 0;
|
|
1211
1254
|
--code-block-max-height: 50vh;
|
|
1212
1255
|
--code-block-word-break: initial;
|
|
1213
1256
|
|
|
@@ -1652,7 +1695,7 @@ const mobileMenu = css`
|
|
|
1652
1695
|
--mobile-menu-item-text-color: #525252;// @presenter Color
|
|
1653
1696
|
--mobile-menu-item-active-color: #FAFAFA; // @presenter Color
|
|
1654
1697
|
--mobile-menu-item-active-text-color: #161616; // @presenter Color
|
|
1655
|
-
|
|
1698
|
+
|
|
1656
1699
|
/**
|
|
1657
1700
|
* @tokens Mobile Menu control button
|
|
1658
1701
|
* */
|
|
@@ -1865,7 +1908,7 @@ const markdown = css`
|
|
|
1865
1908
|
/**
|
|
1866
1909
|
* @tokens Markdown Checkbox List
|
|
1867
1910
|
*/
|
|
1868
|
-
|
|
1911
|
+
|
|
1869
1912
|
--md-checkbox-list-item-style: none;
|
|
1870
1913
|
|
|
1871
1914
|
/**
|
|
@@ -2182,7 +2225,7 @@ export const styles = css`
|
|
|
2182
2225
|
:root.notransition * {
|
|
2183
2226
|
transition: none !important;
|
|
2184
2227
|
}
|
|
2185
|
-
|
|
2228
|
+
|
|
2186
2229
|
@media screen and (max-width: ${breakpoints.medium}) {
|
|
2187
2230
|
body.overflow-hidden {
|
|
2188
2231
|
overflow: hidden;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
direction?: 'up' | 'right' | 'left' | 'down';
|
|
6
|
-
visibility?: 'visible' | 'hidden';
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function directionToTransform({ direction }: ArrowIconProps) {
|
|
4
|
+
function directionToTransform({ direction }: { direction?: string }) {
|
|
10
5
|
switch (direction) {
|
|
11
6
|
case 'up':
|
|
12
7
|
return 180;
|
|
@@ -19,17 +14,45 @@ function directionToTransform({ direction }: ArrowIconProps) {
|
|
|
19
14
|
}
|
|
20
15
|
}
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
export interface ArrowIconProps {
|
|
18
|
+
className?: string;
|
|
19
|
+
weight?: 'regular' | 'thin';
|
|
20
|
+
direction?: 'up' | 'right' | 'left' | 'down';
|
|
21
|
+
visibility?: 'visible' | 'hidden';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const Icon = ({ className, weight }: ArrowIconProps) => (
|
|
23
25
|
<span data-component-name="icons/ArrowIcon/ArrowIcon">
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
|
|
26
|
+
{weight === 'thin' ? (
|
|
27
|
+
<svg
|
|
28
|
+
width="16"
|
|
29
|
+
height="16"
|
|
30
|
+
viewBox="0 0 16 16"
|
|
31
|
+
fill="none"
|
|
32
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
33
|
+
className={className}
|
|
34
|
+
>
|
|
35
|
+
<path
|
|
36
|
+
d="M8 11L3 5.99999L3.7 5.29999L8 9.59999L12.3 5.29999L13 5.99999L8 11Z"
|
|
37
|
+
fill="inherit"
|
|
38
|
+
/>
|
|
39
|
+
</svg>
|
|
40
|
+
) : (
|
|
41
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 7 5" className={className}>
|
|
42
|
+
<path d="M3.5 2.51L5.806.205a.7.7 0 01.99.99l-2.8 2.8a.698.698 0 01-.99 0l-2.8-2.8a.7.7 0 11.99-.99L3.5 2.51z" />
|
|
43
|
+
</svg>
|
|
44
|
+
)}
|
|
27
45
|
</span>
|
|
28
46
|
);
|
|
29
47
|
|
|
30
|
-
export const ArrowIcon = styled(Icon)
|
|
31
|
-
|
|
32
|
-
|
|
48
|
+
export const ArrowIcon = styled(Icon)<Pick<ArrowIconProps, 'weight'>>`
|
|
49
|
+
${({ weight }) =>
|
|
50
|
+
weight !== 'thin' &&
|
|
51
|
+
css`
|
|
52
|
+
width: var(--sidebar-group-item-chevron-size);
|
|
53
|
+
height: var(--sidebar-group-item-chevron-size);
|
|
54
|
+
`}
|
|
55
|
+
|
|
33
56
|
fill: var(--sidebar-group-item-chevron-color);
|
|
34
57
|
transform: rotate(${directionToTransform}deg);
|
|
35
58
|
visibility: ${({ visibility = 'visible' }) => visibility};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
interface IconProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Icon = ({ className, color = 'white' }: IconProps) => (
|
|
10
|
+
<svg
|
|
11
|
+
data-component-name="icons/CollapseIcon"
|
|
12
|
+
viewBox="0 0 14 14"
|
|
13
|
+
fill="none"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
className={className}
|
|
16
|
+
>
|
|
17
|
+
<g clipPath="url(#clip0_906_12165)">
|
|
18
|
+
<rect width="14" height="14" fill="none" style={{ mixBlendMode: 'multiply' }} />
|
|
19
|
+
<path
|
|
20
|
+
d="M1.75 7.875V8.75H4.63138L0.875 12.5046L1.49363 13.125L5.25 9.36862V12.25H6.125V7.875H1.75Z"
|
|
21
|
+
fill={color}
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
d="M13.125 1.4945L12.509 0.875L8.75 4.63138V1.75H7.875V6.125H12.25V5.25H9.36862L13.125 1.4945Z"
|
|
25
|
+
fill={color}
|
|
26
|
+
/>
|
|
27
|
+
</g>
|
|
28
|
+
<defs>
|
|
29
|
+
<clipPath id="clip0_906_12165">
|
|
30
|
+
<rect width="14" height="14" fill="white" />
|
|
31
|
+
</clipPath>
|
|
32
|
+
</defs>
|
|
33
|
+
</svg>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export const CollapseIcon = styled(Icon)`
|
|
37
|
+
width: 1.3em;
|
|
38
|
+
height: 1.3em;
|
|
39
|
+
vertical-align: middle;
|
|
40
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@theme/icons/CollapseIcon/CollapseIcon';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
interface IconProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Icon = ({ className, color = 'white' }: IconProps) => (
|
|
10
|
+
<span data-component-name="icons/CopyIcon">
|
|
11
|
+
<svg viewBox="0 0 11 12" fill="none" xmlns="http://www.w3.org/2000/svg" className={className}>
|
|
12
|
+
<path
|
|
13
|
+
fillRule="evenodd"
|
|
14
|
+
clipRule="evenodd"
|
|
15
|
+
d="M3.52083 1.33333C3.52083 1.25279 3.58613 1.1875 3.66667 1.1875H9.5C9.58054 1.1875 9.64583 1.25279 9.64583 1.33333V8.33333C9.64583 8.41387 9.58054 8.47917 9.5 8.47917H7.75H3.66667C3.58613 8.47917 3.52083 8.41387 3.52083 8.33333V3.08333V1.33333ZM2.64583 2.64583V1.33333C2.64583 0.769543 3.10288 0.3125 3.66667 0.3125H9.5C10.0638 0.3125 10.5208 0.769543 10.5208 1.33333V8.33333C10.5208 8.89712 10.0638 9.35417 9.5 9.35417H8.1875V10.6667C8.1875 10.9374 8.07995 11.1971 7.8885 11.3885C7.69706 11.5799 7.43741 11.6875 7.16667 11.6875H1.33333C1.06259 11.6875 0.802939 11.5799 0.611495 11.3885C0.420051 11.1971 0.3125 10.9374 0.3125 10.6667V3.66667C0.3125 3.39592 0.420052 3.13627 0.611495 2.94483C0.802938 2.75339 1.06259 2.64583 1.33333 2.64583H2.64583ZM7.3125 9.35417V10.6667C7.3125 10.7053 7.29713 10.7424 7.26979 10.7698C7.24244 10.7971 7.20534 10.8125 7.16667 10.8125H1.33333C1.29466 10.8125 1.25756 10.7971 1.23021 10.7698C1.20286 10.7424 1.1875 10.7053 1.1875 10.6667V3.66667C1.1875 3.62799 1.20286 3.5909 1.23021 3.56355C1.25756 3.5362 1.29466 3.52083 1.33333 3.52083H2.64583V8.33333C2.64583 8.89712 3.10288 9.35417 3.66667 9.35417H7.3125Z"
|
|
16
|
+
fill={color}
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
|
19
|
+
</span>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export const CopyIcon = styled(Icon)`
|
|
23
|
+
width: 1.3em;
|
|
24
|
+
height: 1.3em;
|
|
25
|
+
vertical-align: middle;
|
|
26
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@theme/icons/CopyIcon/CopyIcon';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
interface IconProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Icon = ({ className, color = 'white' }: IconProps) => (
|
|
10
|
+
<svg
|
|
11
|
+
data-component-name="icons/DeselectIcon"
|
|
12
|
+
viewBox="0 0 16 16"
|
|
13
|
+
fill="none"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
className={className}
|
|
16
|
+
>
|
|
17
|
+
<path d="M14.4966 10.5H9.49658V11.5H14.4966V10.5Z" fill={color} />
|
|
18
|
+
<path d="M10.5 3.64746H1.5V4.64746H10.5V3.64746Z" fill={color} />
|
|
19
|
+
<path d="M10.5 6.64746H1.5V7.64746H10.5V6.64746Z" fill={color} />
|
|
20
|
+
<path d="M7.5 9.64746H1.5V10.6475H7.5V9.64746Z" fill={color} />
|
|
21
|
+
</svg>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export const DeselectIcon = styled(Icon)`
|
|
25
|
+
width: 1.3em;
|
|
26
|
+
height: 1.3em;
|
|
27
|
+
vertical-align: middle;
|
|
28
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@theme/icons/DeselectIcon/DeselectIcon';
|
|
@@ -1,46 +1,40 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
interface IconProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
color?: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const Icon = ({ className }: { className?: string }) => (
|
|
23
|
-
<span data-component-name="icons/ExpandIcon/ExpandIcon">
|
|
24
|
-
<svg
|
|
25
|
-
width="16"
|
|
26
|
-
height="16"
|
|
27
|
-
viewBox="0 0 16 16"
|
|
28
|
-
fill="none"
|
|
29
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
30
|
-
className={className}
|
|
31
|
-
>
|
|
9
|
+
const Icon = ({ className, color = 'white' }: IconProps) => (
|
|
10
|
+
<svg
|
|
11
|
+
data-component-name="icons/ExpandIcon"
|
|
12
|
+
viewBox="0 0 14 14"
|
|
13
|
+
fill="none"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
className={className}
|
|
16
|
+
>
|
|
17
|
+
<g clipPath="url(#clip0_906_12129)">
|
|
18
|
+
<rect width="14" height="14" fill="none" style={{ mixBlendMode: 'multiply' }} />
|
|
32
19
|
<path
|
|
33
|
-
d="M8
|
|
34
|
-
fill=
|
|
20
|
+
d="M8.75 0.875V1.75H11.6314L7.875 5.50462L8.49362 6.125L12.25 2.36863V5.25H13.125V0.875H8.75Z"
|
|
21
|
+
fill={color}
|
|
35
22
|
/>
|
|
36
|
-
|
|
37
|
-
|
|
23
|
+
<path
|
|
24
|
+
d="M6.125 8.4945L5.509 7.875L1.75 11.6314V8.75H0.875V13.125H5.25V12.25H2.36863L6.125 8.4945Z"
|
|
25
|
+
fill={color}
|
|
26
|
+
/>
|
|
27
|
+
</g>
|
|
28
|
+
<defs>
|
|
29
|
+
<clipPath id="clip0_906_12129">
|
|
30
|
+
<rect width="14" height="14" fill="white" />
|
|
31
|
+
</clipPath>
|
|
32
|
+
</defs>
|
|
33
|
+
</svg>
|
|
38
34
|
);
|
|
39
35
|
|
|
40
36
|
export const ExpandIcon = styled(Icon)`
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
visibility: ${({ visibility = 'visible' }) => visibility};
|
|
44
|
-
|
|
37
|
+
width: 1.3em;
|
|
38
|
+
height: 1.3em;
|
|
45
39
|
vertical-align: middle;
|
|
46
40
|
`;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
interface IconProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Icon = ({ className, color = 'white' }: IconProps) => (
|
|
10
|
+
<svg
|
|
11
|
+
data-component-name="icons/FileIcon"
|
|
12
|
+
viewBox="0 0 16 16"
|
|
13
|
+
fill="none"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
className={className}
|
|
16
|
+
>
|
|
17
|
+
<rect width="14" height="14" fill="none" style={{ mixBlendMode: 'multiply' }} />
|
|
18
|
+
<path
|
|
19
|
+
d="M12.85 4.65018L9.35 1.15018C9.30601 1.10132 9.25192 1.0626 9.19149 1.0367C9.13106 1.0108 9.06572 0.998339 9 1.00018H4C3.73502 1.00096 3.48112 1.10656 3.29375 1.29393C3.10638 1.4813 3.00078 1.7352 3 2.00018V14.0002C3.00078 14.2652 3.10638 14.5191 3.29375 14.7064C3.48112 14.8938 3.73502 14.9994 4 15.0002H12C12.265 14.9994 12.5189 14.8938 12.7062 14.7064C12.8936 14.5191 12.9992 14.2652 13 14.0002V5.00018C13.0018 4.93446 12.9894 4.86912 12.9635 4.80869C12.9376 4.74826 12.8989 4.69417 12.85 4.65018ZM9 2.20018L11.8 5.00018H9V2.20018ZM12 14.0002H4V2.00018H8V5.00018C8.00078 5.26515 8.10638 5.51906 8.29375 5.70642C8.48112 5.89379 8.73502 5.9994 9 6.00018H12V14.0002Z"
|
|
20
|
+
fill={color}
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export const FileIcon = styled(Icon)`
|
|
26
|
+
width: 1.3em;
|
|
27
|
+
height: 1.3em;
|
|
28
|
+
vertical-align: middle;
|
|
29
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@theme/icons/FileIcon/FileIcon';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
interface IconProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Icon = ({ className, color = 'white' }: IconProps) => (
|
|
10
|
+
<svg
|
|
11
|
+
data-component-name="icons/ReportIcon"
|
|
12
|
+
viewBox="0 0 14 14"
|
|
13
|
+
fill="none"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
className={className}
|
|
16
|
+
>
|
|
17
|
+
<rect width="14" height="14" fill="none" style={{ mixBlendMode: 'multiply' }} />
|
|
18
|
+
<path
|
|
19
|
+
d="M7 8.75C6.87021 8.75 6.74333 8.78849 6.63541 8.8606C6.52749 8.93271 6.44337 9.0352 6.3937 9.15511C6.34403 9.27503 6.33104 9.40698 6.35636 9.53428C6.38168 9.66158 6.44418 9.77851 6.53596 9.87029C6.62774 9.96207 6.74467 10.0246 6.87197 10.0499C6.99927 10.0752 7.13122 10.0622 7.25114 10.0125C7.37105 9.96288 7.47354 9.87876 7.54565 9.77084C7.61776 9.66292 7.65625 9.53604 7.65625 9.40625C7.65625 9.2322 7.58711 9.06528 7.46404 8.94221C7.34097 8.81914 7.17405 8.75 7 8.75Z"
|
|
20
|
+
fill={color}
|
|
21
|
+
fillOpacity="1"
|
|
22
|
+
/>
|
|
23
|
+
<path d="M7.4375 3.9375H6.5625V7.875H7.4375V3.9375Z" fill="white" fillOpacity="1" />
|
|
24
|
+
<path
|
|
25
|
+
d="M11.375 12.25H2.625C2.39302 12.2497 2.17061 12.1575 2.00658 11.9934C1.84254 11.8294 1.75027 11.607 1.75 11.375V2.625C1.75027 2.39302 1.84254 2.17061 2.00658 2.00658C2.17061 1.84254 2.39302 1.75027 2.625 1.75H11.375C11.607 1.75027 11.8294 1.84254 11.9934 2.00658C12.1575 2.17061 12.2497 2.39302 12.25 2.625V11.375C12.2497 11.607 12.1575 11.8294 11.9934 11.9934C11.8294 12.1575 11.607 12.2497 11.375 12.25ZM2.625 2.625V11.375H11.3755L11.375 2.625H2.625Z"
|
|
26
|
+
fill={color}
|
|
27
|
+
fillOpacity="1"
|
|
28
|
+
/>
|
|
29
|
+
</svg>
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export const ReportIcon = styled(Icon)`
|
|
33
|
+
width: 1.3em;
|
|
34
|
+
height: 1.3em;
|
|
35
|
+
vertical-align: middle;
|
|
36
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@theme/icons/ReportIcon/ReportIcon';
|