@remvst/design-system 1.1.1 → 1.3.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.
- package/CHANGELOG.md +7 -0
- package/lib/alignment/alignment.js +6 -13
- package/lib/animations/animations.js +2 -6
- package/lib/balanced-row/balanced-row.js +7 -13
- package/lib/balanced-stack/balanced-stack.js +7 -13
- package/lib/buttons/buttons.js +5 -12
- package/lib/component-with-class-name.js +4 -10
- package/lib/dialog-layout/dialog-layout.css +76 -0
- package/lib/dialog-layout/dialog-layout.d.ts +12 -0
- package/lib/dialog-layout/dialog-layout.js +28 -0
- package/lib/dim/dim.css +11 -0
- package/lib/dim/dim.js +3 -7
- package/lib/dim/transitioning-dim.css +78 -0
- package/lib/dim/transitioning-dim.d.ts +10 -0
- package/lib/dim/transitioning-dim.js +26 -0
- package/lib/flow-list/flow-list.js +7 -13
- package/lib/focusable.js +5 -11
- package/lib/frame/frame.js +3 -7
- package/lib/gauge/gauge.js +6 -14
- package/lib/highlightable-row/highlightable-row.d.ts +0 -1
- package/lib/highlightable-row/highlightable-row.js +3 -7
- package/lib/index.d.ts +2 -0
- package/lib/index.js +24 -38
- package/lib/key-value-layout/key-value-layout.js +3 -7
- package/lib/labels/labels.js +9 -19
- package/lib/screen-column-layout/screen-column-layout.js +8 -17
- package/lib/screen-stack-layout/screen-stack-layout.js +6 -13
- package/lib/scrollable-content/scrollable-content.js +3 -7
- package/lib/slider/slider.js +8 -17
- package/lib/spacing/spacing.js +2 -6
- package/lib/stack-list/stack-list.js +7 -13
- package/lib/tabs/tabs.js +7 -14
- package/lib/typography/typography.js +2 -6
- package/package.json +24 -27
- package/src/dialog-layout/dialog-layout.css +76 -0
- package/src/dialog-layout/dialog-layout.tsx +35 -0
- package/src/dim/dim.css +11 -0
- package/src/dim/transitioning-dim.css +78 -0
- package/src/dim/transitioning-dim.tsx +39 -0
- package/src/index.ts +2 -0
- package/tsconfig.json +7 -7
- package/.github/workflows/check.yaml +0 -22
- package/.prettierrc +0 -4
package/CHANGELOG.md
ADDED
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const component_with_class_name_1 = require("../component-with-class-name");
|
|
5
|
-
require("./alignment.css");
|
|
6
|
-
class VerticalCenter extends component_with_class_name_1.ComponentWithClassName {
|
|
1
|
+
import { ComponentWithClassName } from "../component-with-class-name";
|
|
2
|
+
import "./alignment.css";
|
|
3
|
+
export class VerticalCenter extends ComponentWithClassName {
|
|
7
4
|
constructor() {
|
|
8
5
|
super(...arguments);
|
|
9
6
|
this.className = "vertical-center";
|
|
10
7
|
}
|
|
11
8
|
}
|
|
12
|
-
|
|
13
|
-
class HorizontalCenter extends component_with_class_name_1.ComponentWithClassName {
|
|
9
|
+
export class HorizontalCenter extends ComponentWithClassName {
|
|
14
10
|
constructor() {
|
|
15
11
|
super(...arguments);
|
|
16
12
|
this.className = "horizontal-center";
|
|
17
13
|
}
|
|
18
14
|
}
|
|
19
|
-
|
|
20
|
-
class AlignRight extends component_with_class_name_1.ComponentWithClassName {
|
|
15
|
+
export class AlignRight extends ComponentWithClassName {
|
|
21
16
|
constructor() {
|
|
22
17
|
super(...arguments);
|
|
23
18
|
this.className = "align-right";
|
|
24
19
|
}
|
|
25
20
|
}
|
|
26
|
-
|
|
27
|
-
class NarrowColumn extends component_with_class_name_1.ComponentWithClassName {
|
|
21
|
+
export class NarrowColumn extends ComponentWithClassName {
|
|
28
22
|
constructor() {
|
|
29
23
|
super(...arguments);
|
|
30
24
|
this.className = "narrow-column";
|
|
31
25
|
}
|
|
32
26
|
}
|
|
33
|
-
exports.NarrowColumn = NarrowColumn;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.AnimateInSequence = void 0;
|
|
4
|
-
require("./animations.css");
|
|
5
|
-
class AnimateInSequence {
|
|
1
|
+
import "./animations.css";
|
|
2
|
+
export class AnimateInSequence {
|
|
6
3
|
constructor() {
|
|
7
4
|
this.delay = 0;
|
|
8
5
|
this.interval = 0.05;
|
|
@@ -20,4 +17,3 @@ class AnimateInSequence {
|
|
|
20
17
|
};
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
|
-
exports.AnimateInSequence = AnimateInSequence;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BalancedRow = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
require("./balanced-row.css");
|
|
9
|
-
class BalancedRow extends react_1.default.Component {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import "./balanced-row.css";
|
|
4
|
+
export class BalancedRow extends React.Component {
|
|
10
5
|
render() {
|
|
11
|
-
return (
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
return (_jsx("div", { className: "balanced-row", ...this.props, children: React.Children.map(this.props.children, (child, i) => {
|
|
7
|
+
return _jsx("div", { children: child }, `child-${i}`);
|
|
8
|
+
}) }));
|
|
14
9
|
}
|
|
15
10
|
}
|
|
16
|
-
exports.BalancedRow = BalancedRow;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BalancedStack = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
require("./balanced-stack.css");
|
|
9
|
-
class BalancedStack extends react_1.default.Component {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import "./balanced-stack.css";
|
|
4
|
+
export class BalancedStack extends React.Component {
|
|
10
5
|
render() {
|
|
11
|
-
return (
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
return (_jsx("div", { className: "balanced-stack", children: React.Children.map(this.props.children, (child, i) => {
|
|
7
|
+
return _jsx("div", { children: child }, `child-${i}`);
|
|
8
|
+
}) }));
|
|
14
9
|
}
|
|
15
10
|
}
|
|
16
|
-
exports.BalancedStack = BalancedStack;
|
package/lib/buttons/buttons.js
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MainButton = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const focusable_1 = require("../focusable");
|
|
9
|
-
require("./buttons.css");
|
|
10
|
-
class MainButton extends focusable_1.Focusable {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Focusable } from "../focusable";
|
|
3
|
+
import "./buttons.css";
|
|
4
|
+
export class MainButton extends Focusable {
|
|
11
5
|
constructor() {
|
|
12
6
|
super(...arguments);
|
|
13
7
|
this.className = "main-button";
|
|
14
8
|
}
|
|
15
9
|
renderChildren() {
|
|
16
|
-
return
|
|
10
|
+
return _jsx("span", { children: super.renderChildren() });
|
|
17
11
|
}
|
|
18
12
|
}
|
|
19
|
-
exports.MainButton = MainButton;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ComponentWithClassName = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
class ComponentWithClassName extends react_1.default.Component {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export class ComponentWithClassName extends React.Component {
|
|
9
4
|
render() {
|
|
10
5
|
const props = { ...this.props };
|
|
11
6
|
props.className = this.className + " " + (this.props.className || "");
|
|
12
|
-
return
|
|
7
|
+
return _jsx("div", { ...props, children: this.props.children });
|
|
13
8
|
}
|
|
14
9
|
}
|
|
15
|
-
exports.ComponentWithClassName = ComponentWithClassName;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
.dialog-layout {
|
|
2
|
+
margin: var(--spacing-l);
|
|
3
|
+
background: #000;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
width: 90%;
|
|
6
|
+
max-width: 320px;
|
|
7
|
+
|
|
8
|
+
height: 100%;
|
|
9
|
+
max-height: 50%;
|
|
10
|
+
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
|
|
14
|
+
position: relative;
|
|
15
|
+
|
|
16
|
+
color: white;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.dialog-layout.modal {
|
|
20
|
+
max-width: 800px;
|
|
21
|
+
flex: 1 0 auto;
|
|
22
|
+
max-height: 90%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dialog-layout.packed {
|
|
26
|
+
height: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dialog-layout-top-bar {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
flex: 0 0 15%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dialog-layout-bottom-bar {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: row;
|
|
38
|
+
flex: 0 0 15%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.dialog-layout-top-bar > * {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: row;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.dialog-layout-top-bar-left {
|
|
49
|
+
flex: 0 0 20%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dialog-layout-top-bar-center {
|
|
53
|
+
flex: 1 1 auto;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dialog-layout-top-bar-right {
|
|
58
|
+
flex: 0 0 20%;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dialog-layout-content {
|
|
62
|
+
flex: 1 1 auto;
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
overflow-x: hidden;
|
|
66
|
+
overflow-y: auto;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.dialog-layout-bottom-bar .flow-list {
|
|
70
|
+
flex: 1 0 100%;
|
|
71
|
+
align-items: stretch;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dialog-layout-bottom-bar .flow-list .main-button {
|
|
75
|
+
height: 100%;
|
|
76
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./dialog-layout.css";
|
|
3
|
+
export declare function DialogLayout(props: React.PropsWithChildren & {
|
|
4
|
+
isModal?: boolean;
|
|
5
|
+
isPacked?: boolean;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
export declare function DialogTopBar(props: React.PropsWithChildren): React.JSX.Element;
|
|
8
|
+
export declare function DialogBottomBar(props: React.PropsWithChildren): React.JSX.Element;
|
|
9
|
+
export declare function DialogTopBarLeft(props: React.PropsWithChildren): React.JSX.Element;
|
|
10
|
+
export declare function DialogTopBarCenter(props: React.PropsWithChildren): React.JSX.Element;
|
|
11
|
+
export declare function DialogTopBarRight(props: React.PropsWithChildren): React.JSX.Element;
|
|
12
|
+
export declare function DialogContent(props: React.PropsWithChildren): React.JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "./dialog-layout.css";
|
|
3
|
+
export function DialogLayout(props) {
|
|
4
|
+
const classes = ["dialog-layout"];
|
|
5
|
+
if (props.isModal)
|
|
6
|
+
classes.push("modal");
|
|
7
|
+
if (props.isPacked)
|
|
8
|
+
classes.push("packed");
|
|
9
|
+
return _jsx("div", { className: classes.join(" "), children: props.children });
|
|
10
|
+
}
|
|
11
|
+
export function DialogTopBar(props) {
|
|
12
|
+
return _jsx("div", { className: "dialog-layout-top-bar", children: props.children });
|
|
13
|
+
}
|
|
14
|
+
export function DialogBottomBar(props) {
|
|
15
|
+
return _jsx("div", { className: "dialog-layout-bottom-bar", children: props.children });
|
|
16
|
+
}
|
|
17
|
+
export function DialogTopBarLeft(props) {
|
|
18
|
+
return _jsx("div", { className: "dialog-layout-top-bar-left", children: props.children });
|
|
19
|
+
}
|
|
20
|
+
export function DialogTopBarCenter(props) {
|
|
21
|
+
return _jsx("div", { className: "dialog-layout-top-bar-center", children: props.children });
|
|
22
|
+
}
|
|
23
|
+
export function DialogTopBarRight(props) {
|
|
24
|
+
return _jsx("div", { className: "dialog-layout-top-bar-right", children: props.children });
|
|
25
|
+
}
|
|
26
|
+
export function DialogContent(props) {
|
|
27
|
+
return _jsx("div", { className: "dialog-layout-content", children: props.children });
|
|
28
|
+
}
|
package/lib/dim/dim.css
CHANGED
|
@@ -2,4 +2,15 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 100%;
|
|
4
4
|
background-color: rgba(0, 0, 0, 0.5);
|
|
5
|
+
|
|
6
|
+
position: relative;
|
|
7
|
+
z-index: 2;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
|
|
15
|
+
backdrop-filter: blur(5px);
|
|
5
16
|
}
|
package/lib/dim/dim.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const component_with_class_name_1 = require("../component-with-class-name");
|
|
5
|
-
require("./dim.css");
|
|
6
|
-
class Dim extends component_with_class_name_1.ComponentWithClassName {
|
|
1
|
+
import { ComponentWithClassName } from "../component-with-class-name";
|
|
2
|
+
import "./dim.css";
|
|
3
|
+
export class Dim extends ComponentWithClassName {
|
|
7
4
|
constructor() {
|
|
8
5
|
super(...arguments);
|
|
9
6
|
this.className = "dim";
|
|
10
7
|
}
|
|
11
8
|
}
|
|
12
|
-
exports.Dim = Dim;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--slide-in: slide-up 0.2s cubic-bezier(0.33, 1, 0.68, 1) 1;
|
|
3
|
+
--slide-out: slide-down 0.2s cubic-bezier(0.33, 1, 0.68, 1) 1 forwards;
|
|
4
|
+
--slide-in-x: slide-right 0.2s cubic-bezier(0.33, 1, 0.68, 1) 1;
|
|
5
|
+
--slide-out-x: slide-left 0.2s cubic-bezier(0.33, 1, 0.68, 1) 1 forwards;
|
|
6
|
+
--fade-in: fade-in 0.2s linear 1;
|
|
7
|
+
--fade-out: fade-out 0.2s linear 1 forwards;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@keyframes slide-up {
|
|
11
|
+
0% {
|
|
12
|
+
transform: translateY(100%);
|
|
13
|
+
}
|
|
14
|
+
100% {
|
|
15
|
+
transform: translateY(0%);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes slide-down {
|
|
20
|
+
0% {
|
|
21
|
+
transform: translateY(0%);
|
|
22
|
+
}
|
|
23
|
+
100% {
|
|
24
|
+
transform: translateY(100%);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes slide-right {
|
|
29
|
+
0% {
|
|
30
|
+
transform: translateX(-100%);
|
|
31
|
+
}
|
|
32
|
+
100% {
|
|
33
|
+
transform: translateX(0%);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@keyframes slide-left {
|
|
38
|
+
0% {
|
|
39
|
+
transform: translateX(0%);
|
|
40
|
+
}
|
|
41
|
+
100% {
|
|
42
|
+
transform: translateX(-100%);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes fade-in {
|
|
47
|
+
0% {
|
|
48
|
+
opacity: 0%;
|
|
49
|
+
}
|
|
50
|
+
100% {
|
|
51
|
+
opacity: 100%;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes fade-out {
|
|
56
|
+
0% {
|
|
57
|
+
opacity: 100%;
|
|
58
|
+
}
|
|
59
|
+
100% {
|
|
60
|
+
opacity: 0%;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.dim.opening {
|
|
65
|
+
animation: var(--fade-in);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.dim.closing {
|
|
69
|
+
animation: var(--fade-out);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.dim.opening .dialog-layout {
|
|
73
|
+
animation: var(--slide-in);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dim.closing .dialog-layout {
|
|
77
|
+
animation: var(--slide-out);
|
|
78
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./transitioning-dim.css";
|
|
3
|
+
export declare class TransitioningDim extends React.Component<React.PropsWithChildren, {
|
|
4
|
+
closing: boolean;
|
|
5
|
+
animateOutListener(): void;
|
|
6
|
+
}> {
|
|
7
|
+
constructor(props: React.PropsWithChildren);
|
|
8
|
+
animateOut(): Promise<void>;
|
|
9
|
+
render(): React.JSX.Element;
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Dim } from "./dim";
|
|
4
|
+
import "./transitioning-dim.css";
|
|
5
|
+
export class TransitioningDim extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.state = {
|
|
9
|
+
closing: false,
|
|
10
|
+
animateOutListener() { },
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
animateOut() {
|
|
14
|
+
return new Promise((resolve, reject) => {
|
|
15
|
+
this.setState({
|
|
16
|
+
closing: true,
|
|
17
|
+
animateOutListener: resolve,
|
|
18
|
+
});
|
|
19
|
+
// Safety in case the animation code suckssss
|
|
20
|
+
setTimeout(resolve, 300);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return (_jsx(Dim, { onAnimationEnd: this.state.animateOutListener, className: this.state.closing ? "closing" : "opening", children: this.props.children }));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.FlowList = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
require("./flow-list.css");
|
|
9
|
-
class FlowList extends react_1.default.Component {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import "./flow-list.css";
|
|
4
|
+
export class FlowList extends React.Component {
|
|
10
5
|
render() {
|
|
11
|
-
return (
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
return (_jsx("div", { className: "flow-list", ...this.props, children: React.Children.map(this.props.children, (child, i) => {
|
|
7
|
+
return _jsx("div", { children: child }, `child-${i}`);
|
|
8
|
+
}) }));
|
|
14
9
|
}
|
|
15
10
|
}
|
|
16
|
-
exports.FlowList = FlowList;
|
package/lib/focusable.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Focusable = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
class Focusable extends react_1.default.Component {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export class Focusable extends React.Component {
|
|
9
4
|
onMouseOver() {
|
|
10
5
|
this.divElement?.focus();
|
|
11
6
|
}
|
|
@@ -25,10 +20,9 @@ class Focusable extends react_1.default.Component {
|
|
|
25
20
|
props.className = props.className || "";
|
|
26
21
|
props.className += " " + this.className;
|
|
27
22
|
props.className += " " + (this.props.disabled ? "disabled" : "");
|
|
28
|
-
return (
|
|
23
|
+
return (_jsx("div", { ...props, onMouseOver: () => this.onMouseOver(), onKeyUp: (e) => this.keyUp(e), ref: (div) => (this.divElement = div), children: this.renderChildren() }));
|
|
29
24
|
}
|
|
30
25
|
renderChildren() {
|
|
31
|
-
return
|
|
26
|
+
return _jsx(_Fragment, { children: this.props.children });
|
|
32
27
|
}
|
|
33
28
|
}
|
|
34
|
-
exports.Focusable = Focusable;
|
package/lib/frame/frame.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const focusable_1 = require("../focusable");
|
|
5
|
-
require("./frame.css");
|
|
6
|
-
class Frame extends focusable_1.Focusable {
|
|
1
|
+
import { Focusable } from "../focusable";
|
|
2
|
+
import "./frame.css";
|
|
3
|
+
export class Frame extends Focusable {
|
|
7
4
|
constructor() {
|
|
8
5
|
super(...arguments);
|
|
9
6
|
this.className = "frame";
|
|
10
7
|
}
|
|
11
8
|
}
|
|
12
|
-
exports.Frame = Frame;
|
package/lib/gauge/gauge.js
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Gauge = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
require("./gauge.css");
|
|
9
|
-
class Gauge extends react_1.default.Component {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import "./gauge.css";
|
|
4
|
+
export class Gauge extends React.Component {
|
|
10
5
|
render() {
|
|
11
|
-
return (
|
|
12
|
-
react_1.default.createElement("div", { style: {
|
|
6
|
+
return (_jsx("div", { className: "gauge", ...this.props, children: _jsx("div", { style: {
|
|
13
7
|
width: `${Math.max(0, Math.min(100, this.props.value * 100))}%`,
|
|
14
|
-
} }
|
|
15
|
-
react_1.default.createElement("label", null, this.props.label))));
|
|
8
|
+
}, children: _jsx("label", { children: this.props.label }) }) }));
|
|
16
9
|
}
|
|
17
10
|
}
|
|
18
|
-
exports.Gauge = Gauge;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const focusable_1 = require("../focusable");
|
|
5
|
-
require("./highlightable-row.css");
|
|
6
|
-
class HighlightableRow extends focusable_1.Focusable {
|
|
1
|
+
import { Focusable } from "../focusable";
|
|
2
|
+
import "./highlightable-row.css";
|
|
3
|
+
export class HighlightableRow extends Focusable {
|
|
7
4
|
saneProps() {
|
|
8
5
|
const { highlighted, ...other } = this.props;
|
|
9
6
|
return other;
|
|
@@ -12,4 +9,3 @@ class HighlightableRow extends focusable_1.Focusable {
|
|
|
12
9
|
return ("highlightable-row" + (this.props.highlighted ? " highlighted" : ""));
|
|
13
10
|
}
|
|
14
11
|
}
|
|
15
|
-
exports.HighlightableRow = HighlightableRow;
|
package/lib/index.d.ts
CHANGED
|
@@ -4,7 +4,9 @@ export * from "./animations/animations";
|
|
|
4
4
|
export * from "./balanced-row/balanced-row";
|
|
5
5
|
export * from "./balanced-stack/balanced-stack";
|
|
6
6
|
export * from "./buttons/buttons";
|
|
7
|
+
export * from "./dialog-layout/dialog-layout";
|
|
7
8
|
export * from "./dim/dim";
|
|
9
|
+
export * from "./dim/transitioning-dim";
|
|
8
10
|
export * from "./flow-list/flow-list";
|
|
9
11
|
export * from "./focusable";
|
|
10
12
|
export * from "./frame/frame";
|
package/lib/index.js
CHANGED
|
@@ -1,38 +1,24 @@
|
|
|
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
|
-
__exportStar(require("./focusable"), exports);
|
|
26
|
-
__exportStar(require("./frame/frame"), exports);
|
|
27
|
-
__exportStar(require("./gauge/gauge"), exports);
|
|
28
|
-
__exportStar(require("./highlightable-row/highlightable-row"), exports);
|
|
29
|
-
__exportStar(require("./key-value-layout/key-value-layout"), exports);
|
|
30
|
-
__exportStar(require("./labels/labels"), exports);
|
|
31
|
-
__exportStar(require("./screen-column-layout/screen-column-layout"), exports);
|
|
32
|
-
__exportStar(require("./screen-stack-layout/screen-stack-layout"), exports);
|
|
33
|
-
__exportStar(require("./scrollable-content/scrollable-content"), exports);
|
|
34
|
-
__exportStar(require("./slider/slider"), exports);
|
|
35
|
-
__exportStar(require("./spacing/spacing"), exports);
|
|
36
|
-
__exportStar(require("./stack-list/stack-list"), exports);
|
|
37
|
-
__exportStar(require("./tabs/tabs"), exports);
|
|
38
|
-
__exportStar(require("./typography/typography"), exports);
|
|
1
|
+
import "./reset/reset.css";
|
|
2
|
+
export * from "./alignment/alignment";
|
|
3
|
+
export * from "./animations/animations";
|
|
4
|
+
export * from "./balanced-row/balanced-row";
|
|
5
|
+
export * from "./balanced-stack/balanced-stack";
|
|
6
|
+
export * from "./buttons/buttons";
|
|
7
|
+
export * from "./dialog-layout/dialog-layout";
|
|
8
|
+
export * from "./dim/dim";
|
|
9
|
+
export * from "./dim/transitioning-dim";
|
|
10
|
+
export * from "./flow-list/flow-list";
|
|
11
|
+
export * from "./focusable";
|
|
12
|
+
export * from "./frame/frame";
|
|
13
|
+
export * from "./gauge/gauge";
|
|
14
|
+
export * from "./highlightable-row/highlightable-row";
|
|
15
|
+
export * from "./key-value-layout/key-value-layout";
|
|
16
|
+
export * from "./labels/labels";
|
|
17
|
+
export * from "./screen-column-layout/screen-column-layout";
|
|
18
|
+
export * from "./screen-stack-layout/screen-stack-layout";
|
|
19
|
+
export * from "./scrollable-content/scrollable-content";
|
|
20
|
+
export * from "./slider/slider";
|
|
21
|
+
export * from "./spacing/spacing";
|
|
22
|
+
export * from "./stack-list/stack-list";
|
|
23
|
+
export * from "./tabs/tabs";
|
|
24
|
+
export * from "./typography/typography";
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const component_with_class_name_1 = require("../component-with-class-name");
|
|
5
|
-
require("./key-value-layout.css");
|
|
6
|
-
class KeyValueLayout extends component_with_class_name_1.ComponentWithClassName {
|
|
1
|
+
import { ComponentWithClassName } from "../component-with-class-name";
|
|
2
|
+
import "./key-value-layout.css";
|
|
3
|
+
export class KeyValueLayout extends ComponentWithClassName {
|
|
7
4
|
constructor() {
|
|
8
5
|
super(...arguments);
|
|
9
6
|
this.className = "key-value-layout";
|
|
10
7
|
}
|
|
11
8
|
}
|
|
12
|
-
exports.KeyValueLayout = KeyValueLayout;
|