@jobber/components 2.78.3 → 2.79.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 CHANGED
@@ -8,6 +8,17 @@ menu: Changelog
8
8
  All notable changes to this project will be documented in this file.
9
9
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
10
10
 
11
+ # [2.79.0](https://github.com/GetJobber/atlantis/compare/@jobber/components@2.78.3...@jobber/components@2.79.0) (2022-03-25)
12
+
13
+
14
+ ### Features
15
+
16
+ * **components:** create statuslabel component ([#870](https://github.com/GetJobber/atlantis/issues/870)) ([cced9b9](https://github.com/GetJobber/atlantis/commit/cced9b9c1af70432b62766e440f445b949bdd236))
17
+
18
+
19
+
20
+
21
+
11
22
  ## [2.78.3](https://github.com/GetJobber/atlantis/compare/@jobber/components@2.78.2...@jobber/components@2.78.3) (2022-03-17)
12
23
 
13
24
  **Note:** Version bump only for package @jobber/components
@@ -0,0 +1 @@
1
+ export * from "./dist/StatusLabel";
package/StatusLabel.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true,
5
+ });
6
+
7
+ var StatusLabel = require("./dist/StatusLabel");
8
+
9
+ Object.keys(StatusLabel).forEach(function(key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ Object.defineProperty(exports, key, {
12
+ enumerable: true,
13
+ get: function get() {
14
+ return StatusLabel[key];
15
+ },
16
+ });
17
+ });
@@ -0,0 +1,25 @@
1
+ export declare type StatusType = "success" | "warning" | "critical" | "inactive" | "informative";
2
+ export interface StatusLabelType {
3
+ readonly statusLabel: string;
4
+ readonly statusType?: StatusType;
5
+ }
6
+ interface StatusLabelProps {
7
+ /**
8
+ * Text to display
9
+ */
10
+ readonly label: string;
11
+ /**
12
+ * Alignment of label
13
+ *
14
+ * @default "start"
15
+ */
16
+ readonly alignment?: "start" | "end";
17
+ /**
18
+ * Status color of the indicator beside text
19
+ *
20
+ * @default "inactive"
21
+ */
22
+ readonly status: StatusType;
23
+ }
24
+ export declare function StatusLabel({ label, alignment, status, }: StatusLabelProps): JSX.Element;
25
+ export {};
@@ -0,0 +1 @@
1
+ export { StatusLabel } from "./StatusLabel";
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
+
7
+ require('../chunk-b67af3cb.js');
8
+ var React = require('react');
9
+ var React__default = _interopDefault(React);
10
+ var __chunk_2 = require('../chunk-17e02351.js');
11
+ var classnames = _interopDefault(require('classnames'));
12
+ require('../Typography/index.js');
13
+ var index$1 = require('../Text/index.js');
14
+
15
+ var css = ":root {\n --statusLabel-icon-diameter: calc(var(--space-base) - var(--space-smaller));\n}\n\n.NUUO4mR41Qn5Pf0pzjhZe {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n grid-gap: var(--space-small);\n grid-gap: var(--space-small);\n gap: var(--space-small);\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n}\n\n._2XU8xQD0q92o9P2Ej5EdwP {\n width: calc(var(--space-base) - var(--space-smaller));\n width: calc(var(--space-base) - var(--space-smaller));\n width: var(--statusLabel-icon-diameter);\n height: calc(var(--space-base) - var(--space-smaller));\n height: calc(var(--space-base) - var(--space-smaller));\n height: var(--statusLabel-icon-diameter);\n margin-top: var(--space-smallest);\n border-radius: var(--radius-base);\n background-color: var(--color-success);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n\n._3eQHL9hZlneMfEoGaF0dDv {\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n";
16
+ var styles = {"statusLabelRow":"NUUO4mR41Qn5Pf0pzjhZe","statusIndicator":"_2XU8xQD0q92o9P2Ej5EdwP","labelTextEndAligned":"_3eQHL9hZlneMfEoGaF0dDv"};
17
+ __chunk_2.styleInject(css);
18
+
19
+ function StatusLabel(_a) {
20
+ var label = _a.label, _b = _a.alignment, alignment = _b === void 0 ? "start" : _b, _c = _a.status, status = _c === void 0 ? "inactive" : _c;
21
+ var containerClassNames = classnames(styles.statusLabelRow, alignment === "end" && styles.labelTextEndAligned);
22
+ return (React__default.createElement("div", { role: "status", className: containerClassNames },
23
+ React__default.createElement(StatusLabelIcon, { status: status }),
24
+ React__default.createElement(index$1.Text, { size: "small", align: alignment }, label)));
25
+ }
26
+ function StatusLabelIcon(_a) {
27
+ var status = _a.status;
28
+ return (React__default.createElement("div", { style: { backgroundColor: "var(--color-" + status }, className: styles.statusIndicator }));
29
+ }
30
+
31
+ exports.StatusLabel = StatusLabel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "2.78.3",
3
+ "version": "2.79.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -85,5 +85,5 @@
85
85
  "> 1%",
86
86
  "IE 10"
87
87
  ],
88
- "gitHead": "67a229b18176c2fe701e218a94049fe8a31aa2f9"
88
+ "gitHead": "d7c9cd86f4cfc7c3d21ef6c6d07773675cad69b7"
89
89
  }