@react-spectrum/statuslight 3.5.2 → 3.5.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
- :root{font-synthesis:weight}.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}}
1
+ :root{font-synthesis:weight}.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:CanvasText;--spectrum-statuslight-text-color-disabled:GrayText;--spectrum-statuslight-dot-color-disabled:GrayText}.spectrum-StatusLight_c020b6:before{border:1px solid ButtonText}}
package/dist/main.js.map CHANGED
@@ -1 +1 @@
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"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;ACVD,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;IAC/E,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,uCAAY,EAAE;IAEjC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,EACnC,QAAQ,KAAK;IAGf,IAAI,CAAC,QAAS,CAAA,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,kBAAkB,AAAD,GAC1D,QAAQ,KAAK;IAGf,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,YAAY;YAAC,WAAW,CAAC,CAAC;QAAI,EAAE;QAClD,GAAG,UAAU;QACd,MAAM;QACN,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,gEAAK,GACL,wBACA,CAAC,sBAAsB,EAAE,QAAQ,CAAC,EAClC;YACE,eAAe;QACjB,GACA,WAAW;QAEb,KAAK;OACJ;AAGP;AAEA;;;CAGC,GACD,IAAI,0DAAe,CAAA,GAAA,uBAAS,EAAE;","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 +1 @@
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,uBAAe,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,oBAAa,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,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAc,AAAD,EAAE,YAAY;YAAC,WAAW,CAAC,CAAC;QAAI,EAAE;QAClD,GAAG,UAAU;QACd,MAAM;QACN,WAAW,CAAA,GAAA,iBAAU,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,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"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;ACVD,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;IAC/E,IAAI,WACF,QAAO,YACP,SAAQ,cACR,WAAU,QACV,KAAI,EACJ,GAAG,YACJ,GAAG,CAAA,GAAA,uBAAe,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,EACnC,QAAQ,KAAK;IAGf,IAAI,CAAC,QAAS,CAAA,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,kBAAkB,AAAD,GAC1D,QAAQ,KAAK;IAGf,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,YAAY;YAAC,WAAW,CAAC,CAAC;QAAI,EAAE;QAClD,GAAG,UAAU;QACd,MAAM;QACN,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,gEAAK,GACL,wBACA,CAAC,sBAAsB,EAAE,QAAQ,CAAC,EAClC;YACE,eAAe;QACjB,GACA,WAAW;QAEb,KAAK;OACJ;AAGP;AAEA;;;CAGC,GACD,IAAI,0DAAe,CAAA,GAAA,iBAAS,EAAE;","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.5.2",
3
+ "version": "3.5.4",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,11 +36,11 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/utils": "^3.17.0",
40
- "@react-spectrum/utils": "^3.9.2",
41
- "@react-types/shared": "^3.18.1",
42
- "@react-types/statuslight": "^3.3.2",
43
- "@swc/helpers": "^0.4.14"
39
+ "@react-aria/utils": "^3.19.0",
40
+ "@react-spectrum/utils": "^3.10.1",
41
+ "@react-types/shared": "^3.19.0",
42
+ "@react-types/statuslight": "^3.3.3",
43
+ "@swc/helpers": "^0.5.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "5911ed21de4b76d66f6254c02302519e02d50e16"
55
+ "gitHead": "d4dfe4bb842a914f10045ee63fc6b92f034c5b30"
56
56
  }