@salesforce/design-system-react 11.0.0-alpha.7 → 11.0.0-alpha.8

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 (94) hide show
  1. package/dist/cjs/components/color-picker/color-picker.cjs +1 -1
  2. package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
  3. package/dist/cjs/components/combobox/combobox.cjs +1 -1
  4. package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
  5. package/dist/cjs/components/filter/filter.cjs +1 -1
  6. package/dist/cjs/components/filter/filter.cjs.map +1 -1
  7. package/dist/cjs/components/modal/check-props.cjs +2 -0
  8. package/dist/cjs/components/modal/check-props.cjs.map +1 -0
  9. package/dist/cjs/components/modal/component.cjs +2 -0
  10. package/dist/cjs/components/modal/component.cjs.map +1 -0
  11. package/dist/cjs/components/modal/index.cjs +1 -1
  12. package/dist/cjs/components/modal/index.cjs.map +1 -1
  13. package/dist/cjs/components/popover/component.cjs +2 -0
  14. package/dist/cjs/components/popover/component.cjs.map +1 -0
  15. package/dist/cjs/components/popover/edit-dialog.cjs +1 -1
  16. package/dist/cjs/components/popover/edit-dialog.cjs.map +1 -1
  17. package/dist/cjs/components/popover/popover.cjs +1 -1
  18. package/dist/cjs/components/popover/popover.cjs.map +1 -1
  19. package/dist/cjs/components/slider/check-props.cjs +1 -1
  20. package/dist/cjs/components/slider/check-props.cjs.map +1 -1
  21. package/dist/cjs/components/slider/index.cjs +1 -1
  22. package/dist/cjs/components/slider/index.cjs.map +1 -1
  23. package/dist/cjs/components/spinner/check-props.cjs +2 -0
  24. package/dist/cjs/components/spinner/check-props.cjs.map +1 -0
  25. package/dist/cjs/components/spinner/component.cjs +2 -0
  26. package/dist/cjs/components/spinner/component.cjs.map +1 -0
  27. package/dist/cjs/components/spinner/index.cjs +1 -1
  28. package/dist/cjs/components/spinner/index.cjs.map +1 -1
  29. package/dist/cjs/components/tree/check-props.cjs +1 -1
  30. package/dist/cjs/components/tree/check-props.cjs.map +1 -1
  31. package/dist/cjs/components/tree/tree.cjs +1 -1
  32. package/dist/cjs/components/tree/tree.cjs.map +1 -1
  33. package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
  34. package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
  35. package/dist/cjs/components/welcome-mat/index.cjs +1 -1
  36. package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
  37. package/dist/es/components/color-picker/color-picker.js +1 -1
  38. package/dist/es/components/color-picker/color-picker.js.map +1 -1
  39. package/dist/es/components/combobox/combobox.js +2 -2
  40. package/dist/es/components/combobox/combobox.js.map +1 -1
  41. package/dist/es/components/filter/filter.js +1 -1
  42. package/dist/es/components/filter/filter.js.map +1 -1
  43. package/dist/es/components/modal/check-props.js +22 -0
  44. package/dist/es/components/modal/check-props.js.map +1 -0
  45. package/dist/es/components/modal/component.js +35 -0
  46. package/dist/es/components/modal/component.js.map +1 -0
  47. package/dist/es/components/modal/index.js +118 -104
  48. package/dist/es/components/modal/index.js.map +1 -1
  49. package/dist/es/components/popover/component.js +59 -0
  50. package/dist/es/components/popover/component.js.map +1 -0
  51. package/dist/es/components/popover/edit-dialog.js +1 -1
  52. package/dist/es/components/popover/edit-dialog.js.map +1 -1
  53. package/dist/es/components/popover/popover.js +235 -191
  54. package/dist/es/components/popover/popover.js.map +1 -1
  55. package/dist/es/components/slider/check-props.js +1 -1
  56. package/dist/es/components/slider/check-props.js.map +1 -1
  57. package/dist/es/components/slider/index.js +63 -60
  58. package/dist/es/components/slider/index.js.map +1 -1
  59. package/dist/es/components/spinner/check-props.js +13 -0
  60. package/dist/es/components/spinner/check-props.js.map +1 -0
  61. package/dist/es/components/spinner/component.js +17 -0
  62. package/dist/es/components/spinner/component.js.map +1 -0
  63. package/dist/es/components/spinner/index.js +43 -29
  64. package/dist/es/components/spinner/index.js.map +1 -1
  65. package/dist/es/components/tree/check-props.js +1 -1
  66. package/dist/es/components/tree/check-props.js.map +1 -1
  67. package/dist/es/components/tree/tree.js +79 -73
  68. package/dist/es/components/tree/tree.js.map +1 -1
  69. package/dist/es/components/vertical-navigation/index.js +17 -16
  70. package/dist/es/components/vertical-navigation/index.js.map +1 -1
  71. package/dist/es/components/welcome-mat/index.js +51 -50
  72. package/dist/es/components/welcome-mat/index.js.map +1 -1
  73. package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
  74. package/dist/types/components/modal/check-props.d.ts +3 -0
  75. package/dist/types/components/modal/check-props.d.ts.map +1 -0
  76. package/dist/types/components/modal/index.d.ts +21 -13
  77. package/dist/types/components/modal/index.d.ts.map +1 -1
  78. package/dist/types/components/popover/popover.d.ts +24 -14
  79. package/dist/types/components/popover/popover.d.ts.map +1 -1
  80. package/dist/types/components/slider/check-props.d.ts.map +1 -1
  81. package/dist/types/components/slider/index.d.ts +9 -7
  82. package/dist/types/components/slider/index.d.ts.map +1 -1
  83. package/dist/types/components/spinner/check-props.d.ts +3 -0
  84. package/dist/types/components/spinner/check-props.d.ts.map +1 -0
  85. package/dist/types/components/spinner/index.d.ts +18 -9
  86. package/dist/types/components/spinner/index.d.ts.map +1 -1
  87. package/dist/types/components/tree/check-props.d.ts.map +1 -1
  88. package/dist/types/components/tree/tree.d.ts +8 -4
  89. package/dist/types/components/tree/tree.d.ts.map +1 -1
  90. package/dist/types/components/vertical-navigation/index.d.ts +7 -7
  91. package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
  92. package/dist/types/components/welcome-mat/index.d.ts +5 -6
  93. package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
  94. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","names":[],"sources":["../../../../components/popover/popover.tsx"],"sourcesContent":["/* eslint-disable max-lines */\n/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tuseCallback,\n\tuseId,\n\tuseContext,\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype MouseEvent,\n\ttype KeyboardEvent,\n\ttype FocusEvent,\n\ttype CSSProperties,\n} from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport MediaObject from '../media-object';\nimport Icon from '../icon';\nimport Dialog from '../utilities/dialog';\nimport keyboardNavigableDialog from '../../utilities/keyboard-navigable-dialog';\nimport KEYS from '../../utilities/key-code';\nimport { POPOVER } from '../../utilities/constants';\nimport { IconSettingsContext } from '../icon-settings';\n\nconst documentDefined = typeof document !== 'undefined';\n\n// Shared overlay element for click-outside detection over iframes\nconst overlay = documentDefined\n\t? document.createElement('span')\n\t: ({ style: {} } as HTMLSpanElement);\nif (documentDefined) {\n\toverlay.style.top = '0';\n\toverlay.style.left = '0';\n\toverlay.style.width = '100%';\n\toverlay.style.height = '100%';\n\toverlay.style.position = 'absolute';\n}\n\n// Track currently open popover for single-popover-at-a-time behavior\nlet currentOpenPopover: {\n\thandleClose: (\n\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\tdata: PopoverRequestCloseData\n\t) => void;\n\tgetId: () => string;\n} | null = null;\n\n/**\n * Popover alignment options\n */\nexport type PopoverAlign =\n\t| 'top'\n\t| 'top left'\n\t| 'top right'\n\t| 'right'\n\t| 'right top'\n\t| 'right bottom'\n\t| 'bottom'\n\t| 'bottom left'\n\t| 'bottom right'\n\t| 'left'\n\t| 'left top'\n\t| 'left bottom';\n\n/**\n * Popover position options\n */\nexport type PopoverPosition =\n\t'absolute' | 'overflowBoundaryElement' | 'relative';\n\n/**\n * Popover variant options\n */\nexport type PopoverVariant =\n\t| 'base'\n\t| 'error'\n\t| 'feature'\n\t| 'walkthrough'\n\t| 'walkthrough-action'\n\t| 'warning';\n\n/**\n * Assistive text for Popover\n */\nexport interface PopoverAssistiveText {\n\tcloseButton?: string;\n}\n\n/**\n * What caused `onRequestClose` to fire:\n * * `cancel`: the close button was clicked or Escape was pressed\n * * `clickOutside`: a click landed outside the popover\n * * `mouseLeave`: the mouse left the trigger/popover (`openOn` `hover`/`hybrid`) and `hoverCloseDelay` elapsed\n * * `newPopover`: another Popover opened (only one can be open at a time)\n * * `triggerClick`: the trigger was clicked while the popover was open\n */\nexport type PopoverRequestCloseTrigger =\n\t'cancel' | 'clickOutside' | 'mouseLeave' | 'newPopover' | 'triggerClick';\n\n/**\n * Data passed to `onRequestClose`\n */\nexport interface PopoverRequestCloseData {\n\t/** What caused the close request */\n\ttrigger: PopoverRequestCloseTrigger;\n\t/** HTML id of the popover being closed. Only present when `trigger` is `newPopover`. */\n\tid?: string;\n}\n\n/**\n * Data passed to `onOpen`\n */\nexport interface PopoverOpenData {\n\t/** The rendered popover dialog element */\n\tportal?: HTMLElement;\n}\n\n/**\n * Data passed to `onClose`\n */\nexport interface PopoverCloseData {\n\t/** `true` when the popover dialog is closing because it is being unmounted */\n\tcomponentWillUnmount: boolean;\n}\n\n/**\n * Props for the Popover component\n */\nexport interface PopoverProps {\n\t/** Alignment relative to trigger */\n\talign?: PopoverAlign;\n\t/** Accessibility labels */\n\tassistiveText?: PopoverAssistiveText;\n\t/** HTML id of heading for aria-labelledby */\n\tariaLabelledby?: string;\n\t/** Trigger element (first child) and optional other children */\n\tchildren: ReactNode;\n\t/** Popover body content */\n\tbody: ReactNode;\n\t/** CSS classes for body */\n\tclassNameBody?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for footer */\n\tclassNameFooter?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use classNameFooter */\n\tfooterClassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for popover container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for contents wrapper */\n\tcontentsClassName?: string | string[] | Record<string, boolean>;\n\t/** Disable the popover */\n\tdisabled?: boolean;\n\t/** Footer content */\n\tfooter?: ReactNode;\n\t/** Footer styles */\n\tfooterStyle?: CSSProperties;\n\t/** Walkthrough footer actions */\n\tfooterWalkthroughActions?: ReactNode | ReactNode[];\n\t/** Hide close button */\n\thasNoCloseButton?: boolean;\n\t/** Hide nubbin/arrow */\n\thasNoNubbin?: boolean;\n\t/** Prevent position flipping */\n\thasStaticAlignment?: boolean;\n\t/** Remove trigger inline-block style */\n\thasNoTriggerStyles?: boolean;\n\t/** Popover heading */\n\theading?: ReactNode;\n\t/** Icon for feature variant */\n\ticon?: ReactNode;\n\t/** HTML id */\n\tid?: string;\n\t/** Controlled open state */\n\tisOpen?: boolean;\n\t/** Offset from target */\n\toffset?: string;\n\t/** Click handler */\n\tonClick?: (event: MouseEvent) => void;\n\t/** Called after the popover dialog has closed (unmounted). There is no triggering event, so `event` is `undefined`. */\n\tonClose?: (event: undefined, data: PopoverCloseData) => void;\n\t/** Focus handler */\n\tonFocus?: (event: FocusEvent) => void;\n\t/** Key down handler */\n\tonKeyDown?: (event: KeyboardEvent) => void;\n\t/** Mouse down handler */\n\tonMouseDown?: (event: MouseEvent) => void;\n\t/** Mouse enter handler */\n\tonMouseEnter?: (event: MouseEvent) => void;\n\t/** Mouse leave handler */\n\tonMouseLeave?: (event: MouseEvent) => void;\n\t/** Called after the popover dialog has opened and rendered. There is no triggering event, so `event` is `undefined`. */\n\tonOpen?: (event: undefined, data: PopoverOpenData) => void;\n\t/**\n\t * Called when the popover requests to close. `data.trigger` says why. `event` is the triggering\n\t * click or key event, or `undefined` when there is none (`mouseLeave` timer, `newPopover`).\n\t */\n\tonRequestClose?: (\n\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\tdata: PopoverRequestCloseData\n\t) => void;\n\t/** Custom target element getter */\n\tonRequestTargetElement?: () => HTMLElement | null;\n\t/** Open trigger type */\n\topenOn?: 'click' | 'hover' | 'hybrid';\n\t/** Overlay for click-outside on iframes */\n\toverlay?: boolean | ((isOpen: boolean, overlayElement: HTMLElement) => void);\n\t/** Positioning strategy */\n\tposition?: PopoverPosition;\n\t/** Walkthrough step text */\n\tstepText?: string;\n\t/** Custom styles */\n\tstyle?: CSSProperties;\n\t/** CSS classes for trigger wrapper */\n\ttriggerClassName?: string | string[] | Record<string, boolean>;\n\t/** Popover variant */\n\tvariant?: PopoverVariant;\n\t/** Delay before closing on hover (ms) */\n\thoverCloseDelay?: number;\n\t/** @deprecated Use assistiveText.closeButton */\n\tcloseButtonAssistiveText?: string;\n}\n\n// Nubbin positions for export (legacy)\nexport const PopoverNubbinPositions = [\n\t'top left',\n\t'top',\n\t'top right',\n\t'bottom left',\n\t'bottom',\n\t'bottom right',\n];\n\nconst defaultAssistiveText: PopoverAssistiveText = {\n\tcloseButton: 'Close dialog',\n};\n\n/**\n * The Popover component is a non-modal dialog. It should be paired with a clickable\n * trigger such as a Button. It traps focus from the page and must be exited if focus\n * needs to be outside the Popover.\n */\nconst Popover = ({\n\talign = 'right',\n\tassistiveText: propAssistiveText,\n\tariaLabelledby,\n\tchildren,\n\tbody,\n\tclassNameBody,\n\tclassNameFooter,\n\tfooterClassName,\n\tclassName,\n\tcontentsClassName,\n\tdisabled = false,\n\tfooter,\n\tfooterStyle,\n\tfooterWalkthroughActions,\n\thasNoCloseButton = false,\n\thasNoNubbin = false,\n\thasStaticAlignment = false,\n\thasNoTriggerStyles = false,\n\theading,\n\ticon,\n\tid: propId,\n\tisOpen: controlledIsOpen,\n\toffset,\n\tonClick,\n\tonClose,\n\tonFocus,\n\tonKeyDown,\n\tonMouseDown,\n\tonMouseEnter,\n\tonMouseLeave,\n\tonOpen,\n\tonRequestClose,\n\tonRequestTargetElement,\n\topenOn = 'click',\n\toverlay: overlayProp,\n\tposition = 'absolute',\n\tstepText,\n\tstyle,\n\ttriggerClassName,\n\tvariant = 'base',\n\thoverCloseDelay = 300,\n\tcloseButtonAssistiveText,\n}: PopoverProps): ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\tconst context = useContext(IconSettingsContext);\n\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\tconst finalCloseButtonAssistiveText =\n\t\tcloseButtonAssistiveText || assistiveText.closeButton;\n\n\t// State\n\tconst [internalIsOpen, setInternalIsOpen] = useState(false);\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Refs\n\tconst triggerRef = useRef<HTMLDivElement>(null);\n\tconst dialogRef = useRef<HTMLElement>(null);\n\tconst isHoverRef = useRef(false);\n\tconst isClosingRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\tconst overlayRef = useRef<HTMLSpanElement | null>(null);\n\tconst isUnmountingRef = useRef(false);\n\n\t// Derived state\n\tconst isOpen =\n\t\t!disabled &&\n\t\t(controlledIsOpen !== undefined ? controlledIsOpen : internalIsOpen);\n\n\t// Get target element for positioning\n\tconst getTargetElement = useCallback(() => {\n\t\tif (onRequestTargetElement) {\n\t\t\tconst target = onRequestTargetElement();\n\t\t\tif (target) return target;\n\t\t}\n\t\treturn triggerRef.current;\n\t}, [onRequestTargetElement]);\n\n\t// Handle dialog close (when unmounted)\n\tconst handleDialogClose = useCallback(\n\t\t(\n\t\t\t_event?: React.SyntheticEvent,\n\t\t\tdata?: { componentWillUnmount?: boolean }\n\t\t) => {\n\t\t\tconst componentWillUnmount = data?.componentWillUnmount || false;\n\n\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\tcurrentOpenPopover = null;\n\t\t\t}\n\n\t\t\tif (onClose) {\n\t\t\t\tonClose(undefined, { componentWillUnmount });\n\t\t\t}\n\t\t},\n\t\t[id, onClose]\n\t);\n\n\t// Handle dialog open (after it has rendered)\n\tconst handleDialogOpen = useCallback(\n\t\t(_event?: unknown, data?: { portal?: HTMLElement }) => {\n\t\t\tif (onOpen) {\n\t\t\t\tonOpen(undefined, { portal: data?.portal });\n\t\t\t}\n\t\t},\n\t\t[onOpen]\n\t);\n\n\t// Handle close\n\tconst handleClose = useCallback(\n\t\t(\n\t\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\t\tdata: PopoverRequestCloseData\n\t\t) => {\n\t\t\tif (isOpen) {\n\t\t\t\tif (onRequestClose) {\n\t\t\t\t\tonRequestClose(event, data);\n\t\t\t\t}\n\n\t\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\t\tcurrentOpenPopover = null;\n\t\t\t\t}\n\n\t\t\t\tsetInternalIsOpen(false);\n\t\t\t\tisHoverRef.current = false;\n\t\t\t}\n\t\t},\n\t\t[isOpen, id, onRequestClose]\n\t);\n\n\t// Latest `handleClose`, so the \"close the other open popover\" path does not call a stale\n\t// closure from when this popover opened (whose `isOpen` was still `false`).\n\tconst handleCloseRef = useRef(handleClose);\n\tuseEffect(() => {\n\t\thandleCloseRef.current = handleClose;\n\t}, [handleClose]);\n\n\t// Handle open\n\tconst handleOpen = useCallback(() => {\n\t\tif (!isOpen) {\n\t\t\t// Close any other open popover\n\t\t\tif (currentOpenPopover && currentOpenPopover.getId() !== id) {\n\t\t\t\tcurrentOpenPopover.handleClose(undefined, {\n\t\t\t\t\ttrigger: 'newPopover',\n\t\t\t\t\tid: currentOpenPopover.getId(),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tcurrentOpenPopover = {\n\t\t\t\thandleClose: (event, data) => handleCloseRef.current(event, data),\n\t\t\t\tgetId: () => id,\n\t\t\t};\n\n\t\t\tsetInternalIsOpen(true);\n\t\t}\n\t}, [isOpen, id]);\n\n\t// Handle cancel (close button or escape)\n\tconst handleCancel = useCallback(\n\t\t(event: MouseEvent | KeyboardEvent) => {\n\t\t\thandleClose(event, { trigger: 'cancel' });\n\t\t},\n\t\t[handleClose]\n\t);\n\n\t// Handle click outside\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\thandleClose(event, { trigger: 'clickOutside' });\n\t\t},\n\t\t[handleClose]\n\t);\n\n\t// Handle mouse enter\n\tconst handleMouseEnter = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\tisHoverRef.current = true;\n\n\t\t\tif (!isOpen && openOn === 'hover') {\n\t\t\t\thandleOpen();\n\t\t\t} else {\n\t\t\t\tif (isClosingRef.current) {\n\t\t\t\t\tclearTimeout(isClosingRef.current);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (onMouseEnter) {\n\t\t\t\tonMouseEnter(event);\n\t\t\t}\n\t\t},\n\t\t[isOpen, openOn, handleOpen, onMouseEnter]\n\t);\n\n\t// Handle mouse leave\n\tconst handleMouseLeave = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\tif (isOpen) {\n\t\t\t\tisClosingRef.current = setTimeout(() => {\n\t\t\t\t\thandleClose(undefined, { trigger: 'mouseLeave' });\n\t\t\t\t}, hoverCloseDelay);\n\t\t\t}\n\n\t\t\tif (onMouseLeave) {\n\t\t\t\tonMouseLeave(event);\n\t\t\t}\n\t\t},\n\t\t[isOpen, hoverCloseDelay, handleClose, onMouseLeave]\n\t);\n\n\t// Handle click\n\tconst handleClick = useCallback(\n\t\t(event: MouseEvent, triggerOnClickCallback?: (e: MouseEvent) => void) => {\n\t\t\tif (!isOpen) {\n\t\t\t\thandleOpen();\n\t\t\t} else {\n\t\t\t\thandleClose(event, { trigger: 'triggerClick' });\n\t\t\t}\n\n\t\t\tif (onClick) {\n\t\t\t\tonClick(event);\n\t\t\t}\n\n\t\t\tif (triggerOnClickCallback) {\n\t\t\t\ttriggerOnClickCallback(event);\n\t\t\t}\n\t\t},\n\t\t[isOpen, handleOpen, handleClose, onClick]\n\t);\n\n\t// Handle focus\n\tconst handleFocus = useCallback(\n\t\t(event: FocusEvent) => {\n\t\t\tif (!isOpen) {\n\t\t\t\thandleOpen();\n\t\t\t}\n\n\t\t\tif (onFocus) {\n\t\t\t\tonFocus(event);\n\t\t\t}\n\t\t},\n\t\t[isOpen, handleOpen, onFocus]\n\t);\n\n\t// Toggle from keyboard\n\tconst toggleOpenFromKeyboard = useCallback(\n\t\t(event: KeyboardEvent) => {\n\t\t\tif (isOpen) {\n\t\t\t\thandleCancel(event);\n\t\t\t} else {\n\t\t\t\thandleOpen();\n\t\t\t}\n\t\t},\n\t\t[isOpen, handleCancel, handleOpen]\n\t);\n\n\t// Handle key down\n\tconst handleKeyDown = useCallback(\n\t\t(event: KeyboardEvent) => {\n\t\t\tif (event.keyCode) {\n\t\t\t\tif (event.keyCode !== KEYS.TAB) {\n\t\t\t\t\tkeyboardNavigableDialog({\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\tisOpen,\n\t\t\t\t\t\thandleClick: (e: MouseEvent) => handleClick(e),\n\t\t\t\t\t\tkeyCode: event.keyCode,\n\t\t\t\t\t\teventTarget: event.target,\n\t\t\t\t\t\t// keyboardNavigableDialog calls `toggleOpen()` without the event; pass it through\n\t\t\t\t\t\ttoggleOpen: () => toggleOpenFromKeyboard(event),\n\t\t\t\t\t\ttrigger: triggerRef.current,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (onKeyDown) {\n\t\t\t\t\tonKeyDown(event);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[isOpen, handleClick, toggleOpenFromKeyboard, onKeyDown]\n\t);\n\n\t// Render overlay for click-outside detection\n\tconst renderOverlay = useCallback(\n\t\t(shouldShow: boolean) => {\n\t\t\tif (typeof overlayProp === 'function' && documentDefined) {\n\t\t\t\toverlayProp(shouldShow, overlay);\n\t\t\t} else if (\n\t\t\t\toverlayProp &&\n\t\t\t\tshouldShow &&\n\t\t\t\t!overlayRef.current &&\n\t\t\t\tdocumentDefined\n\t\t\t) {\n\t\t\t\toverlayRef.current = overlay;\n\t\t\t\tdocument.querySelector('body')?.appendChild(overlay);\n\t\t\t} else if (!shouldShow && overlayRef.current?.parentNode) {\n\t\t\t\toverlayRef.current.parentNode.removeChild(overlayRef.current);\n\t\t\t\toverlayRef.current = null;\n\t\t\t}\n\t\t},\n\t\t[overlayProp]\n\t);\n\n\t// Container ref callback\n\tconst setContainerRef = useCallback(\n\t\t(component: HTMLDivElement | null) => {\n\t\t\t(triggerRef as React.MutableRefObject<HTMLDivElement | null>).current =\n\t\t\t\tcomponent;\n\t\t\tif (component && !inputRendered) {\n\t\t\t\tsetInputRendered(true);\n\t\t\t}\n\t\t},\n\t\t[inputRendered]\n\t);\n\n\t// Dialog ref callback\n\tconst setMenuRef = useCallback((component: HTMLElement | null) => {\n\t\t(dialogRef as React.MutableRefObject<HTMLElement | null>).current =\n\t\t\tcomponent;\n\t}, []);\n\n\t// Cleanup on unmount\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tisUnmountingRef.current = true;\n\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\tcurrentOpenPopover = null;\n\t\t\t}\n\t\t\trenderOverlay(false);\n\t\t};\n\t}, [id, renderOverlay]);\n\n\t// Update overlay when isOpen changes\n\tuseEffect(() => {\n\t\trenderOverlay(isOpen);\n\t}, [isOpen, renderOverlay]);\n\n\t// Render header\n\tconst renderHeader = () => {\n\t\tconst hasThemedHeader = variant === 'error' || variant === 'warning';\n\t\tconst hasDefinedHeader = heading || hasThemedHeader;\n\n\t\tif (\n\t\t\t!hasDefinedHeader ||\n\t\t\tvariant === 'walkthrough-action' ||\n\t\t\tvariant === 'feature'\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst headerIcon = {\n\t\t\terror: <Icon category=\"utility\" name=\"error\" size=\"x-small\" inverse />,\n\t\t\twarning: (\n\t\t\t\t<Icon category=\"utility\" name=\"warning\" size=\"x-small\" inverse />\n\t\t\t),\n\t\t};\n\n\t\tif (hasThemedHeader) {\n\t\t\treturn (\n\t\t\t\t<header className=\"slds-popover__header\">\n\t\t\t\t\t<MediaObject\n\t\t\t\t\t\tbody={\n\t\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\t\t\t\tclassName=\"slds-truncate slds-text-heading_medium\"\n\t\t\t\t\t\t\t\ttitle={typeof heading === 'string' ? heading : undefined}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfigure={headerIcon[variant as 'error' | 'warning']}\n\t\t\t\t\t\tverticalCenter\n\t\t\t\t\t/>\n\t\t\t\t</header>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<header\n\t\t\t\tclassName={classNames('slds-popover__header', {\n\t\t\t\t\t'slds-p-vertical_medium': variant === 'walkthrough',\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<h2\n\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t'slds-text-heading_small': variant !== 'walkthrough',\n\t\t\t\t\t\t'slds-text-heading_medium': variant === 'walkthrough',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{heading}\n\t\t\t\t</h2>\n\t\t\t</header>\n\t\t);\n\t};\n\n\t// Render body\n\tconst renderBody = () => {\n\t\tif (variant === 'error' || variant === 'warning') {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\t\tclassName={classNames('slds-popover__body', classNameBody as string)}\n\t\t\t\t>\n\t\t\t\t\t{body}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tif (variant === 'walkthrough-action' || variant === 'feature') {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-popover__body', classNameBody as string)}\n\t\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"slds-media\">\n\t\t\t\t\t\t<div className=\"slds-media__figure\">\n\t\t\t\t\t\t\t{variant === 'walkthrough-action' ? (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\tname=\"touch_action\"\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tinverse\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\ticon\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"slds-media__body\">\n\t\t\t\t\t\t\t{heading && (\n\t\t\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\t\t\t\t\tclassName=\"slds-text-heading_small\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{body}\n\t\t\t\t\t\t\t{stepText && (\n\t\t\t\t\t\t\t\t<p className=\"slds-m-top_medium slds-text-title\">{stepText}</p>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\tclassName={classNames('slds-popover__body', classNameBody as string)}\n\t\t\t>\n\t\t\t\t{body}\n\t\t\t</div>\n\t\t);\n\t};\n\n\t// Render footer\n\tconst renderFooter = () => {\n\t\tif (footer) {\n\t\t\treturn (\n\t\t\t\t<footer\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-popover__footer',\n\t\t\t\t\t\tclassNameFooter as string,\n\t\t\t\t\t\tfooterClassName as string\n\t\t\t\t\t)}\n\t\t\t\t\tstyle={footerStyle}\n\t\t\t\t>\n\t\t\t\t\t{footer}\n\t\t\t\t</footer>\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\tvariant !== 'walkthrough-action' &&\n\t\t\t(footerWalkthroughActions || stepText)\n\t\t) {\n\t\t\treturn (\n\t\t\t\t<footer\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-popover__footer',\n\t\t\t\t\t\tclassNameFooter as string,\n\t\t\t\t\t\tfooterClassName as string\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"slds-grid slds-grid_vertical-align-center\">\n\t\t\t\t\t\t{stepText && <span className=\"slds-text-title\">{stepText}</span>}\n\t\t\t\t\t\t{footerWalkthroughActions && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"slds-col_bump-left\"\n\t\t\t\t\t\t\t\tstyle={{ display: 'inline-block' }}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{footerWalkthroughActions}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</footer>\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t};\n\n\t// Render dialog\n\tconst renderDialog = () => {\n\t\tif (!isOpen) return null;\n\n\t\tconst outsideClickIgnoreClass = `ignore-click-${id}`;\n\n\t\treturn (\n\t\t\t<Dialog\n\t\t\t\thasNubbin={!hasNoNubbin}\n\t\t\t\talign={align}\n\t\t\t\tcontentsClassName={classNames(\n\t\t\t\t\tcontentsClassName as string,\n\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t'slds-popover',\n\t\t\t\t\t{ 'slds-popover_error': variant === 'error' },\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-popover_walkthrough':\n\t\t\t\t\t\t\tvariant === 'walkthrough' ||\n\t\t\t\t\t\t\tvariant === 'walkthrough-action' ||\n\t\t\t\t\t\t\tvariant === 'feature',\n\t\t\t\t\t},\n\t\t\t\t\t{ 'slds-popover_walkthrough-alt': variant === 'walkthrough-action' },\n\t\t\t\t\t{ 'slds-popover_feature': variant === 'feature' },\n\t\t\t\t\t{ 'slds-popover_warning': variant === 'warning' },\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t\tcontext={context}\n\t\t\t\thasStaticAlignment={hasStaticAlignment}\n\t\t\t\toffset={offset}\n\t\t\t\tonClose={handleDialogClose}\n\t\t\t\tonOpen={handleDialogOpen}\n\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\tonMouseEnter={openOn === 'hover' ? handleMouseEnter : undefined}\n\t\t\t\tonMouseLeave={openOn === 'hover' ? handleMouseLeave : undefined}\n\t\t\t\toutsideClickIgnoreClass={outsideClickIgnoreClass}\n\t\t\t\tonRequestTargetElement={getTargetElement}\n\t\t\t\tposition={position}\n\t\t\t\tstyle={style}\n\t\t\t\tvariant=\"popover\"\n\t\t\t\tref={setMenuRef}\n\t\t\t\tcontainerProps={{\n\t\t\t\t\tid: `${id}-popover`,\n\t\t\t\t\t'aria-labelledby': ariaLabelledby || `${id}-dialog-heading`,\n\t\t\t\t\t'aria-describedby': `${id}-dialog-body`,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{!hasNoCloseButton && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tassistiveText={{ icon: finalCloseButtonAssistiveText }}\n\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\ticonName=\"close\"\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-button slds-button_icon-small slds-float_right slds-popover__close slds-button_icon',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-button_icon-inverse':\n\t\t\t\t\t\t\t\t\tvariant === 'walkthrough' ||\n\t\t\t\t\t\t\t\t\tvariant === 'walkthrough-action' ||\n\t\t\t\t\t\t\t\t\tvariant === 'feature',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tonClick={handleCancel}\n\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\tinverse={variant === 'error' || variant === 'warning'}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{renderHeader()}\n\t\t\t\t{renderBody()}\n\t\t\t\t{renderFooter()}\n\t\t\t</Dialog>\n\t\t);\n\t};\n\n\t// Clone trigger element\n\tconst otherChildren: ReactNode[] = [];\n\tlet clonedTrigger: ReactNode = null;\n\n\tReact.Children.forEach(children, (child, index) => {\n\t\tif (index === 0 && React.isValidElement(child)) {\n\t\t\tconst childProps = child.props as Record<string, unknown>;\n\t\t\tconst triggerProps: Record<string, unknown> = {\n\t\t\t\t'aria-haspopup': 'dialog',\n\t\t\t\tid,\n\t\t\t\tonClick:\n\t\t\t\t\topenOn === 'click' || openOn === 'hybrid'\n\t\t\t\t\t\t? (event: MouseEvent) => {\n\t\t\t\t\t\t\t\thandleClick(\n\t\t\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t\t\tchildProps.onClick as (e: MouseEvent) => void\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: childProps.onClick,\n\t\t\t\tonFocus: openOn === 'hover' ? handleFocus : undefined,\n\t\t\t\tonMouseDown,\n\t\t\t\tonMouseEnter:\n\t\t\t\t\topenOn === 'hover' || openOn === 'hybrid'\n\t\t\t\t\t\t? handleMouseEnter\n\t\t\t\t\t\t: undefined,\n\t\t\t\tonMouseLeave:\n\t\t\t\t\topenOn === 'hover' || openOn === 'hybrid'\n\t\t\t\t\t\t? handleMouseLeave\n\t\t\t\t\t\t: undefined,\n\t\t\t\ttabIndex: (childProps.tabIndex as number) || 0,\n\t\t\t};\n\t\t\tclonedTrigger = React.cloneElement(child, triggerProps);\n\t\t} else if (child) {\n\t\t\totherChildren.push(child);\n\t\t}\n\t});\n\n\tconst containerStyles: CSSProperties = {\n\t\tdisplay: hasNoTriggerStyles ? undefined : 'inline-block',\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={triggerClassName as string}\n\t\t\tstyle={containerStyles}\n\t\t\tref={setContainerRef}\n\t\t>\n\t\t\t{clonedTrigger}\n\t\t\t{otherChildren.length > 0 ? otherChildren : null}\n\t\t\t{renderDialog()}\n\t\t</div>\n\t);\n};\n\nPopover.displayName = POPOVER;\n\nexport default Popover;\n"],"mappings":";;;;;;;;;;;;AA6BA,IAAM,IAAkB,OAAO,WAAa,KAGtC,IAAU,IACb,SAAS,cAAc,MAAM,IAC5B,EAAE,OAAO,CAAC,EAAE;AACZ,MACH,EAAQ,MAAM,MAAM,KACpB,EAAQ,MAAM,OAAO,KACrB,EAAQ,MAAM,QAAQ,QACtB,EAAQ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AO,EANR,SAAS,KAAqB,KAAA,IAAY,eAMlC;EACP,KAAK;EAHN,UAAA;GAKE;GACA,EAAc,SAAS,IAAI,IAAgB;GAC3C,GAAa;EACV;;AAEP;AAEA,EAAQ,cAAc"}
