@redocly/theme 0.7.0 → 0.7.2
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/Feedback/Comment.js +2 -2
- package/lib/Feedback/Reasons.js +2 -2
- package/lib/Feedback/Sentiment.js +1 -1
- package/lib/config.d.ts +3 -0
- package/lib/config.js +1 -0
- package/package.json +1 -1
- package/src/Feedback/Comment.tsx +1 -1
- package/src/Feedback/Reasons.tsx +1 -1
- package/src/Feedback/Sentiment.tsx +1 -2
- package/src/config.ts +1 -0
package/lib/Feedback/Comment.js
CHANGED
|
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.Comment = void 0;
|
|
30
30
|
const React = __importStar(require("react"));
|
|
31
31
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
|
-
const
|
|
32
|
+
const Button_1 = require("../Button/Button");
|
|
33
33
|
const Comment = ({ settings, onSubmit }) => {
|
|
34
34
|
const { label, submitText } = settings || {};
|
|
35
35
|
const [text, setText] = React.useState('');
|
|
@@ -70,7 +70,7 @@ const TextArea = styled_components_1.default.textarea `
|
|
|
70
70
|
margin: 0 0 10px 0;
|
|
71
71
|
padding: 10px;
|
|
72
72
|
`;
|
|
73
|
-
const SendButton = (0, styled_components_1.default)(
|
|
73
|
+
const SendButton = (0, styled_components_1.default)(Button_1.Button).attrs(() => ({
|
|
74
74
|
color: 'primary',
|
|
75
75
|
})) `
|
|
76
76
|
width: 100px;
|
package/lib/Feedback/Reasons.js
CHANGED
|
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.Reasons = void 0;
|
|
30
30
|
const React = __importStar(require("react"));
|
|
31
31
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
|
-
const
|
|
32
|
+
const Button_1 = require("../Button/Button");
|
|
33
33
|
const Reasons = ({ settings, onSubmit }) => {
|
|
34
34
|
const { label, multi, buttonText, items = [] } = settings;
|
|
35
35
|
const [checkedState, setCheckedState] = React.useState(new Array(items.length).fill(false));
|
|
@@ -62,7 +62,7 @@ const Wrapper = styled_components_1.default.div `
|
|
|
62
62
|
const Label = styled_components_1.default.h3 `
|
|
63
63
|
margin-right: 15px;
|
|
64
64
|
`;
|
|
65
|
-
const SendButton = (0, styled_components_1.default)(
|
|
65
|
+
const SendButton = (0, styled_components_1.default)(Button_1.Button).attrs(() => ({
|
|
66
66
|
color: 'primary',
|
|
67
67
|
})) `
|
|
68
68
|
width: 100px;
|
|
@@ -30,7 +30,7 @@ exports.Sentiment = void 0;
|
|
|
30
30
|
const React = __importStar(require("react"));
|
|
31
31
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
32
|
const Feedback_1 = require("../Feedback");
|
|
33
|
-
const Thumbs_1 = require("
|
|
33
|
+
const Thumbs_1 = require("../Feedback/Thumbs");
|
|
34
34
|
const Sentiment = ({ settings, onSubmit }) => {
|
|
35
35
|
const { label, submitText, comment: commentSettings, reasons: reasonsSettings } = settings || {};
|
|
36
36
|
const [score, setScore] = React.useState(0);
|
package/lib/config.d.ts
CHANGED
|
@@ -432,6 +432,7 @@ export declare const ThemeConfig: z.ZodDefault<z.ZodObject<{
|
|
|
432
432
|
}>>>;
|
|
433
433
|
openapi: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, {}, {}>>;
|
|
434
434
|
graphql: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, {}, {}>>;
|
|
435
|
+
analytics: z.ZodOptional<z.ZodAny>;
|
|
435
436
|
userProfile: z.ZodDefault<z.ZodOptional<z.ZodObject<z.extendShape<{
|
|
436
437
|
loginLabel: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
437
438
|
logoutLabel: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
@@ -552,6 +553,7 @@ export declare const ThemeConfig: z.ZodDefault<z.ZodObject<{
|
|
|
552
553
|
} | undefined;
|
|
553
554
|
openapi?: {} | undefined;
|
|
554
555
|
graphql?: {} | undefined;
|
|
556
|
+
analytics?: any;
|
|
555
557
|
colorMode: {
|
|
556
558
|
hide?: boolean | undefined;
|
|
557
559
|
ignoreDetection?: boolean | undefined;
|
|
@@ -691,6 +693,7 @@ export declare const ThemeConfig: z.ZodDefault<z.ZodObject<{
|
|
|
691
693
|
} | undefined;
|
|
692
694
|
openapi?: {} | undefined;
|
|
693
695
|
graphql?: {} | undefined;
|
|
696
|
+
analytics?: any;
|
|
694
697
|
userProfile?: {
|
|
695
698
|
hide?: boolean | undefined;
|
|
696
699
|
loginLabel?: string | undefined;
|
package/lib/config.js
CHANGED
|
@@ -161,6 +161,7 @@ exports.ThemeConfig = zod_1.z
|
|
|
161
161
|
.optional(),
|
|
162
162
|
openapi: zod_1.z.object({}).passthrough().optional(),
|
|
163
163
|
graphql: zod_1.z.object({}).passthrough().optional(),
|
|
164
|
+
analytics: zod_1.z.any().optional(),
|
|
164
165
|
userProfile: zod_1.z
|
|
165
166
|
.object({
|
|
166
167
|
loginLabel: zod_1.z.string().default('Login').optional(),
|
package/package.json
CHANGED
package/src/Feedback/Comment.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { Button } from '@theme';
|
|
4
3
|
|
|
4
|
+
import { Button } from '@theme/Button/Button';
|
|
5
5
|
import type { CommentProps } from '@theme/Feedback';
|
|
6
6
|
|
|
7
7
|
export const Comment = ({ settings, onSubmit }: CommentProps): JSX.Element => {
|
package/src/Feedback/Reasons.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { Button } from '@theme';
|
|
4
3
|
|
|
4
|
+
import { Button } from '@theme/Button/Button';
|
|
5
5
|
import type { ReasonsProps } from '@theme/Feedback';
|
|
6
6
|
|
|
7
7
|
export const Reasons = ({ settings, onSubmit }: ReasonsProps): JSX.Element => {
|
|
@@ -3,8 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import type { SentimentProps, ReasonsProps } from '@theme/Feedback';
|
|
5
5
|
import { Comment, Reasons } from '@theme/Feedback';
|
|
6
|
-
|
|
7
|
-
import { ThumbUp, ThumbDown } from './Thumbs';
|
|
6
|
+
import { ThumbUp, ThumbDown } from '@theme/Feedback/Thumbs';
|
|
8
7
|
|
|
9
8
|
export const Sentiment = ({ settings, onSubmit }: SentimentProps): JSX.Element => {
|
|
10
9
|
const { label, submitText, comment: commentSettings, reasons: reasonsSettings } = settings || {};
|
package/src/config.ts
CHANGED
|
@@ -170,6 +170,7 @@ export const ThemeConfig = z
|
|
|
170
170
|
.optional(),
|
|
171
171
|
openapi: z.object({}).passthrough().optional(),
|
|
172
172
|
graphql: z.object({}).passthrough().optional(),
|
|
173
|
+
analytics: z.any().optional(),
|
|
173
174
|
userProfile: z
|
|
174
175
|
.object({
|
|
175
176
|
loginLabel: z.string().default('Login').optional(),
|