@manuscripts/style-guide 3.1.7 → 3.2.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.
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* © 2025 Atypon Systems LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.ToggleIcon = exports.ToggleHeader = void 0;
|
|
22
|
+
const react_1 = __importDefault(require("react"));
|
|
23
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
24
|
+
const icons_1 = require("./icons");
|
|
25
|
+
const ToggleHeader = ({ title, isOpen, onToggle, }) => {
|
|
26
|
+
return (react_1.default.createElement(ToggleHeaderContainer, { onClick: (e) => {
|
|
27
|
+
e.stopPropagation();
|
|
28
|
+
onToggle();
|
|
29
|
+
} },
|
|
30
|
+
react_1.default.createElement("span", null, title),
|
|
31
|
+
react_1.default.createElement(exports.ToggleIcon, { isOpen: isOpen }, isOpen ? react_1.default.createElement(icons_1.TriangleExpandedIcon, null) : react_1.default.createElement(icons_1.TriangleCollapsedIcon, null))));
|
|
32
|
+
};
|
|
33
|
+
exports.ToggleHeader = ToggleHeader;
|
|
34
|
+
const ToggleHeaderContainer = styled_components_1.default.div `
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
padding: 16px 8px;
|
|
39
|
+
margin: 8px;
|
|
40
|
+
color: #353535;
|
|
41
|
+
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
|
|
44
|
+
border-top: 1px solid #f2f2f2;
|
|
45
|
+
|
|
46
|
+
font-size: 16px;
|
|
47
|
+
font-weight: 700;
|
|
48
|
+
font-family: Lato, sans-serif;
|
|
49
|
+
`;
|
|
50
|
+
exports.ToggleIcon = styled_components_1.default.div `
|
|
51
|
+
width: 20px;
|
|
52
|
+
height: 20px;
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
border: 1px solid #e2e2e2;
|
|
55
|
+
text-align: center;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
|
|
58
|
+
svg {
|
|
59
|
+
width: 19px;
|
|
60
|
+
height: 19px;
|
|
61
|
+
transform: rotate(${(props) => (props.isOpen ? '0deg' : '270deg')});
|
|
62
|
+
transition: transform 0.2s ease; // Smooth transition for rotation
|
|
63
|
+
}
|
|
64
|
+
`;
|
package/dist/cjs/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
32
32
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.errorsDecoder = exports.useDeepCompareCallback = exports.useDeepCompareMemo = void 0;
|
|
35
|
+
exports.errorsDecoder = exports.useDeepCompareCallback = exports.useDeepCompareMemo = exports.ToggleIcon = exports.ToggleHeader = void 0;
|
|
36
36
|
__exportStar(require("./components/AlertMessage"), exports);
|
|
37
37
|
__exportStar(require("./components/Button"), exports);
|
|
38
38
|
__exportStar(require("./components/ContextMenu"), exports);
|
|
@@ -53,6 +53,9 @@ __exportStar(require("./components/TextField"), exports);
|
|
|
53
53
|
__exportStar(require("./components/TextFieldContainer"), exports);
|
|
54
54
|
__exportStar(require("./components/TextFieldError"), exports);
|
|
55
55
|
__exportStar(require("./components/TextFieldGroupContainer"), exports);
|
|
56
|
+
var ToggleHeader_1 = require("./components/ToggleHeader");
|
|
57
|
+
Object.defineProperty(exports, "ToggleHeader", { enumerable: true, get: function () { return ToggleHeader_1.ToggleHeader; } });
|
|
58
|
+
Object.defineProperty(exports, "ToggleIcon", { enumerable: true, get: function () { return ToggleHeader_1.ToggleIcon; } });
|
|
56
59
|
__exportStar(require("./components/Tooltip"), exports);
|
|
57
60
|
__exportStar(require("./components/icons"), exports);
|
|
58
61
|
__exportStar(require("./components/Inspector"), exports);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2025 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import styled from 'styled-components';
|
|
18
|
+
import { TriangleCollapsedIcon, TriangleExpandedIcon } from './icons';
|
|
19
|
+
export const ToggleHeader = ({ title, isOpen, onToggle, }) => {
|
|
20
|
+
return (React.createElement(ToggleHeaderContainer, { onClick: (e) => {
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
onToggle();
|
|
23
|
+
} },
|
|
24
|
+
React.createElement("span", null, title),
|
|
25
|
+
React.createElement(ToggleIcon, { isOpen: isOpen }, isOpen ? React.createElement(TriangleExpandedIcon, null) : React.createElement(TriangleCollapsedIcon, null))));
|
|
26
|
+
};
|
|
27
|
+
const ToggleHeaderContainer = styled.div `
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
padding: 16px 8px;
|
|
32
|
+
margin: 8px;
|
|
33
|
+
color: #353535;
|
|
34
|
+
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
|
|
37
|
+
border-top: 1px solid #f2f2f2;
|
|
38
|
+
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
font-weight: 700;
|
|
41
|
+
font-family: Lato, sans-serif;
|
|
42
|
+
`;
|
|
43
|
+
export const ToggleIcon = styled.div `
|
|
44
|
+
width: 20px;
|
|
45
|
+
height: 20px;
|
|
46
|
+
border-radius: 50%;
|
|
47
|
+
border: 1px solid #e2e2e2;
|
|
48
|
+
text-align: center;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
|
|
51
|
+
svg {
|
|
52
|
+
width: 19px;
|
|
53
|
+
height: 19px;
|
|
54
|
+
transform: rotate(${(props) => (props.isOpen ? '0deg' : '270deg')});
|
|
55
|
+
transition: transform 0.2s ease; // Smooth transition for rotation
|
|
56
|
+
}
|
|
57
|
+
`;
|
package/dist/es/index.js
CHANGED
|
@@ -33,6 +33,7 @@ export * from './components/TextField';
|
|
|
33
33
|
export * from './components/TextFieldContainer';
|
|
34
34
|
export * from './components/TextFieldError';
|
|
35
35
|
export * from './components/TextFieldGroupContainer';
|
|
36
|
+
export { ToggleHeader, ToggleIcon } from './components/ToggleHeader';
|
|
36
37
|
export * from './components/Tooltip';
|
|
37
38
|
export * from './components/icons';
|
|
38
39
|
export * from './components/Inspector';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2025 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
interface SectionHeaderProps {
|
|
18
|
+
title: string;
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
onToggle: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const ToggleHeader: React.FC<SectionHeaderProps>;
|
|
23
|
+
export declare const ToggleIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
24
|
+
isOpen: boolean;
|
|
25
|
+
}, never>;
|
|
26
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export * from './components/TextField';
|
|
|
34
34
|
export * from './components/TextFieldContainer';
|
|
35
35
|
export * from './components/TextFieldError';
|
|
36
36
|
export * from './components/TextFieldGroupContainer';
|
|
37
|
+
export { ToggleHeader, ToggleIcon } from './components/ToggleHeader';
|
|
37
38
|
export * from './components/Tooltip';
|
|
38
39
|
export * from './components/icons';
|
|
39
40
|
export * from './components/Inspector';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/style-guide",
|
|
3
3
|
"description": "Shared components for Manuscripts applications",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|