1
+ {"version":3,"file":"popover.js","names":[],"sources":["../../../../components/popover/popover.tsx"],"sourcesContent":["/* eslint-disable max-lines */\n/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tforwardRef,\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tuseCallback,\n\tuseId,\n\tuseContext,\n\ttype ReactNode,\n\ttype MouseEvent,\n\ttype KeyboardEvent,\n\ttype FocusEvent,\n\ttype CSSProperties,\n} from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport MediaObject from '../media-object';\nimport Icon from '../icon';\nimport Dialog from '../utilities/dialog';\nimport keyboardNavigableDialog from '../../utilities/keyboard-navigable-dialog';\nimport KEYS from '../../utilities/key-code';\nimport { POPOVER } from '../../utilities/constants';\nimport { IconSettingsContext } from '../icon-settings';\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\nimport componentDoc from './component.json';\n\nconst documentDefined = typeof document !== 'undefined';\n\n// Shared overlay element for click-outside detection over iframes\nconst overlay = documentDefined\n\t? document.createElement('span')\n\t: ({ style: {} } as HTMLSpanElement);\nif (documentDefined) {\n\toverlay.style.top = '0';\n\toverlay.style.left = '0';\n\toverlay.style.width = '100%';\n\toverlay.style.height = '100%';\n\toverlay.style.position = 'absolute';\n}\n\n// Track currently open popover for single-popover-at-a-time behavior\nlet currentOpenPopover: {\n\thandleClose: (\n\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\tdata: PopoverRequestCloseData\n\t) => void;\n\tgetId: () => string;\n} | null = null;\n\n/**\n * Popover alignment options\n */\nexport type PopoverAlign =\n\t| 'top'\n\t| 'top left'\n\t| 'top right'\n\t| 'right'\n\t| 'right top'\n\t| 'right bottom'\n\t| 'bottom'\n\t| 'bottom left'\n\t| 'bottom right'\n\t| 'left'\n\t| 'left top'\n\t| 'left bottom';\n\n/**\n * Popover position options\n */\nexport type PopoverPosition =\n\t'absolute' | 'overflowBoundaryElement' | 'relative';\n\n/**\n * Popover variant options\n */\nexport type PopoverVariant =\n\t| 'base'\n\t| 'error'\n\t| 'feature'\n\t| 'walkthrough'\n\t| 'walkthrough-action'\n\t| 'warning';\n\n/**\n * Assistive text for Popover\n */\nexport interface PopoverAssistiveText {\n\tcloseButton?: string;\n}\n\n/**\n * What caused `onRequestClose` to fire:\n * * `cancel`: the close button was clicked or Escape was pressed\n * * `clickOutside`: a click landed outside the popover\n * * `mouseLeave`: the mouse left the trigger/popover (`openOn` `hover`/`hybrid`) and `hoverCloseDelay` elapsed\n * * `newPopover`: another Popover opened (only one can be open at a time)\n * * `triggerClick`: the trigger was clicked while the popover was open\n */\nexport type PopoverRequestCloseTrigger =\n\t'cancel' | 'clickOutside' | 'mouseLeave' | 'newPopover' | 'triggerClick';\n\n/**\n * Data passed to `onRequestClose`\n */\nexport interface PopoverRequestCloseData {\n\t/** What caused the close request */\n\ttrigger: PopoverRequestCloseTrigger;\n\t/** HTML id of the popover being closed. Only present when `trigger` is `newPopover`. */\n\tid?: string;\n}\n\n/**\n * Data passed to `onOpen`\n */\nexport interface PopoverOpenData {\n\t/** The rendered popover dialog element */\n\tportal?: HTMLElement;\n}\n\n/**\n * Data passed to `onClose`\n */\nexport interface PopoverCloseData {\n\t/** `true` when the popover dialog is closing because it is being unmounted */\n\tcomponentWillUnmount: boolean;\n}\n\n/**\n * Props for the Popover component\n */\nexport interface PopoverProps {\n\t/** Alignment relative to trigger */\n\talign?: PopoverAlign;\n\t/** Accessibility labels */\n\tassistiveText?: PopoverAssistiveText;\n\t/** HTML id of heading for aria-labelledby */\n\tariaLabelledby?: string;\n\t/** Trigger element (first child) and optional other children */\n\tchildren: ReactNode;\n\t/** Popover body content */\n\tbody: ReactNode;\n\t/** CSS classes for the `.slds-popover__body` element */\n\tclassNameBody?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for the `.slds-popover__footer` element */\n\tclassNameFooter?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `classNameFooter`. */\n\tfooterClassName?: string | string[] | Record<string, boolean>;\n\t/**\n\t * CSS classes for the root element: the `div` that wraps the trigger. To style the\n\t * `.slds-popover` dialog (for example `slds-popover_large`), use `classNameDialog`.\n\t */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for the `.slds-popover` dialog element */\n\tclassNameDialog?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `classNameDialog`, which lands on the same element. */\n\tcontentsClassName?: string | string[] | Record<string, boolean>;\n\t/** Disable the popover */\n\tdisabled?: boolean;\n\t/** Footer content */\n\tfooter?: ReactNode;\n\t/** @deprecated Use `styleFooter`. */\n\tfooterStyle?: CSSProperties;\n\t/** Walkthrough footer actions */\n\tfooterWalkthroughActions?: ReactNode | ReactNode[];\n\t/** Hide close button */\n\thasNoCloseButton?: boolean;\n\t/** Hide nubbin/arrow */\n\thasNoNubbin?: boolean;\n\t/** Prevent position flipping */\n\thasStaticAlignment?: boolean;\n\t/** Remove trigger inline-block style */\n\thasNoTriggerStyles?: boolean;\n\t/** Popover heading */\n\theading?: ReactNode;\n\t/** Icon for feature variant */\n\ticon?: ReactNode;\n\t/** HTML id */\n\tid?: string;\n\t/** Controlled open state */\n\tisOpen?: boolean;\n\t/** Offset from target */\n\toffset?: string;\n\t/** Click handler */\n\tonClick?: (event: MouseEvent) => void;\n\t/** Called after the popover dialog has closed (unmounted). There is no triggering event, so `event` is `undefined`. */\n\tonClose?: (event: undefined, data: PopoverCloseData) => void;\n\t/** Focus handler */\n\tonFocus?: (event: FocusEvent) => void;\n\t/** Key down handler */\n\tonKeyDown?: (event: KeyboardEvent) => void;\n\t/** Mouse down handler */\n\tonMouseDown?: (event: MouseEvent) => void;\n\t/** Mouse enter handler */\n\tonMouseEnter?: (event: MouseEvent) => void;\n\t/** Mouse leave handler */\n\tonMouseLeave?: (event: MouseEvent) => void;\n\t/** Called after the popover dialog has opened and rendered. There is no triggering event, so `event` is `undefined`. */\n\tonOpen?: (event: undefined, data: PopoverOpenData) => void;\n\t/**\n\t * Called when the popover requests to close. `data.trigger` says why. `event` is the triggering\n\t * click or key event, or `undefined` when there is none (`mouseLeave` timer, `newPopover`).\n\t */\n\tonRequestClose?: (\n\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\tdata: PopoverRequestCloseData\n\t) => void;\n\t/** Custom target element getter */\n\tonRequestTargetElement?: () => HTMLElement | null;\n\t/** Open trigger type */\n\topenOn?: 'click' | 'hover' | 'hybrid';\n\t/** Overlay for click-outside on iframes */\n\toverlay?: boolean | ((isOpen: boolean, overlayElement: HTMLElement) => void);\n\t/** Positioning strategy */\n\tposition?: PopoverPosition;\n\t/** Walkthrough step text */\n\tstepText?: string;\n\t/** Styles for the root element: the `div` that wraps the trigger. To style the dialog, use `styleDialog`. */\n\tstyle?: CSSProperties;\n\t/** Styles for the `.slds-popover` dialog element */\n\tstyleDialog?: CSSProperties;\n\t/** Styles for the `.slds-popover__footer` element */\n\tstyleFooter?: CSSProperties;\n\t/** @deprecated Use `className`, which lands on the same element. */\n\ttriggerClassName?: string | string[] | Record<string, boolean>;\n\t/** Popover variant */\n\tvariant?: PopoverVariant;\n\t/** Delay before closing on hover (ms) */\n\thoverCloseDelay?: number;\n\t/** @deprecated Use assistiveText.closeButton */\n\tcloseButtonAssistiveText?: string;\n}\n\n// Nubbin positions for export (legacy)\nexport const PopoverNubbinPositions = [\n\t'top left',\n\t'top',\n\t'top right',\n\t'bottom left',\n\t'bottom',\n\t'bottom right',\n];\n\nconst defaultAssistiveText: PopoverAssistiveText = {\n\tcloseButton: 'Close dialog',\n};\n\n/**\n * The Popover component is a non-modal dialog. It should be paired with a clickable\n * trigger such as a Button. It traps focus from the page and must be exited if focus\n * needs to be outside the Popover.\n */\nconst Popover = forwardRef<HTMLDivElement, PopoverProps>(\n\t(\n\t\t{\n\t\t\talign = 'right',\n\t\t\tassistiveText: propAssistiveText,\n\t\t\tariaLabelledby,\n\t\t\tchildren,\n\t\t\tbody,\n\t\t\tclassNameBody,\n\t\t\tclassNameFooter,\n\t\t\tfooterClassName,\n\t\t\tclassName,\n\t\t\tclassNameDialog,\n\t\t\tcontentsClassName,\n\t\t\tdisabled = false,\n\t\t\tfooter,\n\t\t\tfooterStyle,\n\t\t\tfooterWalkthroughActions,\n\t\t\thasNoCloseButton = false,\n\t\t\thasNoNubbin = false,\n\t\t\thasStaticAlignment = false,\n\t\t\thasNoTriggerStyles = false,\n\t\t\theading,\n\t\t\ticon,\n\t\t\tid: propId,\n\t\t\tisOpen: controlledIsOpen,\n\t\t\toffset,\n\t\t\tonClick,\n\t\t\tonClose,\n\t\t\tonFocus,\n\t\t\tonKeyDown,\n\t\t\tonMouseDown,\n\t\t\tonMouseEnter,\n\t\t\tonMouseLeave,\n\t\t\tonOpen,\n\t\t\tonRequestClose,\n\t\t\tonRequestTargetElement,\n\t\t\topenOn = 'click',\n\t\t\toverlay: overlayProp,\n\t\t\tposition = 'absolute',\n\t\t\tstepText,\n\t\t\tstyle,\n\t\t\tstyleDialog,\n\t\t\tstyleFooter,\n\t\t\ttriggerClassName,\n\t\t\tvariant = 'base',\n\t\t\thoverCloseDelay = 300,\n\t\t\tcloseButtonAssistiveText,\n\t\t},\n\t\tref\n\t) => {\n\t\t// `check-props.js` is not wired up (its trigger and heading checks predate v11), so the\n\t\t// renamed props are checked here.\n\t\tuseEffect(() => {\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tconst createDocUrl = getComponentDocFn(componentDoc);\n\t\t\t\tconst renamedProps: [string, unknown, string][] = [\n\t\t\t\t\t['contentsClassName', contentsClassName, 'classNameDialog'],\n\t\t\t\t\t['footerClassName', footerClassName, 'classNameFooter'],\n\t\t\t\t\t['footerStyle', footerStyle, 'styleFooter'],\n\t\t\t\t\t['triggerClassName', triggerClassName, 'className'],\n\t\t\t\t];\n\t\t\t\trenamedProps.forEach(([oldProp, value, newProp]) => {\n\t\t\t\t\tdeprecatedProperty(\n\t\t\t\t\t\tPOPOVER,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\toldProp,\n\t\t\t\t\t\tnewProp,\n\t\t\t\t\t\tcreateDocUrl(newProp)\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t}\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t}, []); // Only run on mount\n\n\t\tconst generatedId = useId();\n\t\tconst id = propId || generatedId;\n\t\tconst context = useContext(IconSettingsContext);\n\n\t\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\t\tconst finalCloseButtonAssistiveText =\n\t\t\tcloseButtonAssistiveText || assistiveText.closeButton;\n\n\t\t// State\n\t\tconst [internalIsOpen, setInternalIsOpen] = useState(false);\n\t\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t\t// Refs\n\t\tconst triggerRef = useRef<HTMLDivElement>(null);\n\t\tconst dialogRef = useRef<HTMLElement>(null);\n\t\tconst isHoverRef = useRef(false);\n\t\tconst isClosingRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\t\tconst overlayRef = useRef<HTMLSpanElement | null>(null);\n\t\tconst isUnmountingRef = useRef(false);\n\n\t\t// Derived state\n\t\tconst isOpen =\n\t\t\t!disabled &&\n\t\t\t(controlledIsOpen !== undefined ? controlledIsOpen : internalIsOpen);\n\n\t\t// Get target element for positioning\n\t\tconst getTargetElement = useCallback(() => {\n\t\t\tif (onRequestTargetElement) {\n\t\t\t\tconst target = onRequestTargetElement();\n\t\t\t\tif (target) return target;\n\t\t\t}\n\t\t\treturn triggerRef.current;\n\t\t}, [onRequestTargetElement]);\n\n\t\t// Handle dialog close (when unmounted)\n\t\tconst handleDialogClose = useCallback(\n\t\t\t(\n\t\t\t\t_event?: React.SyntheticEvent,\n\t\t\t\tdata?: { componentWillUnmount?: boolean }\n\t\t\t) => {\n\t\t\t\tconst componentWillUnmount = data?.componentWillUnmount || false;\n\n\t\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\t\tcurrentOpenPopover = null;\n\t\t\t\t}\n\n\t\t\t\tif (onClose) {\n\t\t\t\t\tonClose(undefined, { componentWillUnmount });\n\t\t\t\t}\n\t\t\t},\n\t\t\t[id, onClose]\n\t\t);\n\n\t\t// Handle dialog open (after it has rendered)\n\t\tconst handleDialogOpen = useCallback(\n\t\t\t(_event?: unknown, data?: { portal?: HTMLElement }) => {\n\t\t\t\tif (onOpen) {\n\t\t\t\t\tonOpen(undefined, { portal: data?.portal });\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onOpen]\n\t\t);\n\n\t\t// Handle close\n\t\tconst handleClose = useCallback(\n\t\t\t(\n\t\t\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\t\t\tdata: PopoverRequestCloseData\n\t\t\t) => {\n\t\t\t\tif (isOpen) {\n\t\t\t\t\tif (onRequestClose) {\n\t\t\t\t\t\tonRequestClose(event, data);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\t\t\tcurrentOpenPopover = null;\n\t\t\t\t\t}\n\n\t\t\t\t\tsetInternalIsOpen(false);\n\t\t\t\t\tisHoverRef.current = false;\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, id, onRequestClose]\n\t\t);\n\n\t\t// Latest `handleClose`, so the \"close the other open popover\" path does not call a stale\n\t\t// closure from when this popover opened (whose `isOpen` was still `false`).\n\t\tconst handleCloseRef = useRef(handleClose);\n\t\tuseEffect(() => {\n\t\t\thandleCloseRef.current = handleClose;\n\t\t}, [handleClose]);\n\n\t\t// Handle open\n\t\tconst handleOpen = useCallback(() => {\n\t\t\tif (!isOpen) {\n\t\t\t\t// Close any other open popover\n\t\t\t\tif (currentOpenPopover && currentOpenPopover.getId() !== id) {\n\t\t\t\t\tcurrentOpenPopover.handleClose(undefined, {\n\t\t\t\t\t\ttrigger: 'newPopover',\n\t\t\t\t\t\tid: currentOpenPopover.getId(),\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tcurrentOpenPopover = {\n\t\t\t\t\thandleClose: (event, data) => handleCloseRef.current(event, data),\n\t\t\t\t\tgetId: () => id,\n\t\t\t\t};\n\n\t\t\t\tsetInternalIsOpen(true);\n\t\t\t}\n\t\t}, [isOpen, id]);\n\n\t\t// Handle cancel (close button or escape)\n\t\tconst handleCancel = useCallback(\n\t\t\t(event: MouseEvent | KeyboardEvent) => {\n\t\t\t\thandleClose(event, { trigger: 'cancel' });\n\t\t\t},\n\t\t\t[handleClose]\n\t\t);\n\n\t\t// Handle click outside\n\t\tconst handleClickOutside = useCallback(\n\t\t\t(event: MouseEvent) => {\n\t\t\t\thandleClose(event, { trigger: 'clickOutside' });\n\t\t\t},\n\t\t\t[handleClose]\n\t\t);\n\n\t\t// Handle mouse enter\n\t\tconst handleMouseEnter = useCallback(\n\t\t\t(event: MouseEvent) => {\n\t\t\t\tisHoverRef.current = true;\n\n\t\t\t\tif (!isOpen && openOn === 'hover') {\n\t\t\t\t\thandleOpen();\n\t\t\t\t} else {\n\t\t\t\t\tif (isClosingRef.current) {\n\t\t\t\t\t\tclearTimeout(isClosingRef.current);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (onMouseEnter) {\n\t\t\t\t\tonMouseEnter(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, openOn, handleOpen, onMouseEnter]\n\t\t);\n\n\t\t// Handle mouse leave\n\t\tconst handleMouseLeave = useCallback(\n\t\t\t(event: MouseEvent) => {\n\t\t\t\tif (isOpen) {\n\t\t\t\t\tisClosingRef.current = setTimeout(() => {\n\t\t\t\t\t\thandleClose(undefined, { trigger: 'mouseLeave' });\n\t\t\t\t\t}, hoverCloseDelay);\n\t\t\t\t}\n\n\t\t\t\tif (onMouseLeave) {\n\t\t\t\t\tonMouseLeave(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, hoverCloseDelay, handleClose, onMouseLeave]\n\t\t);\n\n\t\t// Handle click\n\t\tconst handleClick = useCallback(\n\t\t\t(event: MouseEvent, triggerOnClickCallback?: (e: MouseEvent) => void) => {\n\t\t\t\tif (!isOpen) {\n\t\t\t\t\thandleOpen();\n\t\t\t\t} else {\n\t\t\t\t\thandleClose(event, { trigger: 'triggerClick' });\n\t\t\t\t}\n\n\t\t\t\tif (onClick) {\n\t\t\t\t\tonClick(event);\n\t\t\t\t}\n\n\t\t\t\tif (triggerOnClickCallback) {\n\t\t\t\t\ttriggerOnClickCallback(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, handleOpen, handleClose, onClick]\n\t\t);\n\n\t\t// Handle focus\n\t\tconst handleFocus = useCallback(\n\t\t\t(event: FocusEvent) => {\n\t\t\t\tif (!isOpen) {\n\t\t\t\t\thandleOpen();\n\t\t\t\t}\n\n\t\t\t\tif (onFocus) {\n\t\t\t\t\tonFocus(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, handleOpen, onFocus]\n\t\t);\n\n\t\t// Toggle from keyboard\n\t\tconst toggleOpenFromKeyboard = useCallback(\n\t\t\t(event: KeyboardEvent) => {\n\t\t\t\tif (isOpen) {\n\t\t\t\t\thandleCancel(event);\n\t\t\t\t} else {\n\t\t\t\t\thandleOpen();\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, handleCancel, handleOpen]\n\t\t);\n\n\t\t// Handle key down\n\t\tconst handleKeyDown = useCallback(\n\t\t\t(event: KeyboardEvent) => {\n\t\t\t\tif (event.keyCode) {\n\t\t\t\t\tif (event.keyCode !== KEYS.TAB) {\n\t\t\t\t\t\tkeyboardNavigableDialog({\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\tisOpen,\n\t\t\t\t\t\t\thandleClick: (e: MouseEvent) => handleClick(e),\n\t\t\t\t\t\t\tkeyCode: event.keyCode,\n\t\t\t\t\t\t\teventTarget: event.target,\n\t\t\t\t\t\t\t// keyboardNavigableDialog calls `toggleOpen()` without the event; pass it through\n\t\t\t\t\t\t\ttoggleOpen: () => toggleOpenFromKeyboard(event),\n\t\t\t\t\t\t\ttrigger: triggerRef.current,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tif (onKeyDown) {\n\t\t\t\t\t\tonKeyDown(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, handleClick, toggleOpenFromKeyboard, onKeyDown]\n\t\t);\n\n\t\t// Render overlay for click-outside detection\n\t\tconst renderOverlay = useCallback(\n\t\t\t(shouldShow: boolean) => {\n\t\t\t\tif (typeof overlayProp === 'function' && documentDefined) {\n\t\t\t\t\toverlayProp(shouldShow, overlay);\n\t\t\t\t} else if (\n\t\t\t\t\toverlayProp &&\n\t\t\t\t\tshouldShow &&\n\t\t\t\t\t!overlayRef.current &&\n\t\t\t\t\tdocumentDefined\n\t\t\t\t) {\n\t\t\t\t\toverlayRef.current = overlay;\n\t\t\t\t\tdocument.querySelector('body')?.appendChild(overlay);\n\t\t\t\t} else if (!shouldShow && overlayRef.current?.parentNode) {\n\t\t\t\t\toverlayRef.current.parentNode.removeChild(overlayRef.current);\n\t\t\t\t\toverlayRef.current = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\t[overlayProp]\n\t\t);\n\n\t\t// Container ref callback\n\t\tconst setContainerRef = useCallback(\n\t\t\t(component: HTMLDivElement | null) => {\n\t\t\t\t(triggerRef as React.MutableRefObject<HTMLDivElement | null>).current =\n\t\t\t\t\tcomponent;\n\t\t\t\tif (typeof ref === 'function') {\n\t\t\t\t\tref(component);\n\t\t\t\t} else if (ref) {\n\t\t\t\t\tref.current = component;\n\t\t\t\t}\n\t\t\t\tif (component && !inputRendered) {\n\t\t\t\t\tsetInputRendered(true);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[inputRendered, ref]\n\t\t);\n\n\t\t// Dialog ref callback\n\t\tconst setMenuRef = useCallback((component: HTMLElement | null) => {\n\t\t\t(dialogRef as React.MutableRefObject<HTMLElement | null>).current =\n\t\t\t\tcomponent;\n\t\t}, []);\n\n\t\t// Cleanup on unmount\n\t\tuseEffect(() => {\n\t\t\treturn () => {\n\t\t\t\tisUnmountingRef.current = true;\n\t\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\t\tcurrentOpenPopover = null;\n\t\t\t\t}\n\t\t\t\trenderOverlay(false);\n\t\t\t};\n\t\t}, [id, renderOverlay]);\n\n\t\t// Update overlay when isOpen changes\n\t\tuseEffect(() => {\n\t\t\trenderOverlay(isOpen);\n\t\t}, [isOpen, renderOverlay]);\n\n\t\t// Render header\n\t\tconst renderHeader = () => {\n\t\t\tconst hasThemedHeader = variant === 'error' || variant === 'warning';\n\t\t\tconst hasDefinedHeader = heading || hasThemedHeader;\n\n\t\t\tif (\n\t\t\t\t!hasDefinedHeader ||\n\t\t\t\tvariant === 'walkthrough-action' ||\n\t\t\t\tvariant === 'feature'\n\t\t\t) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst headerIcon = {\n\t\t\t\terror: <Icon category=\"utility\" name=\"error\" size=\"x-small\" inverse />,\n\t\t\t\twarning: (\n\t\t\t\t\t<Icon category=\"utility\" name=\"warning\" size=\"x-small\" inverse />\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tif (hasThemedHeader) {\n\t\t\t\treturn (\n\t\t\t\t\t<header className=\"slds-popover__header\">\n\t\t\t\t\t\t<MediaObject\n\t\t\t\t\t\t\tbody={\n\t\t\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\t\t\t\t\tclassName=\"slds-truncate slds-text-heading_medium\"\n\t\t\t\t\t\t\t\t\ttitle={typeof heading === 'string' ? heading : undefined}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfigure={headerIcon[variant as 'error' | 'warning']}\n\t\t\t\t\t\t\tverticalCenter\n\t\t\t\t\t\t/>\n\t\t\t\t\t</header>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<header\n\t\t\t\t\tclassName={classNames('slds-popover__header', {\n\t\t\t\t\t\t'slds-p-vertical_medium': variant === 'walkthrough',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<h2\n\t\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t\t'slds-text-heading_small': variant !== 'walkthrough',\n\t\t\t\t\t\t\t'slds-text-heading_medium': variant === 'walkthrough',\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{heading}\n\t\t\t\t\t</h2>\n\t\t\t\t</header>\n\t\t\t);\n\t\t};\n\n\t\t// Render body\n\t\tconst renderBody = () => {\n\t\t\tif (variant === 'error' || variant === 'warning') {\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-popover__body',\n\t\t\t\t\t\t\tclassNameBody as string\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{body}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (variant === 'walkthrough-action' || variant === 'feature') {\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-popover__body',\n\t\t\t\t\t\t\tclassNameBody as string\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"slds-media\">\n\t\t\t\t\t\t\t<div className=\"slds-media__figure\">\n\t\t\t\t\t\t\t\t{variant === 'walkthrough-action' ? (\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\tname=\"touch_action\"\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\tinverse\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\ticon\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"slds-media__body\">\n\t\t\t\t\t\t\t\t{heading && (\n\t\t\t\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\t\t\t\t\t\tclassName=\"slds-text-heading_small\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{body}\n\t\t\t\t\t\t\t\t{stepText && (\n\t\t\t\t\t\t\t\t\t<p className=\"slds-m-top_medium slds-text-title\">\n\t\t\t\t\t\t\t\t\t\t{stepText}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\t\tclassName={classNames('slds-popover__body', classNameBody as string)}\n\t\t\t\t>\n\t\t\t\t\t{body}\n\t\t\t\t</div>\n\t\t\t);\n\t\t};\n\n\t\t// Render footer\n\t\tconst renderFooter = () => {\n\t\t\tconst footerClassNames = classNames(\n\t\t\t\t'slds-popover__footer',\n\t\t\t\tfooterClassName,\n\t\t\t\tclassNameFooter\n\t\t\t);\n\t\t\tconst footerStyles =\n\t\t\t\tfooterStyle || styleFooter\n\t\t\t\t\t? { ...footerStyle, ...styleFooter }\n\t\t\t\t\t: undefined;\n\n\t\t\tif (footer) {\n\t\t\t\treturn (\n\t\t\t\t\t<footer className={footerClassNames} style={footerStyles}>\n\t\t\t\t\t\t{footer}\n\t\t\t\t\t</footer>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tvariant !== 'walkthrough-action' &&\n\t\t\t\t(footerWalkthroughActions || stepText)\n\t\t\t) {\n\t\t\t\treturn (\n\t\t\t\t\t<footer className={footerClassNames} style={footerStyles}>\n\t\t\t\t\t\t<div className=\"slds-grid slds-grid_vertical-align-center\">\n\t\t\t\t\t\t\t{stepText && <span className=\"slds-text-title\">{stepText}</span>}\n\t\t\t\t\t\t\t{footerWalkthroughActions && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName=\"slds-col_bump-left\"\n\t\t\t\t\t\t\t\t\tstyle={{ display: 'inline-block' }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{footerWalkthroughActions}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</footer>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn null;\n\t\t};\n\n\t\t// Render dialog\n\t\tconst renderDialog = () => {\n\t\t\tif (!isOpen) return null;\n\n\t\t\tconst outsideClickIgnoreClass = `ignore-click-${id}`;\n\n\t\t\treturn (\n\t\t\t\t<Dialog\n\t\t\t\t\thasNubbin={!hasNoNubbin}\n\t\t\t\t\talign={align}\n\t\t\t\t\tcontentsClassName={classNames(\n\t\t\t\t\t\tcontentsClassName,\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t'slds-popover',\n\t\t\t\t\t\t{ 'slds-popover_error': variant === 'error' },\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-popover_walkthrough':\n\t\t\t\t\t\t\t\tvariant === 'walkthrough' ||\n\t\t\t\t\t\t\t\tvariant === 'walkthrough-action' ||\n\t\t\t\t\t\t\t\tvariant === 'feature',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-popover_walkthrough-alt': variant === 'walkthrough-action',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ 'slds-popover_feature': variant === 'feature' },\n\t\t\t\t\t\t{ 'slds-popover_warning': variant === 'warning' },\n\t\t\t\t\t\tclassNameDialog\n\t\t\t\t\t)}\n\t\t\t\t\tcontext={context}\n\t\t\t\t\thasStaticAlignment={hasStaticAlignment}\n\t\t\t\t\toffset={offset}\n\t\t\t\t\tonClose={handleDialogClose}\n\t\t\t\t\tonOpen={handleDialogOpen}\n\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\tonMouseEnter={openOn === 'hover' ? handleMouseEnter : undefined}\n\t\t\t\t\tonMouseLeave={openOn === 'hover' ? handleMouseLeave : undefined}\n\t\t\t\t\toutsideClickIgnoreClass={outsideClickIgnoreClass}\n\t\t\t\t\tonRequestTargetElement={getTargetElement}\n\t\t\t\t\tposition={position}\n\t\t\t\t\tstyle={styleDialog}\n\t\t\t\t\tvariant=\"popover\"\n\t\t\t\t\tref={setMenuRef}\n\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\tid: `${id}-popover`,\n\t\t\t\t\t\t'aria-labelledby': ariaLabelledby || `${id}-dialog-heading`,\n\t\t\t\t\t\t'aria-describedby': `${id}-dialog-body`,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{!hasNoCloseButton && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tassistiveText={{ icon: finalCloseButtonAssistiveText }}\n\t\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\t\ticonName=\"close\"\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t'slds-button slds-button_icon-small slds-float_right slds-popover__close slds-button_icon',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'slds-button_icon-inverse':\n\t\t\t\t\t\t\t\t\t\tvariant === 'walkthrough' ||\n\t\t\t\t\t\t\t\t\t\tvariant === 'walkthrough-action' ||\n\t\t\t\t\t\t\t\t\t\tvariant === 'feature',\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tonClick={handleCancel}\n\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t\tinverse={variant === 'error' || variant === 'warning'}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{renderHeader()}\n\t\t\t\t\t{renderBody()}\n\t\t\t\t\t{renderFooter()}\n\t\t\t\t</Dialog>\n\t\t\t);\n\t\t};\n\n\t\t// Clone trigger element\n\t\tconst otherChildren: ReactNode[] = [];\n\t\tlet clonedTrigger: ReactNode = null;\n\n\t\tReact.Children.forEach(children, (child, index) => {\n\t\t\tif (index === 0 && React.isValidElement(child)) {\n\t\t\t\tconst childProps = child.props as Record<string, unknown>;\n\t\t\t\tconst triggerProps: Record<string, unknown> = {\n\t\t\t\t\t'aria-haspopup': 'dialog',\n\t\t\t\t\tid,\n\t\t\t\t\tonClick:\n\t\t\t\t\t\topenOn === 'click' || openOn === 'hybrid'\n\t\t\t\t\t\t\t? (event: MouseEvent) => {\n\t\t\t\t\t\t\t\t\thandleClick(\n\t\t\t\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t\t\t\tchildProps.onClick as (e: MouseEvent) => void\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: childProps.onClick,\n\t\t\t\t\tonFocus: openOn === 'hover' ? handleFocus : undefined,\n\t\t\t\t\tonMouseDown,\n\t\t\t\t\tonMouseEnter:\n\t\t\t\t\t\topenOn === 'hover' || openOn === 'hybrid'\n\t\t\t\t\t\t\t? handleMouseEnter\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\tonMouseLeave:\n\t\t\t\t\t\topenOn === 'hover' || openOn === 'hybrid'\n\t\t\t\t\t\t\t? handleMouseLeave\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\ttabIndex: (childProps.tabIndex as number) || 0,\n\t\t\t\t};\n\t\t\t\tclonedTrigger = React.cloneElement(child, triggerProps);\n\t\t\t} else if (child) {\n\t\t\t\totherChildren.push(child);\n\t\t\t}\n\t\t});\n\n\t\tconst containerStyles: CSSProperties = {\n\t\t\tdisplay: hasNoTriggerStyles ? undefined : 'inline-block',\n\t\t\t...style,\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(triggerClassName, className) || undefined}\n\t\t\t\tstyle={containerStyles}\n\t\t\t\tref={setContainerRef}\n\t\t\t>\n\t\t\t\t{clonedTrigger}\n\t\t\t\t{otherChildren.length > 0 ? otherChildren : null}\n\t\t\t\t{renderDialog()}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nPopover.displayName = POPOVER;\n\nexport default Popover;\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,IAAM,IAAkB,OAAO,WAAa,KAGtC,IAAU,IACb,SAAS,cAAc,MAAM,IAC5B,EAAE,OAAO,CAAC,EAAE;AACZ,MACH,EAAQ,MAAM,MAAM,KACpB,EAAQ,MAAM,OAAO,KACrB,EAAQ,MAAM,QAAQ,QACtB,EAAQ,MAAM,SAAS,QACvB,EAAQ,MAAM,WAAW;AAI1B,IAAI,IAMO,MA0LE,KAAyB;CACrC;CACA;CACA;CACA;CACA;CACA;AACD,GAEM,KAA6C,EAClD,aAAa,eACd,GAOM,IAAU,GAEd,EACC,WAAQ,SACR,eAAe,IACf,mBACA,cACA,SACA,kBACA,qBACA,oBACA,eACA,qBACA,uBACA,eAAW,IACX,WACA,gBACA,6BACA,uBAAmB,IACnB,kBAAc,IACd,yBAAqB,IACrB,yBAAqB,IACrB,YACA,UACA,IAAI,IACJ,QAAQ,IACR,YACA,YACA,YACA,YACA,c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A,KAAA;IACJ,UAAW,EAAW,YAAuB;GAC9C;GACA,KAAgB,EAAM,aAAa,GAAO,CAAY;EACvD,OAAO,AAAI,KACV,EAAc,KAAK,CAAK;CAE1B,CAAC;CAED,IAAM,KAAiC;EACtC,SAAS,KAAqB,KAAA,IAAY;EAC1C,GAAG;CACJ;CAEA,OACC,kBAAC,OAAD;EACC,WAAW,EAAW,GAAkB,EAAS,KAAK,KAAA;EACtD,OAAO;EACP,KAAK;EAHN,UAAA;GAKE;GACA,EAAc,SAAS,IAAI,IAAgB;GAC3C,GAAa;EACV;;AAEP,CACD;AAEA,EAAQ,cAAc"}
@@ -5,7 +5,7 @@ import n from "../../utilities/warning/only-one-of-properties.js";
5
5
  var r = function() {};
6
6
  process.env.NODE_ENV !== "production" && (r = function(r, i, a) {
7
7
  let o = e(a);
8
- t(r, i.errorText, "errorText", "labels.error` and `hasError", o("labels")), t(r, i.label, "label", "labels.label", o("labels")), n(r, {
8
+ t(r, i.classNameContainer, "classNameContainer", "className", o("className")), t(r, i.errorText, "errorText", "labels.error` and `hasError", o("labels")), t(r, i.label, "label", "labels.label", o("labels")), n(r, {
9
9
  "labels.label": i.labels?.label ?? i.label,
10
10
  "assistiveText.label": i.assistiveText?.label
11
11
  }, o());
@@ -1 +1 @@
1
- {"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/slider/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport onlyOneOfProperties from '../../utilities/warning/only-one-of-properties';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.errorText,\n\t\t\t'errorText',\n\t\t\t'labels.error` and `hasError',\n\t\t\tcreateDocUrl('labels')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.label,\n\t\t\t'label',\n\t\t\t'labels.label',\n\t\t\tcreateDocUrl('labels')\n\t\t);\n\t\tonlyOneOfProperties(\n\t\t\tCOMPONENT,\n\t\t\t{\n\t\t\t\t'labels.label': props.labels?.label ?? props.label,\n\t\t\t\t'assistiveText.label': props.assistiveText?.label,\n\t\t\t},\n\t\t\tcreateDocUrl()\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;;AAQA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO,GAAS;CACnE,IAAM,IAAe,EAAkB,CAAO;CAgB9C,AAdA,EACC,GACA,EAAM,WACN,aACA,+BACA,EAAa,QAAQ,CACtB,GACA,EACC,GACA,EAAM,OACN,SACA,gBACA,EAAa,QAAQ,CACtB,GACA,EACC,GACA;EACC,gBAAgB,EAAM,QAAQ,SAAS,EAAM;EAC7C,uBAAuB,EAAM,eAAe;CAC7C,GACA,EAAa,CACd;AACD;AAGD,IAAA,IAAe"}
1
+ {"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/slider/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport onlyOneOfProperties from '../../utilities/warning/only-one-of-properties';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.classNameContainer,\n\t\t\t'classNameContainer',\n\t\t\t'className',\n\t\t\tcreateDocUrl('className')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.errorText,\n\t\t\t'errorText',\n\t\t\t'labels.error` and `hasError',\n\t\t\tcreateDocUrl('labels')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.label,\n\t\t\t'label',\n\t\t\t'labels.label',\n\t\t\tcreateDocUrl('labels')\n\t\t);\n\t\tonlyOneOfProperties(\n\t\t\tCOMPONENT,\n\t\t\t{\n\t\t\t\t'labels.label': props.labels?.label ?? props.label,\n\t\t\t\t'assistiveText.label': props.assistiveText?.label,\n\t\t\t},\n\t\t\tcreateDocUrl()\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;;AAQA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO,GAAS;CACnE,IAAM,IAAe,EAAkB,CAAO;CAuB9C,AArBA,EACC,GACA,EAAM,oBACN,sBACA,aACA,EAAa,WAAW,CACzB,GACA,EACC,GACA,EAAM,WACN,aACA,+BACA,EAAa,QAAQ,CACtB,GACA,EACC,GACA,EAAM,OACN,SACA,gBACA,EAAa,QAAQ,CACtB,GACA,EACC,GACA;EACC,gBAAgB,EAAM,QAAQ,SAAS,EAAM;EAC7C,uBAAuB,EAAM,eAAe;CAC7C,GACA,EAAa,CACd;AACD;AAGD,IAAA,IAAe"}
@@ -2,99 +2,102 @@ import { SLIDER as e } from "../../utilities/constants.js";
2
2
  import t from "../../utilities/get-aria-props.js";
3
3
  import n from "./check-props.js";
4
4
  import r from "./component.js";
5
- import { useCallback as i, useEffect as a, useId as o } from "react";
6
- import s from "classnames";
7
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
+ import { forwardRef as i, useCallback as a, useEffect as o, useId as s } from "react";
6
+ import c from "classnames";
7
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
8
  //#region components/slider/index.tsx
9
- var u = { disabled: "Disabled" }, d = ({ "aria-describedby": d, assistiveText: f, classNameContainer: p, defaultValue: m, disabled: h, errorText: g, hasError: _, id: v, label: y, labels: b, max: x = 100, min: S = 0, name: C, onChange: w, onInput: T, size: E, step: D = 1, value: O, vertical: k, ...A }) => {
10
- let j = o(), M = o(), N = v || j, P = _ ?? !!g, F = P ? b?.error ?? g : void 0, I = d || (F ? M : void 0), L = {
11
- ...u,
9
+ var d = { disabled: "Disabled" }, f = i(({ "aria-describedby": i, assistiveText: f, className: p, classNameContainer: m, defaultValue: h, disabled: g, errorText: _, hasError: v, id: y, label: b, labels: x, max: S = 100, min: C = 0, name: w, onChange: T, onInput: E, size: D, step: O = 1, value: k, vertical: A, ...j }, M) => {
10
+ let N = s(), P = s(), F = y || N, I = v ?? !!_, L = I ? x?.error ?? _ : void 0, R = i || (L ? P : void 0), z = {
11
+ ...d,
12
12
  ...f
13
- }, R = b?.label ?? y, z = R || L.label;
14
- a(() => {
13
+ }, B = x?.label ?? b, V = B || z.label;
14
+ o(() => {
15
15
  n(e, {
16
16
  assistiveText: f,
17
- errorText: g,
18
- label: y,
19
- labels: b
17
+ classNameContainer: m,
18
+ errorText: _,
19
+ label: b,
20
+ labels: x
20
21
  }, r);
21
22
  }, [
22
23
  f,
23
- g,
24
- y,
25
- b
24
+ m,
25
+ _,
26
+ b,
27
+ x
26
28
  ]);
27
- let B = t(A);
28
- I && (B["aria-describedby"] = I);
29
- let V = i((e) => {
30
- w?.(e, { value: Number(e.target.value) });
31
- }, [w]), H = i((e) => {
29
+ let H = t(j);
30
+ R && (H["aria-describedby"] = R);
31
+ let U = a((e) => {
32
32
  T?.(e, { value: Number(e.target.value) });
33
- }, [T]), U = O ?? m ?? 0;
34
- return /* @__PURE__ */ l("div", {
35
- className: s("slds-form-element", { "slds-has-error": P }, p),
36
- children: [/* @__PURE__ */ c("label", {
37
- className: s("slds-form-element__label", { "slds-assistive-text": L.label && !R }),
38
- htmlFor: N,
39
- children: /* @__PURE__ */ l("span", {
33
+ }, [T]), W = a((e) => {
34
+ E?.(e, { value: Number(e.target.value) });
35
+ }, [E]), G = k ?? h ?? 0;
36
+ return /* @__PURE__ */ u("div", {
37
+ className: c("slds-form-element", { "slds-has-error": I }, m, p),
38
+ ref: M,
39
+ children: [/* @__PURE__ */ l("label", {
40
+ className: c("slds-form-element__label", { "slds-assistive-text": z.label && !B }),
41
+ htmlFor: F,
42
+ children: /* @__PURE__ */ u("span", {
40
43
  className: "slds-slider-label",
41
44
  children: [
42
- z && /* @__PURE__ */ c("span", {
45
+ V && /* @__PURE__ */ l("span", {
43
46
  className: "slds-slider-label__label",
44
- children: z
47
+ children: V
45
48
  }),
46
- /* @__PURE__ */ l("span", {
49
+ /* @__PURE__ */ u("span", {
47
50
  className: "slds-slider-label__range",
48
51
  children: [
49
- S,
52
+ C,
50
53
  " - ",
51
- x
54
+ S
52
55
  ]
53
56
  }),
54
- h && /* @__PURE__ */ l("span", {
57
+ g && /* @__PURE__ */ u("span", {
55
58
  className: "slds-assistive-text",
56
- children: [" ", L.disabled]
59
+ children: [" ", z.disabled]
57
60
  })
58
61
  ]
59
62
  })
60
- }), /* @__PURE__ */ l("div", {
63
+ }), /* @__PURE__ */ u("div", {
61
64
  className: "slds-form-element__control",
62
- children: [/* @__PURE__ */ l("div", {
63
- className: s("slds-slider", {
64
- "slds-slider_vertical": k,
65
- "slds-size_x-small": E === "x-small",
66
- "slds-size_small": E === "small",
67
- "slds-size_medium": E === "medium",
68
- "slds-size_large": E === "large"
65
+ children: [/* @__PURE__ */ u("div", {
66
+ className: c("slds-slider", {
67
+ "slds-slider_vertical": A,
68
+ "slds-size_x-small": D === "x-small",
69
+ "slds-size_small": D === "small",
70
+ "slds-size_medium": D === "medium",
71
+ "slds-size_large": D === "large"
69
72
  }),
70
- children: [/* @__PURE__ */ c("input", {
73
+ children: [/* @__PURE__ */ l("input", {
71
74
  type: "range",
72
- id: N,
73
- name: C,
75
+ id: F,
76
+ name: w,
74
77
  className: "slds-slider__range",
75
- min: S,
76
- max: x,
77
- step: D,
78
- disabled: h,
79
- onChange: V,
80
- onInput: H,
81
- ...B,
82
- ...O === void 0 ? { defaultValue: m } : { value: O }
83
- }), /* @__PURE__ */ c("span", {
78
+ min: C,
79
+ max: S,
80
+ step: O,
81
+ disabled: g,
82
+ onChange: U,
83
+ onInput: W,
84
+ ...H,
85
+ ...k === void 0 ? { defaultValue: h } : { value: k }
86
+ }), /* @__PURE__ */ l("span", {
84
87
  className: "slds-slider__value",
85
88
  "aria-hidden": "true",
86
- children: U
89
+ children: G
87
90
  })]
88
- }), F && /* @__PURE__ */ c("div", {
89
- id: I,
91
+ }), L && /* @__PURE__ */ l("div", {
92
+ id: R,
90
93
  className: "slds-form-element__help",
91
- children: F
94
+ children: L
92
95
  })]
93
96
  })]
94
97
  });
95
- };
96
- d.displayName = e;
98
+ });
99
+ f.displayName = e;
97
100
  //#endregion
98
- export { d as default };
101
+ export { f as default };
99
102
 
100
103
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../components/slider/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseId,\n\tuseCallback,\n\tuseEffect,\n\ttype ChangeEvent,\n\ttype FormEvent,\n\ttype ReactNode,\n} from 'react';\nimport classNames from 'classnames';\nimport { SLIDER } from '../../utilities/constants';\nimport getAriaProps from '../../utilities/get-aria-props';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n/**\n * Slider size options\n */\nexport type SliderSize = 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Assistive text for Slider\n */\nexport interface SliderAssistiveText {\n\t/** Text for disabled state */\n\tdisabled?: string;\n\t/** Visually hidden label */\n\tlabel?: string;\n}\n\n/**\n * Labels for Slider\n */\nexport interface SliderLabels {\n\t/** Error message shown below the slider while `hasError` is true */\n\terror?: ReactNode;\n\t/** Visible label */\n\tlabel?: ReactNode;\n}\n\n/**\n * Props for the Slider component\n */\nexport interface SliderProps {\n\t/** ARIA describedby attribute */\n\t'aria-describedby'?: string;\n\t/**\n\t * **Assistive text for accessibility**\n\t * * `disabled`: Read after the range while the slider is disabled\n\t * * `label`: Visually hidden label. Use instead of `labels.label`.\n\t */\n\tassistiveText?: SliderAssistiveText;\n\t/** CSS classes for the container */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** Initial value for uncontrolled usage */\n\tdefaultValue?: number;\n\t/** Whether the slider is disabled */\n\tdisabled?: boolean;\n\t/** @deprecated Use `labels.error` and `hasError` instead. */\n\terrorText?: string;\n\t/** Puts the slider in an error state and shows `labels.error` */\n\thasError?: boolean;\n\t/** HTML id attribute */\n\tid?: string;\n\t/** @deprecated Use `labels.label` instead. */\n\tlabel?: string;\n\t/**\n\t * **Text labels for internationalization**\n\t * * `error`: Error message shown below the slider while `hasError` is true\n\t * * `label`: Visible label. Use `assistiveText.label` for a visually hidden label.\n\t */\n\tlabels?: SliderLabels;\n\t/** Maximum value (default: 100) */\n\tmax?: number;\n\t/** Minimum value (default: 0) */\n\tmin?: number;\n\t/** Form input name */\n\tname?: string;\n\t/** Called when value changes */\n\tonChange?: (\n\t\tevent: ChangeEvent<HTMLInputElement>,\n\t\tdata: { value: number }\n\t) => void;\n\t/** Called on input event */\n\tonInput?: (\n\t\tevent: FormEvent<HTMLInputElement>,\n\t\tdata: { value: number }\n\t) => void;\n\t/** Size of the slider */\n\tsize?: SliderSize;\n\t/** Step increment (default: 1) */\n\tstep?: number;\n\t/** Controlled value */\n\tvalue?: number;\n\t/** Display vertically */\n\tvertical?: boolean;\n}\n\nconst defaultAssistiveText: SliderAssistiveText = {\n\tdisabled: 'Disabled',\n};\n\n/**\n * The ability to style sliders with CSS varies across browsers.\n * Using this component ensures sliders look the same everywhere.\n */\nconst Slider = ({\n\t'aria-describedby': ariaDescribedBy,\n\tassistiveText: propAssistiveText,\n\tclassNameContainer,\n\tdefaultValue,\n\tdisabled,\n\terrorText,\n\thasError: hasErrorProp,\n\tid: propId,\n\tlabel: labelProp,\n\tlabels,\n\tmax = 100,\n\tmin = 0,\n\tname,\n\tonChange,\n\tonInput,\n\tsize,\n\tstep = 1,\n\tvalue,\n\tvertical,\n\t...rest\n}: SliderProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst generatedErrorId = useId();\n\n\tconst id = propId || generatedId;\n\t// `errorText` is deprecated: it sets both the error state and the message\n\tconst hasError = hasErrorProp ?? !!errorText;\n\tconst errorMessage = hasError ? (labels?.error ?? errorText) : undefined;\n\tconst errorId =\n\t\tariaDescribedBy || (errorMessage ? generatedErrorId : undefined);\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\t// `label` is deprecated\n\tconst label = labels?.label ?? labelProp;\n\tconst labelText = label || assistiveText.label;\n\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tSLIDER,\n\t\t\t{ assistiveText: propAssistiveText, errorText, label: labelProp, labels },\n\t\t\tcomponentDoc\n\t\t);\n\t}, [propAssistiveText, errorText, labelProp, labels]);\n\n\tconst ariaProps = getAriaProps(rest) as Record<string, unknown>;\n\tif (errorId) {\n\t\tariaProps['aria-describedby'] = errorId;\n\t}\n\n\tconst handleChange = useCallback(\n\t\t(event: ChangeEvent<HTMLInputElement>) => {\n\t\t\tonChange?.(event, { value: Number(event.target.value) });\n\t\t},\n\t\t[onChange]\n\t);\n\n\tconst handleInput = useCallback(\n\t\t(event: FormEvent<HTMLInputElement>) => {\n\t\t\tonInput?.(event, {\n\t\t\t\tvalue: Number((event.target as HTMLInputElement).value),\n\t\t\t});\n\t\t},\n\t\t[onInput]\n\t);\n\n\tconst displayValue = value ?? defaultValue ?? 0;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-form-element',\n\t\t\t\t{ 'slds-has-error': hasError },\n\t\t\t\tclassNameContainer as string\n\t\t\t)}\n\t\t>\n\t\t\t<label\n\t\t\t\tclassName={classNames('slds-form-element__label', {\n\t\t\t\t\t'slds-assistive-text': assistiveText.label && !label,\n\t\t\t\t})}\n\t\t\t\thtmlFor={id}\n\t\t\t>\n\t\t\t\t<span className=\"slds-slider-label\">\n\t\t\t\t\t{labelText && (\n\t\t\t\t\t\t<span className=\"slds-slider-label__label\">{labelText}</span>\n\t\t\t\t\t)}\n\t\t\t\t\t<span className=\"slds-slider-label__range\">\n\t\t\t\t\t\t{min} - {max}\n\t\t\t\t\t</span>\n\t\t\t\t\t{disabled && (\n\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t{assistiveText.disabled}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t</label>\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-slider', {\n\t\t\t\t\t\t'slds-slider_vertical': vertical,\n\t\t\t\t\t\t'slds-size_x-small': size === 'x-small',\n\t\t\t\t\t\t'slds-size_small': size === 'small',\n\t\t\t\t\t\t'slds-size_medium': size === 'medium',\n\t\t\t\t\t\t'slds-size_large': size === 'large',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype=\"range\"\n\t\t\t\t\t\tid={id}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tclassName=\"slds-slider__range\"\n\t\t\t\t\t\tmin={min}\n\t\t\t\t\t\tmax={max}\n\t\t\t\t\t\tstep={step}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\tonInput={handleInput}\n\t\t\t\t\t\t{...ariaProps}\n\t\t\t\t\t\t{...(value !== undefined ? { value } : { defaultValue })}\n\t\t\t\t\t/>\n\t\t\t\t\t<span className=\"slds-slider__value\" aria-hidden=\"true\">\n\t\t\t\t\t\t{displayValue}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t{errorMessage && (\n\t\t\t\t\t<div id={errorId} className=\"slds-form-element__help\">\n\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nSlider.displayName = SLIDER;\n\nexport default Slider;\n"],"mappings":";;;;;;;;AAoGA,IAAM,IAA4C,EACjD,UAAU,WACX,GAMM,KAAU,EACf,oBAAoB,GACpB,eAAe,GACf,uBACA,iBACA,aACA,cACA,UAAU,GACV,IAAI,GACJ,OAAO,GACP,WACA,SAAM,KACN,SAAM,GACN,SACA,aACA,YACA,SACA,UAAO,GACP,UACA,aACA,GAAG,QACmC;CACtC,IAAM,IAAc,EAAM,GACpB,IAAmB,EAAM,GAEzB,IAAK,KAAU,GAEf,IAAW,KAAgB,CAAC,CAAC,GAC7B,IAAe,IAAY,GAAQ,SAAS,IAAa,KAAA,GACzD,IACL,MAAoB,IAAe,IAAmB,KAAA,IACjD,IAAgB;EAAE,GAAG;EAAsB,GAAG;CAAkB,GAEhE,IAAQ,GAAQ,SAAS,GACzB,IAAY,KAAS,EAAc;CAEzC,QAAgB;EACf,EACC,GACA;GAAE,eAAe;GAAmB;GAAW,OAAO;GAAW;EAAO,GACxE,CACD;CACD,GAAG;EAAC;EAAmB;EAAW;EAAW;CAAM,CAAC;CAEpD,IAAM,IAAY,EAAa,CAAI;CACnC,AAAI,MACH,EAAU,sBAAsB;CAGjC,IAAM,IAAe,GACnB,MAAyC;EACzC,IAAW,GAAO,EAAE,OAAO,OAAO,EAAM,OAAO,KAAK,EAAE,CAAC;CACxD,GACA,CAAC,CAAQ,CACV,GAEM,IAAc,GAClB,MAAuC;EACvC,IAAU,GAAO,EAChB,OAAO,OAAQ,EAAM,OAA4B,KAAK,EACvD,CAAC;CACF,GACA,CAAC,CAAO,CACT,GAEM,IAAe,KAAS,KAAgB;CAE9C,OACC,kBAAC,OAAD;EACC,WAAW,EACV,qBACA,EAAE,kBAAkB,EAAS,GAC7B,CACD;EALD,UAAA,CAOC,kBAAC,SAAD;GACC,WAAW,EAAW,4BAA4B,EACjD,uBAAuB,EAAc,SAAS,CAAC,EAChD,CAAC;GACD,SAAS;GAET,UAAA,kBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA;KACE,KACA,kBAAC,QAAD;MAAM,WAAU;MAA4B,UAAA;KAAgB,CAAA;KAE7D,kBAAC,QAAD;MAAM,WAAU;MAAhB,UAAA;OACE;OAAI;OAAI;MACJ;;KACL,KACA,kBAAC,QAAD;MAAM,WAAU;MAAhB,UAAA,CACE,KACA,EAAc,QACV;;IAEF;;EACA,CAAA,GACP,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACC,kBAAC,OAAD;IACC,WAAW,EAAW,eAAe;KACpC,wBAAwB;KACxB,qBAAqB,MAAS;KAC9B,mBAAmB,MAAS;KAC5B,oBAAoB,MAAS;KAC7B,mBAAmB,MAAS;IAC7B,CAAC;IAPF,UAAA,CASC,kBAAC,SAAD;KACC,MAAK;KACD;KACE;KACN,WAAU;KACL;KACA;KACC;KACI;KACV,UAAU;KACV,SAAS;KACT,GAAI;KACJ,GAAK,MAAU,KAAA,IAAwB,EAAE,gBAAa,IAA3B,EAAE,SAAM;IACnC,CAAA,GACD,kBAAC,QAAD;KAAM,WAAU;KAAqB,eAAY;KAC/C,UAAA;IACI,CAAA,CACF;GACJ,CAAA,GAAA,KACA,kBAAC,OAAD;IAAK,IAAI;IAAS,WAAU;IAC1B,UAAA;GACG,CAAA,CAEF;EACD,CAAA,CAAA;;AAEP;AAEA,EAAO,cAAc"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../components/slider/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport {\n\tforwardRef,\n\tuseId,\n\tuseCallback,\n\tuseEffect,\n\ttype ChangeEvent,\n\ttype FormEvent,\n\ttype ReactNode,\n} from 'react';\nimport classNames from 'classnames';\nimport { SLIDER } from '../../utilities/constants';\nimport getAriaProps from '../../utilities/get-aria-props';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n/**\n * Slider size options\n */\nexport type SliderSize = 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Assistive text for Slider\n */\nexport interface SliderAssistiveText {\n\t/** Text for disabled state */\n\tdisabled?: string;\n\t/** Visually hidden label */\n\tlabel?: string;\n}\n\n/**\n * Labels for Slider\n */\nexport interface SliderLabels {\n\t/** Error message shown below the slider while `hasError` is true */\n\terror?: ReactNode;\n\t/** Visible label */\n\tlabel?: ReactNode;\n}\n\n/**\n * Props for the Slider component\n */\nexport interface SliderProps {\n\t/** ARIA describedby attribute */\n\t'aria-describedby'?: string;\n\t/**\n\t * **Assistive text for accessibility**\n\t * * `disabled`: Read after the range while the slider is disabled\n\t * * `label`: Visually hidden label. Use instead of `labels.label`.\n\t */\n\tassistiveText?: SliderAssistiveText;\n\t/** CSS classes for the root `.slds-form-element` div */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `className`, which lands on the same element. */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** Initial value for uncontrolled usage */\n\tdefaultValue?: number;\n\t/** Whether the slider is disabled */\n\tdisabled?: boolean;\n\t/** @deprecated Use `labels.error` and `hasError` instead. */\n\terrorText?: string;\n\t/** Puts the slider in an error state and shows `labels.error` */\n\thasError?: boolean;\n\t/** HTML id attribute */\n\tid?: string;\n\t/** @deprecated Use `labels.label` instead. */\n\tlabel?: string;\n\t/**\n\t * **Text labels for internationalization**\n\t * * `error`: Error message shown below the slider while `hasError` is true\n\t * * `label`: Visible label. Use `assistiveText.label` for a visually hidden label.\n\t */\n\tlabels?: SliderLabels;\n\t/** Maximum value (default: 100) */\n\tmax?: number;\n\t/** Minimum value (default: 0) */\n\tmin?: number;\n\t/** Form input name */\n\tname?: string;\n\t/** Called when value changes */\n\tonChange?: (\n\t\tevent: ChangeEvent<HTMLInputElement>,\n\t\tdata: { value: number }\n\t) => void;\n\t/** Called on input event */\n\tonInput?: (\n\t\tevent: FormEvent<HTMLInputElement>,\n\t\tdata: { value: number }\n\t) => void;\n\t/** Size of the slider */\n\tsize?: SliderSize;\n\t/** Step increment (default: 1) */\n\tstep?: number;\n\t/** Controlled value */\n\tvalue?: number;\n\t/** Display vertically */\n\tvertical?: boolean;\n}\n\nconst defaultAssistiveText: SliderAssistiveText = {\n\tdisabled: 'Disabled',\n};\n\n/**\n * The ability to style sliders with CSS varies across browsers.\n * Using this component ensures sliders look the same everywhere.\n */\nconst Slider = forwardRef<HTMLDivElement, SliderProps>(\n\t(\n\t\t{\n\t\t\t'aria-describedby': ariaDescribedBy,\n\t\t\tassistiveText: propAssistiveText,\n\t\t\tclassName,\n\t\t\tclassNameContainer,\n\t\t\tdefaultValue,\n\t\t\tdisabled,\n\t\t\terrorText,\n\t\t\thasError: hasErrorProp,\n\t\t\tid: propId,\n\t\t\tlabel: labelProp,\n\t\t\tlabels,\n\t\t\tmax = 100,\n\t\t\tmin = 0,\n\t\t\tname,\n\t\t\tonChange,\n\t\t\tonInput,\n\t\t\tsize,\n\t\t\tstep = 1,\n\t\t\tvalue,\n\t\t\tvertical,\n\t\t\t...rest\n\t\t},\n\t\tref\n\t) => {\n\t\tconst generatedId = useId();\n\t\tconst generatedErrorId = useId();\n\n\t\tconst id = propId || generatedId;\n\t\t// `errorText` is deprecated: it sets both the error state and the message\n\t\tconst hasError = hasErrorProp ?? !!errorText;\n\t\tconst errorMessage = hasError ? (labels?.error ?? errorText) : undefined;\n\t\tconst errorId =\n\t\t\tariaDescribedBy || (errorMessage ? generatedErrorId : undefined);\n\t\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\t\t// `label` is deprecated\n\t\tconst label = labels?.label ?? labelProp;\n\t\tconst labelText = label || assistiveText.label;\n\n\t\tuseEffect(() => {\n\t\t\tcheckProps(\n\t\t\t\tSLIDER,\n\t\t\t\t{\n\t\t\t\t\tassistiveText: propAssistiveText,\n\t\t\t\t\tclassNameContainer,\n\t\t\t\t\terrorText,\n\t\t\t\t\tlabel: labelProp,\n\t\t\t\t\tlabels,\n\t\t\t\t},\n\t\t\t\tcomponentDoc\n\t\t\t);\n\t\t}, [propAssistiveText, classNameContainer, errorText, labelProp, labels]);\n\n\t\tconst ariaProps = getAriaProps(rest) as Record<string, unknown>;\n\t\tif (errorId) {\n\t\t\tariaProps['aria-describedby'] = errorId;\n\t\t}\n\n\t\tconst handleChange = useCallback(\n\t\t\t(event: ChangeEvent<HTMLInputElement>) => {\n\t\t\t\tonChange?.(event, { value: Number(event.target.value) });\n\t\t\t},\n\t\t\t[onChange]\n\t\t);\n\n\t\tconst handleInput = useCallback(\n\t\t\t(event: FormEvent<HTMLInputElement>) => {\n\t\t\t\tonInput?.(event, {\n\t\t\t\t\tvalue: Number((event.target as HTMLInputElement).value),\n\t\t\t\t});\n\t\t\t},\n\t\t\t[onInput]\n\t\t);\n\n\t\tconst displayValue = value ?? defaultValue ?? 0;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-form-element',\n\t\t\t\t\t{ 'slds-has-error': hasError },\n\t\t\t\t\tclassNameContainer,\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t<label\n\t\t\t\t\tclassName={classNames('slds-form-element__label', {\n\t\t\t\t\t\t'slds-assistive-text': assistiveText.label && !label,\n\t\t\t\t\t})}\n\t\t\t\t\thtmlFor={id}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-slider-label\">\n\t\t\t\t\t\t{labelText && (\n\t\t\t\t\t\t\t<span className=\"slds-slider-label__label\">{labelText}</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<span className=\"slds-slider-label__range\">\n\t\t\t\t\t\t\t{min} - {max}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{disabled && (\n\t\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t{assistiveText.disabled}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t</label>\n\t\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames('slds-slider', {\n\t\t\t\t\t\t\t'slds-slider_vertical': vertical,\n\t\t\t\t\t\t\t'slds-size_x-small': size === 'x-small',\n\t\t\t\t\t\t\t'slds-size_small': size === 'small',\n\t\t\t\t\t\t\t'slds-size_medium': size === 'medium',\n\t\t\t\t\t\t\t'slds-size_large': size === 'large',\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"range\"\n\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\tname={name}\n\t\t\t\t\t\t\tclassName=\"slds-slider__range\"\n\t\t\t\t\t\t\tmin={min}\n\t\t\t\t\t\t\tmax={max}\n\t\t\t\t\t\t\tstep={step}\n\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\tonInput={handleInput}\n\t\t\t\t\t\t\t{...ariaProps}\n\t\t\t\t\t\t\t{...(value !== undefined ? { value } : { defaultValue })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"slds-slider__value\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t{displayValue}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t{errorMessage && (\n\t\t\t\t\t\t<div id={errorId} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nSlider.displayName = SLIDER;\n\nexport default Slider;\n"],"mappings":";;;;;;;;AAuGA,IAAM,IAA4C,EACjD,UAAU,WACX,GAMM,IAAS,GAEb,EACC,oBAAoB,GACpB,eAAe,GACf,cACA,uBACA,iBACA,aACA,cACA,UAAU,GACV,IAAI,GACJ,OAAO,GACP,WACA,SAAM,KACN,SAAM,GACN,SACA,aACA,YACA,SACA,UAAO,GACP,UACA,aACA,GAAG,KAEJ,MACI;CACJ,IAAM,IAAc,EAAM,GACpB,IAAmB,EAAM,GAEzB,IAAK,KAAU,GAEf,IAAW,KAAgB,CAAC,CAAC,GAC7B,IAAe,IAAY,GAAQ,SAAS,IAAa,KAAA,GACzD,IACL,MAAoB,IAAe,IAAmB,KAAA,IACjD,IAAgB;EAAE,GAAG;EAAsB,GAAG;CAAkB,GAEhE,IAAQ,GAAQ,SAAS,GACzB,IAAY,KAAS,EAAc;CAEzC,QAAgB;EACf,EACC,GACA;GACC,eAAe;GACf;GACA;GACA,OAAO;GACP;EACD,GACA,CACD;CACD,GAAG;EAAC;EAAmB;EAAoB;EAAW;EAAW;CAAM,CAAC;CAExE,IAAM,IAAY,EAAa,CAAI;CACnC,AAAI,MACH,EAAU,sBAAsB;CAGjC,IAAM,IAAe,GACnB,MAAyC;EACzC,IAAW,GAAO,EAAE,OAAO,OAAO,EAAM,OAAO,KAAK,EAAE,CAAC;CACxD,GACA,CAAC,CAAQ,CACV,GAEM,IAAc,GAClB,MAAuC;EACvC,IAAU,GAAO,EAChB,OAAO,OAAQ,EAAM,OAA4B,KAAK,EACvD,CAAC;CACF,GACA,CAAC,CAAO,CACT,GAEM,IAAe,KAAS,KAAgB;CAE9C,OACC,kBAAC,OAAD;EACC,WAAW,EACV,qBACA,EAAE,kBAAkB,EAAS,GAC7B,GACA,CACD;EACK;EAPN,UAAA,CASC,kBAAC,SAAD;GACC,WAAW,EAAW,4BAA4B,EACjD,uBAAuB,EAAc,SAAS,CAAC,EAChD,CAAC;GACD,SAAS;GAET,UAAA,kBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA;KACE,KACA,kBAAC,QAAD;MAAM,WAAU;MAA4B,UAAA;KAAgB,CAAA;KAE7D,kBAAC,QAAD;MAAM,WAAU;MAAhB,UAAA;OACE;OAAI;OAAI;MACJ;;KACL,KACA,kBAAC,QAAD;MAAM,WAAU;MAAhB,UAAA,CACE,KACA,EAAc,QACV;;IAEF;;EACA,CAAA,GACP,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACC,kBAAC,OAAD;IACC,WAAW,EAAW,eAAe;KACpC,wBAAwB;KACxB,qBAAqB,MAAS;KAC9B,mBAAmB,MAAS;KAC5B,oBAAoB,MAAS;KAC7B,mBAAmB,MAAS;IAC7B,CAAC;IAPF,UAAA,CASC,kBAAC,SAAD;KACC,MAAK;KACD;KACE;KACN,WAAU;KACL;KACA;KACC;KACI;KACV,UAAU;KACV,SAAS;KACT,GAAI;KACJ,GAAK,MAAU,KAAA,IAAwB,EAAE,gBAAa,IAA3B,EAAE,SAAM;IACnC,CAAA,GACD,kBAAC,QAAD;KAAM,WAAU;KAAqB,eAAY;KAC/C,UAAA;IACI,CAAA,CACF;GACJ,CAAA,GAAA,KACA,kBAAC,OAAD;IAAK,IAAI;IAAS,WAAU;IAC1B,UAAA;GACG,CAAA,CAEF;EACD,CAAA,CAAA;;AAEP,CACD;AAEA,EAAO,cAAc"}
@@ -0,0 +1,13 @@
1
+ import e from "../../utilities/get-component-doc.js";
2
+ import t from "../../utilities/warning/deprecated-property.js";
3
+ //#region components/spinner/check-props.js
4
+ var n = function() {};
5
+ process.env.NODE_ENV !== "production" && (n = function(n, r = {}, i) {
6
+ let a = e(i);
7
+ t(n, r.containerClassName, "containerClassName", "className", a("className")), t(n, r.containerStyle, "containerStyle", "style", a("style"));
8
+ });
9
+ var r = n;
10
+ //#endregion
11
+ export { r as default };
12
+
13
+ //# sourceMappingURL=check-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/spinner/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props = {}, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.containerClassName,\n\t\t\t'containerClassName',\n\t\t\t'className',\n\t\t\tcreateDocUrl('className')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.containerStyle,\n\t\t\t'containerStyle',\n\t\t\t'style',\n\t\t\tcreateDocUrl('style')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;AAOA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,IAAQ,CAAC,GAAG,GAAS;CACxE,IAAM,IAAe,EAAkB,CAAO;CAS9C,AAPA,EACC,GACA,EAAM,oBACN,sBACA,aACA,EAAa,WAAW,CACzB,GACA,EACC,GACA,EAAM,gBACN,kBACA,SACA,EAAa,OAAO,CACrB;AACD;AAGD,IAAA,IAAe"}
@@ -0,0 +1,17 @@
1
+ //#region components/spinner/component.json
2
+ var e = "spinner", t = "prod", n = "Spinner", r = {
3
+ component: e,
4
+ status: t,
5
+ "display-name": "Spinners",
6
+ classKey: n,
7
+ "SLDS-component-path": "/components/spinner",
8
+ "site-stories": [{
9
+ heading: "Default",
10
+ path: "/__examples__/default.jsx"
11
+ }],
12
+ "url-slug": "spinners"
13
+ };
14
+ //#endregion
15
+ export { n as classKey, e as component, r as default, t as status };
16
+
17
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","names":[],"sources":["../../../../components/spinner/component.json"],"sourcesContent":["{\n\t\"component\": \"spinner\",\n\t\"status\": \"prod\",\n\t\"display-name\": \"Spinners\",\n\t\"classKey\": \"Spinner\",\n\t\"SLDS-component-path\": \"/components/spinner\",\n\t\"site-stories\": [\n\t\t{\n\t\t\t\"heading\": \"Default\",\n\t\t\t\"path\": \"/__examples__/default.jsx\"\n\t\t}\n\t],\n\t\"url-slug\": \"spinners\"\n}\n"],"mappings":""}
@@ -1,41 +1,55 @@
1
1
  import { SPINNER as e } from "../../utilities/constants.js";
2
- import "react";
3
- import t from "classnames";
4
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
2
+ import t from "./check-props.js";
3
+ import n from "./component.js";
4
+ import { forwardRef as r, useEffect as i } from "react";
5
+ import a from "classnames";
6
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
7
  //#region components/spinner/index.tsx
6
- var i = { label: "Loading..." }, a = ({ assistiveText: e = i, containerClassName: a, containerStyle: o, hasContainer: s = !0, id: c, isDelayed: l = !1, isInline: u = !1, isInput: d = !1, size: f = "medium", variant: p = "base" }) => {
7
- let m = {
8
- ...i,
9
- ...e
10
- }.label, h = t("slds-spinner", {
11
- "slds-spinner_inline": u,
12
- "slds-input__spinner": d,
13
- "slds-spinner_brand": p === "brand",
14
- "slds-spinner_inverse": p === "inverse",
15
- "slds-spinner_delayed": l,
16
- [`slds-spinner_${f}`]: f
17
- }), g = /* @__PURE__ */ r("div", {
8
+ var c = { label: "Loading..." }, l = r(({ assistiveText: r = c, className: l, classNameSpinner: u, containerClassName: d, containerStyle: f, hasContainer: p = !0, id: m, isDelayed: h = !1, isInline: g = !1, isInput: _ = !1, size: v = "medium", style: y, variant: b = "base" }, x) => {
9
+ i(() => {
10
+ t(e, {
11
+ containerClassName: d,
12
+ containerStyle: f
13
+ }, n);
14
+ }, []);
15
+ let S = {
16
+ ...c,
17
+ ...r
18
+ }.label, C = p ? a(d, l) : l, w = p ? {
19
+ ...f,
20
+ ...y
21
+ } : y, T = a("slds-spinner", {
22
+ "slds-spinner_inline": g,
23
+ "slds-input__spinner": _,
24
+ "slds-spinner_brand": b === "brand",
25
+ "slds-spinner_inverse": b === "inverse",
26
+ "slds-spinner_delayed": h,
27
+ [`slds-spinner_${v}`]: v
28
+ }, u, p ? void 0 : C), E = /* @__PURE__ */ s("div", {
18
29
  "aria-hidden": "false",
19
- className: h,
20
- id: c,
30
+ className: T,
31
+ id: m,
32
+ ref: p ? void 0 : x,
21
33
  role: "status",
34
+ style: p ? void 0 : w,
22
35
  children: [
23
- m && /* @__PURE__ */ n("span", {
36
+ S && /* @__PURE__ */ o("span", {
24
37
  className: "slds-assistive-text",
25
- children: m
38
+ children: S
26
39
  }),
27
- /* @__PURE__ */ n("div", { className: "slds-spinner__dot-a" }),
28
- /* @__PURE__ */ n("div", { className: "slds-spinner__dot-b" })
40
+ /* @__PURE__ */ o("div", { className: "slds-spinner__dot-a" }),
41
+ /* @__PURE__ */ o("div", { className: "slds-spinner__dot-b" })
29
42
  ]
30
43
  });
31
- return s ? /* @__PURE__ */ n("div", {
32
- className: t(a, "slds-spinner_container"),
33
- style: o,
34
- children: g
35
- }) : g;
36
- };
37
- a.displayName = e;
44
+ return p ? /* @__PURE__ */ o("div", {
45
+ className: a(C, "slds-spinner_container"),
46
+ ref: x,
47
+ style: w,
48
+ children: E
49
+ }) : E;
50
+ });
51
+ l.displayName = e;
38
52
  //#endregion
39
- export { a as default };
53
+ export { l as default };
40
54
 
41
55
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../components/spinner/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { type CSSProperties } from 'react';\nimport classNames from 'classnames';\nimport { SPINNER } from '../../utilities/constants';\n\n/**\n * Spinner size options\n */\nexport type SpinnerSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Spinner color variant\n */\nexport type SpinnerVariant = 'base' | 'brand' | 'inverse';\n\n/**\n * Assistive text for Spinner\n */\nexport interface SpinnerAssistiveText {\n\t/** Text read by screen readers */\n\tlabel?: string;\n}\n\n/**\n * Props for the Spinner component\n */\nexport interface SpinnerProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: SpinnerAssistiveText;\n\t/** CSS classes for the container */\n\tcontainerClassName?: string;\n\t/** Custom styles for the container */\n\tcontainerStyle?: CSSProperties;\n\t/** Render inside a container div */\n\thasContainer?: boolean;\n\t/** Unique identifier */\n\tid?: string;\n\t/** Add 300ms delay before showing */\n\tisDelayed?: boolean;\n\t/** Inline spinner inside document flow */\n\tisInline?: boolean;\n\t/** Spinner inside an input field */\n\tisInput?: boolean;\n\t/** Size of the spinner */\n\tsize?: SpinnerSize;\n\t/** Color variant */\n\tvariant?: SpinnerVariant;\n}\n\nconst defaultAssistiveText: SpinnerAssistiveText = { label: 'Loading...' };\n\n/**\n * Spinners are CSS loading indicators that should be shown when retrieving data\n * or performing slow computations.\n */\nconst Spinner = ({\n\tassistiveText = defaultAssistiveText,\n\tcontainerClassName,\n\tcontainerStyle,\n\thasContainer = true,\n\tid,\n\tisDelayed = false,\n\tisInline = false,\n\tisInput = false,\n\tsize = 'medium',\n\tvariant = 'base',\n}: SpinnerProps): React.ReactElement => {\n\tconst mergedAssistiveText = {\n\t\t...defaultAssistiveText,\n\t\t...assistiveText,\n\t}.label;\n\n\tconst spinnerClassName = classNames('slds-spinner', {\n\t\t'slds-spinner_inline': isInline,\n\t\t'slds-input__spinner': isInput,\n\t\t'slds-spinner_brand': variant === 'brand',\n\t\t'slds-spinner_inverse': variant === 'inverse',\n\t\t'slds-spinner_delayed': isDelayed,\n\t\t[`slds-spinner_${size}`]: size,\n\t});\n\n\tconst spinner = (\n\t\t<div aria-hidden=\"false\" className={spinnerClassName} id={id} role=\"status\">\n\t\t\t{mergedAssistiveText && (\n\t\t\t\t<span className=\"slds-assistive-text\">{mergedAssistiveText}</span>\n\t\t\t)}\n\t\t\t<div className=\"slds-spinner__dot-a\" />\n\t\t\t<div className=\"slds-spinner__dot-b\" />\n\t\t</div>\n\t);\n\n\tif (hasContainer) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(containerClassName, 'slds-spinner_container')}\n\t\t\t\tstyle={containerStyle}\n\t\t\t>\n\t\t\t\t{spinner}\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn spinner;\n};\n\nSpinner.displayName = SPINNER;\n\nexport default Spinner;\n"],"mappings":";;;;;AAmDA,IAAM,IAA6C,EAAE,OAAO,aAAa,GAMnE,KAAW,EAChB,mBAAgB,GAChB,uBACA,mBACA,kBAAe,IACf,OACA,eAAY,IACZ,cAAW,IACX,aAAU,IACV,UAAO,UACP,aAAU,aAC6B;CACvC,IAAM,IAAsB;EAC3B,GAAG;EACH,GAAG;CACJ,EAAE,OAEI,IAAmB,EAAW,gBAAgB;EACnD,uBAAuB;EACvB,uBAAuB;EACvB,sBAAsB,MAAY;EAClC,wBAAwB,MAAY;EACpC,wBAAwB;GACvB,gBAAgB,MAAS;CAC3B,CAAC,GAEK,IACL,kBAAC,OAAD;EAAK,eAAY;EAAQ,WAAW;EAAsB;EAAI,MAAK;EAAnE,UAAA;GACE,KACA,kBAAC,QAAD;IAAM,WAAU;IAAuB,UAAA;GAA0B,CAAA;GAElE,kBAAC,OAAD,EAAK,WAAU,sBAAuB,CAAA;GACtC,kBAAC,OAAD,EAAK,WAAU,sBAAuB,CAAA;EAClC;;CAcN,OAXI,IAEF,kBAAC,OAAD;EACC,WAAW,EAAW,GAAoB,wBAAwB;EAClE,OAAO;EAEN,UAAA;CACG,CAAA,IAIA;AACR;AAEA,EAAQ,cAAc"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../components/spinner/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport { forwardRef, useEffect, type CSSProperties } from 'react';\nimport classNames from 'classnames';\nimport { SPINNER } from '../../utilities/constants';\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n/**\n * Spinner size options\n */\nexport type SpinnerSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Spinner color variant\n */\nexport type SpinnerVariant = 'base' | 'brand' | 'inverse';\n\n/**\n * Assistive text for Spinner\n */\nexport interface SpinnerAssistiveText {\n\t/** Text read by screen readers */\n\tlabel?: string;\n}\n\n/**\n * Props for the Spinner component\n */\nexport interface SpinnerProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: SpinnerAssistiveText;\n\t/**\n\t * CSS classes for the root element: the `.slds-spinner_container` div, or the\n\t * `.slds-spinner` div when `hasContainer` is `false`.\n\t */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for the `.slds-spinner` div */\n\tclassNameSpinner?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `className`, which lands on the container when `hasContainer` is `true`. */\n\tcontainerClassName?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `style`, which lands on the container when `hasContainer` is `true`. */\n\tcontainerStyle?: CSSProperties;\n\t/** Render inside a container div */\n\thasContainer?: boolean;\n\t/** Unique identifier */\n\tid?: string;\n\t/** Add 300ms delay before showing */\n\tisDelayed?: boolean;\n\t/** Inline spinner inside document flow */\n\tisInline?: boolean;\n\t/** Spinner inside an input field */\n\tisInput?: boolean;\n\t/** Size of the spinner */\n\tsize?: SpinnerSize;\n\t/** Styles for the root element (see `className`) */\n\tstyle?: CSSProperties;\n\t/** Color variant */\n\tvariant?: SpinnerVariant;\n}\n\nconst defaultAssistiveText: SpinnerAssistiveText = { label: 'Loading...' };\n\n/**\n * Spinners are CSS loading indicators that should be shown when retrieving data\n * or performing slow computations.\n */\nconst Spinner = forwardRef<HTMLDivElement, SpinnerProps>(\n\t(\n\t\t{\n\t\t\tassistiveText = defaultAssistiveText,\n\t\t\tclassName,\n\t\t\tclassNameSpinner,\n\t\t\tcontainerClassName,\n\t\t\tcontainerStyle,\n\t\t\thasContainer = true,\n\t\t\tid,\n\t\t\tisDelayed = false,\n\t\t\tisInline = false,\n\t\t\tisInput = false,\n\t\t\tsize = 'medium',\n\t\t\tstyle,\n\t\t\tvariant = 'base',\n\t\t},\n\t\tref\n\t) => {\n\t\tuseEffect(() => {\n\t\t\tcheckProps(SPINNER, { containerClassName, containerStyle }, componentDoc);\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t}, []); // Only run on mount\n\n\t\tconst mergedAssistiveText = {\n\t\t\t...defaultAssistiveText,\n\t\t\t...assistiveText,\n\t\t}.label;\n\n\t\t// The deprecated container props only ever applied to the container\n\t\tconst rootClassName = hasContainer\n\t\t\t? classNames(containerClassName, className)\n\t\t\t: className;\n\t\tconst rootStyle = hasContainer ? { ...containerStyle, ...style } : style;\n\n\t\tconst spinnerClassName = classNames(\n\t\t\t'slds-spinner',\n\t\t\t{\n\t\t\t\t'slds-spinner_inline': isInline,\n\t\t\t\t'slds-input__spinner': isInput,\n\t\t\t\t'slds-spinner_brand': variant === 'brand',\n\t\t\t\t'slds-spinner_inverse': variant === 'inverse',\n\t\t\t\t'slds-spinner_delayed': isDelayed,\n\t\t\t\t[`slds-spinner_${size}`]: size,\n\t\t\t},\n\t\t\tclassNameSpinner,\n\t\t\thasContainer ? undefined : rootClassName\n\t\t);\n\n\t\tconst spinner = (\n\t\t\t<div\n\t\t\t\taria-hidden=\"false\"\n\t\t\t\tclassName={spinnerClassName}\n\t\t\t\tid={id}\n\t\t\t\tref={hasContainer ? undefined : ref}\n\t\t\t\trole=\"status\"\n\t\t\t\tstyle={hasContainer ? undefined : rootStyle}\n\t\t\t>\n\t\t\t\t{mergedAssistiveText && (\n\t\t\t\t\t<span className=\"slds-assistive-text\">{mergedAssistiveText}</span>\n\t\t\t\t)}\n\t\t\t\t<div className=\"slds-spinner__dot-a\" />\n\t\t\t\t<div className=\"slds-spinner__dot-b\" />\n\t\t\t</div>\n\t\t);\n\n\t\tif (hasContainer) {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(rootClassName, 'slds-spinner_container')}\n\t\t\t\t\tref={ref}\n\t\t\t\t\tstyle={rootStyle}\n\t\t\t\t>\n\t\t\t\t\t{spinner}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn spinner;\n\t}\n);\n\nSpinner.displayName = SPINNER;\n\nexport default Spinner;\n"],"mappings":";;;;;;;AA8DA,IAAM,IAA6C,EAAE,OAAO,aAAa,GAMnE,IAAU,GAEd,EACC,mBAAgB,GAChB,cACA,qBACA,uBACA,mBACA,kBAAe,IACf,OACA,eAAY,IACZ,cAAW,IACX,aAAU,IACV,UAAO,UACP,UACA,aAAU,UAEX,MACI;CACJ,QAAgB;EACf,EAAW,GAAS;GAAE;GAAoB;EAAe,GAAG,CAAY;CAEzE,GAAG,CAAC,CAAC;CAEL,IAAM,IAAsB;EAC3B,GAAG;EACH,GAAG;CACJ,EAAE,OAGI,IAAgB,IACnB,EAAW,GAAoB,CAAS,IACxC,GACG,IAAY,IAAe;EAAE,GAAG;EAAgB,GAAG;CAAM,IAAI,GAE7D,IAAmB,EACxB,gBACA;EACC,uBAAuB;EACvB,uBAAuB;EACvB,sBAAsB,MAAY;EAClC,wBAAwB,MAAY;EACpC,wBAAwB;GACvB,gBAAgB,MAAS;CAC3B,GACA,GACA,IAAe,KAAA,IAAY,CAC5B,GAEM,IACL,kBAAC,OAAD;EACC,eAAY;EACZ,WAAW;EACP;EACJ,KAAK,IAAe,KAAA,IAAY;EAChC,MAAK;EACL,OAAO,IAAe,KAAA,IAAY;EANnC,UAAA;GAQE,KACA,kBAAC,QAAD;IAAM,WAAU;IAAuB,UAAA;GAA0B,CAAA;GAElE,kBAAC,OAAD,EAAK,WAAU,sBAAuB,CAAA;GACtC,kBAAC,OAAD,EAAK,WAAU,sBAAuB,CAAA;EAClC;;CAeN,OAZI,IAEF,kBAAC,OAAD;EACC,WAAW,EAAW,GAAe,wBAAwB;EACxD;EACL,OAAO;EAEN,UAAA;CACG,CAAA,IAIA;AACR,CACD;AAEA,EAAQ,cAAc"}
@@ -9,7 +9,7 @@ process.env.NODE_ENV !== "production" && (i = function(i, a, o) {
9
9
  "labels.heading": a.labels?.heading ?? a.heading,
10
10
  "assistiveText.heading": c.heading ?? c.label
11
11
  };
12
- t(i, l, s()), r(i, l, s()), n(i, a.heading, "heading", "labels.heading", s("labels")), n(i, c.label, "assistiveText.label", "assistiveText.heading", s("assistiveText")), n(i, a.onClick, "onClick", "onSelect", "`onSelect` receives `(event, { node, isSelected })`, where `isSelected` is the requested selection state."), n(i, a.onExpandClick, "onExpandClick", "onRequestToggle", "`onRequestToggle` receives `(event, { node, isExpanded })`, where `isExpanded` is the requested expansion state. Left arrow on a collapsed branch or item selects the parent through `onSelect` instead.");
12
+ t(i, l, s()), r(i, l, s()), n(i, a.heading, "heading", "labels.heading", s("labels")), n(i, c.label, "assistiveText.label", "assistiveText.heading", s("assistiveText")), n(i, a.onClick, "onClick", "onSelect", "`onSelect` receives `(event, { node, isSelected })`, where `isSelected` is the requested selection state."), n(i, a.onExpandClick, "onExpandClick", "onRequestToggle", "`onRequestToggle` receives `(event, { node, isExpanded })`, where `isExpanded` is the requested expansion state. Left arrow on a collapsed branch or item selects the parent through `onSelect` instead."), n(i, a.listClassName, "listClassName", "classNameList"), n(i, a.listStyle, "listStyle", "styleList");
13
13
  });
14
14
  var a = i;
15
15
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/tree/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport oneOfRequiredProperty from '../../utilities/warning/one-of-required-property';\nimport onlyOneOfProperties from '../../utilities/warning/only-one-of-properties';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\t\tconst assistiveText = props.assistiveText || {};\n\n\t\tconst headingProps = {\n\t\t\t'labels.heading': props.labels?.heading ?? props.heading,\n\t\t\t'assistiveText.heading': assistiveText.heading ?? assistiveText.label,\n\t\t};\n\t\toneOfRequiredProperty(COMPONENT, headingProps, createDocUrl());\n\t\tonlyOneOfProperties(COMPONENT, headingProps, createDocUrl());\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.heading,\n\t\t\t'heading',\n\t\t\t'labels.heading',\n\t\t\tcreateDocUrl('labels')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tassistiveText.label,\n\t\t\t'assistiveText.label',\n\t\t\t'assistiveText.heading',\n\t\t\tcreateDocUrl('assistiveText')\n\t\t);\n\n\t\t/* eslint-disable max-len */\n\t\t// Deprecated and changed to another property\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onClick,\n\t\t\t'onClick',\n\t\t\t'onSelect',\n\t\t\t'`onSelect` receives `(event, { node, isSelected })`, where `isSelected` is the requested selection state.'\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onExpandClick,\n\t\t\t'onExpandClick',\n\t\t\t'onRequestToggle',\n\t\t\t'`onRequestToggle` receives `(event, { node, isExpanded })`, where `isExpanded` is the requested expansion state. Left arrow on a collapsed branch or item selects the parent through `onSelect` instead.'\n\t\t);\n\t\t/* eslint-enable max-len */\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;;;AASA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO,GAAS;CACnE,IAAM,IAAe,EAAkB,CAAO,GACxC,IAAgB,EAAM,iBAAiB,CAAC,GAExC,IAAe;EACpB,kBAAkB,EAAM,QAAQ,WAAW,EAAM;EACjD,yBAAyB,EAAc,WAAW,EAAc;CACjE;CA4BA,AA3BA,EAAsB,GAAW,GAAc,EAAa,CAAC,GAC7D,EAAoB,GAAW,GAAc,EAAa,CAAC,GAE3D,EACC,GACA,EAAM,SACN,WACA,kBACA,EAAa,QAAQ,CACtB,GACA,EACC,GACA,EAAc,OACd,uBACA,yBACA,EAAa,eAAe,CAC7B,GAIA,EACC,GACA,EAAM,SACN,WACA,YACA,2GACD,GACA,EACC,GACA,EAAM,eACN,iBACA,mBACA,0MACD;AAED;AAGD,IAAA,IAAe"}
1
+ {"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/tree/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport oneOfRequiredProperty from '../../utilities/warning/one-of-required-property';\nimport onlyOneOfProperties from '../../utilities/warning/only-one-of-properties';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\t\tconst assistiveText = props.assistiveText || {};\n\n\t\tconst headingProps = {\n\t\t\t'labels.heading': props.labels?.heading ?? props.heading,\n\t\t\t'assistiveText.heading': assistiveText.heading ?? assistiveText.label,\n\t\t};\n\t\toneOfRequiredProperty(COMPONENT, headingProps, createDocUrl());\n\t\tonlyOneOfProperties(COMPONENT, headingProps, createDocUrl());\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.heading,\n\t\t\t'heading',\n\t\t\t'labels.heading',\n\t\t\tcreateDocUrl('labels')\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tassistiveText.label,\n\t\t\t'assistiveText.label',\n\t\t\t'assistiveText.heading',\n\t\t\tcreateDocUrl('assistiveText')\n\t\t);\n\n\t\t/* eslint-disable max-len */\n\t\t// Deprecated and changed to another property\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onClick,\n\t\t\t'onClick',\n\t\t\t'onSelect',\n\t\t\t'`onSelect` receives `(event, { node, isSelected })`, where `isSelected` is the requested selection state.'\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onExpandClick,\n\t\t\t'onExpandClick',\n\t\t\t'onRequestToggle',\n\t\t\t'`onRequestToggle` receives `(event, { node, isExpanded })`, where `isExpanded` is the requested expansion state. Left arrow on a collapsed branch or item selects the parent through `onSelect` instead.'\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.listClassName,\n\t\t\t'listClassName',\n\t\t\t'classNameList'\n\t\t);\n\t\tdeprecatedProperty(COMPONENT, props.listStyle, 'listStyle', 'styleList');\n\t\t/* eslint-enable max-len */\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;;;AASA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO,GAAS;CACnE,IAAM,IAAe,EAAkB,CAAO,GACxC,IAAgB,EAAM,iBAAiB,CAAC,GAExC,IAAe;EACpB,kBAAkB,EAAM,QAAQ,WAAW,EAAM;EACjD,yBAAyB,EAAc,WAAW,EAAc;CACjE;CAyCA,AAxCA,EAAsB,GAAW,GAAc,EAAa,CAAC,GAC7D,EAAoB,GAAW,GAAc,EAAa,CAAC,GAE3D,EACC,GACA,EAAM,SACN,WACA,kBACA,EAAa,QAAQ,CACtB,GACA,EACC,GACA,EAAc,OACd,uBACA,yBACA,EAAa,eAAe,CAC7B,GAIA,EACC,GACA,EAAM,SACN,WACA,YACA,2GACD,GACA,EACC,GACA,EAAM,eACN,iBACA,mBACA,0MACD,GACA,EACC,GACA,EAAM,eACN,iBACA,eACD,GACA,EAAmB,GAAW,EAAM,WAAW,aAAa,WAAW;AAExE;AAGD,IAAA,IAAe"}