@remvst/design-system 1.2.0 → 2.0.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 +21 -0
- package/lib/alignment/alignment.d.ts +4 -13
- package/lib/alignment/alignment.js +6 -33
- 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.d.ts +6 -4
- package/lib/component-with-class-name.js +11 -14
- package/lib/dialog-layout/dialog-layout.js +16 -29
- package/lib/dim/dim.d.ts +1 -4
- package/lib/dim/dim.js +3 -12
- package/lib/dim/transitioning-dim.js +6 -12
- 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.js +24 -40
- package/lib/key-value-layout/key-value-layout.d.ts +1 -4
- package/lib/key-value-layout/key-value-layout.js +3 -12
- package/lib/labels/labels.d.ts +7 -22
- package/lib/labels/labels.js +9 -54
- package/lib/screen-column-layout/screen-column-layout.d.ts +6 -19
- package/lib/screen-column-layout/screen-column-layout.js +8 -47
- package/lib/screen-stack-layout/screen-stack-layout.d.ts +4 -13
- package/lib/screen-stack-layout/screen-stack-layout.js +6 -33
- package/lib/scrollable-content/scrollable-content.d.ts +1 -4
- package/lib/scrollable-content/scrollable-content.js +3 -12
- 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/alignment/alignment.tsx +5 -16
- package/src/component-with-class-name.tsx +22 -10
- package/src/dim/dim.tsx +2 -4
- package/src/key-value-layout/key-value-layout.tsx +2 -4
- package/src/labels/labels.tsx +8 -28
- package/src/screen-column-layout/screen-column-layout.tsx +17 -24
- package/src/screen-stack-layout/screen-stack-layout.tsx +9 -16
- package/src/scrollable-content/scrollable-content.tsx +2 -4
- package/tsconfig.json +7 -7
- package/.github/workflows/check.yaml +0 -22
- package/.prettierrc +0 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# @remvst/design-system
|
|
2
|
+
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- f4ae4fa: Migrate to React 19. Update the workspace catalog to `react`/`react-dom` `^19.2.0`, `@types/react`/`@types/react-dom` `^19.2.0`, and `@vitejs/plugin-react` `^5.0.0`.
|
|
8
|
+
|
|
9
|
+
**Breaking:** the published `react` (and `react-dom`) peer dependency range is narrowed to `^19.2.0`, dropping support for React 18. Consumers must upgrade to React 19.
|
|
10
|
+
|
|
11
|
+
No source changes were required — the packages already used the modern `createRoot` API, the `react-jsx` runtime, and explicitly typed component children.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 11a4966: Replace the `ComponentWithClassName` base class with a `divWithClassName` factory that returns a forward-ref function component. Public JSX usage of the design-system components is unchanged.
|
|
16
|
+
|
|
17
|
+
## 1.3.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- f4821d3: Moves rxjs and react to peer dependencies
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import { ComponentWithClassName } from "../component-with-class-name";
|
|
2
1
|
import "./alignment.css";
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare
|
|
7
|
-
protected readonly className = "horizontal-center";
|
|
8
|
-
}
|
|
9
|
-
export declare class AlignRight extends ComponentWithClassName {
|
|
10
|
-
protected readonly className = "align-right";
|
|
11
|
-
}
|
|
12
|
-
export declare class NarrowColumn extends ComponentWithClassName {
|
|
13
|
-
protected readonly className = "narrow-column";
|
|
14
|
-
}
|
|
2
|
+
export declare const VerticalCenter: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const HorizontalCenter: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const AlignRight: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const NarrowColumn: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,33 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.className = "vertical-center";
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.VerticalCenter = VerticalCenter;
|
|
13
|
-
class HorizontalCenter extends component_with_class_name_1.ComponentWithClassName {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this.className = "horizontal-center";
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.HorizontalCenter = HorizontalCenter;
|
|
20
|
-
class AlignRight extends component_with_class_name_1.ComponentWithClassName {
|
|
21
|
-
constructor() {
|
|
22
|
-
super(...arguments);
|
|
23
|
-
this.className = "align-right";
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.AlignRight = AlignRight;
|
|
27
|
-
class NarrowColumn extends component_with_class_name_1.ComponentWithClassName {
|
|
28
|
-
constructor() {
|
|
29
|
-
super(...arguments);
|
|
30
|
-
this.className = "narrow-column";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.NarrowColumn = NarrowColumn;
|
|
1
|
+
import { divWithClassName } from "../component-with-class-name";
|
|
2
|
+
import "./alignment.css";
|
|
3
|
+
export const VerticalCenter = divWithClassName("vertical-center");
|
|
4
|
+
export const HorizontalCenter = divWithClassName("horizontal-center");
|
|
5
|
+
export const AlignRight = divWithClassName("align-right");
|
|
6
|
+
export const NarrowColumn = divWithClassName("narrow-column");
|
|
@@ -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,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Creates a `<div>` component with a fixed base class name. Any `className`
|
|
4
|
+
* passed by the consumer is appended, and all other div props (including
|
|
5
|
+
* `ref`) are forwarded.
|
|
6
|
+
*/
|
|
7
|
+
export declare function divWithClassName<Props extends React.HTMLAttributes<HTMLDivElement> = React.HTMLAttributes<HTMLDivElement>>(baseClassName: string): React.ForwardRefExoticComponent<React.PropsWithoutRef<Props> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return react_1.default.createElement("div", { ...props }, this.props.children);
|
|
13
|
-
}
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a `<div>` component with a fixed base class name. Any `className`
|
|
5
|
+
* passed by the consumer is appended, and all other div props (including
|
|
6
|
+
* `ref`) are forwarded.
|
|
7
|
+
*/
|
|
8
|
+
export function divWithClassName(baseClassName) {
|
|
9
|
+
const Component = React.forwardRef(({ className, children, ...rest }, ref) => (_jsx("div", { ref: ref, className: className ? `${baseClassName} ${className}` : baseClassName, ...rest, children: children })));
|
|
10
|
+
Component.displayName = baseClassName;
|
|
11
|
+
return Component;
|
|
14
12
|
}
|
|
15
|
-
exports.ComponentWithClassName = ComponentWithClassName;
|
|
@@ -1,41 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DialogContent = exports.DialogTopBarRight = exports.DialogTopBarCenter = exports.DialogTopBarLeft = exports.DialogBottomBar = exports.DialogTopBar = exports.DialogLayout = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
require("./dialog-layout.css");
|
|
9
|
-
function DialogLayout(props) {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "./dialog-layout.css";
|
|
3
|
+
export function DialogLayout(props) {
|
|
10
4
|
const classes = ["dialog-layout"];
|
|
11
5
|
if (props.isModal)
|
|
12
6
|
classes.push("modal");
|
|
13
7
|
if (props.isPacked)
|
|
14
8
|
classes.push("packed");
|
|
15
|
-
return
|
|
9
|
+
return _jsx("div", { className: classes.join(" "), children: props.children });
|
|
16
10
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return react_1.default.createElement("div", { className: "dialog-layout-top-bar" }, props.children);
|
|
11
|
+
export function DialogTopBar(props) {
|
|
12
|
+
return _jsx("div", { className: "dialog-layout-top-bar", children: props.children });
|
|
20
13
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return react_1.default.createElement("div", { className: "dialog-layout-bottom-bar" }, props.children);
|
|
14
|
+
export function DialogBottomBar(props) {
|
|
15
|
+
return _jsx("div", { className: "dialog-layout-bottom-bar", children: props.children });
|
|
24
16
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return react_1.default.createElement("div", { className: "dialog-layout-top-bar-left" }, props.children);
|
|
17
|
+
export function DialogTopBarLeft(props) {
|
|
18
|
+
return _jsx("div", { className: "dialog-layout-top-bar-left", children: props.children });
|
|
28
19
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return react_1.default.createElement("div", { className: "dialog-layout-top-bar-center" }, props.children);
|
|
20
|
+
export function DialogTopBarCenter(props) {
|
|
21
|
+
return _jsx("div", { className: "dialog-layout-top-bar-center", children: props.children });
|
|
32
22
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return react_1.default.createElement("div", { className: "dialog-layout-top-bar-right" }, props.children);
|
|
23
|
+
export function DialogTopBarRight(props) {
|
|
24
|
+
return _jsx("div", { className: "dialog-layout-top-bar-right", children: props.children });
|
|
36
25
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return react_1.default.createElement("div", { className: "dialog-layout-content" }, props.children);
|
|
26
|
+
export function DialogContent(props) {
|
|
27
|
+
return _jsx("div", { className: "dialog-layout-content", children: props.children });
|
|
40
28
|
}
|
|
41
|
-
exports.DialogContent = DialogContent;
|
package/lib/dim/dim.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import { ComponentWithClassName } from "../component-with-class-name";
|
|
2
1
|
import "./dim.css";
|
|
3
|
-
export declare
|
|
4
|
-
protected className: string;
|
|
5
|
-
}
|
|
2
|
+
export declare const Dim: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
package/lib/dim/dim.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
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 {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.className = "dim";
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.Dim = Dim;
|
|
1
|
+
import { divWithClassName } from "../component-with-class-name";
|
|
2
|
+
import "./dim.css";
|
|
3
|
+
export const Dim = divWithClassName("dim");
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.TransitioningDim = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const dim_1 = require("./dim");
|
|
9
|
-
require("./transitioning-dim.css");
|
|
10
|
-
class TransitioningDim extends react_1.default.Component {
|
|
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 {
|
|
11
6
|
constructor(props) {
|
|
12
7
|
super(props);
|
|
13
8
|
this.state = {
|
|
@@ -26,7 +21,6 @@ class TransitioningDim extends react_1.default.Component {
|
|
|
26
21
|
});
|
|
27
22
|
}
|
|
28
23
|
render() {
|
|
29
|
-
return (
|
|
24
|
+
return (_jsx(Dim, { onAnimationEnd: this.state.animateOutListener, className: this.state.closing ? "closing" : "opening", children: this.props.children }));
|
|
30
25
|
}
|
|
31
26
|
}
|
|
32
|
-
exports.TransitioningDim = TransitioningDim;
|
|
@@ -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.js
CHANGED
|
@@ -1,40 +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("./dim/transitioning-dim"), exports);
|
|
26
|
-
__exportStar(require("./flow-list/flow-list"), exports);
|
|
27
|
-
__exportStar(require("./focusable"), exports);
|
|
28
|
-
__exportStar(require("./frame/frame"), exports);
|
|
29
|
-
__exportStar(require("./gauge/gauge"), exports);
|
|
30
|
-
__exportStar(require("./highlightable-row/highlightable-row"), exports);
|
|
31
|
-
__exportStar(require("./key-value-layout/key-value-layout"), exports);
|
|
32
|
-
__exportStar(require("./labels/labels"), exports);
|
|
33
|
-
__exportStar(require("./screen-column-layout/screen-column-layout"), exports);
|
|
34
|
-
__exportStar(require("./screen-stack-layout/screen-stack-layout"), exports);
|
|
35
|
-
__exportStar(require("./scrollable-content/scrollable-content"), exports);
|
|
36
|
-
__exportStar(require("./slider/slider"), exports);
|
|
37
|
-
__exportStar(require("./spacing/spacing"), exports);
|
|
38
|
-
__exportStar(require("./stack-list/stack-list"), exports);
|
|
39
|
-
__exportStar(require("./tabs/tabs"), exports);
|
|
40
|
-
__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,5 +1,2 @@
|
|
|
1
|
-
import { ComponentWithClassName } from "../component-with-class-name";
|
|
2
1
|
import "./key-value-layout.css";
|
|
3
|
-
export declare
|
|
4
|
-
protected readonly className = "key-value-layout";
|
|
5
|
-
}
|
|
2
|
+
export declare const KeyValueLayout: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +1,3 @@
|
|
|
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 {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.className = "key-value-layout";
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.KeyValueLayout = KeyValueLayout;
|
|
1
|
+
import { divWithClassName } from "../component-with-class-name";
|
|
2
|
+
import "./key-value-layout.css";
|
|
3
|
+
export const KeyValueLayout = divWithClassName("key-value-layout");
|
package/lib/labels/labels.d.ts
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import { ComponentWithClassName } from "../component-with-class-name";
|
|
2
1
|
import "./labels.css";
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare
|
|
10
|
-
readonly className = "label label-medium";
|
|
11
|
-
}
|
|
12
|
-
export declare class SmallLabel extends ComponentWithClassName {
|
|
13
|
-
readonly className = "label label-small";
|
|
14
|
-
}
|
|
15
|
-
export declare class TinyLabel extends ComponentWithClassName {
|
|
16
|
-
readonly className = "label label-tiny";
|
|
17
|
-
}
|
|
18
|
-
export declare class MainTitle extends ComponentWithClassName {
|
|
19
|
-
readonly className = "label main-title";
|
|
20
|
-
}
|
|
21
|
-
export declare class TextBlock extends ComponentWithClassName {
|
|
22
|
-
readonly className = "text-block";
|
|
23
|
-
}
|
|
2
|
+
export declare const GiantLabel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const LargeLabel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const MediumLabel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const SmallLabel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const TinyLabel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export declare const MainTitle: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const TextBlock: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|