@react-spectrum/statuslight 3.2.0 → 3.2.4
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/dist/main.css +1 -2
- package/dist/main.js +104 -85
- package/dist/main.js.map +1 -1
- package/dist/module.js +81 -57
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/main.css.map +0 -1
package/dist/main.css
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
.
|
|
2
|
-
/*# sourceMappingURL=main.css.map */
|
|
1
|
+
.spectrum-StatusLight_c020b6{min-height:var(--spectrum-statuslight-height,var(--spectrum-alias-single-line-height));padding:calc(var(--spectrum-global-dimension-size-65) - 1px)0 calc(var(--spectrum-global-dimension-size-65) + 1px)0;box-sizing:border-box;font-size:var(--spectrum-statuslight-text-size,var(--spectrum-alias-font-size-default));font-weight:var(--spectrum-statuslight-text-font-weight,var(--spectrum-alias-body-text-font-weight));flex-direction:row;align-items:flex-start;line-height:1.44;display:flex}.spectrum-StatusLight_c020b6:before{content:"";width:var(--spectrum-statuslight-dot-size,var(--spectrum-global-dimension-size-100));height:var(--spectrum-statuslight-dot-size,var(--spectrum-global-dimension-size-100));margin:calc(var(--spectrum-global-dimension-size-65) + 1px)var(--spectrum-statuslight-text-gap,var(--spectrum-global-dimension-size-150))calc(var(--spectrum-global-dimension-size-65) - 1px)var(--spectrum-statuslight-text-gap,var(--spectrum-global-dimension-size-150));border-radius:50%;flex-grow:0;flex-shrink:0;display:inline-block}.spectrum-StatusLight--neutral_c020b6{font-style:italic}.spectrum-StatusLight_c020b6{color:var(--spectrum-statuslight-text-color,var(--spectrum-alias-text-color))}.spectrum-StatusLight_c020b6[disabled],.spectrum-StatusLight_c020b6.is-disabled_c020b6{color:var(--spectrum-statuslight-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-StatusLight_c020b6[disabled]:before,.spectrum-StatusLight_c020b6.is-disabled_c020b6:before{background-color:var(--spectrum-statuslight-dot-color-disabled,var(--spectrum-global-color-gray-400))}.spectrum-StatusLight--negative_c020b6:before{background-color:var(--spectrum-statuslight-negative-dot-color,var(--spectrum-semantic-negative-color-status))}.spectrum-StatusLight--notice_c020b6:before{background-color:var(--spectrum-statuslight-notice-dot-color,var(--spectrum-semantic-notice-color-status))}.spectrum-StatusLight--positive_c020b6:before{background-color:var(--spectrum-statuslight-positive-dot-color,var(--spectrum-semantic-positive-color-status))}.spectrum-StatusLight--info_c020b6:before,.spectrum-StatusLight--active_c020b6:before{background-color:var(--spectrum-statuslight-info-dot-color,var(--spectrum-semantic-informative-color-status))}.spectrum-StatusLight--neutral_c020b6{color:var(--spectrum-statuslight-neutral-text-color,var(--spectrum-global-color-gray-700))}.spectrum-StatusLight--neutral_c020b6:before{background-color:var(--spectrum-statuslight-neutral-dot-color,var(--spectrum-global-color-gray-500))}.spectrum-StatusLight--celery_c020b6:before{background-color:var(--spectrum-statuslight-dot-color-label-celery,var(--spectrum-global-color-celery-400))}.spectrum-StatusLight--yellow_c020b6:before{background-color:var(--spectrum-statuslight-dot-color-label-yellow,var(--spectrum-global-color-yellow-400))}.spectrum-StatusLight--fuchsia_c020b6:before{background-color:var(--spectrum-statuslight-dot-color-label-fuchsia,var(--spectrum-global-color-fuchsia-400))}.spectrum-StatusLight--indigo_c020b6:before{background-color:var(--spectrum-statuslight-dot-color-label-indigo,var(--spectrum-global-color-indigo-400))}.spectrum-StatusLight--seafoam_c020b6:before{background-color:var(--spectrum-statuslight-dot-color-label-seafoam,var(--spectrum-global-color-seafoam-400))}.spectrum-StatusLight--chartreuse_c020b6:before{background-color:var(--spectrum-statuslight-dot-color-label-chartreuse,var(--spectrum-global-color-chartreuse-400))}.spectrum-StatusLight--magenta_c020b6:before{background-color:var(--spectrum-statuslight-dot-color-label-magenta,var(--spectrum-global-color-magenta-400))}.spectrum-StatusLight--purple_c020b6:before{background-color:var(--spectrum-statuslight-dot-color-label-purple,var(--spectrum-global-color-purple-400))}@media (forced-colors:active){.spectrum-StatusLight_c020b6{forced-color-adjust:none;--spectrum-statuslight-text-color-disabled:GrayText;--spectrum-statuslight-dot-color-disabled:GrayText}.spectrum-StatusLight_c020b6:before{border:1px solid ButtonText}}
|
package/dist/main.js
CHANGED
|
@@ -1,96 +1,115 @@
|
|
|
1
|
-
var {
|
|
2
|
-
useProviderProps
|
|
3
|
-
} = require("@react-spectrum/provider");
|
|
4
|
-
|
|
5
|
-
var _react2 = require("react");
|
|
6
|
-
|
|
7
|
-
var _react = $parcel$interopDefault(_react2);
|
|
8
|
-
|
|
9
|
-
var {
|
|
10
|
-
forwardRef
|
|
11
|
-
} = _react2;
|
|
12
|
-
|
|
13
|
-
var {
|
|
14
|
-
filterDOMProps
|
|
15
|
-
} = require("@react-aria/utils");
|
|
16
|
-
|
|
17
|
-
var {
|
|
18
|
-
classNames,
|
|
19
|
-
useDOMRef,
|
|
20
|
-
useStyleProps
|
|
21
|
-
} = require("@react-spectrum/utils");
|
|
22
|
-
|
|
23
|
-
var _babelRuntimeHelpersObjectWithoutPropertiesLoose = $parcel$interopDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
24
|
-
|
|
25
|
-
var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
|
|
26
|
-
|
|
27
1
|
require("./main.css");
|
|
28
|
-
|
|
2
|
+
var $lPlPc$reactspectrumutils = require("@react-spectrum/utils");
|
|
3
|
+
var $lPlPc$reactariautils = require("@react-aria/utils");
|
|
4
|
+
var $lPlPc$react = require("react");
|
|
5
|
+
var $lPlPc$reactspectrumprovider = require("@react-spectrum/provider");
|
|
6
|
+
|
|
7
|
+
function $parcel$exportWildcard(dest, source) {
|
|
8
|
+
Object.keys(source).forEach(function(key) {
|
|
9
|
+
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
Object.defineProperty(dest, key, {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return source[key];
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return dest;
|
|
22
|
+
}
|
|
29
23
|
function $parcel$interopDefault(a) {
|
|
30
24
|
return a && a.__esModule ? a.default : a;
|
|
31
25
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
$
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
26
|
+
function $parcel$export(e, n, v, s) {
|
|
27
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
28
|
+
}
|
|
29
|
+
var $5f006adc0ac94144$exports = {};
|
|
30
|
+
|
|
31
|
+
$parcel$export($5f006adc0ac94144$exports, "StatusLight", () => $5f006adc0ac94144$export$5f84c37a31c6e41c);
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
var $0a01bece09d42ba7$exports = {};
|
|
36
|
+
|
|
37
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight", () => $0a01bece09d42ba7$export$11d3697e7e5c1bef, (v) => $0a01bece09d42ba7$export$11d3697e7e5c1bef = v);
|
|
38
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--neutral", () => $0a01bece09d42ba7$export$bbf75dd99797a93e, (v) => $0a01bece09d42ba7$export$bbf75dd99797a93e = v);
|
|
39
|
+
$parcel$export($0a01bece09d42ba7$exports, "is-disabled", () => $0a01bece09d42ba7$export$d35bc1e505d1ebbf, (v) => $0a01bece09d42ba7$export$d35bc1e505d1ebbf = v);
|
|
40
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--negative", () => $0a01bece09d42ba7$export$1974c2646528dc4f, (v) => $0a01bece09d42ba7$export$1974c2646528dc4f = v);
|
|
41
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--notice", () => $0a01bece09d42ba7$export$30a5e512ed4618b, (v) => $0a01bece09d42ba7$export$30a5e512ed4618b = v);
|
|
42
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--positive", () => $0a01bece09d42ba7$export$141dae5af9534f54, (v) => $0a01bece09d42ba7$export$141dae5af9534f54 = v);
|
|
43
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--info", () => $0a01bece09d42ba7$export$945a5d9a4e8494e6, (v) => $0a01bece09d42ba7$export$945a5d9a4e8494e6 = v);
|
|
44
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--active", () => $0a01bece09d42ba7$export$b40c603f4b579265, (v) => $0a01bece09d42ba7$export$b40c603f4b579265 = v);
|
|
45
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--celery", () => $0a01bece09d42ba7$export$e9a22f483095fe3e, (v) => $0a01bece09d42ba7$export$e9a22f483095fe3e = v);
|
|
46
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--yellow", () => $0a01bece09d42ba7$export$b22c4af54e28c6c, (v) => $0a01bece09d42ba7$export$b22c4af54e28c6c = v);
|
|
47
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--fuchsia", () => $0a01bece09d42ba7$export$cbaba642d0afd312, (v) => $0a01bece09d42ba7$export$cbaba642d0afd312 = v);
|
|
48
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--indigo", () => $0a01bece09d42ba7$export$8b77e0c07c11635a, (v) => $0a01bece09d42ba7$export$8b77e0c07c11635a = v);
|
|
49
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--seafoam", () => $0a01bece09d42ba7$export$d14bcd2d3ae8238c, (v) => $0a01bece09d42ba7$export$d14bcd2d3ae8238c = v);
|
|
50
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--chartreuse", () => $0a01bece09d42ba7$export$f05bd1f10c0cc15f, (v) => $0a01bece09d42ba7$export$f05bd1f10c0cc15f = v);
|
|
51
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--magenta", () => $0a01bece09d42ba7$export$43990cc5ba9a0059, (v) => $0a01bece09d42ba7$export$43990cc5ba9a0059 = v);
|
|
52
|
+
$parcel$export($0a01bece09d42ba7$exports, "spectrum-StatusLight--purple", () => $0a01bece09d42ba7$export$975baced4f8182b4, (v) => $0a01bece09d42ba7$export$975baced4f8182b4 = v);
|
|
53
|
+
var $0a01bece09d42ba7$export$11d3697e7e5c1bef;
|
|
54
|
+
var $0a01bece09d42ba7$export$bbf75dd99797a93e;
|
|
55
|
+
var $0a01bece09d42ba7$export$d35bc1e505d1ebbf;
|
|
56
|
+
var $0a01bece09d42ba7$export$1974c2646528dc4f;
|
|
57
|
+
var $0a01bece09d42ba7$export$30a5e512ed4618b;
|
|
58
|
+
var $0a01bece09d42ba7$export$141dae5af9534f54;
|
|
59
|
+
var $0a01bece09d42ba7$export$945a5d9a4e8494e6;
|
|
60
|
+
var $0a01bece09d42ba7$export$b40c603f4b579265;
|
|
61
|
+
var $0a01bece09d42ba7$export$e9a22f483095fe3e;
|
|
62
|
+
var $0a01bece09d42ba7$export$b22c4af54e28c6c;
|
|
63
|
+
var $0a01bece09d42ba7$export$cbaba642d0afd312;
|
|
64
|
+
var $0a01bece09d42ba7$export$8b77e0c07c11635a;
|
|
65
|
+
var $0a01bece09d42ba7$export$d14bcd2d3ae8238c;
|
|
66
|
+
var $0a01bece09d42ba7$export$f05bd1f10c0cc15f;
|
|
67
|
+
var $0a01bece09d42ba7$export$43990cc5ba9a0059;
|
|
68
|
+
var $0a01bece09d42ba7$export$975baced4f8182b4;
|
|
69
|
+
$0a01bece09d42ba7$export$11d3697e7e5c1bef = "spectrum-StatusLight_c020b6";
|
|
70
|
+
$0a01bece09d42ba7$export$bbf75dd99797a93e = "spectrum-StatusLight--neutral_c020b6";
|
|
71
|
+
$0a01bece09d42ba7$export$d35bc1e505d1ebbf = "is-disabled_c020b6";
|
|
72
|
+
$0a01bece09d42ba7$export$1974c2646528dc4f = "spectrum-StatusLight--negative_c020b6";
|
|
73
|
+
$0a01bece09d42ba7$export$30a5e512ed4618b = "spectrum-StatusLight--notice_c020b6";
|
|
74
|
+
$0a01bece09d42ba7$export$141dae5af9534f54 = "spectrum-StatusLight--positive_c020b6";
|
|
75
|
+
$0a01bece09d42ba7$export$945a5d9a4e8494e6 = "spectrum-StatusLight--info_c020b6";
|
|
76
|
+
$0a01bece09d42ba7$export$b40c603f4b579265 = "spectrum-StatusLight--active_c020b6";
|
|
77
|
+
$0a01bece09d42ba7$export$e9a22f483095fe3e = "spectrum-StatusLight--celery_c020b6";
|
|
78
|
+
$0a01bece09d42ba7$export$b22c4af54e28c6c = "spectrum-StatusLight--yellow_c020b6";
|
|
79
|
+
$0a01bece09d42ba7$export$cbaba642d0afd312 = "spectrum-StatusLight--fuchsia_c020b6";
|
|
80
|
+
$0a01bece09d42ba7$export$8b77e0c07c11635a = "spectrum-StatusLight--indigo_c020b6";
|
|
81
|
+
$0a01bece09d42ba7$export$d14bcd2d3ae8238c = "spectrum-StatusLight--seafoam_c020b6";
|
|
82
|
+
$0a01bece09d42ba7$export$f05bd1f10c0cc15f = "spectrum-StatusLight--chartreuse_c020b6";
|
|
83
|
+
$0a01bece09d42ba7$export$43990cc5ba9a0059 = "spectrum-StatusLight--magenta_c020b6";
|
|
84
|
+
$0a01bece09d42ba7$export$975baced4f8182b4 = "spectrum-StatusLight--purple_c020b6";
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
function $5f006adc0ac94144$var$StatusLight(props, ref) {
|
|
89
|
+
let { variant: variant , children: children , isDisabled: isDisabled , role: role , ...otherProps } = $lPlPc$reactspectrumprovider.useProviderProps(props);
|
|
90
|
+
let domRef = $lPlPc$reactspectrumutils.useDOMRef(ref);
|
|
91
|
+
let { styleProps: styleProps } = $lPlPc$reactspectrumutils.useStyleProps(otherProps);
|
|
92
|
+
if (!children && !props['aria-label']) console.warn('If no children are provided, an aria-label must be specified');
|
|
93
|
+
if (!role && (props['aria-label'] || props['aria-labelledby'])) console.warn('A labelled StatusLight must have a role.');
|
|
94
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($lPlPc$react)).createElement("div", {
|
|
95
|
+
...$lPlPc$reactariautils.filterDOMProps(otherProps, {
|
|
96
|
+
labelable: !!role
|
|
97
|
+
}),
|
|
98
|
+
...styleProps,
|
|
99
|
+
role: role,
|
|
100
|
+
className: $lPlPc$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($0a01bece09d42ba7$exports)), 'spectrum-StatusLight', `spectrum-StatusLight--${variant}`, {
|
|
101
|
+
'is-disabled': isDisabled
|
|
102
|
+
}, styleProps.className),
|
|
103
|
+
ref: domRef
|
|
104
|
+
}, children));
|
|
87
105
|
}
|
|
88
106
|
/**
|
|
89
107
|
* Status lights are used to color code categories and labels commonly found in data visualization.
|
|
90
108
|
* When status lights have a semantic meaning, they should use semantic variant colors.
|
|
91
|
-
*/
|
|
109
|
+
*/ let $5f006adc0ac94144$export$5f84c37a31c6e41c = /*#__PURE__*/ $lPlPc$react.forwardRef($5f006adc0ac94144$var$StatusLight);
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
$parcel$exportWildcard(module.exports, $5f006adc0ac94144$exports);
|
|
92
113
|
|
|
93
114
|
|
|
94
|
-
let StatusLight = forwardRef($e73b264a0f1df629ff3e0b79dc4e357a$var$StatusLight);
|
|
95
|
-
exports.StatusLight = StatusLight;
|
|
96
115
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAsC;AACtC,GAA+C;AAC/C,GAA6B;AAC7B,GAAgD;AAChD,GAA8C;AAC9C,GAAgD;AAChD,GAA4C;AAC5C,GAA8C;AAC9C,GAA8C;AAC9C,GAA8C;AAC9C,GAA+C;AAC/C,GAA8C;AAC9C,GAA+C;AAC/C,GAAkD;AAClD,GAA+C;AAC/C,GAA8C;AAf9C,yCAAsC,GAAG,CAA6B;AACtE,yCAA+C,GAAG,CAAsC;AACxF,yCAA6B,GAAG,CAAoB;AACpD,yCAAgD,GAAG,CAAuC;AAC1F,wCAA8C,GAAG,CAAqC;AACtF,yCAAgD,GAAG,CAAuC;AAC1F,yCAA4C,GAAG,CAAmC;AAClF,yCAA8C,GAAG,CAAqC;AACtF,yCAA8C,GAAG,CAAqC;AACtF,wCAA8C,GAAG,CAAqC;AACtF,yCAA+C,GAAG,CAAsC;AACxF,yCAA8C,GAAG,CAAqC;AACtF,yCAA+C,GAAG,CAAsC;AACxF,yCAAkD,GAAG,CAAyC;AAC9F,yCAA+C,GAAG,CAAsC;AACxF,yCAA8C,GAAG,CAAqC;;;;SDK7E,iCAAW,CAAC,KAA+B,EAAE,GAA2B,EAAE,CAAC;IAClF,GAAG,CAAC,CAAC,UACH,OAAO,aACP,QAAQ,eACR,UAAU,SACV,IAAI,MACD,UAAU,CACf,CAAC,GAAG,6CAAgB,CAAC,KAAK;IAC1B,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAC1B,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAE3C,EAAE,GAAG,QAAQ,KAAK,KAAK,CAAC,CAAY,cAClC,OAAO,CAAC,IAAI,CAAC,CAA8D;IAG7E,EAAE,GAAG,IAAI,KAAK,KAAK,CAAC,CAAY,gBAAK,KAAK,CAAC,CAAiB,oBAC1D,OAAO,CAAC,IAAI,CAAC,CAA0C;IAGzD,MAAM,oEACH,CAAG;WACE,oCAAc,CAAC,UAAU,EAAE,CAAC;YAAA,SAAS,IAAI,IAAI;QAAA,CAAC;WAC9C,UAAU;QACd,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,oCAAU,CACnB,gEAAM,EACN,CAAsB,wBACrB,sBAAsB,EAAE,OAAO,IAChC,CAAC;YACC,CAAa,cAAE,UAAU;QAC3B,CAAC,EACD,UAAU,CAAC,SAAS;QAEtB,GAAG,EAAE,MAAM;OACV,QAAQ;AAGf,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAY,iBAAG,uBAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/statuslight/src/index.ts","packages/@react-spectrum/statuslight/src/StatusLight.tsx","packages/@adobe/spectrum-css-temp/components/statuslight/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './StatusLight';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {SpectrumStatusLightProps} from '@react-types/statuslight';\nimport styles from '@adobe/spectrum-css-temp/components/statuslight/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction StatusLight(props: SpectrumStatusLightProps, ref: DOMRef<HTMLDivElement>) {\n let {\n variant,\n children,\n isDisabled,\n role,\n ...otherProps\n } = useProviderProps(props);\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n if (!children && !props['aria-label']) {\n console.warn('If no children are provided, an aria-label must be specified');\n }\n\n if (!role && (props['aria-label'] || props['aria-labelledby'])) {\n console.warn('A labelled StatusLight must have a role.');\n }\n\n return (\n <div\n {...filterDOMProps(otherProps, {labelable: !!role})}\n {...styleProps}\n role={role}\n className={classNames(\n styles,\n 'spectrum-StatusLight',\n `spectrum-StatusLight--${variant}`,\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )}\n ref={domRef}>\n {children}\n </div>\n );\n}\n\n/**\n * Status lights are used to color code categories and labels commonly found in data visualization.\n * When status lights have a semantic meaning, they should use semantic variant colors.\n */\nlet _StatusLight = forwardRef(StatusLight);\nexport {_StatusLight as StatusLight};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,75 +1,99 @@
|
|
|
1
|
-
import { useProviderProps } from "@react-spectrum/provider";
|
|
2
|
-
import _react, { forwardRef } from "react";
|
|
3
|
-
import { filterDOMProps } from "@react-aria/utils";
|
|
4
|
-
import { classNames, useDOMRef, useStyleProps } from "@react-spectrum/utils";
|
|
5
|
-
import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
6
|
-
import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
|
|
7
1
|
import "./main.css";
|
|
2
|
+
import {useDOMRef as $2knHf$useDOMRef, useStyleProps as $2knHf$useStyleProps, classNames as $2knHf$classNames} from "@react-spectrum/utils";
|
|
3
|
+
import {filterDOMProps as $2knHf$filterDOMProps} from "@react-aria/utils";
|
|
4
|
+
import $2knHf$react, {forwardRef as $2knHf$forwardRef} from "react";
|
|
5
|
+
import {useProviderProps as $2knHf$useProviderProps} from "@react-spectrum/provider";
|
|
8
6
|
|
|
9
7
|
function $parcel$interopDefault(a) {
|
|
10
8
|
return a && a.__esModule ? a.default : a;
|
|
11
9
|
}
|
|
10
|
+
function $parcel$export(e, n, v, s) {
|
|
11
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
|
+
}
|
|
13
|
+
var $9d1f104f9a5d54c4$exports = {};
|
|
14
|
+
|
|
15
|
+
$parcel$export($9d1f104f9a5d54c4$exports, "StatusLight", () => $9d1f104f9a5d54c4$export$5f84c37a31c6e41c);
|
|
16
|
+
|
|
12
17
|
|
|
13
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/statuslight/vars.css
|
|
14
|
-
var $dd4b8a3e2f1fd49bf33fcb2d525d0bc5$exports = {};
|
|
15
|
-
$dd4b8a3e2f1fd49bf33fcb2d525d0bc5$exports = {
|
|
16
|
-
"spectrum-StatusLight": "_spectrum-StatusLight_71d0f",
|
|
17
|
-
"spectrum-StatusLight--neutral": "_spectrum-StatusLight--neutral_71d0f",
|
|
18
|
-
"is-disabled": "_is-disabled_71d0f",
|
|
19
|
-
"spectrum-StatusLight--negative": "_spectrum-StatusLight--negative_71d0f",
|
|
20
|
-
"spectrum-StatusLight--notice": "_spectrum-StatusLight--notice_71d0f",
|
|
21
|
-
"spectrum-StatusLight--positive": "_spectrum-StatusLight--positive_71d0f",
|
|
22
|
-
"spectrum-StatusLight--info": "_spectrum-StatusLight--info_71d0f",
|
|
23
|
-
"spectrum-StatusLight--active": "_spectrum-StatusLight--active_71d0f",
|
|
24
|
-
"spectrum-StatusLight--celery": "_spectrum-StatusLight--celery_71d0f",
|
|
25
|
-
"spectrum-StatusLight--yellow": "_spectrum-StatusLight--yellow_71d0f",
|
|
26
|
-
"spectrum-StatusLight--fuchsia": "_spectrum-StatusLight--fuchsia_71d0f",
|
|
27
|
-
"spectrum-StatusLight--indigo": "_spectrum-StatusLight--indigo_71d0f",
|
|
28
|
-
"spectrum-StatusLight--seafoam": "_spectrum-StatusLight--seafoam_71d0f",
|
|
29
|
-
"spectrum-StatusLight--chartreuse": "_spectrum-StatusLight--chartreuse_71d0f",
|
|
30
|
-
"spectrum-StatusLight--magenta": "_spectrum-StatusLight--magenta_71d0f",
|
|
31
|
-
"spectrum-StatusLight--purple": "_spectrum-StatusLight--purple_71d0f"
|
|
32
|
-
};
|
|
33
|
-
var $dd4b8a3e2f1fd49bf33fcb2d525d0bc5$$interop$default = $parcel$interopDefault($dd4b8a3e2f1fd49bf33fcb2d525d0bc5$exports);
|
|
34
18
|
|
|
35
|
-
|
|
36
|
-
let _useProviderProps = useProviderProps(props),
|
|
37
|
-
{
|
|
38
|
-
variant,
|
|
39
|
-
children,
|
|
40
|
-
isDisabled,
|
|
41
|
-
role
|
|
42
|
-
} = _useProviderProps,
|
|
43
|
-
otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(_useProviderProps, ["variant", "children", "isDisabled", "role"]);
|
|
19
|
+
var $bf7f989bef646f91$exports = {};
|
|
44
20
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
21
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight", () => $bf7f989bef646f91$export$11d3697e7e5c1bef, (v) => $bf7f989bef646f91$export$11d3697e7e5c1bef = v);
|
|
22
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--neutral", () => $bf7f989bef646f91$export$bbf75dd99797a93e, (v) => $bf7f989bef646f91$export$bbf75dd99797a93e = v);
|
|
23
|
+
$parcel$export($bf7f989bef646f91$exports, "is-disabled", () => $bf7f989bef646f91$export$d35bc1e505d1ebbf, (v) => $bf7f989bef646f91$export$d35bc1e505d1ebbf = v);
|
|
24
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--negative", () => $bf7f989bef646f91$export$1974c2646528dc4f, (v) => $bf7f989bef646f91$export$1974c2646528dc4f = v);
|
|
25
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--notice", () => $bf7f989bef646f91$export$30a5e512ed4618b, (v) => $bf7f989bef646f91$export$30a5e512ed4618b = v);
|
|
26
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--positive", () => $bf7f989bef646f91$export$141dae5af9534f54, (v) => $bf7f989bef646f91$export$141dae5af9534f54 = v);
|
|
27
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--info", () => $bf7f989bef646f91$export$945a5d9a4e8494e6, (v) => $bf7f989bef646f91$export$945a5d9a4e8494e6 = v);
|
|
28
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--active", () => $bf7f989bef646f91$export$b40c603f4b579265, (v) => $bf7f989bef646f91$export$b40c603f4b579265 = v);
|
|
29
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--celery", () => $bf7f989bef646f91$export$e9a22f483095fe3e, (v) => $bf7f989bef646f91$export$e9a22f483095fe3e = v);
|
|
30
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--yellow", () => $bf7f989bef646f91$export$b22c4af54e28c6c, (v) => $bf7f989bef646f91$export$b22c4af54e28c6c = v);
|
|
31
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--fuchsia", () => $bf7f989bef646f91$export$cbaba642d0afd312, (v) => $bf7f989bef646f91$export$cbaba642d0afd312 = v);
|
|
32
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--indigo", () => $bf7f989bef646f91$export$8b77e0c07c11635a, (v) => $bf7f989bef646f91$export$8b77e0c07c11635a = v);
|
|
33
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--seafoam", () => $bf7f989bef646f91$export$d14bcd2d3ae8238c, (v) => $bf7f989bef646f91$export$d14bcd2d3ae8238c = v);
|
|
34
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--chartreuse", () => $bf7f989bef646f91$export$f05bd1f10c0cc15f, (v) => $bf7f989bef646f91$export$f05bd1f10c0cc15f = v);
|
|
35
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--magenta", () => $bf7f989bef646f91$export$43990cc5ba9a0059, (v) => $bf7f989bef646f91$export$43990cc5ba9a0059 = v);
|
|
36
|
+
$parcel$export($bf7f989bef646f91$exports, "spectrum-StatusLight--purple", () => $bf7f989bef646f91$export$975baced4f8182b4, (v) => $bf7f989bef646f91$export$975baced4f8182b4 = v);
|
|
37
|
+
var $bf7f989bef646f91$export$11d3697e7e5c1bef;
|
|
38
|
+
var $bf7f989bef646f91$export$bbf75dd99797a93e;
|
|
39
|
+
var $bf7f989bef646f91$export$d35bc1e505d1ebbf;
|
|
40
|
+
var $bf7f989bef646f91$export$1974c2646528dc4f;
|
|
41
|
+
var $bf7f989bef646f91$export$30a5e512ed4618b;
|
|
42
|
+
var $bf7f989bef646f91$export$141dae5af9534f54;
|
|
43
|
+
var $bf7f989bef646f91$export$945a5d9a4e8494e6;
|
|
44
|
+
var $bf7f989bef646f91$export$b40c603f4b579265;
|
|
45
|
+
var $bf7f989bef646f91$export$e9a22f483095fe3e;
|
|
46
|
+
var $bf7f989bef646f91$export$b22c4af54e28c6c;
|
|
47
|
+
var $bf7f989bef646f91$export$cbaba642d0afd312;
|
|
48
|
+
var $bf7f989bef646f91$export$8b77e0c07c11635a;
|
|
49
|
+
var $bf7f989bef646f91$export$d14bcd2d3ae8238c;
|
|
50
|
+
var $bf7f989bef646f91$export$f05bd1f10c0cc15f;
|
|
51
|
+
var $bf7f989bef646f91$export$43990cc5ba9a0059;
|
|
52
|
+
var $bf7f989bef646f91$export$975baced4f8182b4;
|
|
53
|
+
$bf7f989bef646f91$export$11d3697e7e5c1bef = "spectrum-StatusLight_c020b6";
|
|
54
|
+
$bf7f989bef646f91$export$bbf75dd99797a93e = "spectrum-StatusLight--neutral_c020b6";
|
|
55
|
+
$bf7f989bef646f91$export$d35bc1e505d1ebbf = "is-disabled_c020b6";
|
|
56
|
+
$bf7f989bef646f91$export$1974c2646528dc4f = "spectrum-StatusLight--negative_c020b6";
|
|
57
|
+
$bf7f989bef646f91$export$30a5e512ed4618b = "spectrum-StatusLight--notice_c020b6";
|
|
58
|
+
$bf7f989bef646f91$export$141dae5af9534f54 = "spectrum-StatusLight--positive_c020b6";
|
|
59
|
+
$bf7f989bef646f91$export$945a5d9a4e8494e6 = "spectrum-StatusLight--info_c020b6";
|
|
60
|
+
$bf7f989bef646f91$export$b40c603f4b579265 = "spectrum-StatusLight--active_c020b6";
|
|
61
|
+
$bf7f989bef646f91$export$e9a22f483095fe3e = "spectrum-StatusLight--celery_c020b6";
|
|
62
|
+
$bf7f989bef646f91$export$b22c4af54e28c6c = "spectrum-StatusLight--yellow_c020b6";
|
|
63
|
+
$bf7f989bef646f91$export$cbaba642d0afd312 = "spectrum-StatusLight--fuchsia_c020b6";
|
|
64
|
+
$bf7f989bef646f91$export$8b77e0c07c11635a = "spectrum-StatusLight--indigo_c020b6";
|
|
65
|
+
$bf7f989bef646f91$export$d14bcd2d3ae8238c = "spectrum-StatusLight--seafoam_c020b6";
|
|
66
|
+
$bf7f989bef646f91$export$f05bd1f10c0cc15f = "spectrum-StatusLight--chartreuse_c020b6";
|
|
67
|
+
$bf7f989bef646f91$export$43990cc5ba9a0059 = "spectrum-StatusLight--magenta_c020b6";
|
|
68
|
+
$bf7f989bef646f91$export$975baced4f8182b4 = "spectrum-StatusLight--purple_c020b6";
|
|
49
69
|
|
|
50
|
-
if (!children && !props['aria-label']) {
|
|
51
|
-
console.warn('If no children are provided, an aria-label must be specified');
|
|
52
|
-
}
|
|
53
70
|
|
|
54
|
-
if (!role && (props['aria-label'] || props['aria-labelledby'])) {
|
|
55
|
-
console.warn('A labelled StatusLight must have a role.');
|
|
56
|
-
}
|
|
57
71
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
72
|
+
function $9d1f104f9a5d54c4$var$StatusLight(props, ref) {
|
|
73
|
+
let { variant: variant , children: children , isDisabled: isDisabled , role: role , ...otherProps } = $2knHf$useProviderProps(props);
|
|
74
|
+
let domRef = $2knHf$useDOMRef(ref);
|
|
75
|
+
let { styleProps: styleProps } = $2knHf$useStyleProps(otherProps);
|
|
76
|
+
if (!children && !props['aria-label']) console.warn('If no children are provided, an aria-label must be specified');
|
|
77
|
+
if (!role && (props['aria-label'] || props['aria-labelledby'])) console.warn('A labelled StatusLight must have a role.');
|
|
78
|
+
return(/*#__PURE__*/ $2knHf$react.createElement("div", {
|
|
79
|
+
...$2knHf$filterDOMProps(otherProps, {
|
|
80
|
+
labelable: !!role
|
|
81
|
+
}),
|
|
82
|
+
...styleProps,
|
|
83
|
+
role: role,
|
|
84
|
+
className: $2knHf$classNames((/*@__PURE__*/$parcel$interopDefault($bf7f989bef646f91$exports)), 'spectrum-StatusLight', `spectrum-StatusLight--${variant}`, {
|
|
85
|
+
'is-disabled': isDisabled
|
|
86
|
+
}, styleProps.className),
|
|
87
|
+
ref: domRef
|
|
88
|
+
}, children));
|
|
67
89
|
}
|
|
68
90
|
/**
|
|
69
91
|
* Status lights are used to color code categories and labels commonly found in data visualization.
|
|
70
92
|
* When status lights have a semantic meaning, they should use semantic variant colors.
|
|
71
|
-
*/
|
|
93
|
+
*/ let $9d1f104f9a5d54c4$export$5f84c37a31c6e41c = /*#__PURE__*/ $2knHf$forwardRef($9d1f104f9a5d54c4$var$StatusLight);
|
|
94
|
+
|
|
95
|
+
|
|
72
96
|
|
|
73
97
|
|
|
74
|
-
export
|
|
98
|
+
export {$9d1f104f9a5d54c4$export$5f84c37a31c6e41c as StatusLight};
|
|
75
99
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAsC;AACtC,GAA+C;AAC/C,GAA6B;AAC7B,GAAgD;AAChD,GAA8C;AAC9C,GAAgD;AAChD,GAA4C;AAC5C,GAA8C;AAC9C,GAA8C;AAC9C,GAA8C;AAC9C,GAA+C;AAC/C,GAA8C;AAC9C,GAA+C;AAC/C,GAAkD;AAClD,GAA+C;AAC/C,GAA8C;AAf9C,yCAAsC,GAAG,CAA6B;AACtE,yCAA+C,GAAG,CAAsC;AACxF,yCAA6B,GAAG,CAAoB;AACpD,yCAAgD,GAAG,CAAuC;AAC1F,wCAA8C,GAAG,CAAqC;AACtF,yCAAgD,GAAG,CAAuC;AAC1F,yCAA4C,GAAG,CAAmC;AAClF,yCAA8C,GAAG,CAAqC;AACtF,yCAA8C,GAAG,CAAqC;AACtF,wCAA8C,GAAG,CAAqC;AACtF,yCAA+C,GAAG,CAAsC;AACxF,yCAA8C,GAAG,CAAqC;AACtF,yCAA+C,GAAG,CAAsC;AACxF,yCAAkD,GAAG,CAAyC;AAC9F,yCAA+C,GAAG,CAAsC;AACxF,yCAA8C,GAAG,CAAqC;;;;SDK7E,iCAAW,CAAC,KAA+B,EAAE,GAA2B,EAAE,CAAC;IAClF,GAAG,CAAC,CAAC,UACH,OAAO,aACP,QAAQ,eACR,UAAU,SACV,IAAI,MACD,UAAU,CACf,CAAC,GAAG,uBAAgB,CAAC,KAAK;IAC1B,GAAG,CAAC,MAAM,GAAG,gBAAS,CAAC,GAAG;IAC1B,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,UAAU;IAE3C,EAAE,GAAG,QAAQ,KAAK,KAAK,CAAC,CAAY,cAClC,OAAO,CAAC,IAAI,CAAC,CAA8D;IAG7E,EAAE,GAAG,IAAI,KAAK,KAAK,CAAC,CAAY,gBAAK,KAAK,CAAC,CAAiB,oBAC1D,OAAO,CAAC,IAAI,CAAC,CAA0C;IAGzD,MAAM,0CACH,CAAG;WACE,qBAAc,CAAC,UAAU,EAAE,CAAC;YAAA,SAAS,IAAI,IAAI;QAAA,CAAC;WAC9C,UAAU;QACd,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,iBAAU,CACnB,gEAAM,EACN,CAAsB,wBACrB,sBAAsB,EAAE,OAAO,IAChC,CAAC;YACC,CAAa,cAAE,UAAU;QAC3B,CAAC,EACD,UAAU,CAAC,SAAS;QAEtB,GAAG,EAAE,MAAM;OACV,QAAQ;AAGf,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAY,iBAAG,iBAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/statuslight/src/index.ts","packages/@react-spectrum/statuslight/src/StatusLight.tsx","packages/@adobe/spectrum-css-temp/components/statuslight/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './StatusLight';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {SpectrumStatusLightProps} from '@react-types/statuslight';\nimport styles from '@adobe/spectrum-css-temp/components/statuslight/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction StatusLight(props: SpectrumStatusLightProps, ref: DOMRef<HTMLDivElement>) {\n let {\n variant,\n children,\n isDisabled,\n role,\n ...otherProps\n } = useProviderProps(props);\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n if (!children && !props['aria-label']) {\n console.warn('If no children are provided, an aria-label must be specified');\n }\n\n if (!role && (props['aria-label'] || props['aria-labelledby'])) {\n console.warn('A labelled StatusLight must have a role.');\n }\n\n return (\n <div\n {...filterDOMProps(otherProps, {labelable: !!role})}\n {...styleProps}\n role={role}\n className={classNames(\n styles,\n 'spectrum-StatusLight',\n `spectrum-StatusLight--${variant}`,\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )}\n ref={domRef}>\n {children}\n </div>\n );\n}\n\n/**\n * Status lights are used to color code categories and labels commonly found in data visualization.\n * When status lights have a semantic meaning, they should use semantic variant colors.\n */\nlet _StatusLight = forwardRef(StatusLight);\nexport {_StatusLight as StatusLight};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;AA2DA;;;GAGG;AACH,OAAA,IAAI,uJAAsC,CAAC","sources":["packages/@react-spectrum/statuslight/src/packages/@react-spectrum/statuslight/src/StatusLight.tsx","packages/@react-spectrum/statuslight/src/packages/@react-spectrum/statuslight/src/index.ts","packages/@react-spectrum/statuslight/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './StatusLight';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/statuslight",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.6.2",
|
|
35
|
-
"@react-aria/utils": "^3.
|
|
36
|
-
"@react-spectrum/utils": "^3.5
|
|
37
|
-
"@react-types/shared": "^3.
|
|
38
|
-
"@react-types/statuslight": "^3.1.
|
|
35
|
+
"@react-aria/utils": "^3.11.2",
|
|
36
|
+
"@react-spectrum/utils": "^3.6.5",
|
|
37
|
+
"@react-types/shared": "^3.11.1",
|
|
38
|
+
"@react-types/statuslight": "^3.1.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@react-spectrum/provider": "^3.0.0
|
|
44
|
+
"@react-spectrum/provider": "^3.0.0",
|
|
45
45
|
"react": "^16.8.0 || ^17.0.0-rc.1"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "404d41859b7d6f56201d7fc01bd9f22ae3512937"
|
|
51
51
|
}
|
package/dist/main.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAwBA,6BACE,6FAAkD,CAClD,mBAAa,CAAb,YAAa,CACb,sBAAmB,CAAnB,kBAAmB,CACnB,oBAAuB,CAAvB,sBAAuB,CAEvB,qHAA+F,CAC/F,qBAAsB,CAEtB,gGAAgD,CAChD,kGAAyD,CACzD,gBAcF,CAZA,oCACG,UAAW,CACX,mBAAY,CAAZ,WAAY,CACZ,mBAAc,CAAd,aAAc,CACd,oBAAqB,CACrB,+CAAiD,CACjD,gDAAgD,CAChD,iBAAkB,CAGlB,oMACF,CAGD,sCACE,iBACF,CCzCA,6BACE,4EAUF,CARE,uFAEE,qFAKF,CAHE,qGACE,sDACF,CAIJ,8CACE,oGACF,CAEA,4CACE,qGACF,CAEA,8CACE,sGACF,CAEA,sFAEE,wGACF,CAEA,sCACE,2CAKF,CAHE,6CACE,sDACF,CAGF,4CACE,wDACF,CAEA,4CACE,wDACF,CAEA,6CACE,yDACF,CAEA,4CACE,wDACF,CAEA,6CACE,yDACF,CAEA,gDACE,4DACF,CAEA,6CACE,yDACF,CAEA,4CACE,wDACF","sources":["./node_modules/@adobe/spectrum-css-temp/components/statuslight/index.css","./node_modules/@adobe/spectrum-css-temp/components/statuslight/skin.css"],"sourcesContent":["/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n:root {\n --spectrum-statuslight-padding-y: var(--spectrum-global-dimension-size-65);\n\n /* Override line-height to fix Firefox */\n --spectrum-statuslight-text-line-height: 1.44;\n\n /* Override padding to fix alignment of the first line of text (needs to be moved down 1px) */\n --spectrum-statuslight-padding-top: calc(var(--spectrum-statuslight-padding-y) - 1px);\n --spectrum-statuslight-padding-bottom: calc(var(--spectrum-statuslight-padding-y) + 1px);\n}\n\n.spectrum-StatusLight {\n min-block-size: var(--spectrum-statuslight-height);\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n\n padding: var(--spectrum-statuslight-padding-top) 0 var(--spectrum-statuslight-padding-bottom) 0;\n box-sizing: border-box;\n\n font-size: var(--spectrum-statuslight-text-size);\n font-weight: var(--spectrum-statuslight-text-font-weight);\n line-height: var(--spectrum-statuslight-text-line-height);\n\n&::before {\n content: '';\n flex-grow: 0;\n flex-shrink: 0;\n display: inline-block;\n inline-size: var(--spectrum-statuslight-dot-size);\n block-size: var(--spectrum-statuslight-dot-size);\n border-radius: 50%;\n\n /* margin on the dog is the opposite of the padding in order to align the dot as if the padding hack was not present */\n margin: var(--spectrum-statuslight-padding-bottom) var(--spectrum-statuslight-text-gap) var(--spectrum-statuslight-padding-top) var(--spectrum-statuslight-text-gap);\n }\n}\n\n.spectrum-StatusLight--neutral {\n font-style: italic;\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n.spectrum-StatusLight {\n color: var(--spectrum-statuslight-text-color);\n\n &[disabled],\n &.is-disabled {\n color: var(--spectrum-statuslight-text-color-disabled);\n\n &::before {\n background-color: var(--spectrum-statuslight-dot-color-disabled);\n }\n }\n}\n\n.spectrum-StatusLight--negative::before {\n background-color: var(--spectrum-statuslight-negative-dot-color);\n}\n\n.spectrum-StatusLight--notice::before {\n background-color: var(--spectrum-statuslight-notice-dot-color);\n}\n\n.spectrum-StatusLight--positive::before {\n background-color: var(--spectrum-statuslight-positive-dot-color);\n}\n\n.spectrum-StatusLight--info::before,\n/** @deprecated */.spectrum-StatusLight--active::before {\n background-color: var(--spectrum-statuslight-info-dot-color);\n}\n\n.spectrum-StatusLight--neutral {\n color: var(--spectrum-statuslight-neutral-text-color);\n\n &::before {\n background-color: var(--spectrum-statuslight-neutral-dot-color);\n }\n}\n\n.spectrum-StatusLight--celery::before {\n background-color: var(--spectrum-statuslight-dot-color-label-celery);\n}\n\n.spectrum-StatusLight--yellow::before {\n background-color: var(--spectrum-statuslight-dot-color-label-yellow);\n}\n\n.spectrum-StatusLight--fuchsia::before {\n background-color: var(--spectrum-statuslight-dot-color-label-fuchsia);\n}\n\n.spectrum-StatusLight--indigo::before {\n background-color: var(--spectrum-statuslight-dot-color-label-indigo);\n}\n\n.spectrum-StatusLight--seafoam::before {\n background-color: var(--spectrum-statuslight-dot-color-label-seafoam);\n}\n\n.spectrum-StatusLight--chartreuse::before {\n background-color: var(--spectrum-statuslight-dot-color-label-chartreuse);\n}\n\n.spectrum-StatusLight--magenta::before {\n background-color: var(--spectrum-statuslight-dot-color-label-magenta);\n}\n\n.spectrum-StatusLight--purple::before {\n background-color: var(--spectrum-statuslight-dot-color-label-purple);\n}\n"],"names":[],"version":3,"file":"main.css.map"}
|