@react-spectrum/statuslight 3.4.2 → 3.4.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 CHANGED
@@ -1 +1 @@
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}}
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-gray-visual-color)}.spectrum-StatusLight--celery_c020b6:before{background-color:var(--spectrum-celery-visual-color)}.spectrum-StatusLight--yellow_c020b6:before{background-color:var(--spectrum-yellow-visual-color)}.spectrum-StatusLight--fuchsia_c020b6:before{background-color:var(--spectrum-fuchsia-visual-color)}.spectrum-StatusLight--indigo_c020b6:before{background-color:var(--spectrum-indigo-visual-color)}.spectrum-StatusLight--seafoam_c020b6:before{background-color:var(--spectrum-seafoam-visual-color)}.spectrum-StatusLight--chartreuse_c020b6:before{background-color:var(--spectrum-chartreuse-visual-color)}.spectrum-StatusLight--magenta_c020b6:before{background-color:var(--spectrum-magenta-visual-color)}.spectrum-StatusLight--purple_c020b6:before{background-color:var(--spectrum-purple-visual-color)}@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
@@ -12,7 +12,28 @@ function $parcel$interopDefault(a) {
12
12
  }
13
13
 
14
14
  $parcel$export(module.exports, "StatusLight", () => $ba01d1490c4da3ea$export$5f84c37a31c6e41c);
15
-
15
+ /*
16
+ * Copyright 2020 Adobe. All rights reserved.
17
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
+ * you may not use this file except in compliance with the License. You may obtain a copy
19
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
+ *
21
+ * Unless required by applicable law or agreed to in writing, software distributed under
22
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
+ * OF ANY KIND, either express or implied. See the License for the specific language
24
+ * governing permissions and limitations under the License.
25
+ */ /// <reference types="css-module-types" />
26
+ /*
27
+ * Copyright 2020 Adobe. All rights reserved.
28
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
29
+ * you may not use this file except in compliance with the License. You may obtain a copy
30
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
31
+ *
32
+ * Unless required by applicable law or agreed to in writing, software distributed under
33
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
34
+ * OF ANY KIND, either express or implied. See the License for the specific language
35
+ * governing permissions and limitations under the License.
36
+ */
16
37
 
17
38
 
18
39
  var $7e20c9d2bb376434$exports = {};
@@ -69,27 +90,27 @@ $7e20c9d2bb376434$export$975baced4f8182b4 = "spectrum-StatusLight--purple_c020b6
69
90
 
70
91
 
71
92
  function $ba01d1490c4da3ea$var$StatusLight(props, ref) {
72
- let { variant: variant , children: children , isDisabled: isDisabled , role: role , ...otherProps } = $cYKEG$reactspectrumprovider.useProviderProps(props);
73
- let domRef = $cYKEG$reactspectrumutils.useDOMRef(ref);
74
- let { styleProps: styleProps } = $cYKEG$reactspectrumutils.useStyleProps(otherProps);
75
- if (!children && !props['aria-label']) console.warn('If no children are provided, an aria-label must be specified');
76
- if (!role && (props['aria-label'] || props['aria-labelledby'])) console.warn('A labelled StatusLight must have a role.');
77
- return(/*#__PURE__*/ ($parcel$interopDefault($cYKEG$react)).createElement("div", {
78
- ...$cYKEG$reactariautils.filterDOMProps(otherProps, {
93
+ let { variant: variant , children: children , isDisabled: isDisabled , role: role , ...otherProps } = (0, $cYKEG$reactspectrumprovider.useProviderProps)(props);
94
+ let domRef = (0, $cYKEG$reactspectrumutils.useDOMRef)(ref);
95
+ let { styleProps: styleProps } = (0, $cYKEG$reactspectrumutils.useStyleProps)(otherProps);
96
+ if (!children && !props["aria-label"]) console.warn("If no children are provided, an aria-label must be specified");
97
+ if (!role && (props["aria-label"] || props["aria-labelledby"])) console.warn("A labelled StatusLight must have a role.");
98
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($cYKEG$react))).createElement("div", {
99
+ ...(0, $cYKEG$reactariautils.filterDOMProps)(otherProps, {
79
100
  labelable: !!role
80
101
  }),
81
102
  ...styleProps,
82
103
  role: role,
83
- className: $cYKEG$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($7e20c9d2bb376434$exports)), 'spectrum-StatusLight', `spectrum-StatusLight--${variant}`, {
84
- 'is-disabled': isDisabled
104
+ className: (0, $cYKEG$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($7e20c9d2bb376434$exports))), "spectrum-StatusLight", `spectrum-StatusLight--${variant}`, {
105
+ "is-disabled": isDisabled
85
106
  }, styleProps.className),
86
107
  ref: domRef
87
- }, children));
108
+ }, children);
88
109
  }
