@react-spectrum/s2 3.0.0-nightly-5ed06068e-241105 → 3.0.0-nightly-09ccc53e7-241107

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.
Files changed (113) hide show
  1. package/dist/ActionButton.cjs +54 -11
  2. package/dist/ActionButton.cjs.map +1 -1
  3. package/dist/ActionButton.css +47 -3
  4. package/dist/ActionButton.css.map +1 -1
  5. package/dist/ActionButton.mjs +55 -12
  6. package/dist/ActionButton.mjs.map +1 -1
  7. package/dist/ActionButtonGroup.cjs +77 -0
  8. package/dist/ActionButtonGroup.cjs.map +1 -0
  9. package/dist/ActionButtonGroup.css +44 -0
  10. package/dist/ActionButtonGroup.css.map +1 -0
  11. package/dist/ActionButtonGroup.mjs +70 -0
  12. package/dist/ActionButtonGroup.mjs.map +1 -0
  13. package/dist/Badge.cjs +42 -42
  14. package/dist/Badge.css +35 -35
  15. package/dist/Badge.mjs +42 -42
  16. package/dist/Card.cjs +1 -1
  17. package/dist/Card.css +1 -1
  18. package/dist/Card.mjs +1 -1
  19. package/dist/Content.cjs +1 -0
  20. package/dist/Content.cjs.map +1 -1
  21. package/dist/Content.mjs +1 -0
  22. package/dist/Content.mjs.map +1 -1
  23. package/dist/ContextualHelp.cjs +1 -1
  24. package/dist/ContextualHelp.cjs.map +1 -1
  25. package/dist/ContextualHelp.css +32 -16
  26. package/dist/ContextualHelp.css.map +1 -1
  27. package/dist/ContextualHelp.mjs +1 -1
  28. package/dist/ContextualHelp.mjs.map +1 -1
  29. package/dist/IllustratedMessage.cjs +6 -2
  30. package/dist/IllustratedMessage.cjs.map +1 -1
  31. package/dist/IllustratedMessage.css +2 -2
  32. package/dist/IllustratedMessage.css.map +1 -1
  33. package/dist/IllustratedMessage.mjs +6 -2
  34. package/dist/IllustratedMessage.mjs.map +1 -1
  35. package/dist/InlineAlert.cjs +8 -8
  36. package/dist/InlineAlert.css +6 -6
  37. package/dist/InlineAlert.mjs +8 -8
  38. package/dist/Meter.cjs +4 -17
  39. package/dist/Meter.cjs.map +1 -1
  40. package/dist/Meter.css +7 -19
  41. package/dist/Meter.css.map +1 -1
  42. package/dist/Meter.mjs +4 -17
  43. package/dist/Meter.mjs.map +1 -1
  44. package/dist/Modal.cjs +1 -1
  45. package/dist/Modal.css +1 -1
  46. package/dist/Modal.mjs +1 -1
  47. package/dist/Picker.cjs +3 -0
  48. package/dist/Picker.cjs.map +1 -1
  49. package/dist/Picker.css +12 -0
  50. package/dist/Picker.css.map +1 -1
  51. package/dist/Picker.mjs +3 -0
  52. package/dist/Picker.mjs.map +1 -1
  53. package/dist/Popover.cjs +1 -1
  54. package/dist/Popover.css +1 -1
  55. package/dist/Popover.mjs +1 -1
  56. package/dist/ProgressBar.cjs +19 -3
  57. package/dist/ProgressBar.cjs.map +1 -1
  58. package/dist/ProgressBar.css +14 -0
  59. package/dist/ProgressBar.css.map +1 -1
  60. package/dist/ProgressBar.mjs +19 -3
  61. package/dist/ProgressBar.mjs.map +1 -1
  62. package/dist/Provider.cjs +1 -1
  63. package/dist/Provider.css +1 -1
  64. package/dist/Provider.mjs +1 -1
  65. package/dist/Radio.cjs +2 -2
  66. package/dist/Radio.cjs.map +1 -1
  67. package/dist/Radio.css +4 -8
  68. package/dist/Radio.css.map +1 -1
  69. package/dist/Radio.mjs +2 -2
  70. package/dist/Radio.mjs.map +1 -1
  71. package/dist/SegmentedControl.cjs +76 -62
  72. package/dist/SegmentedControl.cjs.map +1 -1
  73. package/dist/SegmentedControl.css +110 -69
  74. package/dist/SegmentedControl.css.map +1 -1
  75. package/dist/SegmentedControl.mjs +77 -63
  76. package/dist/SegmentedControl.mjs.map +1 -1
  77. package/dist/ToggleButton.cjs +13 -6
  78. package/dist/ToggleButton.cjs.map +1 -1
  79. package/dist/ToggleButton.css +16 -0
  80. package/dist/ToggleButton.css.map +1 -1
  81. package/dist/ToggleButton.mjs +14 -7
  82. package/dist/ToggleButton.mjs.map +1 -1
  83. package/dist/ToggleButtonGroup.cjs +54 -0
  84. package/dist/ToggleButtonGroup.cjs.map +1 -0
  85. package/dist/ToggleButtonGroup.mjs +48 -0
  86. package/dist/ToggleButtonGroup.mjs.map +1 -0
  87. package/dist/main.cjs +8 -0
  88. package/dist/main.cjs.map +1 -1
  89. package/dist/module.mjs +5 -1
  90. package/dist/module.mjs.map +1 -1
  91. package/dist/types.d.ts +57 -12
  92. package/dist/types.d.ts.map +1 -1
  93. package/package.json +17 -17
  94. package/src/ActionButton.tsx +88 -8
  95. package/src/ActionButtonGroup.tsx +106 -0
  96. package/src/Content.tsx +2 -1
  97. package/src/ContextualHelp.tsx +1 -1
  98. package/src/IllustratedMessage.tsx +1 -3
  99. package/src/Meter.tsx +4 -4
  100. package/src/Picker.tsx +10 -1
  101. package/src/ProgressBar.tsx +20 -3
  102. package/src/Radio.tsx +1 -3
  103. package/src/SegmentedControl.tsx +56 -45
  104. package/src/ToggleButton.tsx +23 -7
  105. package/src/ToggleButtonGroup.tsx +55 -0
  106. package/src/index.ts +4 -0
  107. package/style/dist/spectrum-theme.cjs +5 -0
  108. package/style/dist/spectrum-theme.cjs.map +1 -1
  109. package/style/dist/spectrum-theme.mjs +5 -0
  110. package/style/dist/spectrum-theme.mjs.map +1 -1
  111. package/style/dist/types.d.ts +2 -2
  112. package/style/dist/types.d.ts.map +1 -1
  113. package/style/spectrum-theme.ts +5 -0
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAqBM,MAAM,0DAAiB,CAAA,GAAA,oBAAY,EAA+D;AAEzG,qDAAqD;AACrD,SAAS,8BAAQ,KAAmB,EAAE,GAA+B;IACnE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,YAAE,QAAQ,QAAE,IAAI,EAAE,GAAG,YAAW,GAAG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EAAE;AAGtB,MAAM,0DAAgB,CAAA,GAAA,oBAAY,EAA2C,CAAC;AAErF,SAAS,6BAAO,KAAmB,EAAE,GAAW;IAC9C,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,YAAE,QAAQ,QAAE,IAAI,EAAE,GAAG,YAAW,GAAG;IACnF,IAAI,UACF,OAAO;IAET,qBACE,gBAAC;QACE,GAAG,UAAU;QACd,KAAK;QACL,WAAW,mBAAmB;QAC9B,OAAO;QACP,MAAM,QAAQ;;AAEpB;AAEA,MAAM,0DAAU,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Content.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {ContextValue, Keyboard as KeyboardAria, Header as RACHeader, Heading as RACHeading, TextContext as RACTextContext, SlotProps, Text as TextAria} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {StyleString} from '../style/types';\nimport {UnsafeStyles} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useIsSkeleton, useSkeletonText} from './Skeleton';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface ContentProps extends UnsafeStyles, SlotProps {\n children?: ReactNode,\n styles?: StyleString,\n isHidden?: boolean\n}\n\ninterface HeadingProps extends ContentProps {\n level?: number\n}\n\nexport const HeadingContext = createContext<ContextValue<HeadingProps, DOMRefValue<HTMLHeadingElement>>>(null);\n\n// Wrapper around RAC Heading to unmount when hidden.\nfunction Heading(props: HeadingProps, ref: DOMRef<HTMLHeadingElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, HeadingContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props;\n if (isHidden) {\n return null;\n }\n\n return (\n <RACHeading\n {...otherProps}\n ref={domRef}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined} />\n );\n}\n\nconst _Heading = forwardRef(Heading);\nexport {_Heading as Heading};\n\nexport const HeaderContext = createContext<ContextValue<ContentProps, DOMRefValue<HTMLElement>>>(null);\n\nfunction Header(props: ContentProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, HeaderContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props;\n if (isHidden) {\n return null;\n }\n\n return (\n <RACHeader\n {...otherProps}\n ref={domRef}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined} />\n );\n}\n\nconst _Header = forwardRef(Header);\nexport {_Header as Header};\n\nexport const ContentContext = createContext<ContextValue<ContentProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction Content(props: ContentProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ContentContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props;\n if (isHidden) {\n return null;\n }\n return (\n <div\n {...otherProps}\n ref={domRef}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined} />\n );\n}\n\nconst _Content = forwardRef(Content);\nexport {_Content as Content};\n\nexport const TextContext = createContext<ContextValue<ContentProps, DOMRefValue>>(null);\n\nfunction Text(props: ContentProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, TextContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, children, ...otherProps} = props;\n let racContext = useContext(RACTextContext);\n let isSkeleton = useIsSkeleton();\n [children, UNSAFE_style] = useSkeletonText(children, UNSAFE_style);\n if (isHidden) {\n return null;\n }\n\n slot = slot && racContext && 'slots' in racContext && !racContext.slots?.[slot] ? undefined : slot;\n return (\n <TextAria\n {...otherProps}\n ref={domRef}\n // @ts-ignore - compatibility with React < 19\n inert={isSkeleton ? 'true' : undefined}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined}>\n {children}\n </TextAria>\n );\n}\n\nconst _Text = forwardRef(Text);\nexport {_Text as Text};\n\nexport const KeyboardContext = createContext<ContextValue<ContentProps, DOMRefValue>>({});\n\nfunction Keyboard(props: ContentProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, KeyboardContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props;\n if (isHidden) {\n return null;\n }\n return (\n <KeyboardAria\n {...otherProps}\n ref={domRef}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined} />\n );\n}\n\nconst _Keyboard = forwardRef(Keyboard);\nexport {_Keyboard as Keyboard};\n\nexport const FooterContext = createContext<ContextValue<ContentProps, DOMRefValue>>({});\n\nfunction Footer(props: ContentProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, FooterContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props;\n if (isHidden) {\n return null;\n }\n return (\n <footer\n {...otherProps}\n ref={domRef}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined} />\n );\n}\n\nconst _Footer = forwardRef(Footer);\nexport {_Footer as Footer};\n"],"names":[],"version":3,"file":"Content.mjs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AAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,YAAE,QAAQ,QAAE,IAAI,EAAE,GAAG,YAAW,GAAG;IACnF,IAAI,UACF,OAAO;IAET,qBACE,gBAAC,CAAA,GAAA,eAAW;QACT,GAAG,UAAU;QACd,KAAK;QACL,WAAW,mBAAmB;QAC9B,OAAO;QACP,MAAM,QAAQ;;AAEpB;AAEA,MAAM,0DAAY,CAAA,GAAA,iBAAS,EAAE;AAGtB,MAAM,0DAAgB,CAAA,GAAA,oBAAY,EAA2C,CAAC;AAErF,SAAS,6BAAO,KAAmB,EAAE,GAAW;IAC9C,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,YAAE,QAAQ,QAAE,IAAI,EAAE,GAAG,YAAW,GAAG;IACnF,IAAI,UACF,OAAO;IAET,qBACE,gBAAC;QACE,GAAG,UAAU;QACd,KAAK;QACL,WAAW,mBAAmB;QAC9B,OAAO;QACP,MAAM,QAAQ;;AAEpB;AAEA,MAAM,0DAAU,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Content.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {ContextValue, Keyboard as KeyboardAria, Header as RACHeader, Heading as RACHeading, TextContext as RACTextContext, SlotProps, Text as TextAria} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {StyleString} from '../style/types';\nimport {UnsafeStyles} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useIsSkeleton, useSkeletonText} from './Skeleton';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface ContentProps extends UnsafeStyles, SlotProps {\n children?: ReactNode,\n styles?: StyleString,\n isHidden?: boolean\n}\n\ninterface HeadingProps extends ContentProps {\n level?: number\n}\n\nexport const HeadingContext = createContext<ContextValue<HeadingProps, DOMRefValue<HTMLHeadingElement>>>(null);\n\n// Wrapper around RAC Heading to unmount when hidden.\nfunction Heading(props: HeadingProps, ref: DOMRef<HTMLHeadingElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, HeadingContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props;\n if (isHidden) {\n return null;\n }\n\n return (\n <RACHeading\n {...otherProps}\n ref={domRef}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined} />\n );\n}\n\nconst _Heading = forwardRef(Heading);\nexport {_Heading as Heading};\n\nexport const HeaderContext = createContext<ContextValue<ContentProps, DOMRefValue<HTMLElement>>>(null);\n\nfunction Header(props: ContentProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, HeaderContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props;\n if (isHidden) {\n return null;\n }\n\n return (\n <RACHeader\n {...otherProps}\n ref={domRef}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined} />\n );\n}\n\nconst _Header = forwardRef(Header);\nexport {_Header as Header};\n\nexport const ContentContext = createContext<ContextValue<ContentProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction Content(props: ContentProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ContentContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props;\n if (isHidden) {\n return null;\n }\n return (\n <div\n {...otherProps}\n ref={domRef}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined} />\n );\n}\n\nconst _Content = forwardRef(Content);\nexport {_Content as Content};\n\nexport const TextContext = createContext<ContextValue<ContentProps, DOMRefValue>>(null);\n\nfunction Text(props: ContentProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, TextContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, children, ...otherProps} = props;\n let racContext = useContext(RACTextContext);\n let isSkeleton = useIsSkeleton();\n [children, UNSAFE_style] = useSkeletonText(children, UNSAFE_style);\n if (isHidden) {\n return null;\n }\n\n slot = slot && racContext && 'slots' in racContext && !racContext.slots?.[slot] ? undefined : slot;\n return (\n <TextAria\n {...otherProps}\n ref={domRef}\n // @ts-ignore - compatibility with React < 19\n inert={isSkeleton ? 'true' : undefined}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined}\n data-rsp-slot=\"text\">\n {children}\n </TextAria>\n );\n}\n\nconst _Text = forwardRef(Text);\nexport {_Text as Text};\n\nexport const KeyboardContext = createContext<ContextValue<ContentProps, DOMRefValue>>({});\n\nfunction Keyboard(props: ContentProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, KeyboardContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props;\n if (isHidden) {\n return null;\n }\n return (\n <KeyboardAria\n {...otherProps}\n ref={domRef}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined} />\n );\n}\n\nconst _Keyboard = forwardRef(Keyboard);\nexport {_Keyboard as Keyboard};\n\nexport const FooterContext = createContext<ContextValue<ContentProps, DOMRefValue>>({});\n\nfunction Footer(props: ContentProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, FooterContext);\n let domRef = useDOMRef(ref);\n let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props;\n if (isHidden) {\n return null;\n }\n return (\n <footer\n {...otherProps}\n ref={domRef}\n className={UNSAFE_className + styles}\n style={UNSAFE_style}\n slot={slot || undefined} />\n );\n}\n\nconst _Footer = forwardRef(Footer);\nexport {_Footer as Footer};\n"],"names":[],"version":3,"file":"Content.mjs.map"}
@@ -82,7 +82,7 @@ function $bab829476f85a155$var$ContextualHelp(props, ref) {
82
82
  hideArrow: true,
83
83
  UNSAFE_className: $bab829476f85a155$var$popover,
84
84
  children: /*#__PURE__*/ (0, $44GE8$reactjsxruntime.jsx)((0, $44GE8$reactariacomponents.Dialog), {
85
- className: (0, $308b180f49d82d28$exports.mergeStyles)((0, $0f4636c7093b9233$exports.dialogInner), " . _va _wa _xa _ya"),
85
+ className: (0, $308b180f49d82d28$exports.mergeStyles)((0, $0f4636c7093b9233$exports.dialogInner), " . _va _wa _xa _ya AP BP yP zP Eh Fh Ch Dh"),
86
86
  children: /*#__PURE__*/ (0, $44GE8$reactjsxruntime.jsx)((0, $44GE8$reactariacomponents.Provider), {
87
87
  values: [
88
88
  [
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAM;AAOC,MAAM,0DAAwB,CAAA,GAAA,0BAAY,EAA2E;AAE5H,SAAS,qCAAe,KAA0B,EAAE,GAAoC;IACtF,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,YACF,QAAQ,eACR,WAAW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A,GAAA,wCAAa;gCAAG;oCAAC,MAAM;gCAItB;6BAAE;4BACJ;gCAAC,CAAA,GAAA,wCAAa;gCAAG;oCAAC,MAAM;gCAEtB;6BAAE;4BACJ;gCAAC,CAAA,GAAA,uCAAY;gCAAG;oCAAC,MAAM;gCAGrB;6BAAE;yBACL;kCACA;;;;;;AAMb;AAEA;;CAEC,GACD,IAAI,0DAAkB,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ContextualHelp.tsx"],"sourcesContent":["import {ActionButton} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContentContext, FooterContext, HeadingContext} from './Content';\nimport {ContextValue, DEFAULT_SLOT, Provider, Dialog as RACDialog, TextContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {dialogInner} from './Dialog';\nimport {DialogTrigger, DialogTriggerProps} from './DialogTrigger';\nimport {filterDOMProps, mergeProps, useLabels} from '@react-aria/utils';\nimport HelpIcon from '../s2wf-icons/S2_Icon_HelpCircle_20_N.svg';\nimport InfoIcon from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {mergeStyles} from '../style/runtime';\nimport {Popover, PopoverProps} from './Popover';\nimport {style, size as styleSize} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ContextualHelpStyleProps {\n /**\n * Indicates whether contents are informative or provides helpful guidance.\n *\n * @default 'help'\n */\n variant?: 'info' | 'help'\n}\nexport interface ContextualHelpProps extends\n Pick<DialogTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'shouldFlip' | 'offset' | 'crossOffset' | 'placement'>,\n Pick<PopoverProps, 'containerPadding'>,\n ContextualHelpStyleProps, StyleProps, DOMProps, AriaLabelingProps {\n /** Contents of the Contextual Help popover. */\n children?: ReactNode,\n /**\n * The size of the ActionButton.\n *\n * @default 'XS'\n */\n size?: 'XS' | 'S'\n}\n\nconst popover = style({\n fontFamily: 'sans',\n minWidth: '[218px]',\n width: '[218px]',\n padding: 24\n});\n\nexport const ContextualHelpContext = createContext<ContextValue<ContextualHelpProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\nfunction ContextualHelp(props: ContextualHelpProps, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ContextualHelpContext);\n let {\n children,\n defaultOpen,\n // containerPadding = 24, // See popover() above. Issue noted in Popover.tsx.\n size = 'XS',\n crossOffset,\n isOpen,\n offset = 8,\n onOpenChange,\n placement = 'bottom start',\n shouldFlip,\n UNSAFE_className,\n UNSAFE_style,\n styles,\n variant = 'help'\n } = props;\n\n // In a FieldLabel we're getting the context's aria-labeledby, so we need to\n // manually set the aria-label after useLabels() to keep the order of label\n // then ContextualHelp variant\n let labelProps = useLabels(props);\n let label = stringFormatter.format(`contextualhelp.${variant}`);\n labelProps['aria-label'] = labelProps['aria-label'] ? labelProps['aria-label'] + ' ' + label : label;\n\n let buttonProps = filterDOMProps(props, {labelable: true});\n\n return (\n <DialogTrigger\n isOpen={isOpen}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}>\n <ActionButton\n slot={null}\n ref={ref}\n size={size}\n {...mergeProps(buttonProps, labelProps)}\n UNSAFE_style={UNSAFE_style}\n UNSAFE_className={UNSAFE_className}\n styles={styles}\n isQuiet>\n {variant === 'info' ? <InfoIcon /> : <HelpIcon />}\n </ActionButton>\n <Popover\n placement={placement}\n shouldFlip={shouldFlip}\n // not working => containerPadding={containerPadding}\n offset={offset}\n crossOffset={crossOffset}\n hideArrow\n UNSAFE_className={popover}>\n <RACDialog className={mergeStyles(dialogInner, style({borderRadius: 'none'}))}>\n <Provider\n values={[\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {}\n }\n }],\n [HeadingContext, {styles: style({\n font: 'heading-xs',\n margin: 0,\n marginBottom: styleSize(8) // This only makes it 10px on mobile and should be 12px\n })}],\n [ContentContext, {styles: style({\n font: 'body-sm'\n })}],\n [FooterContext, {styles: style({\n font: 'body-sm',\n marginTop: 16\n })}]\n ]}>\n {children}\n </Provider>\n </RACDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n\n/**\n * Contextual help shows a user extra information about the state of an adjacent component, or a total view.\n */\nlet _ContextualHelp = forwardRef(ContextualHelp);\nexport {_ContextualHelp as ContextualHelp};\n"],"names":[],"version":3,"file":"ContextualHelp.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAM;AAOC,MAAM,0DAAwB,CAAA,GAAA,0BAAY,EAA2E;AAE5H,SAAS,qCAAe,KAA0B,EAAE,GAAoC;IACtF,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,YACF,QAAQ,eACR,WAAW,QACX,6EAA6E;IAC7E,OAAO,mBACP,WAAW,UACX,MAAM,UACN,SAAS,iBACT,YAAY,aACZ,YAAY,4BACZ,UAAU,oBACV,gBAAgB,gBAChB,YAAY,UACZ,MAAM,WACN,UAAU,QACX,GAAG;IAEJ,4EAA4E;IAC5E,2EAA2E;IAC3E,8BAA8B;IAC9B,IAAI,aAAa,CAAA,GAAA,+BAAQ,EAAE;IAC3B,IAAI,QAAQ,gBAAgB,MAAM,CAAC,CAAC,eAAe,EAAE,QAAQ,CAAC;IAC9D,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,GAAG,MAAM,QAAQ;IAE/F,IAAI,cAAc,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAExD,qBACE,iCAAC,CAAA,GAAA,uCAAY;QACX,QAAQ;QACR,aAAa;QACb,cAAc;;0BACd,gCAAC,CAAA,GAAA,sCAAW;gBACV,MAAM;gBACN,KAAK;gBACL,MAAM;gBACL,GAAG,CAAA,GAAA,gCAAS,EAAE,aAAa,WAAW;gBACvC,cAAc;gBACd,kBAAkB;gBAClB,QAAQ;gBACR,OAAO;0BACN,YAAY,uBAAS,gCAAC,CAAA,GAAA,iCAAO,uBAAO,gCAAC,CAAA,GAAA,iCAAO;;0BAE/C,gCAAC,CAAA,GAAA,iCAAM;gBACL,WAAW;gBACX,YAAY;gBACZ,qDAAqD;gBACrD,QAAQ;gBACR,aAAa;gBACb,SAAS;gBACT,kBAAkB;0BAClB,cAAA,gCAAC,CAAA,GAAA,iCAAQ;oBAAE,WAAW,CAAA,GAAA,qCAAU,EAAE,CAAA,GAAA,qCAAU;8BAC1C,cAAA,gCAAC,CAAA,GAAA,mCAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,sCAAU;gCAAG;oCACZ,OAAO;wCACL,CAAC,CAAA,GAAA,uCAAW,EAAE,EAAE,CAAC;oCACnB;gCACF;6BAAE;4BACF;gCAAC,CAAA,GAAA,wCAAa;gCAAG;oCAAC,MAAM;gCAItB;6BAAE;4BACJ;gCAAC,CAAA,GAAA,wCAAa;gCAAG;oCAAC,MAAM;gCAEtB;6BAAE;4BACJ;gCAAC,CAAA,GAAA,uCAAY;gCAAG;oCAAC,MAAM;gCAGrB;6BAAE;yBACL;kCACA;;;;;;AAMb;AAEA;;CAEC,GACD,IAAI,0DAAkB,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ContextualHelp.tsx"],"sourcesContent":["import {ActionButton} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContentContext, FooterContext, HeadingContext} from './Content';\nimport {ContextValue, DEFAULT_SLOT, Provider, Dialog as RACDialog, TextContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {dialogInner} from './Dialog';\nimport {DialogTrigger, DialogTriggerProps} from './DialogTrigger';\nimport {filterDOMProps, mergeProps, useLabels} from '@react-aria/utils';\nimport HelpIcon from '../s2wf-icons/S2_Icon_HelpCircle_20_N.svg';\nimport InfoIcon from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {mergeStyles} from '../style/runtime';\nimport {Popover, PopoverProps} from './Popover';\nimport {style, size as styleSize} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ContextualHelpStyleProps {\n /**\n * Indicates whether contents are informative or provides helpful guidance.\n *\n * @default 'help'\n */\n variant?: 'info' | 'help'\n}\nexport interface ContextualHelpProps extends\n Pick<DialogTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'shouldFlip' | 'offset' | 'crossOffset' | 'placement'>,\n Pick<PopoverProps, 'containerPadding'>,\n ContextualHelpStyleProps, StyleProps, DOMProps, AriaLabelingProps {\n /** Contents of the Contextual Help popover. */\n children?: ReactNode,\n /**\n * The size of the ActionButton.\n *\n * @default 'XS'\n */\n size?: 'XS' | 'S'\n}\n\nconst popover = style({\n fontFamily: 'sans',\n minWidth: '[218px]',\n width: '[218px]',\n padding: 24\n});\n\nexport const ContextualHelpContext = createContext<ContextValue<ContextualHelpProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\nfunction ContextualHelp(props: ContextualHelpProps, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ContextualHelpContext);\n let {\n children,\n defaultOpen,\n // containerPadding = 24, // See popover() above. Issue noted in Popover.tsx.\n size = 'XS',\n crossOffset,\n isOpen,\n offset = 8,\n onOpenChange,\n placement = 'bottom start',\n shouldFlip,\n UNSAFE_className,\n UNSAFE_style,\n styles,\n variant = 'help'\n } = props;\n\n // In a FieldLabel we're getting the context's aria-labeledby, so we need to\n // manually set the aria-label after useLabels() to keep the order of label\n // then ContextualHelp variant\n let labelProps = useLabels(props);\n let label = stringFormatter.format(`contextualhelp.${variant}`);\n labelProps['aria-label'] = labelProps['aria-label'] ? labelProps['aria-label'] + ' ' + label : label;\n\n let buttonProps = filterDOMProps(props, {labelable: true});\n\n return (\n <DialogTrigger\n isOpen={isOpen}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}>\n <ActionButton\n slot={null}\n ref={ref}\n size={size}\n {...mergeProps(buttonProps, labelProps)}\n UNSAFE_style={UNSAFE_style}\n UNSAFE_className={UNSAFE_className}\n styles={styles}\n isQuiet>\n {variant === 'info' ? <InfoIcon /> : <HelpIcon />}\n </ActionButton>\n <Popover\n placement={placement}\n shouldFlip={shouldFlip}\n // not working => containerPadding={containerPadding}\n offset={offset}\n crossOffset={crossOffset}\n hideArrow\n UNSAFE_className={popover}>\n <RACDialog className={mergeStyles(dialogInner, style({borderRadius: 'none', margin: -24, padding: 24}))}>\n <Provider\n values={[\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {}\n }\n }],\n [HeadingContext, {styles: style({\n font: 'heading-xs',\n margin: 0,\n marginBottom: styleSize(8) // This only makes it 10px on mobile and should be 12px\n })}],\n [ContentContext, {styles: style({\n font: 'body-sm'\n })}],\n [FooterContext, {styles: style({\n font: 'body-sm',\n marginTop: 16\n })}]\n ]}>\n {children}\n </Provider>\n </RACDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n\n/**\n * Contextual help shows a user extra information about the state of an adjacent component, or a total view.\n */\nlet _ContextualHelp = forwardRef(ContextualHelp);\nexport {_ContextualHelp as ContextualHelp};\n"],"names":[],"version":3,"file":"ContextualHelp.cjs.map"}
@@ -7,22 +7,6 @@
7
7
  width: 218px;
8
8
  }
9
9
 
10
- .Eh {
11
- padding-top: 1.5rem;
12
- }
13
-
14
- .Fh {
15
- padding-bottom: 1.5rem;
16
- }
17
-
18
- .Ch {
19
- padding-inline-start: 1.5rem;
20
- }
21
-
22
- .Dh {
23
- padding-inline-end: 1.5rem;
24
- }
25
-
26
10
  ._va {
27
11
  border-start-start-radius: 0;
28
12
  }
@@ -39,6 +23,38 @@
39
23
  border-end-end-radius: 0;
40
24
  }
41
25
 
26
+ .AP {
27
+ margin-top: -1.5rem;
28
+ }
29
+
30
+ .BP {
31
+ margin-bottom: -1.5rem;
32
+ }
33
+
34
+ .yP {
35
+ margin-inline-start: -1.5rem;
36
+ }
37
+
38
+ .zP {
39
+ margin-inline-end: -1.5rem;
40
+ }
41
+
42
+ .Eh {
43
+ padding-top: 1.5rem;
44
+ }
45
+
46
+ .Fh {
47
+ padding-bottom: 1.5rem;
48
+ }
49
+
50
+ .Ch {
51
+ padding-inline-start: 1.5rem;
52
+ }
53
+
54
+ .Dh {
55
+ padding-inline-end: 1.5rem;
56
+ }
57
+
42
58
  ._di {
43
59
  font-size: 1.125rem;
44
60
  }
@@ -1 +1 @@
1
- {"mappings":"ACyCgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA8DuC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAQf;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAQD;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AA9EvB;EAsEwB;;;;;;EAAA;;;;EAQD;;;;EAAA;;;;;AA9EvB;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAsEwB;EAAA;IAAA;;;;IAKA;;;;;;AAAA","sources":["019fb1fcc3c1598d","packages/@react-spectrum/s2/src/ContextualHelp.tsx"],"sourcesContent":["@import \"3578337ca657fa78\";\n@import \"a023844b8de14349\";\n@import \"3be9de50ea21a4ea\";\n@import \"5266771b1d67e2fb\";\n@import \"ccaa61f08a335ea7\";\n","import {ActionButton} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContentContext, FooterContext, HeadingContext} from './Content';\nimport {ContextValue, DEFAULT_SLOT, Provider, Dialog as RACDialog, TextContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {dialogInner} from './Dialog';\nimport {DialogTrigger, DialogTriggerProps} from './DialogTrigger';\nimport {filterDOMProps, mergeProps, useLabels} from '@react-aria/utils';\nimport HelpIcon from '../s2wf-icons/S2_Icon_HelpCircle_20_N.svg';\nimport InfoIcon from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {mergeStyles} from '../style/runtime';\nimport {Popover, PopoverProps} from './Popover';\nimport {style, size as styleSize} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ContextualHelpStyleProps {\n /**\n * Indicates whether contents are informative or provides helpful guidance.\n *\n * @default 'help'\n */\n variant?: 'info' | 'help'\n}\nexport interface ContextualHelpProps extends\n Pick<DialogTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'shouldFlip' | 'offset' | 'crossOffset' | 'placement'>,\n Pick<PopoverProps, 'containerPadding'>,\n ContextualHelpStyleProps, StyleProps, DOMProps, AriaLabelingProps {\n /** Contents of the Contextual Help popover. */\n children?: ReactNode,\n /**\n * The size of the ActionButton.\n *\n * @default 'XS'\n */\n size?: 'XS' | 'S'\n}\n\nconst popover = style({\n fontFamily: 'sans',\n minWidth: '[218px]',\n width: '[218px]',\n padding: 24\n});\n\nexport const ContextualHelpContext = createContext<ContextValue<ContextualHelpProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\nfunction ContextualHelp(props: ContextualHelpProps, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ContextualHelpContext);\n let {\n children,\n defaultOpen,\n // containerPadding = 24, // See popover() above. Issue noted in Popover.tsx.\n size = 'XS',\n crossOffset,\n isOpen,\n offset = 8,\n onOpenChange,\n placement = 'bottom start',\n shouldFlip,\n UNSAFE_className,\n UNSAFE_style,\n styles,\n variant = 'help'\n } = props;\n\n // In a FieldLabel we're getting the context's aria-labeledby, so we need to\n // manually set the aria-label after useLabels() to keep the order of label\n // then ContextualHelp variant\n let labelProps = useLabels(props);\n let label = stringFormatter.format(`contextualhelp.${variant}`);\n labelProps['aria-label'] = labelProps['aria-label'] ? labelProps['aria-label'] + ' ' + label : label;\n\n let buttonProps = filterDOMProps(props, {labelable: true});\n\n return (\n <DialogTrigger\n isOpen={isOpen}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}>\n <ActionButton\n slot={null}\n ref={ref}\n size={size}\n {...mergeProps(buttonProps, labelProps)}\n UNSAFE_style={UNSAFE_style}\n UNSAFE_className={UNSAFE_className}\n styles={styles}\n isQuiet>\n {variant === 'info' ? <InfoIcon /> : <HelpIcon />}\n </ActionButton>\n <Popover\n placement={placement}\n shouldFlip={shouldFlip}\n // not working => containerPadding={containerPadding}\n offset={offset}\n crossOffset={crossOffset}\n hideArrow\n UNSAFE_className={popover}>\n <RACDialog className={mergeStyles(dialogInner, style({borderRadius: 'none'}))}>\n <Provider\n values={[\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {}\n }\n }],\n [HeadingContext, {styles: style({\n font: 'heading-xs',\n margin: 0,\n marginBottom: styleSize(8) // This only makes it 10px on mobile and should be 12px\n })}],\n [ContentContext, {styles: style({\n font: 'body-sm'\n })}],\n [FooterContext, {styles: style({\n font: 'body-sm',\n marginTop: 16\n })}]\n ]}>\n {children}\n </Provider>\n </RACDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n\n/**\n * Contextual help shows a user extra information about the state of an adjacent component, or a total view.\n */\nlet _ContextualHelp = forwardRef(ContextualHelp);\nexport {_ContextualHelp as ContextualHelp};\n"],"names":[],"version":3,"file":"ContextualHelp.css.map"}
1
+ {"mappings":"ACyCgB;EAAA;;;;EAAA;;;;EA8DuC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAQf;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAQD;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AA9EvB;EAsEwB;;;;;;EAAA;;;;EAQD;;;;EAAA;;;;;AA9EvB;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAsEwB;EAAA;IAAA;;;;IAKA;;;;;;AAAA","sources":["019fb1fcc3c1598d","packages/@react-spectrum/s2/src/ContextualHelp.tsx"],"sourcesContent":["@import \"3578337ca657fa78\";\n@import \"a023844b8de14349\";\n@import \"3be9de50ea21a4ea\";\n@import \"5266771b1d67e2fb\";\n@import \"ccaa61f08a335ea7\";\n","import {ActionButton} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContentContext, FooterContext, HeadingContext} from './Content';\nimport {ContextValue, DEFAULT_SLOT, Provider, Dialog as RACDialog, TextContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {dialogInner} from './Dialog';\nimport {DialogTrigger, DialogTriggerProps} from './DialogTrigger';\nimport {filterDOMProps, mergeProps, useLabels} from '@react-aria/utils';\nimport HelpIcon from '../s2wf-icons/S2_Icon_HelpCircle_20_N.svg';\nimport InfoIcon from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {mergeStyles} from '../style/runtime';\nimport {Popover, PopoverProps} from './Popover';\nimport {style, size as styleSize} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ContextualHelpStyleProps {\n /**\n * Indicates whether contents are informative or provides helpful guidance.\n *\n * @default 'help'\n */\n variant?: 'info' | 'help'\n}\nexport interface ContextualHelpProps extends\n Pick<DialogTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'shouldFlip' | 'offset' | 'crossOffset' | 'placement'>,\n Pick<PopoverProps, 'containerPadding'>,\n ContextualHelpStyleProps, StyleProps, DOMProps, AriaLabelingProps {\n /** Contents of the Contextual Help popover. */\n children?: ReactNode,\n /**\n * The size of the ActionButton.\n *\n * @default 'XS'\n */\n size?: 'XS' | 'S'\n}\n\nconst popover = style({\n fontFamily: 'sans',\n minWidth: '[218px]',\n width: '[218px]',\n padding: 24\n});\n\nexport const ContextualHelpContext = createContext<ContextValue<ContextualHelpProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\nfunction ContextualHelp(props: ContextualHelpProps, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ContextualHelpContext);\n let {\n children,\n defaultOpen,\n // containerPadding = 24, // See popover() above. Issue noted in Popover.tsx.\n size = 'XS',\n crossOffset,\n isOpen,\n offset = 8,\n onOpenChange,\n placement = 'bottom start',\n shouldFlip,\n UNSAFE_className,\n UNSAFE_style,\n styles,\n variant = 'help'\n } = props;\n\n // In a FieldLabel we're getting the context's aria-labeledby, so we need to\n // manually set the aria-label after useLabels() to keep the order of label\n // then ContextualHelp variant\n let labelProps = useLabels(props);\n let label = stringFormatter.format(`contextualhelp.${variant}`);\n labelProps['aria-label'] = labelProps['aria-label'] ? labelProps['aria-label'] + ' ' + label : label;\n\n let buttonProps = filterDOMProps(props, {labelable: true});\n\n return (\n <DialogTrigger\n isOpen={isOpen}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}>\n <ActionButton\n slot={null}\n ref={ref}\n size={size}\n {...mergeProps(buttonProps, labelProps)}\n UNSAFE_style={UNSAFE_style}\n UNSAFE_className={UNSAFE_className}\n styles={styles}\n isQuiet>\n {variant === 'info' ? <InfoIcon /> : <HelpIcon />}\n </ActionButton>\n <Popover\n placement={placement}\n shouldFlip={shouldFlip}\n // not working => containerPadding={containerPadding}\n offset={offset}\n crossOffset={crossOffset}\n hideArrow\n UNSAFE_className={popover}>\n <RACDialog className={mergeStyles(dialogInner, style({borderRadius: 'none', margin: -24, padding: 24}))}>\n <Provider\n values={[\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {}\n }\n }],\n [HeadingContext, {styles: style({\n font: 'heading-xs',\n margin: 0,\n marginBottom: styleSize(8) // This only makes it 10px on mobile and should be 12px\n })}],\n [ContentContext, {styles: style({\n font: 'body-sm'\n })}],\n [FooterContext, {styles: style({\n font: 'body-sm',\n marginTop: 16\n })}]\n ]}>\n {children}\n </Provider>\n </RACDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n\n/**\n * Contextual help shows a user extra information about the state of an adjacent component, or a total view.\n */\nlet _ContextualHelp = forwardRef(ContextualHelp);\nexport {_ContextualHelp as ContextualHelp};\n"],"names":[],"version":3,"file":"ContextualHelp.css.map"}
@@ -75,7 +75,7 @@ function $8e176595bc49ca3f$var$ContextualHelp(props, ref) {
75
75
  hideArrow: true,
76
76
  UNSAFE_className: $8e176595bc49ca3f$var$popover,
77
77
  children: /*#__PURE__*/ (0, $bcd4U$jsx)((0, $bcd4U$Dialog), {
78
- className: (0, $feb886035e0d4633$export$e618dc39ac9ad607)((0, $9bbc115952dac5a6$export$6af31f836f9aa6f2), " . _va _wa _xa _ya"),
78
+ className: (0, $feb886035e0d4633$export$e618dc39ac9ad607)((0, $9bbc115952dac5a6$export$6af31f836f9aa6f2), " . _va _wa _xa _ya AP BP yP zP Eh Fh Ch Dh"),
79
79
  children: /*#__PURE__*/ (0, $bcd4U$jsx)((0, $bcd4U$Provider), {
80
80
  values: [
81
81
  [
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAM;AAOC,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAA2E;AAE5H,SAAS,qCAAe,KAA0B,EAAE,GAAoC;IACtF,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,YACF,QAAQ,eACR,WAAW,QACX,6EAA6E;IAC7E,OAAO,mBACP,WAAW,UACX,MAAM,UACN,SAAS,iBACT,YAAY,aACZ,YAAY,4BACZ,UAAU,oBACV,gBAAgB,gBAChB,YAAY,UACZ,MAAM,WACN,UAAU,QACX,GAAG;IAEJ,4EAA4E;IAC5E,2EAA2E;IAC3E,8BAA8B;IAC9B,IAAI,aAAa,CAAA,GAAA,gBAAQ,EAAE;IAC3B,IAAI,QAAQ,gBAAgB,MAAM,CAAC,CAAC,eAAe,EAAE,QAAQ,CAAC;IAC9D,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,GAAG,MAAM,QAAQ;IAE/F,IAAI,cAAc,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAExD,qBACE,iBAAC,CAAA,GAAA,yCAAY;QACX,QAAQ;QACR,aAAa;QACb,cAAc;;0BACd,gBAAC,CAAA,GAAA,yCAAW;gBACV,MAAM;gBACN,KAAK;gBACL,MAAM;gBACL,GAAG,CAAA,GAAA,iBAAS,EAAE,aAAa,WAAW;gBACvC,cAAc;gBACd,kBAAkB;gBAClB,QAAQ;gBACR,OAAO;0BACN,YAAY,uBAAS,gBAAC,CAAA,GAAA,wCAAO,uBAAO,gBAAC,CAAA,GAAA,wCAAO;;0BAE/C,gBAAC,CAAA,GAAA,yCAAM;gBACL,WAAW;gBACX,YAAY;gBACZ,qDAAqD;gBACrD,QAAQ;gBACR,aAAa;gBACb,SAAS;gBACT,kBAAkB;0BAClB,cAAA,gBAAC,CAAA,GAAA,aAAQ;oBAAE,WAAW,CAAA,GAAA,yCAAU,EAAE,CAAA,GAAA,yCAAU;8BAC1C,cAAA,gBAAC,CAAA,GAAA,eAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,kBAAU;gCAAG;oCACZ,OAAO;wCACL,CAAC,CAAA,GAAA,mBAAW,EAAE,EAAE,CAAC;oCACnB;gCACF;6BAAE;4BACF;gCAAC,CAAA,GAAA,yCAAa;gCAAG;oCAAC,MAAM;gCAItB;6BAAE;4BACJ;gCAAC,CAAA,GAAA,yCAAa;gCAAG;oCAAC,MAAM;gCAEtB;6BAAE;4BACJ;gCAAC,CAAA,GAAA,yCAAY;gCAAG;oCAAC,MAAM;gCAGrB;6BAAE;yBACL;kCACA;;;;;;AAMb;AAEA;;CAEC,GACD,IAAI,0DAAkB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ContextualHelp.tsx"],"sourcesContent":["import {ActionButton} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContentContext, FooterContext, HeadingContext} from './Content';\nimport {ContextValue, DEFAULT_SLOT, Provider, Dialog as RACDialog, TextContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {dialogInner} from './Dialog';\nimport {DialogTrigger, DialogTriggerProps} from './DialogTrigger';\nimport {filterDOMProps, mergeProps, useLabels} from '@react-aria/utils';\nimport HelpIcon from '../s2wf-icons/S2_Icon_HelpCircle_20_N.svg';\nimport InfoIcon from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {mergeStyles} from '../style/runtime';\nimport {Popover, PopoverProps} from './Popover';\nimport {style, size as styleSize} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ContextualHelpStyleProps {\n /**\n * Indicates whether contents are informative or provides helpful guidance.\n *\n * @default 'help'\n */\n variant?: 'info' | 'help'\n}\nexport interface ContextualHelpProps extends\n Pick<DialogTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'shouldFlip' | 'offset' | 'crossOffset' | 'placement'>,\n Pick<PopoverProps, 'containerPadding'>,\n ContextualHelpStyleProps, StyleProps, DOMProps, AriaLabelingProps {\n /** Contents of the Contextual Help popover. */\n children?: ReactNode,\n /**\n * The size of the ActionButton.\n *\n * @default 'XS'\n */\n size?: 'XS' | 'S'\n}\n\nconst popover = style({\n fontFamily: 'sans',\n minWidth: '[218px]',\n width: '[218px]',\n padding: 24\n});\n\nexport const ContextualHelpContext = createContext<ContextValue<ContextualHelpProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\nfunction ContextualHelp(props: ContextualHelpProps, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ContextualHelpContext);\n let {\n children,\n defaultOpen,\n // containerPadding = 24, // See popover() above. Issue noted in Popover.tsx.\n size = 'XS',\n crossOffset,\n isOpen,\n offset = 8,\n onOpenChange,\n placement = 'bottom start',\n shouldFlip,\n UNSAFE_className,\n UNSAFE_style,\n styles,\n variant = 'help'\n } = props;\n\n // In a FieldLabel we're getting the context's aria-labeledby, so we need to\n // manually set the aria-label after useLabels() to keep the order of label\n // then ContextualHelp variant\n let labelProps = useLabels(props);\n let label = stringFormatter.format(`contextualhelp.${variant}`);\n labelProps['aria-label'] = labelProps['aria-label'] ? labelProps['aria-label'] + ' ' + label : label;\n\n let buttonProps = filterDOMProps(props, {labelable: true});\n\n return (\n <DialogTrigger\n isOpen={isOpen}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}>\n <ActionButton\n slot={null}\n ref={ref}\n size={size}\n {...mergeProps(buttonProps, labelProps)}\n UNSAFE_style={UNSAFE_style}\n UNSAFE_className={UNSAFE_className}\n styles={styles}\n isQuiet>\n {variant === 'info' ? <InfoIcon /> : <HelpIcon />}\n </ActionButton>\n <Popover\n placement={placement}\n shouldFlip={shouldFlip}\n // not working => containerPadding={containerPadding}\n offset={offset}\n crossOffset={crossOffset}\n hideArrow\n UNSAFE_className={popover}>\n <RACDialog className={mergeStyles(dialogInner, style({borderRadius: 'none'}))}>\n <Provider\n values={[\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {}\n }\n }],\n [HeadingContext, {styles: style({\n font: 'heading-xs',\n margin: 0,\n marginBottom: styleSize(8) // This only makes it 10px on mobile and should be 12px\n })}],\n [ContentContext, {styles: style({\n font: 'body-sm'\n })}],\n [FooterContext, {styles: style({\n font: 'body-sm',\n marginTop: 16\n })}]\n ]}>\n {children}\n </Provider>\n </RACDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n\n/**\n * Contextual help shows a user extra information about the state of an adjacent component, or a total view.\n */\nlet _ContextualHelp = forwardRef(ContextualHelp);\nexport {_ContextualHelp as ContextualHelp};\n"],"names":[],"version":3,"file":"ContextualHelp.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAM;AAOC,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAA2E;AAE5H,SAAS,qCAAe,KAA0B,EAAE,GAAoC;IACtF,I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GAAA,eAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,kBAAU;gCAAG;oCACZ,OAAO;wCACL,CAAC,CAAA,GAAA,mBAAW,EAAE,EAAE,CAAC;oCACnB;gCACF;6BAAE;4BACF;gCAAC,CAAA,GAAA,yCAAa;gCAAG;oCAAC,MAAM;gCAItB;6BAAE;4BACJ;gCAAC,CAAA,GAAA,yCAAa;gCAAG;oCAAC,MAAM;gCAEtB;6BAAE;4BACJ;gCAAC,CAAA,GAAA,yCAAY;gCAAG;oCAAC,MAAM;gCAGrB;6BAAE;yBACL;kCACA;;;;;;AAMb;AAEA;;CAEC,GACD,IAAI,0DAAkB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ContextualHelp.tsx"],"sourcesContent":["import {ActionButton} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContentContext, FooterContext, HeadingContext} from './Content';\nimport {ContextValue, DEFAULT_SLOT, Provider, Dialog as RACDialog, TextContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {dialogInner} from './Dialog';\nimport {DialogTrigger, DialogTriggerProps} from './DialogTrigger';\nimport {filterDOMProps, mergeProps, useLabels} from '@react-aria/utils';\nimport HelpIcon from '../s2wf-icons/S2_Icon_HelpCircle_20_N.svg';\nimport InfoIcon from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {mergeStyles} from '../style/runtime';\nimport {Popover, PopoverProps} from './Popover';\nimport {style, size as styleSize} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ContextualHelpStyleProps {\n /**\n * Indicates whether contents are informative or provides helpful guidance.\n *\n * @default 'help'\n */\n variant?: 'info' | 'help'\n}\nexport interface ContextualHelpProps extends\n Pick<DialogTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'shouldFlip' | 'offset' | 'crossOffset' | 'placement'>,\n Pick<PopoverProps, 'containerPadding'>,\n ContextualHelpStyleProps, StyleProps, DOMProps, AriaLabelingProps {\n /** Contents of the Contextual Help popover. */\n children?: ReactNode,\n /**\n * The size of the ActionButton.\n *\n * @default 'XS'\n */\n size?: 'XS' | 'S'\n}\n\nconst popover = style({\n fontFamily: 'sans',\n minWidth: '[218px]',\n width: '[218px]',\n padding: 24\n});\n\nexport const ContextualHelpContext = createContext<ContextValue<ContextualHelpProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\nfunction ContextualHelp(props: ContextualHelpProps, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ContextualHelpContext);\n let {\n children,\n defaultOpen,\n // containerPadding = 24, // See popover() above. Issue noted in Popover.tsx.\n size = 'XS',\n crossOffset,\n isOpen,\n offset = 8,\n onOpenChange,\n placement = 'bottom start',\n shouldFlip,\n UNSAFE_className,\n UNSAFE_style,\n styles,\n variant = 'help'\n } = props;\n\n // In a FieldLabel we're getting the context's aria-labeledby, so we need to\n // manually set the aria-label after useLabels() to keep the order of label\n // then ContextualHelp variant\n let labelProps = useLabels(props);\n let label = stringFormatter.format(`contextualhelp.${variant}`);\n labelProps['aria-label'] = labelProps['aria-label'] ? labelProps['aria-label'] + ' ' + label : label;\n\n let buttonProps = filterDOMProps(props, {labelable: true});\n\n return (\n <DialogTrigger\n isOpen={isOpen}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}>\n <ActionButton\n slot={null}\n ref={ref}\n size={size}\n {...mergeProps(buttonProps, labelProps)}\n UNSAFE_style={UNSAFE_style}\n UNSAFE_className={UNSAFE_className}\n styles={styles}\n isQuiet>\n {variant === 'info' ? <InfoIcon /> : <HelpIcon />}\n </ActionButton>\n <Popover\n placement={placement}\n shouldFlip={shouldFlip}\n // not working => containerPadding={containerPadding}\n offset={offset}\n crossOffset={crossOffset}\n hideArrow\n UNSAFE_className={popover}>\n <RACDialog className={mergeStyles(dialogInner, style({borderRadius: 'none', margin: -24, padding: 24}))}>\n <Provider\n values={[\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {}\n }\n }],\n [HeadingContext, {styles: style({\n font: 'heading-xs',\n margin: 0,\n marginBottom: styleSize(8) // This only makes it 10px on mobile and should be 12px\n })}],\n [ContentContext, {styles: style({\n font: 'body-sm'\n })}],\n [FooterContext, {styles: style({\n font: 'body-sm',\n marginTop: 16\n })}]\n ]}>\n {children}\n </Provider>\n </RACDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n\n/**\n * Contextual help shows a user extra information about the state of an adjacent component, or a total view.\n */\nlet _ContextualHelp = forwardRef(ContextualHelp);\nexport {_ContextualHelp as ContextualHelp};\n"],"names":[],"version":3,"file":"ContextualHelp.mjs.map"}
@@ -101,8 +101,12 @@ const $55f1b8940d3e02db$var$illustration = function anonymous(props) {
101
101
  else if (props.isFocusVisible) rules += ' -rwx0fg_a-z';
102
102
  else if (props.isHovered) rules += ' -rwx0fg_a-z';
103
103
  else rules += ' -rwx0fg_a-y';
104
- } else if (props.isInDropZone) rules += ' -rwx0fg_a-k';
105
- else rules += ' -rwx0fg_a-n';
104
+ } else {
105
+ if (props.isPressed) rules += ' -rwx0fg_a-o';
106
+ else if (props.isFocusVisible) rules += ' -rwx0fg_a-o';
107
+ else if (props.isHovered) rules += ' -rwx0fg_a-o';
108
+ else rules += ' -rwx0fg_a-n';
109
+ }
106
110
  return rules;
107
111
  };
108
112
  const $55f1b8940d3e02db$var$heading = function anonymous(props) {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAoCD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDN,MAAM;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AAEA;;;CAGC,GACD,IAAI,4CAAsB,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/IllustratedMessage.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {ButtonGroupContext} from './ButtonGroup';\nimport {ContentContext, HeadingContext} from './Content';\nimport {ContextValue, Provider} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustrationContext} from './Icon';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface IllustratedMessageStyleProps {\n /**\n * The size of the IllustratedMessage.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /**\n * The direction that the IllustratedMessage should be laid out in.\n *\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\ninterface S2SpectrumIllustratedMessageProps extends DOMProps, UnsafeStyles, IllustratedMessageStyleProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the IllustratedMessage. */\n children: ReactNode\n}\n\nconst illustratedMessage = style<IllustratedMessageStyleProps & {isInDropZone?: boolean}>({\n display: 'grid',\n fontFamily: 'sans',\n fontSize: 'control',\n maxWidth: {\n orientation: {\n vertical: '[380px]',\n horizontal: '[33rem]' // ask design about max width for horizontal because doesn't look great when L\n }\n },\n gridTemplateAreas: {\n orientation: {\n vertical: [\n ' . illustration . ',\n ' . . . ',\n 'heading heading heading',\n ' . . . ',\n 'content content content',\n ' . buttonGroup . '\n ],\n horizontal: [\n 'illustration . heading',\n 'illustration . . ',\n 'illustration . content',\n 'illustration . buttonGroup'\n ]\n }\n },\n gridTemplateRows: {\n orientation: {\n vertical: {\n default: ['min-content', 12, 'min-content', 4, 'min-content', 'min-content'],\n size: {\n L: ['min-content', 8, 'min-content', 4, 'min-content', 'min-content']\n }\n },\n horizontal: ['1fr', 4, '1fr']\n }\n },\n gridTemplateColumns: {\n orientation: {\n horizontal: ['1fr', 12, 'auto']\n }\n },\n justifyItems: {\n orientation: {\n vertical: 'center',\n horizontal: 'start'\n }\n },\n textAlign: {\n orientation: {\n vertical: 'center'\n }\n }\n}, getAllowedOverrides({height: true}));\n\nconst illustration = style<IllustratedMessageStyleProps & {isInDropZone?: boolean, isDropTarget?: boolean}>({\n gridArea: 'illustration',\n size: {\n size: {\n S: 96,\n M: 96,\n L: 160\n }\n },\n alignSelf: 'center',\n '--iconPrimary': {\n type: 'color',\n value: {\n // TODO: ask design about what the color should be. Says gray-800 in the designs file, neutral in token spec, but different neutral in dropzone spec\n default: 'gray-800',\n isInDropZone: 'gray-500', // neutral doesn't seem to match the color in designs, opted for gray-500 instead\n isDropTarget: 'accent'\n }\n }\n});\n\nconst heading = style<IllustratedMessageStyleProps>({\n gridArea: 'heading',\n font: {\n size: {\n S: 'title',\n M: 'title-xl',\n L: 'title-2xl'\n }\n },\n alignSelf: 'end',\n margin: 0\n});\n\nconst content = style({\n font: {\n size: {\n S: 'body-xs',\n M: 'body-sm',\n L: 'body-sm'\n }\n },\n gridArea: 'content',\n alignSelf: 'start'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttonGroup',\n marginTop: 16\n});\n\ninterface IllustratedMessageContextProps extends Partial<S2SpectrumIllustratedMessageProps> {\n isInDropZone?: boolean,\n isDropTarget?: boolean\n}\n\nexport const IllustratedMessageContext = createContext<ContextValue<IllustratedMessageContextProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction IllustratedMessage(props: S2SpectrumIllustratedMessageProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, IllustratedMessageContext);\n let domRef = useDOMRef(ref);\n let {\n children,\n orientation = 'horizontal',\n size = 'M',\n UNSAFE_className = '',\n UNSAFE_style,\n isInDropZone = false,\n isDropTarget = false,\n ...otherProps\n } = props as IllustratedMessageContextProps;\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n style={UNSAFE_style}\n className={UNSAFE_className + illustratedMessage({\n size: props.size || 'M',\n orientation: props.orientation || 'vertical'\n }, props.styles)}\n ref={domRef}>\n <Provider\n values={[\n [HeadingContext, {styles: heading({orientation, size})}],\n [ContentContext, {styles: content({size})}],\n [IllustrationContext, {size: size === 'L' ? 'L' : 'M', styles: illustration({orientation, size, isInDropZone, isDropTarget})}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </div>\n );\n}\n\n/**\n * An IllustratedMessage displays an illustration and a message, usually\n * for an empty state or an error page.\n */\nlet _IllustratedMessage = /*#__PURE__*/ forwardRef(IllustratedMessage);\nexport {_IllustratedMessage as IllustratedMessage};\n"],"names":[],"version":3,"file":"IllustratedMessage.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAoCD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYN,MAAM;AAUC,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAA6E;AAElI,SAAS,yCAAmB,KAAwC,EAAE,GAA2B;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,YACF,QAAQ,eACR,cAAc,oBACd,OAAO,uBACP,mBAAmB,kBACnB,YAAY,gBACZ,eAAe,qBACf,eAAe,OACf,GAAG,YACJ,GAAG;IAEJ,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC9B,OAAO;QACP,WAAW,mBAAmB,yCAAmB;YAC/C,MAAM,MAAM,IAAI,IAAI;YACpB,aAAa,MAAM,WAAW,IAAI;QACpC,GAAG,MAAM,MAAM;QACf,KAAK;kBACL,cAAA,gCAAC,CAAA,GAAA,mCAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,wCAAa;oBAAG;wBAAC,QAAQ,8BAAQ;yCAAC;kCAAa;wBAAI;oBAAE;iBAAE;gBACxD;oBAAC,CAAA,GAAA,wCAAa;oBAAG;wBAAC,QAAQ,8BAAQ;kCAAC;wBAAI;oBAAE;iBAAE;gBAC3C;oBAAC,CAAA,GAAA,6CAAkB;oBAAG;wBAAC,MAAM,SAAS,MAAM,MAAM;wBAAK,QAAQ,mCAAa;yCAAC;kCAAa;0CAAM;0CAAc;wBAAY;oBAAE;iBAAE;gBAC9H;oBAAC,CAAA,GAAA,4CAAiB;oBAAG;wBAAC,QAAQ;oBAAW;iBAAE;aAC5C;sBACA;;;AAIT;AAEA;;;CAGC,GACD,IAAI,4CAAsB,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/IllustratedMessage.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {ButtonGroupContext} from './ButtonGroup';\nimport {ContentContext, HeadingContext} from './Content';\nimport {ContextValue, Provider} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustrationContext} from './Icon';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface IllustratedMessageStyleProps {\n /**\n * The size of the IllustratedMessage.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /**\n * The direction that the IllustratedMessage should be laid out in.\n *\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\ninterface S2SpectrumIllustratedMessageProps extends DOMProps, UnsafeStyles, IllustratedMessageStyleProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the IllustratedMessage. */\n children: ReactNode\n}\n\nconst illustratedMessage = style<IllustratedMessageStyleProps & {isInDropZone?: boolean}>({\n display: 'grid',\n fontFamily: 'sans',\n fontSize: 'control',\n maxWidth: {\n orientation: {\n vertical: '[380px]',\n horizontal: '[33rem]' // ask design about max width for horizontal because doesn't look great when L\n }\n },\n gridTemplateAreas: {\n orientation: {\n vertical: [\n ' . illustration . ',\n ' . . . ',\n 'heading heading heading',\n ' . . . ',\n 'content content content',\n ' . buttonGroup . '\n ],\n horizontal: [\n 'illustration . heading',\n 'illustration . . ',\n 'illustration . content',\n 'illustration . buttonGroup'\n ]\n }\n },\n gridTemplateRows: {\n orientation: {\n vertical: {\n default: ['min-content', 12, 'min-content', 4, 'min-content', 'min-content'],\n size: {\n L: ['min-content', 8, 'min-content', 4, 'min-content', 'min-content']\n }\n },\n horizontal: ['1fr', 4, '1fr']\n }\n },\n gridTemplateColumns: {\n orientation: {\n horizontal: ['1fr', 12, 'auto']\n }\n },\n justifyItems: {\n orientation: {\n vertical: 'center',\n horizontal: 'start'\n }\n },\n textAlign: {\n orientation: {\n vertical: 'center'\n }\n }\n}, getAllowedOverrides({height: true}));\n\nconst illustration = style<IllustratedMessageStyleProps & {isInDropZone?: boolean, isDropTarget?: boolean}>({\n gridArea: 'illustration',\n size: {\n size: {\n S: 96,\n M: 96,\n L: 160\n }\n },\n alignSelf: 'center',\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDropTarget: 'accent'\n }\n }\n});\n\nconst heading = style<IllustratedMessageStyleProps>({\n gridArea: 'heading',\n font: {\n size: {\n S: 'title',\n M: 'title-xl',\n L: 'title-2xl'\n }\n },\n alignSelf: 'end',\n margin: 0\n});\n\nconst content = style({\n font: {\n size: {\n S: 'body-xs',\n M: 'body-sm',\n L: 'body-sm'\n }\n },\n gridArea: 'content',\n alignSelf: 'start'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttonGroup',\n marginTop: 16\n});\n\ninterface IllustratedMessageContextProps extends Partial<S2SpectrumIllustratedMessageProps> {\n isInDropZone?: boolean,\n isDropTarget?: boolean\n}\n\nexport const IllustratedMessageContext = createContext<ContextValue<IllustratedMessageContextProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction IllustratedMessage(props: S2SpectrumIllustratedMessageProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, IllustratedMessageContext);\n let domRef = useDOMRef(ref);\n let {\n children,\n orientation = 'horizontal',\n size = 'M',\n UNSAFE_className = '',\n UNSAFE_style,\n isInDropZone = false,\n isDropTarget = false,\n ...otherProps\n } = props as IllustratedMessageContextProps;\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n style={UNSAFE_style}\n className={UNSAFE_className + illustratedMessage({\n size: props.size || 'M',\n orientation: props.orientation || 'vertical'\n }, props.styles)}\n ref={domRef}>\n <Provider\n values={[\n [HeadingContext, {styles: heading({orientation, size})}],\n [ContentContext, {styles: content({size})}],\n [IllustrationContext, {size: size === 'L' ? 'L' : 'M', styles: illustration({orientation, size, isInDropZone, isDropTarget})}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </div>\n );\n}\n\n/**\n * An IllustratedMessage displays an illustration and a message, usually\n * for an empty state or an error page.\n */\nlet _IllustratedMessage = /*#__PURE__*/ forwardRef(IllustratedMessage);\nexport {_IllustratedMessage as IllustratedMessage};\n"],"names":[],"version":3,"file":"IllustratedMessage.cjs.map"}
@@ -105,8 +105,8 @@
105
105
  --iconPrimary: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
106
106
  }
107
107
 
108
- .-rwx0fg_a-k {
109
- --iconPrimary: var(--lightningcss-light, #8f8f8f) var(--lightningcss-dark, #6d6d6d);
108
+ .-rwx0fg_a-o {
109
+ --iconPrimary: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
110
110
  }
111
111
 
112
112
  .-rwx0fg_a-y {
@@ -1 +1 @@
1
- {"mappings":"AC8C2B;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;;;;EAAA;;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAyDN;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAqBL;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAaA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAYI;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAvGO;EA8EX;;;;;;;;;;EAAA;;;;EAaA;;;;EAAA;;;;;AA3FW;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IA8EX;;;;IAAA;;;;IAAA;;;;IAaA;;;;IAAA;;;;;;AAlCK","sources":["8de053f3c18af99e","packages/@react-spectrum/s2/src/IllustratedMessage.tsx"],"sourcesContent":["@import \"a1699b32f8f5f832\";\n@import \"0905d73dcc75523b\";\n@import \"b0b8309ded54f11f\";\n@import \"dce39f72f1fcef87\";\n@import \"7c612a8ca86186fd\";\n","/*\n * Copyright 2024 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 {ButtonGroupContext} from './ButtonGroup';\nimport {ContentContext, HeadingContext} from './Content';\nimport {ContextValue, Provider} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustrationContext} from './Icon';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface IllustratedMessageStyleProps {\n /**\n * The size of the IllustratedMessage.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /**\n * The direction that the IllustratedMessage should be laid out in.\n *\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\ninterface S2SpectrumIllustratedMessageProps extends DOMProps, UnsafeStyles, IllustratedMessageStyleProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the IllustratedMessage. */\n children: ReactNode\n}\n\nconst illustratedMessage = style<IllustratedMessageStyleProps & {isInDropZone?: boolean}>({\n display: 'grid',\n fontFamily: 'sans',\n fontSize: 'control',\n maxWidth: {\n orientation: {\n vertical: '[380px]',\n horizontal: '[33rem]' // ask design about max width for horizontal because doesn't look great when L\n }\n },\n gridTemplateAreas: {\n orientation: {\n vertical: [\n ' . illustration . ',\n ' . . . ',\n 'heading heading heading',\n ' . . . ',\n 'content content content',\n ' . buttonGroup . '\n ],\n horizontal: [\n 'illustration . heading',\n 'illustration . . ',\n 'illustration . content',\n 'illustration . buttonGroup'\n ]\n }\n },\n gridTemplateRows: {\n orientation: {\n vertical: {\n default: ['min-content', 12, 'min-content', 4, 'min-content', 'min-content'],\n size: {\n L: ['min-content', 8, 'min-content', 4, 'min-content', 'min-content']\n }\n },\n horizontal: ['1fr', 4, '1fr']\n }\n },\n gridTemplateColumns: {\n orientation: {\n horizontal: ['1fr', 12, 'auto']\n }\n },\n justifyItems: {\n orientation: {\n vertical: 'center',\n horizontal: 'start'\n }\n },\n textAlign: {\n orientation: {\n vertical: 'center'\n }\n }\n}, getAllowedOverrides({height: true}));\n\nconst illustration = style<IllustratedMessageStyleProps & {isInDropZone?: boolean, isDropTarget?: boolean}>({\n gridArea: 'illustration',\n size: {\n size: {\n S: 96,\n M: 96,\n L: 160\n }\n },\n alignSelf: 'center',\n '--iconPrimary': {\n type: 'color',\n value: {\n // TODO: ask design about what the color should be. Says gray-800 in the designs file, neutral in token spec, but different neutral in dropzone spec\n default: 'gray-800',\n isInDropZone: 'gray-500', // neutral doesn't seem to match the color in designs, opted for gray-500 instead\n isDropTarget: 'accent'\n }\n }\n});\n\nconst heading = style<IllustratedMessageStyleProps>({\n gridArea: 'heading',\n font: {\n size: {\n S: 'title',\n M: 'title-xl',\n L: 'title-2xl'\n }\n },\n alignSelf: 'end',\n margin: 0\n});\n\nconst content = style({\n font: {\n size: {\n S: 'body-xs',\n M: 'body-sm',\n L: 'body-sm'\n }\n },\n gridArea: 'content',\n alignSelf: 'start'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttonGroup',\n marginTop: 16\n});\n\ninterface IllustratedMessageContextProps extends Partial<S2SpectrumIllustratedMessageProps> {\n isInDropZone?: boolean,\n isDropTarget?: boolean\n}\n\nexport const IllustratedMessageContext = createContext<ContextValue<IllustratedMessageContextProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction IllustratedMessage(props: S2SpectrumIllustratedMessageProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, IllustratedMessageContext);\n let domRef = useDOMRef(ref);\n let {\n children,\n orientation = 'horizontal',\n size = 'M',\n UNSAFE_className = '',\n UNSAFE_style,\n isInDropZone = false,\n isDropTarget = false,\n ...otherProps\n } = props as IllustratedMessageContextProps;\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n style={UNSAFE_style}\n className={UNSAFE_className + illustratedMessage({\n size: props.size || 'M',\n orientation: props.orientation || 'vertical'\n }, props.styles)}\n ref={domRef}>\n <Provider\n values={[\n [HeadingContext, {styles: heading({orientation, size})}],\n [ContentContext, {styles: content({size})}],\n [IllustrationContext, {size: size === 'L' ? 'L' : 'M', styles: illustration({orientation, size, isInDropZone, isDropTarget})}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </div>\n );\n}\n\n/**\n * An IllustratedMessage displays an illustration and a message, usually\n * for an empty state or an error page.\n */\nlet _IllustratedMessage = /*#__PURE__*/ forwardRef(IllustratedMessage);\nexport {_IllustratedMessage as IllustratedMessage};\n"],"names":[],"version":3,"file":"IllustratedMessage.css.map"}
1
+ {"mappings":"AC8C2B;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;;;;EAAA;;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAyDN;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAmBL;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAaA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAYI;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AArGO;EA4EX;;;;;;;;;;EAAA;;;;EAaA;;;;EAAA;;;;;AAzFW;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IA4EX;;;;IAAA;;;;IAAA;;;;IAaA;;;;IAAA;;;;;;AAhCK","sources":["8de053f3c18af99e","packages/@react-spectrum/s2/src/IllustratedMessage.tsx"],"sourcesContent":["@import \"a1699b32f8f5f832\";\n@import \"0905d73dcc75523b\";\n@import \"b0b8309ded54f11f\";\n@import \"dce39f72f1fcef87\";\n@import \"7c612a8ca86186fd\";\n","/*\n * Copyright 2024 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 {ButtonGroupContext} from './ButtonGroup';\nimport {ContentContext, HeadingContext} from './Content';\nimport {ContextValue, Provider} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustrationContext} from './Icon';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface IllustratedMessageStyleProps {\n /**\n * The size of the IllustratedMessage.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /**\n * The direction that the IllustratedMessage should be laid out in.\n *\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\ninterface S2SpectrumIllustratedMessageProps extends DOMProps, UnsafeStyles, IllustratedMessageStyleProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the IllustratedMessage. */\n children: ReactNode\n}\n\nconst illustratedMessage = style<IllustratedMessageStyleProps & {isInDropZone?: boolean}>({\n display: 'grid',\n fontFamily: 'sans',\n fontSize: 'control',\n maxWidth: {\n orientation: {\n vertical: '[380px]',\n horizontal: '[33rem]' // ask design about max width for horizontal because doesn't look great when L\n }\n },\n gridTemplateAreas: {\n orientation: {\n vertical: [\n ' . illustration . ',\n ' . . . ',\n 'heading heading heading',\n ' . . . ',\n 'content content content',\n ' . buttonGroup . '\n ],\n horizontal: [\n 'illustration . heading',\n 'illustration . . ',\n 'illustration . content',\n 'illustration . buttonGroup'\n ]\n }\n },\n gridTemplateRows: {\n orientation: {\n vertical: {\n default: ['min-content', 12, 'min-content', 4, 'min-content', 'min-content'],\n size: {\n L: ['min-content', 8, 'min-content', 4, 'min-content', 'min-content']\n }\n },\n horizontal: ['1fr', 4, '1fr']\n }\n },\n gridTemplateColumns: {\n orientation: {\n horizontal: ['1fr', 12, 'auto']\n }\n },\n justifyItems: {\n orientation: {\n vertical: 'center',\n horizontal: 'start'\n }\n },\n textAlign: {\n orientation: {\n vertical: 'center'\n }\n }\n}, getAllowedOverrides({height: true}));\n\nconst illustration = style<IllustratedMessageStyleProps & {isInDropZone?: boolean, isDropTarget?: boolean}>({\n gridArea: 'illustration',\n size: {\n size: {\n S: 96,\n M: 96,\n L: 160\n }\n },\n alignSelf: 'center',\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDropTarget: 'accent'\n }\n }\n});\n\nconst heading = style<IllustratedMessageStyleProps>({\n gridArea: 'heading',\n font: {\n size: {\n S: 'title',\n M: 'title-xl',\n L: 'title-2xl'\n }\n },\n alignSelf: 'end',\n margin: 0\n});\n\nconst content = style({\n font: {\n size: {\n S: 'body-xs',\n M: 'body-sm',\n L: 'body-sm'\n }\n },\n gridArea: 'content',\n alignSelf: 'start'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttonGroup',\n marginTop: 16\n});\n\ninterface IllustratedMessageContextProps extends Partial<S2SpectrumIllustratedMessageProps> {\n isInDropZone?: boolean,\n isDropTarget?: boolean\n}\n\nexport const IllustratedMessageContext = createContext<ContextValue<IllustratedMessageContextProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction IllustratedMessage(props: S2SpectrumIllustratedMessageProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, IllustratedMessageContext);\n let domRef = useDOMRef(ref);\n let {\n children,\n orientation = 'horizontal',\n size = 'M',\n UNSAFE_className = '',\n UNSAFE_style,\n isInDropZone = false,\n isDropTarget = false,\n ...otherProps\n } = props as IllustratedMessageContextProps;\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n style={UNSAFE_style}\n className={UNSAFE_className + illustratedMessage({\n size: props.size || 'M',\n orientation: props.orientation || 'vertical'\n }, props.styles)}\n ref={domRef}>\n <Provider\n values={[\n [HeadingContext, {styles: heading({orientation, size})}],\n [ContentContext, {styles: content({size})}],\n [IllustrationContext, {size: size === 'L' ? 'L' : 'M', styles: illustration({orientation, size, isInDropZone, isDropTarget})}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </div>\n );\n}\n\n/**\n * An IllustratedMessage displays an illustration and a message, usually\n * for an empty state or an error page.\n */\nlet _IllustratedMessage = /*#__PURE__*/ forwardRef(IllustratedMessage);\nexport {_IllustratedMessage as IllustratedMessage};\n"],"names":[],"version":3,"file":"IllustratedMessage.css.map"}
@@ -94,8 +94,12 @@ const $4950413ac998f607$var$illustration = function anonymous(props) {
94
94
  else if (props.isFocusVisible) rules += ' -rwx0fg_a-z';
95
95
  else if (props.isHovered) rules += ' -rwx0fg_a-z';
96
96
  else rules += ' -rwx0fg_a-y';
97
- } else if (props.isInDropZone) rules += ' -rwx0fg_a-k';
98
- else rules += ' -rwx0fg_a-n';
97
+ } else {
98
+ if (props.isPressed) rules += ' -rwx0fg_a-o';
99
+ else if (props.isFocusVisible) rules += ' -rwx0fg_a-o';
100
+ else if (props.isHovered) rules += ' -rwx0fg_a-o';
101
+ else rules += ' -rwx0fg_a-n';
102
+ }
99
103
  return rules;
100
104
  };
101
105
  const $4950413ac998f607$var$heading = function anonymous(props) {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAoCD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDN,MAAM;;;;;;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;CAGC,GACD,IAAI,4CAAsB,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/IllustratedMessage.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {ButtonGroupContext} from './ButtonGroup';\nimport {ContentContext, HeadingContext} from './Content';\nimport {ContextValue, Provider} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustrationContext} from './Icon';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface IllustratedMessageStyleProps {\n /**\n * The size of the IllustratedMessage.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /**\n * The direction that the IllustratedMessage should be laid out in.\n *\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\ninterface S2SpectrumIllustratedMessageProps extends DOMProps, UnsafeStyles, IllustratedMessageStyleProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the IllustratedMessage. */\n children: ReactNode\n}\n\nconst illustratedMessage = style<IllustratedMessageStyleProps & {isInDropZone?: boolean}>({\n display: 'grid',\n fontFamily: 'sans',\n fontSize: 'control',\n maxWidth: {\n orientation: {\n vertical: '[380px]',\n horizontal: '[33rem]' // ask design about max width for horizontal because doesn't look great when L\n }\n },\n gridTemplateAreas: {\n orientation: {\n vertical: [\n ' . illustration . ',\n ' . . . ',\n 'heading heading heading',\n ' . . . ',\n 'content content content',\n ' . buttonGroup . '\n ],\n horizontal: [\n 'illustration . heading',\n 'illustration . . ',\n 'illustration . content',\n 'illustration . buttonGroup'\n ]\n }\n },\n gridTemplateRows: {\n orientation: {\n vertical: {\n default: ['min-content', 12, 'min-content', 4, 'min-content', 'min-content'],\n size: {\n L: ['min-content', 8, 'min-content', 4, 'min-content', 'min-content']\n }\n },\n horizontal: ['1fr', 4, '1fr']\n }\n },\n gridTemplateColumns: {\n orientation: {\n horizontal: ['1fr', 12, 'auto']\n }\n },\n justifyItems: {\n orientation: {\n vertical: 'center',\n horizontal: 'start'\n }\n },\n textAlign: {\n orientation: {\n vertical: 'center'\n }\n }\n}, getAllowedOverrides({height: true}));\n\nconst illustration = style<IllustratedMessageStyleProps & {isInDropZone?: boolean, isDropTarget?: boolean}>({\n gridArea: 'illustration',\n size: {\n size: {\n S: 96,\n M: 96,\n L: 160\n }\n },\n alignSelf: 'center',\n '--iconPrimary': {\n type: 'color',\n value: {\n // TODO: ask design about what the color should be. Says gray-800 in the designs file, neutral in token spec, but different neutral in dropzone spec\n default: 'gray-800',\n isInDropZone: 'gray-500', // neutral doesn't seem to match the color in designs, opted for gray-500 instead\n isDropTarget: 'accent'\n }\n }\n});\n\nconst heading = style<IllustratedMessageStyleProps>({\n gridArea: 'heading',\n font: {\n size: {\n S: 'title',\n M: 'title-xl',\n L: 'title-2xl'\n }\n },\n alignSelf: 'end',\n margin: 0\n});\n\nconst content = style({\n font: {\n size: {\n S: 'body-xs',\n M: 'body-sm',\n L: 'body-sm'\n }\n },\n gridArea: 'content',\n alignSelf: 'start'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttonGroup',\n marginTop: 16\n});\n\ninterface IllustratedMessageContextProps extends Partial<S2SpectrumIllustratedMessageProps> {\n isInDropZone?: boolean,\n isDropTarget?: boolean\n}\n\nexport const IllustratedMessageContext = createContext<ContextValue<IllustratedMessageContextProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction IllustratedMessage(props: S2SpectrumIllustratedMessageProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, IllustratedMessageContext);\n let domRef = useDOMRef(ref);\n let {\n children,\n orientation = 'horizontal',\n size = 'M',\n UNSAFE_className = '',\n UNSAFE_style,\n isInDropZone = false,\n isDropTarget = false,\n ...otherProps\n } = props as IllustratedMessageContextProps;\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n style={UNSAFE_style}\n className={UNSAFE_className + illustratedMessage({\n size: props.size || 'M',\n orientation: props.orientation || 'vertical'\n }, props.styles)}\n ref={domRef}>\n <Provider\n values={[\n [HeadingContext, {styles: heading({orientation, size})}],\n [ContentContext, {styles: content({size})}],\n [IllustrationContext, {size: size === 'L' ? 'L' : 'M', styles: illustration({orientation, size, isInDropZone, isDropTarget})}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </div>\n );\n}\n\n/**\n * An IllustratedMessage displays an illustration and a message, usually\n * for an empty state or an error page.\n */\nlet _IllustratedMessage = /*#__PURE__*/ forwardRef(IllustratedMessage);\nexport {_IllustratedMessage as IllustratedMessage};\n"],"names":[],"version":3,"file":"IllustratedMessage.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAoCD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYN,MAAM;AAUC,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAA6E;AAElI,SAAS,yCAAmB,KAAwC,EAAE,GAA2B;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,YACF,QAAQ,eACR,cAAc,oBACd,OAAO,uBACP,mBAAmB,kBACnB,YAAY,gBACZ,eAAe,qBACf,eAAe,OACf,GAAG,YACJ,GAAG;IAEJ,qBACE,gBAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAC9B,OAAO;QACP,WAAW,mBAAmB,yCAAmB;YAC/C,MAAM,MAAM,IAAI,IAAI;YACpB,aAAa,MAAM,WAAW,IAAI;QACpC,GAAG,MAAM,MAAM;QACf,KAAK;kBACL,cAAA,gBAAC,CAAA,GAAA,eAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,yCAAa;oBAAG;wBAAC,QAAQ,8BAAQ;yCAAC;kCAAa;wBAAI;oBAAE;iBAAE;gBACxD;oBAAC,CAAA,GAAA,yCAAa;oBAAG;wBAAC,QAAQ,8BAAQ;kCAAC;wBAAI;oBAAE;iBAAE;gBAC3C;oBAAC,CAAA,GAAA,yCAAkB;oBAAG;wBAAC,MAAM,SAAS,MAAM,MAAM;wBAAK,QAAQ,mCAAa;yCAAC;kCAAa;0CAAM;0CAAc;wBAAY;oBAAE;iBAAE;gBAC9H;oBAAC,CAAA,GAAA,yCAAiB;oBAAG;wBAAC,QAAQ;oBAAW;iBAAE;aAC5C;sBACA;;;AAIT;AAEA;;;CAGC,GACD,IAAI,4CAAsB,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/IllustratedMessage.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {ButtonGroupContext} from './ButtonGroup';\nimport {ContentContext, HeadingContext} from './Content';\nimport {ContextValue, Provider} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustrationContext} from './Icon';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface IllustratedMessageStyleProps {\n /**\n * The size of the IllustratedMessage.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /**\n * The direction that the IllustratedMessage should be laid out in.\n *\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\ninterface S2SpectrumIllustratedMessageProps extends DOMProps, UnsafeStyles, IllustratedMessageStyleProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the IllustratedMessage. */\n children: ReactNode\n}\n\nconst illustratedMessage = style<IllustratedMessageStyleProps & {isInDropZone?: boolean}>({\n display: 'grid',\n fontFamily: 'sans',\n fontSize: 'control',\n maxWidth: {\n orientation: {\n vertical: '[380px]',\n horizontal: '[33rem]' // ask design about max width for horizontal because doesn't look great when L\n }\n },\n gridTemplateAreas: {\n orientation: {\n vertical: [\n ' . illustration . ',\n ' . . . ',\n 'heading heading heading',\n ' . . . ',\n 'content content content',\n ' . buttonGroup . '\n ],\n horizontal: [\n 'illustration . heading',\n 'illustration . . ',\n 'illustration . content',\n 'illustration . buttonGroup'\n ]\n }\n },\n gridTemplateRows: {\n orientation: {\n vertical: {\n default: ['min-content', 12, 'min-content', 4, 'min-content', 'min-content'],\n size: {\n L: ['min-content', 8, 'min-content', 4, 'min-content', 'min-content']\n }\n },\n horizontal: ['1fr', 4, '1fr']\n }\n },\n gridTemplateColumns: {\n orientation: {\n horizontal: ['1fr', 12, 'auto']\n }\n },\n justifyItems: {\n orientation: {\n vertical: 'center',\n horizontal: 'start'\n }\n },\n textAlign: {\n orientation: {\n vertical: 'center'\n }\n }\n}, getAllowedOverrides({height: true}));\n\nconst illustration = style<IllustratedMessageStyleProps & {isInDropZone?: boolean, isDropTarget?: boolean}>({\n gridArea: 'illustration',\n size: {\n size: {\n S: 96,\n M: 96,\n L: 160\n }\n },\n alignSelf: 'center',\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDropTarget: 'accent'\n }\n }\n});\n\nconst heading = style<IllustratedMessageStyleProps>({\n gridArea: 'heading',\n font: {\n size: {\n S: 'title',\n M: 'title-xl',\n L: 'title-2xl'\n }\n },\n alignSelf: 'end',\n margin: 0\n});\n\nconst content = style({\n font: {\n size: {\n S: 'body-xs',\n M: 'body-sm',\n L: 'body-sm'\n }\n },\n gridArea: 'content',\n alignSelf: 'start'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttonGroup',\n marginTop: 16\n});\n\ninterface IllustratedMessageContextProps extends Partial<S2SpectrumIllustratedMessageProps> {\n isInDropZone?: boolean,\n isDropTarget?: boolean\n}\n\nexport const IllustratedMessageContext = createContext<ContextValue<IllustratedMessageContextProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction IllustratedMessage(props: S2SpectrumIllustratedMessageProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, IllustratedMessageContext);\n let domRef = useDOMRef(ref);\n let {\n children,\n orientation = 'horizontal',\n size = 'M',\n UNSAFE_className = '',\n UNSAFE_style,\n isInDropZone = false,\n isDropTarget = false,\n ...otherProps\n } = props as IllustratedMessageContextProps;\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n style={UNSAFE_style}\n className={UNSAFE_className + illustratedMessage({\n size: props.size || 'M',\n orientation: props.orientation || 'vertical'\n }, props.styles)}\n ref={domRef}>\n <Provider\n values={[\n [HeadingContext, {styles: heading({orientation, size})}],\n [ContentContext, {styles: content({size})}],\n [IllustrationContext, {size: size === 'L' ? 'L' : 'M', styles: illustration({orientation, size, isInDropZone, isDropTarget})}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </div>\n );\n}\n\n/**\n * An IllustratedMessage displays an illustration and a message, usually\n * for an empty state or an error page.\n */\nlet _IllustratedMessage = /*#__PURE__*/ forwardRef(IllustratedMessage);\nexport {_IllustratedMessage as IllustratedMessage};\n"],"names":[],"version":3,"file":"IllustratedMessage.mjs.map"}
@@ -108,19 +108,19 @@ const $72bf3a9f94a75d9f$var$inlineAlert = function anonymous(props, overrides) {
108
108
  else if (props.isFocusVisible) rules += ' b_____L';
109
109
  else if (props.isHovered) rules += ' b_____L';
110
110
  else rules += ' b_____K';
111
- } else if (props.fillStyle === "subtleFill") rules += ' b_____M';
111
+ } else if (props.fillStyle === "subtleFill") rules += ' b_____N';
112
112
  else if (props.fillStyle === "border") rules += ' bd';
113
113
  } else if (props.variant === "notice") {
114
- if (props.fillStyle === "boldFill") rules += ' b_____Q';
115
- else if (props.fillStyle === "subtleFill") rules += ' b_____R';
114
+ if (props.fillStyle === "boldFill") rules += ' b_____T';
115
+ else if (props.fillStyle === "subtleFill") rules += ' b_____V';
116
116
  else if (props.fillStyle === "border") rules += ' bd';
117
117
  } else if (props.variant === "positive") {
118
118
  if (props.fillStyle === "boldFill") {
119
- if (props.isPressed) rules += ' b_____O';
120
- else if (props.isFocusVisible) rules += ' b_____O';
121
- else if (props.isHovered) rules += ' b_____O';
122
- else rules += ' b_____N';
123
- } else if (props.fillStyle === "subtleFill") rules += ' b_____P';
119
+ if (props.isPressed) rules += ' b_____Q';
120
+ else if (props.isFocusVisible) rules += ' b_____Q';
121
+ else if (props.isHovered) rules += ' b_____Q';
122
+ else rules += ' b_____P';
123
+ } else if (props.fillStyle === "subtleFill") rules += ' b_____S';
124
124
  else if (props.fillStyle === "border") rules += ' bd';
125
125
  } else if (props.variant === "informative") {
126
126
  if (props.fillStyle === "boldFill") {
@@ -123,27 +123,27 @@
123
123
  background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #345bf8);
124
124
  }
125
125
 
126
- .b_____P {
126
+ .b_____S {
127
127
  background-color: var(--lightningcss-light, #d7f7e1) var(--lightningcss-dark, #003326);
128
128
  }
129
129
 
130
- .b_____N {
130
+ .b_____P {
131
131
  background-color: var(--lightningcss-light, #05834e) var(--lightningcss-dark, #068850);
132
132
  }
133
133
 
134
- .b_____O {
134
+ .b_____Q {
135
135
  background-color: var(--lightningcss-light, #036e45) var(--lightningcss-dark, #047c4b);
136
136
  }
137
137
 
138
- .b_____R {
138
+ .b_____V {
139
139
  background-color: var(--lightningcss-light, #ffeccf) var(--lightningcss-dark, #501b00);
140
140
  }
141
141
 
142
- .b_____Q {
142
+ .b_____T {
143
143
  background-color: var(--lightningcss-light, #fc7d00) var(--lightningcss-dark, #e06400);
144
144
  }
145
145
 
146
- .b_____M {
146
+ .b_____N {
147
147
  background-color: var(--lightningcss-light, #ffebe8) var(--lightningcss-dark, #571107);
148
148
  }
149
149
 
@@ -101,19 +101,19 @@ const $fc2cf6b397804b9c$var$inlineAlert = function anonymous(props, overrides) {
101
101
  else if (props.isFocusVisible) rules += ' b_____L';
102
102
  else if (props.isHovered) rules += ' b_____L';
103
103
  else rules += ' b_____K';
104
- } else if (props.fillStyle === "subtleFill") rules += ' b_____M';
104
+ } else if (props.fillStyle === "subtleFill") rules += ' b_____N';
105
105
  else if (props.fillStyle === "border") rules += ' bd';
106
106
  } else if (props.variant === "notice") {
107
- if (props.fillStyle === "boldFill") rules += ' b_____Q';
108
- else if (props.fillStyle === "subtleFill") rules += ' b_____R';
107
+ if (props.fillStyle === "boldFill") rules += ' b_____T';
108
+ else if (props.fillStyle === "subtleFill") rules += ' b_____V';
109
109
  else if (props.fillStyle === "border") rules += ' bd';
110
110
  } else if (props.variant === "positive") {
111
111
  if (props.fillStyle === "boldFill") {
112
- if (props.isPressed) rules += ' b_____O';
113
- else if (props.isFocusVisible) rules += ' b_____O';
114
- else if (props.isHovered) rules += ' b_____O';
115
- else rules += ' b_____N';
116
- } else if (props.fillStyle === "subtleFill") rules += ' b_____P';
112
+ if (props.isPressed) rules += ' b_____Q';
113
+ else if (props.isFocusVisible) rules += ' b_____Q';
114
+ else if (props.isHovered) rules += ' b_____Q';
115
+ else rules += ' b_____P';
116
+ } else if (props.fillStyle === "subtleFill") rules += ' b_____S';
117
117
  else if (props.fillStyle === "border") rules += ' bd';
118
118
  } else if (props.variant === "informative") {
119
119
  if (props.fillStyle === "boldFill") {
package/dist/Meter.cjs CHANGED
@@ -165,23 +165,10 @@ const $f53cdf036c04454a$var$fillStyles = function anonymous(props) {
165
165
  rules += ' ba_____x';
166
166
  if (props.staticColor === "black") rules += ' b_____s';
167
167
  else if (props.staticColor === "white") rules += ' b_____f';
168
- else if (props.variant === "negative") {
169
- if (props.isPressed) rules += ' b_____L';
170
- else if (props.isFocusVisible) rules += ' b_____L';
171
- else if (props.isHovered) rules += ' b_____L';
172
- else rules += ' b_____K';
173
- } else if (props.variant === "notice") rules += ' b_____Q';
174
- else if (props.variant === "positive") {
175
- if (props.isPressed) rules += ' b_____O';
176
- else if (props.isFocusVisible) rules += ' b_____O';
177
- else if (props.isHovered) rules += ' b_____O';
178
- else rules += ' b_____N';
179
- } else {
180
- if (props.isPressed) rules += ' b_____F';
181
- else if (props.isFocusVisible) rules += ' b_____F';
182
- else if (props.isHovered) rules += ' b_____F';
183
- else rules += ' b_____E';
184
- }
168
+ else if (props.variant === "negative") rules += ' b_____M';
169
+ else if (props.variant === "notice") rules += ' b_____U';
170
+ else if (props.variant === "positive") rules += ' b_____R';
171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AAC;gCAAI,WAAW,iCAAW;iDAAC;6CAAa;gCAAO;gCAAI,OAAO;oCAAC,OAAO,aAAa;gCAAG;;;;;;;AAOjG;AAEA;;;CAGC,GACD,IAAI,0DAAS,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Meter.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {\n Meter as AriaMeter,\n MeterProps as AriaMeterProps,\n ContextValue\n} from 'react-aria-components';\nimport {bar, track} from './bar-utils' with {type: 'macro'};\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMRef, DOMRefValue, LabelPosition} from '@react-types/shared';\nimport {FieldLabel} from './Field';\nimport {fieldLabel, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {size, style} from '../style' with {type: 'macro'};\nimport {SkeletonWrapper} from './Skeleton';\nimport {Text} from './Content';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface MeterStyleProps {\n /** The [visual style](https://spectrum.adobe.com/page/meter/#-Options) of the Meter.\n * @default 'informative'\n */\n variant?: 'informative' | 'positive' | 'notice' | 'negative',\n /**\n * The size of the Meter.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** \n * The static color style to apply. Useful when the button appears over a color background. \n */\n staticColor?: 'white' | 'black',\n /**\n * The label's overall position relative to the element it is labeling.\n * @default 'top'\n */\n labelPosition?: LabelPosition\n}\n\nexport interface MeterProps extends Omit<AriaMeterProps, 'children' | 'className' | 'style'>, MeterStyleProps, StyleProps {\n /** The content to display as the label. */\n label?: ReactNode\n}\n\nexport const MeterContext = createContext<ContextValue<MeterProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst wrapper = style({\n ...bar()\n}, getAllowedOverrides());\n\nconst valueStyles = style({\n ...fieldLabel(),\n gridArea: 'value'\n});\n\nconst trackStyles = style({\n ...track(),\n height: {\n default: size(6),\n size: {\n S: 4, // progress-bar-thickness-small\n M: size(6), // progress-bar-thickness-medium\n L: 8, // progress-bar-thickness-large\n XL: size(10) // progress-bar-thickness-extra-large\n }\n }\n});\n\nconst fillStyles = style<MeterStyleProps>({\n height: 'full',\n borderStyle: 'none',\n borderRadius: 'full',\n backgroundColor: {\n default: 'informative',\n variant: {\n positive: 'positive',\n notice: 'notice',\n negative: 'negative'\n },\n staticColor: {\n white: {\n default: 'transparent-white-900'\n },\n // TODO: Is there a black static color in S2?\n black: {\n default: 'transparent-black-900'\n }\n },\n forcedColors: 'ButtonText'\n }\n});\n\nfunction Meter(props: MeterProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, MeterContext);\n let domRef = useDOMRef(ref);\n\n let {\n label,\n size = 'M',\n staticColor,\n styles,\n UNSAFE_className = '',\n UNSAFE_style,\n variant = 'informative',\n labelPosition = 'top',\n ...groupProps\n } = props;\n\n return (\n <AriaMeter\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + wrapper({\n size,\n variant,\n staticColor,\n labelPosition\n }, styles)}>\n {({percentage, valueText}) => (\n <>\n {label && <FieldLabel size={size} labelAlign=\"start\" labelPosition={labelPosition} staticColor={staticColor}>{label}</FieldLabel>}\n {label && <Text styles={valueStyles({size, labelAlign: 'end', staticColor})}>{valueText}</Text>}\n <SkeletonWrapper>\n <div className={trackStyles({staticColor, size})}>\n <div className={fillStyles({staticColor, variant})} style={{width: percentage + '%'}} />\n </div>\n </SkeletonWrapper>\n </>\n )}\n </AriaMeter>\n );\n}\n\n/**\n * Meters are visual representations of a quantity or an achievement.\n * Their progress is determined by user actions, rather than system actions.\n */\nlet _Meter = forwardRef(Meter);\nexport {_Meter as Meter};\n"],"names":[],"version":3,"file":"Meter.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA6CM,MAAM,0DAAe,CAAA,GAAA,0BAAY,EAAyD;AAEjG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaN,MAAM;;;;;;;;;;;;;;;;;AAwBN,SAAS,4BAAM,KAAiB,EAAE,GAA2B;IAC3D,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,IAAI,SACF,KAAK,QACL,OAAO,kBACP,WAAW,UACX,MAAM,oBACN,mBAAmB,kBACnB,YAAY,WACZ,UAAU,8BACV,gBAAgB,OAChB,GAAG,YACJ,GAAG;IAEJ,qBACE,gCAAC,CAAA,GAAA,gCAAQ;QACN,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB,8BAAQ;kBACpC;qBACA;yBACA;2BACA;QACF,GAAG;kBACF,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBACvB;;oBACG,uBAAS,gCAAC,CAAA,GAAA,oCAAS;wBAAE,MAAM;wBAAM,YAAW;wBAAQ,eAAe;wBAAe,aAAa;kCAAc;;oBAC7G,uBAAS,gCAAC,CAAA,GAAA,8BAAG;wBAAE,QAAQ,kCAAY;kCAAC;4BAAM,YAAY;yCAAO;wBAAW;kCAAK;;kCAC9E,gCAAC,CAAA,GAAA,yCAAc;kCACb,cAAA,gCAAC;4BAAI,WAAW,kCAAY;6CAAC;sCAAa;4BAAI;sCAC5C,cAAA,gCAAC;gCAAI,WAAW,iCAAW;iDAAC;6CAAa;gCAAO;gCAAI,OAAO;oCAAC,OAAO,aAAa;gCAAG;;;;;;;AAOjG;AAEA;;;CAGC,GACD,IAAI,0DAAS,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Meter.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {\n Meter as AriaMeter,\n MeterProps as AriaMeterProps,\n ContextValue\n} from 'react-aria-components';\nimport {bar, track} from './bar-utils' with {type: 'macro'};\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMRef, DOMRefValue, LabelPosition} from '@react-types/shared';\nimport {FieldLabel} from './Field';\nimport {fieldLabel, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {size, style} from '../style' with {type: 'macro'};\nimport {SkeletonWrapper} from './Skeleton';\nimport {Text} from './Content';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface MeterStyleProps {\n /** The [visual style](https://spectrum.adobe.com/page/meter/#-Options) of the Meter.\n * @default 'informative'\n */\n variant?: 'informative' | 'positive' | 'notice' | 'negative',\n /**\n * The size of the Meter.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** \n * The static color style to apply. Useful when the button appears over a color background. \n */\n staticColor?: 'white' | 'black',\n /**\n * The label's overall position relative to the element it is labeling.\n * @default 'top'\n */\n labelPosition?: LabelPosition\n}\n\nexport interface MeterProps extends Omit<AriaMeterProps, 'children' | 'className' | 'style'>, MeterStyleProps, StyleProps {\n /** The content to display as the label. */\n label?: ReactNode\n}\n\nexport const MeterContext = createContext<ContextValue<MeterProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst wrapper = style({\n ...bar()\n}, getAllowedOverrides());\n\nconst valueStyles = style({\n ...fieldLabel(),\n gridArea: 'value'\n});\n\nconst trackStyles = style({\n ...track(),\n height: {\n default: size(6),\n size: {\n S: 4, // progress-bar-thickness-small\n M: size(6), // progress-bar-thickness-medium\n L: 8, // progress-bar-thickness-large\n XL: size(10) // progress-bar-thickness-extra-large\n }\n }\n});\n\nconst fillStyles = style<MeterStyleProps>({\n height: 'full',\n borderStyle: 'none',\n borderRadius: 'full',\n backgroundColor: {\n default: 'informative-visual',\n variant: {\n positive: 'positive-visual',\n notice: 'notice-visual',\n negative: 'negative-visual'\n },\n staticColor: {\n white: {\n default: 'transparent-white-900'\n },\n // TODO: Is there a black static color in S2?\n black: {\n default: 'transparent-black-900'\n }\n },\n forcedColors: 'ButtonText'\n }\n});\n\nfunction Meter(props: MeterProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, MeterContext);\n let domRef = useDOMRef(ref);\n\n let {\n label,\n size = 'M',\n staticColor,\n styles,\n UNSAFE_className = '',\n UNSAFE_style,\n variant = 'informative',\n labelPosition = 'top',\n ...groupProps\n } = props;\n\n return (\n <AriaMeter\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + wrapper({\n size,\n variant,\n staticColor,\n labelPosition\n }, styles)}>\n {({percentage, valueText}) => (\n <>\n {label && <FieldLabel size={size} labelAlign=\"start\" labelPosition={labelPosition} staticColor={staticColor}>{label}</FieldLabel>}\n {label && <Text styles={valueStyles({size, labelAlign: 'end', staticColor})}>{valueText}</Text>}\n <SkeletonWrapper>\n <div className={trackStyles({staticColor, size})}>\n <div className={fillStyles({staticColor, variant})} style={{width: percentage + '%'}} />\n </div>\n </SkeletonWrapper>\n </>\n )}\n </AriaMeter>\n );\n}\n\n/**\n * Meters are visual representations of a quantity or an achievement.\n * Their progress is determined by user actions, rather than system actions.\n */\nlet _Meter = forwardRef(Meter);\nexport {_Meter as Meter};\n"],"names":[],"version":3,"file":"Meter.cjs.map"}
package/dist/Meter.css CHANGED
@@ -278,32 +278,20 @@
278
278
  border-end-end-radius: 9999px;
279
279
  }
280
280
 
281
- .b_____E {
282
- background-color: var(--lightningcss-light, #3b63fb) var(--lightningcss-dark, #4069fd);
283
- }
284
-
285
- .b_____F {
286
- background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #345bf8);
287
- }
288
-
289
- .b_____N {
290
- background-color: var(--lightningcss-light, #05834e) var(--lightningcss-dark, #068850);
291
- }
292
-
293
281
  .b_____O {
294
- background-color: var(--lightningcss-light, #036e45) var(--lightningcss-dark, #047c4b);
282
+ background-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #5681ff);
295
283
  }
296
284
 
297
- .b_____Q {
298
- background-color: var(--lightningcss-light, #fc7d00) var(--lightningcss-dark, #e06400);
285
+ .b_____R {
286
+ background-color: var(--lightningcss-light, #079355) var(--lightningcss-dark, #099d59);
299
287
  }
300
288
 
301
- .b_____K {
302
- background-color: var(--lightningcss-light, #d73220) var(--lightningcss-dark, #df3422);
289
+ .b_____U {
290
+ background-color: var(--lightningcss-light, #d45b00) var(--lightningcss-dark, #e06400);
303
291
  }
304
292
 
305
- .b_____L {
306
- background-color: var(--lightningcss-light, #b72818) var(--lightningcss-dark, #cd2e1d);
293
+ .b_____M {
294
+ background-color: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #fc432e);
307
295
  }
308
296
 
309
297
  .b_____f {