@jobber/components 2.78.1 → 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 +27 -0
- package/StatusLabel.d.ts +1 -0
- package/StatusLabel.js +17 -0
- package/dist/Popover/index.js +1 -1
- package/dist/StatusLabel/StatusLabel.d.ts +25 -0
- package/dist/StatusLabel/index.d.ts +1 -0
- package/dist/StatusLabel/index.js +31 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,33 @@ 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
|
+
|
|
22
|
+
## [2.78.3](https://github.com/GetJobber/atlantis/compare/@jobber/components@2.78.2...@jobber/components@2.78.3) (2022-03-17)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @jobber/components
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [2.78.2](https://github.com/GetJobber/atlantis/compare/@jobber/components@2.78.1...@jobber/components@2.78.2) (2022-03-16)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @jobber/components
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
11
38
|
## [2.78.1](https://github.com/GetJobber/atlantis/compare/@jobber/components@2.78.0...@jobber/components@2.78.1) (2022-03-10)
|
|
12
39
|
|
|
13
40
|
|
package/StatusLabel.d.ts
ADDED
|
@@ -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
|
+
});
|
package/dist/Popover/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var hooks = require('@jobber/hooks');
|
|
|
18
18
|
var index$1$1 = require('../ButtonDismiss/index.js');
|
|
19
19
|
var reactPopper = require('react-popper');
|
|
20
20
|
|
|
21
|
-
var css = ":root {\n --card--base-padding: var(--space-base);\n --popover--padding: var(--space-base);\n --popover--width: calc(var(--base-unit) * 21.875);\n --dismiss--button-padding: calc(var(--base-unit) / 4);\n}\n\n.bmcwfoRgxW9uxv0uyXH04 {\n display: -ms-flexbox;\n display: flex;\n position: \"relative\";\n padding: var(--space-base);\n padding: var(--space-base);\n padding: var(--popover--padding);\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.TjIegPUFwvTBnPHT-hzfN {\n float: right;\n padding: calc(var(--base-unit) / 4);\n padding: calc(var(--base-unit) / 4);\n padding: var(--dismiss--button-padding);\n text-align: right;\n}\n\n._1v-Ekqld7VhWiu8_bFt62z {\n z-index: var(--elevation-
|
|
21
|
+
var css = ":root {\n --card--base-padding: var(--space-base);\n --popover--padding: var(--space-base);\n --popover--width: calc(var(--base-unit) * 21.875);\n --dismiss--button-padding: calc(var(--base-unit) / 4);\n}\n\n.bmcwfoRgxW9uxv0uyXH04 {\n display: -ms-flexbox;\n display: flex;\n position: \"relative\";\n padding: var(--space-base);\n padding: var(--space-base);\n padding: var(--popover--padding);\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.TjIegPUFwvTBnPHT-hzfN {\n float: right;\n padding: calc(var(--base-unit) / 4);\n padding: calc(var(--base-unit) / 4);\n padding: var(--dismiss--button-padding);\n text-align: right;\n}\n\n._1v-Ekqld7VhWiu8_bFt62z {\n z-index: var(--elevation-tooltip);\n width: -webkit-max-content;\n width: -moz-max-content;\n width: max-content;\n max-width: calc(var(--base-unit) * 21.875);\n max-width: calc(var(--base-unit) * 21.875);\n max-width: var(--popover--width);\n box-shadow: var(--shadow-base);\n border: var(--border-base) solid var(--color-border);\n border-radius: var(--radius-base);\n font-size: var(--base-unit);\n line-height: normal;\n background: var(--color-surface);\n}\n\n._1v-Ekqld7VhWiu8_bFt62z > * {\n --public-content--padding: var(--card--base-padding);\n}\n\n.ZBY5pcUZw7V-86CZwsJcF {\n visibility: hidden;\n}\n\n.ZBY5pcUZw7V-86CZwsJcF,\n.ZBY5pcUZw7V-86CZwsJcF::before {\n position: absolute;\n width: var(--base-unit);\n height: var(--base-unit);\n background: inherit;\n}\n\n.ZBY5pcUZw7V-86CZwsJcF::before {\n content: \"\";\n visibility: visible;\n border: var(--border-base) solid var(--color-border);\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n -webkit-transform-origin: center;\n transform-origin: center;\n -webkit-clip-path: polygon(-4px -4px, 15.3px 0, 0 15.3px);\n clip-path: polygon(-4px -4px, 15.3px 0, 0 15.3px);\n}\n\n._1v-Ekqld7VhWiu8_bFt62z[data-popper-placement^=\"top\"] > .ZBY5pcUZw7V-86CZwsJcF {\n bottom: -5px;\n}\n\n._1v-Ekqld7VhWiu8_bFt62z[data-popper-placement^=\"top\"] > .ZBY5pcUZw7V-86CZwsJcF::before {\n -webkit-transform: rotate(-135deg);\n transform: rotate(-135deg);\n}\n\n._1v-Ekqld7VhWiu8_bFt62z[data-popper-placement^=\"bottom\"] > .ZBY5pcUZw7V-86CZwsJcF {\n top: -7px;\n}\n\n._1v-Ekqld7VhWiu8_bFt62z[data-popper-placement^=\"left\"] > .ZBY5pcUZw7V-86CZwsJcF {\n right: -5px;\n}\n\n._1v-Ekqld7VhWiu8_bFt62z[data-popper-placement^=\"left\"] > .ZBY5pcUZw7V-86CZwsJcF::before {\n -webkit-transform: rotate(135deg);\n transform: rotate(135deg);\n}\n\n._1v-Ekqld7VhWiu8_bFt62z[data-popper-placement^=\"right\"] > .ZBY5pcUZw7V-86CZwsJcF {\n left: -7px;\n}\n\n._1v-Ekqld7VhWiu8_bFt62z[data-popper-placement^=\"right\"] > .ZBY5pcUZw7V-86CZwsJcF::before {\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n}\n";
|
|
22
22
|
var classes = {"header":"bmcwfoRgxW9uxv0uyXH04","dismissButton":"TjIegPUFwvTBnPHT-hzfN","popover":"_1v-Ekqld7VhWiu8_bFt62z","arrow":"ZBY5pcUZw7V-86CZwsJcF"};
|
|
23
23
|
__chunk_2.styleInject(css);
|
|
24
24
|
|
|
@@ -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.
|
|
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": "
|
|
88
|
+
"gitHead": "d7c9cd86f4cfc7c3d21ef6c6d07773675cad69b7"
|
|
89
89
|
}
|