89
110
  /**
90
111
  * Status lights are used to color code categories and labels commonly found in data visualization.
91
112
  * When status lights have a semantic meaning, they should use semantic variant colors.
92
- */ let $ba01d1490c4da3ea$export$5f84c37a31c6e41c = /*#__PURE__*/ $cYKEG$react.forwardRef($ba01d1490c4da3ea$var$StatusLight);
113
+ */ let $ba01d1490c4da3ea$export$5f84c37a31c6e41c = /*#__PURE__*/ (0, $cYKEG$react.forwardRef)($ba01d1490c4da3ea$var$StatusLight);
93
114
 
94
115
 
95
116
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
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 {StatusLight} from './StatusLight';\nexport type {SpectrumStatusLightProps} from '@react-types/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"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAfA,4CAAyC;AACzC,4CAAkD;AAClD,4CAAgC;AAChC,4CAAmD;AACnD,2CAAiD;AACjD,4CAAmD;AACnD,4CAA+C;AAC/C,4CAAiD;AACjD,4CAAiD;AACjD,2CAAiD;AACjD,4CAAkD;AAClD,4CAAiD;AACjD,4CAAkD;AAClD,4CAAqD;AACrD,4CAAkD;AAClD,4CAAiD;;;;ADKjD,SAAS,kCAAY,KAA+B,EAAE,GAA2B,EAAE;IACjF,IAAI,WACF,QAAO,YACP,SAAQ,cACR,WAAU,QACV,KAAI,EACJ,GAAG,YACJ,GAAG,CAAA,GAAA,6CAAe,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAa,AAAD,EAAE;IAEjC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,EACnC,QAAQ,IAAI,CAAC;IAGf,IAAI,CAAC,QAAS,CAAA,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,kBAAkB,AAAD,GAC1D,QAAQ,IAAI,CAAC;IAGf,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAc,AAAD,EAAE,YAAY;YAAC,WAAW,CAAC,CAAC;QAAI,EAAE;QAClD,GAAG,UAAU;QACd,MAAM;QACN,WAAW,CAAA,GAAA,oCAAU,AAAD,EAClB,CAAA,GAAA,gEAAM,AAAD,GACL,wBACA,CAAC,sBAAsB,EAAE,QAAQ,CAAC,EAClC;YACE,eAAe;QACjB,GACA,WAAW,SAAS;QAEtB,KAAK;OACJ;AAGP;AAEA;;;CAGC,GACD,IAAI,0DAAe,CAAA,GAAA,uBAAS,EAAE;;ADjD9B","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 {StatusLight} from './StatusLight';\nexport type {SpectrumStatusLightProps} from '@react-types/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
@@ -10,7 +10,28 @@ function $parcel$interopDefault(a) {
10
10
  function $parcel$export(e, n, v, s) {
11
11
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
12
  }
13
-
13
+ /*
14
+ * Copyright 2020 Adobe. All rights reserved.
15
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
+ * you may not use this file except in compliance with the License. You may obtain a copy
17
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software distributed under
20
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
21
+ * OF ANY KIND, either express or implied. See the License for the specific language
22
+ * governing permissions and limitations under the License.
23
+ */ /// <reference types="css-module-types" />
24
+ /*
25
+ * Copyright 2020 Adobe. All rights reserved.
26
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
27
+ * you may not use this file except in compliance with the License. You may obtain a copy
28
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
29
+ *
30
+ * Unless required by applicable law or agreed to in writing, software distributed under
31
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
32
+ * OF ANY KIND, either express or implied. See the License for the specific language
33
+ * governing permissions and limitations under the License.
34
+ */
14
35
 
15
36
 
16
37
  var $7661ca422872705f$exports = {};
@@ -67,27 +88,27 @@ $7661ca422872705f$export$975baced4f8182b4 = "spectrum-StatusLight--purple_c020b6
67
88
 
68
89
 
69
90
  function $df8f173c8bd4ebc0$var$StatusLight(props, ref) {
70
- let { variant: variant , children: children , isDisabled: isDisabled , role: role , ...otherProps } = $71ACv$useProviderProps(props);
71
- let domRef = $71ACv$useDOMRef(ref);
72
- let { styleProps: styleProps } = $71ACv$useStyleProps(otherProps);
73
- if (!children && !props['aria-label']) console.warn('If no children are provided, an aria-label must be specified');
74
- if (!role && (props['aria-label'] || props['aria-labelledby'])) console.warn('A labelled StatusLight must have a role.');
75
- return(/*#__PURE__*/ $71ACv$react.createElement("div", {
76
- ...$71ACv$filterDOMProps(otherProps, {
91
+ let { variant: variant , children: children , isDisabled: isDisabled , role: role , ...otherProps } = (0, $71ACv$useProviderProps)(props);
92
+ let domRef = (0, $71ACv$useDOMRef)(ref);
93
+ let { styleProps: styleProps } = (0, $71ACv$useStyleProps)(otherProps);
94
+ if (!children && !props["aria-label"]) console.warn("If no children are provided, an aria-label must be specified");
95
+ if (!role && (props["aria-label"] || props["aria-labelledby"])) console.warn("A labelled StatusLight must have a role.");
96
+ return /*#__PURE__*/ (0, $71ACv$react).createElement("div", {
97
+ ...(0, $71ACv$filterDOMProps)(otherProps, {
77
98
  labelable: !!role
78
99
  }),
79
100
  ...styleProps,
80
101
  role: role,
81
- className: $71ACv$classNames((/*@__PURE__*/$parcel$interopDefault($7661ca422872705f$exports)), 'spectrum-StatusLight', `spectrum-StatusLight--${variant}`, {
82
- 'is-disabled': isDisabled
102
+ className: (0, $71ACv$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($7661ca422872705f$exports))), "spectrum-StatusLight", `spectrum-StatusLight--${variant}`, {
103
+ "is-disabled": isDisabled
83
104
  }, styleProps.className),
84
105
  ref: domRef
85
- }, children));
106
+ }, children);
86
107
  }
87
108
  /**
88
109
  * Status lights are used to color code categories and labels commonly found in data visualization.
89
110
  * When status lights have a semantic meaning, they should use semantic variant colors.
90
- */ let $df8f173c8bd4ebc0$export$5f84c37a31c6e41c = /*#__PURE__*/ $71ACv$forwardRef($df8f173c8bd4ebc0$var$StatusLight);
111
+ */ let $df8f173c8bd4ebc0$export$5f84c37a31c6e41c = /*#__PURE__*/ (0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,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 {StatusLight} from './StatusLight';\nexport type {SpectrumStatusLightProps} from '@react-types/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"}
1
+ {"mappings":";;;;;;;;;;;;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AEtB,KAAK;OACJ;AAGP;AAEA;;;CAGC,GACD,IAAI,0DAAe,CAAA,GAAA,iBAAS,EAAE;;ADjD9B","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 {StatusLight} from './StatusLight';\nexport type {SpectrumStatusLightProps} from '@react-types/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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/statuslight",
3
- "version": "3.4.2",
3
+ "version": "3.4.4",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -31,11 +31,11 @@
31
31
  "url": "https://github.com/adobe/react-spectrum"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.6.2",
35
- "@react-aria/utils": "^3.14.0",
36
- "@react-spectrum/utils": "^3.7.4",
37
- "@react-types/shared": "^3.15.0",
38
- "@react-types/statuslight": "^3.2.4"
34
+ "@react-aria/utils": "^3.14.2",
35
+ "@react-spectrum/utils": "^3.8.1",
36
+ "@react-types/shared": "^3.16.0",
37
+ "@react-types/statuslight": "^3.2.5",
38
+ "@swc/helpers": "^0.4.14"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "9202ef59e8c104dd06ffe33148445ef7932a5d1b"
50
+ "gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
51
51
  }