reshaped 3.6.0-canary.0 → 3.6.0-canary.2

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 (132) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/dist/bundle.css +1 -1
  3. package/dist/bundle.d.ts +1 -1
  4. package/dist/bundle.js +11 -11
  5. package/dist/components/Accordion/AccordionControlled.js +1 -1
  6. package/dist/components/Accordion/AccordionTrigger.js +1 -1
  7. package/dist/components/ActionBar/ActionBar.js +1 -1
  8. package/dist/components/Actionable/Actionable.js +1 -1
  9. package/dist/components/Autocomplete/tests/Autocomplete.stories.js +1 -0
  10. package/dist/components/Avatar/Avatar.js +1 -1
  11. package/dist/components/Badge/Badge.js +1 -1
  12. package/dist/components/Badge/BadgeContainer.js +1 -1
  13. package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
  14. package/dist/components/Button/Button.js +1 -1
  15. package/dist/components/Button/ButtonGroup.js +1 -1
  16. package/dist/components/Calendar/CalendarDate.js +1 -1
  17. package/dist/components/Card/Card.d.ts +1 -1
  18. package/dist/components/Card/Card.js +1 -1
  19. package/dist/components/Card/tests/Card.stories.d.ts +1 -1
  20. package/dist/components/Card/tests/Card.test.stories.d.ts +1 -1
  21. package/dist/components/Carousel/Carousel.js +4 -3
  22. package/dist/components/Carousel/CarouselControl.js +1 -1
  23. package/dist/components/Checkbox/Checkbox.js +1 -1
  24. package/dist/components/Checkbox/Checkbox.module.css +1 -1
  25. package/dist/components/Container/Container.js +1 -1
  26. package/dist/components/Dismissible/Dismissible.js +1 -1
  27. package/dist/components/Divider/Divider.js +1 -1
  28. package/dist/components/DropdownMenu/DropdownMenu.js +1 -1
  29. package/dist/components/FileUpload/FileUpload.js +1 -1
  30. package/dist/components/Flyout/Flyout.types.d.ts +3 -2
  31. package/dist/components/Flyout/FlyoutContent.js +14 -11
  32. package/dist/components/Flyout/tests/Flyout.stories.d.ts +4 -0
  33. package/dist/components/Flyout/tests/Flyout.stories.js +20 -4
  34. package/dist/components/Flyout/useFlyout.js +13 -9
  35. package/dist/components/Flyout/utilities/calculatePosition.d.ts +1 -1
  36. package/dist/components/Flyout/utilities/calculatePosition.js +1 -1
  37. package/dist/components/Flyout/utilities/flyout.js +4 -4
  38. package/dist/components/FormControl/FormControl.context.d.ts +0 -2
  39. package/dist/components/Grid/Grid.js +1 -1
  40. package/dist/components/Hidden/Hidden.js +1 -1
  41. package/dist/components/Hotkey/Hotkey.js +1 -1
  42. package/dist/components/Icon/Icon.js +1 -1
  43. package/dist/components/Image/Image.js +1 -1
  44. package/dist/components/Link/Link.js +1 -1
  45. package/dist/components/Loader/Loader.js +1 -1
  46. package/dist/components/MenuItem/MenuItem.js +1 -1
  47. package/dist/components/Modal/Modal.js +2 -2
  48. package/dist/components/Modal/Modal.module.css +1 -1
  49. package/dist/components/NumberField/NumberFieldControlled.js +1 -1
  50. package/dist/components/Overlay/Overlay.js +3 -3
  51. package/dist/components/Overlay/Overlay.module.css +1 -1
  52. package/dist/components/Overlay/Overlay.types.d.ts +1 -0
  53. package/dist/components/PinField/PinFieldControlled.js +1 -1
  54. package/dist/components/Popover/Popover.js +3 -3
  55. package/dist/components/Popover/Popover.module.css +1 -1
  56. package/dist/components/Popover/Popover.types.d.ts +1 -0
  57. package/dist/components/Popover/tests/Popover.stories.d.ts +46 -7
  58. package/dist/components/Popover/tests/Popover.stories.js +209 -85
  59. package/dist/components/Progress/Progress.js +1 -1
  60. package/dist/components/ProgressIndicator/ProgressIndicator.js +1 -1
  61. package/dist/components/Radio/Radio.js +1 -1
  62. package/dist/components/Radio/Radio.module.css +1 -1
  63. package/dist/components/Reshaped/Reshaped.js +1 -1
  64. package/dist/components/Resizable/Resizable.js +1 -1
  65. package/dist/components/Scrim/Scrim.js +1 -1
  66. package/dist/components/ScrollArea/ScrollArea.js +8 -11
  67. package/dist/components/ScrollArea/ScrollArea.module.css +1 -1
  68. package/dist/components/ScrollArea/tests/ScrollArea.stories.d.ts +13 -4
  69. package/dist/components/ScrollArea/tests/ScrollArea.stories.js +129 -30
  70. package/dist/components/Select/Select.js +1 -1
  71. package/dist/components/Skeleton/Skeleton.js +1 -1
  72. package/dist/components/Slider/Slider.types.d.ts +34 -7
  73. package/dist/components/Slider/SliderControlled.js +32 -20
  74. package/dist/components/Slider/SliderThumb.js +4 -4
  75. package/dist/components/Slider/SliderUncontrolled.js +3 -2
  76. package/dist/components/Slider/tests/Slider.stories.d.ts +38 -8
  77. package/dist/components/Slider/tests/Slider.stories.js +268 -54
  78. package/dist/components/Stepper/Stepper.js +1 -1
  79. package/dist/components/Switch/Switch.js +1 -1
  80. package/dist/components/Table/Table.js +6 -3
  81. package/dist/components/Table/Table.module.css +1 -1
  82. package/dist/components/Tabs/TabsItem.js +1 -1
  83. package/dist/components/Tabs/TabsList.js +3 -34
  84. package/dist/components/Tabs/TabsPanel.js +1 -1
  85. package/dist/components/Text/Text.js +1 -1
  86. package/dist/components/TextArea/TextArea.js +1 -1
  87. package/dist/components/TextField/TextField.js +1 -1
  88. package/dist/components/Theme/Theme.js +1 -1
  89. package/dist/components/Timeline/Timeline.js +1 -1
  90. package/dist/components/Toast/ToastContainer.js +1 -1
  91. package/dist/components/Toast/ToastRegion.js +1 -1
  92. package/dist/components/View/View.js +1 -1
  93. package/dist/components/_private/Aligner/Aligner.js +1 -1
  94. package/dist/components/_private/Expandable/Expandable.js +1 -1
  95. package/dist/components/_private/HiddenInput/HiddenInput.js +1 -1
  96. package/dist/hooks/_private/useFadeSide.d.ts +5 -0
  97. package/dist/hooks/_private/useFadeSide.js +47 -0
  98. package/dist/index.d.ts +1 -1
  99. package/dist/index.js +1 -1
  100. package/dist/styles/align/index.js +1 -1
  101. package/dist/styles/aspectRatio/index.js +1 -1
  102. package/dist/styles/bleed/index.js +1 -1
  103. package/dist/styles/border/index.js +1 -1
  104. package/dist/styles/height/index.js +1 -1
  105. package/dist/styles/inset/index.js +1 -1
  106. package/dist/styles/justify/index.js +1 -1
  107. package/dist/styles/maxHeight/index.js +1 -1
  108. package/dist/styles/maxWidth/index.js +1 -1
  109. package/dist/styles/minHeight/index.js +1 -1
  110. package/dist/styles/minWidth/index.js +1 -1
  111. package/dist/styles/padding/index.js +1 -1
  112. package/dist/styles/position/index.js +1 -1
  113. package/dist/styles/radius/index.js +1 -1
  114. package/dist/styles/textAlign/index.js +1 -1
  115. package/dist/styles/width/index.js +1 -1
  116. package/dist/utilities/dom/event.d.ts +7 -0
  117. package/dist/utilities/dom/event.js +11 -0
  118. package/dist/utilities/dom/find.d.ts +1 -1
  119. package/dist/utilities/dom/find.js +2 -2
  120. package/dist/utilities/dom/index.d.ts +1 -0
  121. package/dist/utilities/dom/index.js +1 -0
  122. package/dist/utilities/helpers.d.ts +1 -15
  123. package/dist/utilities/helpers.js +11 -133
  124. package/dist/utilities/props.d.ts +13 -0
  125. package/dist/utilities/props.js +83 -0
  126. package/package.json +25 -26
  127. package/dist/components/Popover/tests/Popover.test.stories.d.ts +0 -39
  128. package/dist/components/Popover/tests/Popover.test.stories.js +0 -167
  129. package/dist/components/ScrollArea/tests/ScrollArea.test.stories.d.ts +0 -23
  130. package/dist/components/ScrollArea/tests/ScrollArea.test.stories.js +0 -66
  131. package/dist/components/Slider/tests/Slider.test.stories.d.ts +0 -38
  132. package/dist/components/Slider/tests/Slider.test.stories.js +0 -150
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import { classNames } from "../../utilities/helpers.js";
4
+ import { classNames } from "../../utilities/props.js";
5
5
  import useElementId from "../../hooks/useElementId.js";
6
6
  import AccordionContext from "./Accordion.context.js";
7
7
  const AccordionControlled = (props) => {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import { classNames } from "../../utilities/helpers.js";
4
+ import { classNames } from "../../utilities/props.js";
5
5
  import Actionable from "../Actionable/index.js";
6
6
  import View from "../View/index.js";
7
7
  import Icon from "../Icon/index.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "../../utilities/helpers.js";
2
+ import { classNames } from "../../utilities/props.js";
3
3
  import View from "../View/index.js";
4
4
  import s from "./ActionBar.module.css";
5
5
  const ActionBar = (props) => {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { forwardRef } from "react";
4
- import { classNames } from "../../utilities/helpers.js";
4
+ import { classNames } from "../../utilities/props.js";
5
5
  import * as keys from "../../constants/keys.js";
6
6
  import s from "./Actionable.module.css";
7
7
  const Actionable = forwardRef((props, ref) => {
@@ -56,6 +56,7 @@ export const active = {
56
56
  expect(args.handleClose).toHaveBeenCalledTimes(1);
57
57
  expect(args.handleClose).toHaveBeenLastCalledWith();
58
58
  });
59
+ await sleep(500);
59
60
  await userEvent.click(input);
60
61
  await waitFor(() => {
61
62
  expect(args.handleOpen).toHaveBeenCalledTimes(1);
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames, responsivePropDependency } from "../../utilities/helpers.js";
2
+ import { classNames, responsivePropDependency } from "../../utilities/props.js";
3
3
  import getHeightStyles from "../../styles/height/index.js";
4
4
  import Icon from "../Icon/index.js";
5
5
  import View from "../View/index.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { classNames } from "../../utilities/helpers.js";
2
+ import { classNames } from "../../utilities/props.js";
3
3
  import Text from "../Text/index.js";
4
4
  import Icon from "../Icon/index.js";
5
5
  import IconClose from "../../icons/Close.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "../../utilities/helpers.js";
2
+ import { classNames } from "../../utilities/props.js";
3
3
  import s from "./Badge.module.css";
4
4
  const BadgeContainer = (props) => {
5
5
  const { children, position = "top-end", overlap, className, attributes } = props;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import { classNames } from "../../utilities/helpers.js";
4
+ import { classNames } from "../../utilities/props.js";
5
5
  import View from "../View/index.js";
6
6
  import Icon from "../Icon/index.js";
7
7
  import Text from "../Text/index.js";
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { classNames, responsiveClassNames, responsivePropDependency } from "../../utilities/helpers.js";
3
+ import { classNames, responsiveClassNames, responsivePropDependency } from "../../utilities/props.js";
4
4
  import Icon from "../Icon/index.js";
5
5
  import Loader from "../Loader/index.js";
6
6
  import Actionable from "../Actionable/index.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "../../utilities/helpers.js";
2
+ import { classNames } from "../../utilities/props.js";
3
3
  import s from "./Button.module.css";
4
4
  const ButtonGroup = (props) => {
5
5
  const { children, className, attributes } = props;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import Actionable from "../Actionable/index.js";
4
- import { classNames } from "../../utilities/helpers.js";
4
+ import { classNames } from "../../utilities/props.js";
5
5
  import { getLocalISODate } from "./Calendar.utils.js";
6
6
  import s from "./Calendar.module.css";
7
7
  const CalendarDate = (props) => {
@@ -9,7 +9,7 @@ declare const Card: React.ForwardRefExoticComponent<{
9
9
  href?: string;
10
10
  as?: keyof React.JSX.IntrinsicElements | undefined;
11
11
  className?: import("../../types/global").ClassName;
12
- attributes?: (import("../../types/global").Attributes<keyof React.JSX.IntrinsicElements> & ((import("../../types/global").Attributes<"button"> & Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "form" | "slot" | "style" | "title" | "disabled" | "color" | "children" | "className" | "hidden" | "content" | "ref" | "aria-orientation" | "role" | "suppressHydrationWarning" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "dir" | "name" | "key" | "type" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture"> & {
12
+ attributes?: (import("../../types/global").Attributes<keyof React.JSX.IntrinsicElements> & ((import("../../types/global").Attributes<"button"> & Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "form" | "slot" | "style" | "title" | "disabled" | "color" | "children" | "className" | "hidden" | "content" | "ref" | "aria-orientation" | "role" | "suppressHydrationWarning" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "dir" | "name" | "key" | "type" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture"> & {
13
13
  ref?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;
14
14
  }) | undefined)) | undefined;
15
15
  } & Pick<import("../View").ViewProps, "height"> & React.RefAttributes<HTMLElement>>;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { classNames } from "../../utilities/helpers.js";
3
+ import { classNames } from "../../utilities/props.js";
4
4
  import Actionable from "../Actionable/index.js";
5
5
  import s from "./Card.module.css";
6
6
  import getRadiusStyles from "../../styles/radius/index.js";
@@ -11,7 +11,7 @@ declare const _default: {
11
11
  href?: string;
12
12
  as?: keyof React.JSX.IntrinsicElements | undefined;
13
13
  className?: import("../../../types/global").ClassName;
14
- attributes?: (import("../../../types/global").Attributes<keyof React.JSX.IntrinsicElements> & ((import("../../../types/global").Attributes<"button"> & Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "children" | "ref" | "style" | "form" | "slot" | "title" | "disabled" | "color" | "className" | "hidden" | "content" | "aria-orientation" | "role" | "suppressHydrationWarning" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "dir" | "name" | "key" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "onToggle" | "type" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture"> & {
14
+ attributes?: (import("../../../types/global").Attributes<keyof React.JSX.IntrinsicElements> & ((import("../../../types/global").Attributes<"button"> & Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "children" | "ref" | "style" | "form" | "slot" | "title" | "disabled" | "color" | "className" | "hidden" | "content" | "aria-orientation" | "role" | "suppressHydrationWarning" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "dir" | "name" | "key" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "onToggle" | "type" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture"> & {
15
15
  ref?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;
16
16
  }) | undefined)) | undefined;
17
17
  } & Pick<import("../../View").ViewProps, "height"> & React.RefAttributes<HTMLElement>>;
@@ -13,7 +13,7 @@ declare const _default: {
13
13
  href?: string;
14
14
  as?: keyof React.JSX.IntrinsicElements | undefined;
15
15
  className?: import("../../../types/global").ClassName;
16
- attributes?: (import("../../../types/global").Attributes<keyof React.JSX.IntrinsicElements> & ((import("../../../types/global").Attributes<"button"> & Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "children" | "ref" | "style" | "form" | "slot" | "title" | "disabled" | "color" | "className" | "hidden" | "content" | "aria-orientation" | "role" | "suppressHydrationWarning" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "dir" | "name" | "key" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "onToggle" | "type" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture"> & {
16
+ attributes?: (import("../../../types/global").Attributes<keyof React.JSX.IntrinsicElements> & ((import("../../../types/global").Attributes<"button"> & Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "children" | "ref" | "style" | "form" | "slot" | "title" | "disabled" | "color" | "className" | "hidden" | "content" | "aria-orientation" | "role" | "suppressHydrationWarning" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "dir" | "name" | "key" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "onToggle" | "type" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture"> & {
17
17
  ref?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;
18
18
  }) | undefined)) | undefined;
19
19
  } & Pick<import("../../View").ViewProps, "height"> & React.RefAttributes<HTMLElement>>;
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import { classNames, responsiveVariables, responsiveClassNames, throttleHandler, } from "../../utilities/helpers.js";
4
+ import { classNames, responsiveVariables, responsiveClassNames } from "../../utilities/props.js";
5
+ import { rafThrottle } from "../../utilities/helpers.js";
5
6
  import View from "../View/index.js";
6
7
  import useRTL from "../../hooks/useRTL.js";
7
8
  import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
@@ -29,7 +30,7 @@ const Carousel = (props) => {
29
30
  // itemRefs.current[index] = null;
30
31
  // };
31
32
  };
32
- const handleScroll = throttleHandler((event) => {
33
+ const handleScroll = rafThrottle((event) => {
33
34
  const el = event.target;
34
35
  const firstVisibleIndex = getFirstVisibleIndex();
35
36
  setScrollPosition(el.scrollLeft);
@@ -37,7 +38,7 @@ const Carousel = (props) => {
37
38
  if (currentIndexRef.current !== firstVisibleIndex)
38
39
  onChange?.({ index: firstVisibleIndex });
39
40
  currentIndexRef.current = firstVisibleIndex;
40
- }, 16);
41
+ });
41
42
  const getItemsGap = () => {
42
43
  const style = getComputedStyle(scrollElRef.current);
43
44
  // Safari returns Npx Npx as a value, we need only the first one
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import { classNames } from "../../utilities/helpers.js";
4
+ import { classNames } from "../../utilities/props.js";
5
5
  import Button from "../Button/index.js";
6
6
  import IconChevronRight from "../../icons/ChevronRight.js";
7
7
  import IconChevronLeft from "../../icons/ChevronLeft.js";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import { classNames, responsiveClassNames, responsivePropDependency } from "../../utilities/helpers.js";
4
+ import { classNames, responsiveClassNames, responsivePropDependency } from "../../utilities/props.js";
5
5
  import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
6
6
  import HiddenInput from "../_private/HiddenInput/index.js";
7
7
  import { useFormControl } from "../FormControl/index.js";
@@ -1 +1 @@
1
- @layer rs.checkbox.base;@layer rs.checkbox.error;@layer rs.checkbox.checked;@layer rs.checkbox.disabled;@layer rs.checkbox.base{.root{align-items:center;cursor:pointer;display:inline-flex;gap:var(--rs-checkbox-gap);user-select:none;vertical-align:top;-webkit-tap-highlight-color:transparent}.root:hover .decorator{background:var(--rs-color-background-neutral-faded)}.field{position:relative}.decorator{background:var(--rs-color-background-elevation-base);border:1px solid var(--rs-color-border-neutral);border-radius:var(--rs-radius-small);color:var(--rs-color-on-background-primary);height:var(--rs-checkbox-line-height);transition:var(--rs-duration-fast) var(--rs-easing-standard);transition-property:background-color,border-color;width:var(--rs-checkbox-line-height)}.decorator:before{background:var(--rs-color-on-background-primary);border-radius:999px;content:"";height:1.5px;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%) scale(0);transition:var(--rs-duration-fast) var(--rs-easing-standard);transition-property:opacity,transform;width:calc(var(--rs-checkbox-line-height) * .5)}.--size-small{--rs-checkbox-line-height:var(--rs-line-height-caption-1);--rs-checkbox-gap:var(--rs-unit-x1)}.--size-medium{--rs-checkbox-line-height:var(--rs-line-height-body-3);--rs-checkbox-gap:var(--rs-unit-x2)}.--size-large{--rs-checkbox-line-height:var(--rs-line-height-body-2);--rs-checkbox-gap:var(--rs-unit-x2)}.icon{left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%) scale(0);transition:var(--rs-duration-fast) var(--rs-easing-standard);transition-property:opacity,transform}[data-rs-keyboard] .input:focus-visible+.decorator{box-shadow:var(--rs-focus-shadow)}}@layer rs.checkbox.error{.root.--error .decorator{border-color:var(--rs-color-border-critical)}}@layer rs.checkbox.checked{.input:checked+.decorator,.input:indeterminate+.decorator{background:var(--rs-color-background-primary);border-color:var(--rs-color-background-primary)}.input:checked+.decorator .icon,.input:indeterminate+.decorator:before{opacity:1;transform:translate(-50%,-50%) scale(1)}}@layer rs.checkbox.disabled{.root.--disabled{color:var(--rs-color-foreground-disabled);cursor:not-allowed}.root.--disabled .decorator{background:var(--rs-color-background-disabled-faded);border-color:var(--rs-color-border-disabled);color:var(--rs-color-foreground-disabled)}.root.--disabled .input:checked+.decorator,.root.--disabled .input:indeterminate+.decorator{background:var(--rs-color-background-disabled);border-color:transparent}.root.--disabled .input:checked+.decorator:before,.root.--disabled .input:indeterminate+.decorator:before{background-color:var(--rs-color-foreground-disabled)}}@media (--rs-viewport-m ){.--size-small--m{--rs-checkbox-line-height:var(--rs-line-height-caption-1);--rs-checkbox-gap:var(--rs-unit-x1)}.--size-medium--m{--rs-checkbox-line-height:var(--rs-line-height-body-3);--rs-checkbox-gap:var(--rs-unit-x2)}.--size-large--m{--rs-checkbox-line-height:var(--rs-line-height-body-2);--rs-checkbox-gap:var(--rs-unit-x2)}}@media (--rs-viewport-l ){.--size-small--l{--rs-checkbox-line-height:var(--rs-line-height-caption-1);--rs-checkbox-gap:var(--rs-unit-x1)}.--size-medium--l{--rs-checkbox-line-height:var(--rs-line-height-body-3);--rs-checkbox-gap:var(--rs-unit-x2)}.--size-large--l{--rs-checkbox-line-height:var(--rs-line-height-body-2);--rs-checkbox-gap:var(--rs-unit-x2)}}@media (--rs-viewport-xl ){.--size-small--xl{--rs-checkbox-line-height:var(--rs-line-height-caption-1);--rs-checkbox-gap:var(--rs-unit-x1)}.--size-medium--xl{--rs-checkbox-line-height:var(--rs-line-height-body-3);--rs-checkbox-gap:var(--rs-unit-x2)}.--size-large--xl{--rs-checkbox-line-height:var(--rs-line-height-body-2);--rs-checkbox-gap:var(--rs-unit-x2)}}
1
+ .root{align-items:center;cursor:pointer;display:inline-flex;gap:var(--rs-checkbox-gap);user-select:none;vertical-align:top;-webkit-tap-highlight-color:transparent}.root:hover .decorator{background:var(--rs-color-background-neutral-faded)}.field{position:relative}.decorator{background:var(--rs-color-background-elevation-base);border:1px solid var(--rs-color-border-neutral);border-radius:var(--rs-radius-small);color:var(--rs-color-on-background-primary);height:var(--rs-checkbox-line-height);transition:var(--rs-duration-fast) var(--rs-easing-standard);transition-property:background-color,border-color;width:var(--rs-checkbox-line-height)}.decorator:before{background:var(--rs-color-on-background-primary);border-radius:999px;content:"";height:1.5px;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%) scale(0);transition:var(--rs-duration-fast) var(--rs-easing-standard);transition-property:opacity,transform;width:calc(var(--rs-checkbox-line-height) * .5)}.--size-small{--rs-checkbox-line-height:var(--rs-line-height-caption-1);--rs-checkbox-gap:var(--rs-unit-x1)}.--size-medium{--rs-checkbox-line-height:var(--rs-line-height-body-3);--rs-checkbox-gap:var(--rs-unit-x2)}.--size-large{--rs-checkbox-line-height:var(--rs-line-height-body-2);--rs-checkbox-gap:var(--rs-unit-x2)}.icon{left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%) scale(0);transition:var(--rs-duration-fast) var(--rs-easing-standard);transition-property:opacity,transform}[data-rs-keyboard] .input:focus-visible+.decorator{box-shadow:var(--rs-focus-shadow)}.root.--error .decorator{border-color:var(--rs-color-border-critical)}.input:checked+.decorator,.input:indeterminate+.decorator{background:var(--rs-color-background-primary);border-color:var(--rs-color-background-primary)}.input:checked+.decorator .icon,.input:indeterminate+.decorator:before{opacity:1;transform:translate(-50%,-50%) scale(1)}.root.--disabled{color:var(--rs-color-foreground-disabled);cursor:not-allowed}.root.--disabled .decorator{background:var(--rs-color-background-disabled-faded);border-color:var(--rs-color-border-disabled);color:var(--rs-color-foreground-disabled)}.root.--disabled .input:checked+.decorator,.root.--disabled .input:indeterminate+.decorator{background:var(--rs-color-background-disabled);border-color:transparent}.root.--disabled .input:checked+.decorator:before,.root.--disabled .input:indeterminate+.decorator:before{background-color:var(--rs-color-foreground-disabled)}@media (--rs-viewport-m ){.--size-small--m{--rs-checkbox-line-height:var(--rs-line-height-caption-1);--rs-checkbox-gap:var(--rs-unit-x1)}.--size-medium--m{--rs-checkbox-line-height:var(--rs-line-height-body-3);--rs-checkbox-gap:var(--rs-unit-x2)}.--size-large--m{--rs-checkbox-line-height:var(--rs-line-height-body-2);--rs-checkbox-gap:var(--rs-unit-x2)}}@media (--rs-viewport-l ){.--size-small--l{--rs-checkbox-line-height:var(--rs-line-height-caption-1);--rs-checkbox-gap:var(--rs-unit-x1)}.--size-medium--l{--rs-checkbox-line-height:var(--rs-line-height-body-3);--rs-checkbox-gap:var(--rs-unit-x2)}.--size-large--l{--rs-checkbox-line-height:var(--rs-line-height-body-2);--rs-checkbox-gap:var(--rs-unit-x2)}}@media (--rs-viewport-xl ){.--size-small--xl{--rs-checkbox-line-height:var(--rs-line-height-caption-1);--rs-checkbox-gap:var(--rs-unit-x1)}.--size-medium--xl{--rs-checkbox-line-height:var(--rs-line-height-body-3);--rs-checkbox-gap:var(--rs-unit-x2)}.--size-large--xl{--rs-checkbox-line-height:var(--rs-line-height-body-2);--rs-checkbox-gap:var(--rs-unit-x2)}}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "../../utilities/helpers.js";
2
+ import { classNames } from "../../utilities/props.js";
3
3
  import View from "../View/index.js";
4
4
  import s from "./Container.module.css";
5
5
  const Container = (props) => {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { classNames } from "../../utilities/helpers.js";
3
+ import { classNames } from "../../utilities/props.js";
4
4
  import Button from "../Button/index.js";
5
5
  import IconClose from "../../icons/Close.js";
6
6
  import s from "./Dismissible.module.css";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames, responsiveClassNames } from "../../utilities/helpers.js";
2
+ import { classNames, responsiveClassNames } from "../../utilities/props.js";
3
3
  import Text from "../Text/index.js";
4
4
  import s from "./Divider.module.css";
5
5
  const Divider = (props) => {
@@ -8,7 +8,7 @@ import { useFlyoutContext } from "../Flyout/index.js";
8
8
  import IconChevronRight from "../../icons/ChevronRight.js";
9
9
  import useHotkeys from "../../hooks/useHotkeys.js";
10
10
  import useRTL from "../../hooks/useRTL.js";
11
- import { classNames } from "../../utilities/helpers.js";
11
+ import { classNames } from "../../utilities/props.js";
12
12
  import * as keys from "../../constants/keys.js";
13
13
  import s from "./DropdownMenu.module.css";
14
14
  const DropdownMenuSubContext = React.createContext(null);
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { classNames } from "../../utilities/helpers.js";
3
+ import { classNames } from "../../utilities/props.js";
4
4
  import View from "../View/index.js";
5
5
  import HiddenVisually from "../HiddenVisually/index.js";
6
6
  import useToggle from "../../hooks/useToggle.js";
@@ -21,8 +21,8 @@ export type Options = {
21
21
  container?: HTMLElement | null;
22
22
  rtl: boolean;
23
23
  fallbackPositions?: Position[];
24
- lastUsedFallback: Position;
25
- onFallback: (position: Position) => void;
24
+ lastUsedPosition: Position;
25
+ onPositionChoose: (position: Position) => void;
26
26
  contentGap?: number;
27
27
  contentShift?: number;
28
28
  };
@@ -39,6 +39,7 @@ export type FlyoutData = {
39
39
  export type UseFlyoutData = Pick<State, "styles" | "position" | "status"> & {
40
40
  updatePosition: (args?: {
41
41
  sync?: boolean;
42
+ fallback?: boolean;
42
43
  }) => void;
43
44
  render: () => void;
44
45
  hide: () => void;
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import { classNames, throttleHandler } from "../../utilities/helpers.js";
4
+ import { classNames } from "../../utilities/props.js";
5
+ import { rafThrottle } from "../../utilities/helpers.js";
5
6
  import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
6
7
  import Portal from "../_private/Portal/index.js";
7
8
  import { findClosestPositionContainer, findClosestScrollableContainer } from "../../utilities/dom/index.js";
@@ -23,7 +24,7 @@ const FlyoutContent = (props) => {
23
24
  const closestScrollableContainer = React.useMemo(() => {
24
25
  if (!mounted)
25
26
  return;
26
- if (!triggerElRef)
27
+ if (!triggerElRef?.current)
27
28
  return;
28
29
  return findClosestScrollableContainer({ el: triggerElRef.current });
29
30
  }, [mounted, triggerElRef]);
@@ -42,29 +43,31 @@ const FlyoutContent = (props) => {
42
43
  return () => el.removeEventListener("transitionstart", handleTransitionStart);
43
44
  }, [handleTransitionStart, flyoutElRef, status]);
44
45
  React.useEffect(() => {
45
- if (closestScrollableContainer === document.body)
46
+ if (status !== "visible")
46
47
  return;
48
+ console.log(closestScrollableContainer);
49
+ // if (closestScrollableContainer === document.body) return;
47
50
  if (!closestScrollableContainer)
48
51
  return;
49
52
  const triggerEl = triggerElRef?.current;
50
53
  const containerEl = closestScrollableContainer;
51
- const handleScroll = throttleHandler(() => {
54
+ const handleScroll = rafThrottle(() => {
52
55
  const triggerBounds = triggerEl?.getBoundingClientRect();
53
56
  const containerBounds = containerEl.getBoundingClientRect();
54
57
  if (triggerBounds &&
55
- (triggerBounds.bottom < containerBounds.top ||
56
- triggerBounds.right < containerBounds.left ||
57
- triggerBounds.left > containerBounds.right ||
58
- triggerBounds.top > containerBounds.bottom)) {
58
+ (triggerBounds.top < containerBounds.top ||
59
+ triggerBounds.left < containerBounds.left ||
60
+ triggerBounds.right > containerBounds.right ||
61
+ triggerBounds.bottom > containerBounds.bottom)) {
59
62
  handleClose({});
60
63
  }
61
64
  else {
62
- flyout.updatePosition({ sync: true });
65
+ flyout.updatePosition({ sync: true, fallback: false });
63
66
  }
64
- }, 16);
67
+ });
65
68
  closestScrollableContainer.addEventListener("scroll", handleScroll, { passive: true });
66
69
  return () => closestScrollableContainer.removeEventListener("scroll", handleScroll);
67
- }, [closestScrollableContainer, flyout, handleClose, triggerElRef]);
70
+ }, [closestScrollableContainer, flyout, status, handleClose, triggerElRef]);
68
71
  if (status === "idle" || !mounted)
69
72
  return null;
70
73
  const rootClassNames = classNames(s.content, triggerType === "hover" && s["--hover"], status === "visible" && s["--visible"],
@@ -71,6 +71,10 @@ export declare const testInsideScrollable: {
71
71
  name: string;
72
72
  render: () => React.JSX.Element;
73
73
  };
74
+ export declare const testInsideModal: {
75
+ name: string;
76
+ render: () => React.JSX.Element;
77
+ };
74
78
  export declare const testDynamicBounds: {
75
79
  name: string;
76
80
  render: () => React.JSX.Element;
@@ -11,6 +11,7 @@ import TextField from "../../TextField/index.js";
11
11
  import Select from "../../Select/index.js";
12
12
  import Switch from "../../Switch/index.js";
13
13
  import { sleep } from "../../../utilities/helpers.js";
14
+ import Modal from "../../Modal/index.js";
14
15
  export default { title: "Utility components/Flyout" };
15
16
  const Content = (props) => (<div style={{
16
17
  background: "var(--rs-color-background-elevation-overlay)",
@@ -420,7 +421,7 @@ export const testShadowDom = {
420
421
  export const testInsideFixed = {
421
422
  name: "test: inside position fixed",
422
423
  render: () => (<React.Fragment>
423
- <View position="fixed" insetBottom={2} insetStart={2} insetEnd={2} backgroundColor="elevation-overlay" borderColor="neutral-faded" borderRadius="small" padding={4} zIndex={10} attributes={{ "data-testid": "container" }}>
424
+ <View position="fixed" insetBottom={2} insetStart={2} insetEnd={2} backgroundColor="elevation-overlay" borderColor="neutral-faded" borderRadius="small" padding={4} zIndex={10} attributes={{ "data-testid": "container" }} height={20}>
424
425
  <Demo defaultActive position="top-start"/>
425
426
  </View>
426
427
  <View paddingTop={18} gap={4}>
@@ -455,15 +456,30 @@ export const testInsideScrollable = {
455
456
  name: "test: inside scrollable",
456
457
  render: () => {
457
458
  const containerRef = React.useRef(null);
458
- return (<View padding={50}>
459
+ return (<View padding={20}>
459
460
  <View height={30} overflow="auto" backgroundColor="neutral-faded" borderRadius="small">
460
- <View height={50} attributes={{ ref: containerRef }} padding={4} paddingBottom={30}>
461
- <Demo position="start"/>
461
+ <View height={50} attributes={{ ref: containerRef }} padding={20} paddingBottom={30}>
462
+ <Demo position="bottom"/>
462
463
  </View>
463
464
  </View>
464
465
  </View>);
465
466
  },
466
467
  };
468
+ export const testInsideModal = {
469
+ name: "test: inside modal",
470
+ render: () => {
471
+ return (<Modal active position="end">
472
+ <View gap={4} align="start">
473
+ <Modal.Title>Title</Modal.Title>
474
+ <Demo position="bottom-start"/>
475
+ <View height={300} width={25} backgroundColor="neutral-faded"/>
476
+ <Demo position="start"/>
477
+ <View height={300} width={25} backgroundColor="neutral-faded"/>
478
+ <Demo position="bottom-start"/>
479
+ </View>
480
+ </Modal>);
481
+ },
482
+ };
467
483
  export const testDynamicBounds = {
468
484
  name: "test: auto position update",
469
485
  render: () => {
@@ -39,7 +39,7 @@ const flyoutReducer = (state, action) => {
39
39
  const useFlyout = (args) => {
40
40
  const { triggerElRef, flyoutElRef, triggerBounds, contentGap, contentShift, ...options } = args;
41
41
  const { position: defaultPosition = "bottom", fallbackPositions, width, container } = options;
42
- const lastUsedFallbackRef = React.useRef(defaultPosition);
42
+ const lastUsedPositionRef = React.useRef(defaultPosition);
43
43
  // Memo the array internally to avoid new arrays triggering useCallback
44
44
  const cachedFallbackPositions = React.useMemo(() => fallbackPositions,
45
45
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -62,28 +62,32 @@ const useFlyout = (args) => {
62
62
  const remove = React.useCallback(() => {
63
63
  dispatch({ type: "remove" });
64
64
  }, []);
65
- const handleFallback = React.useCallback((position) => {
66
- lastUsedFallbackRef.current = position;
65
+ const handlePosition = React.useCallback((position) => {
66
+ lastUsedPositionRef.current = position;
67
67
  }, []);
68
68
  const updatePosition = React.useCallback((options) => {
69
69
  if (!flyoutElRef.current)
70
70
  return;
71
+ const changePositon = options?.fallback !== false;
71
72
  const nextFlyoutData = flyout({
72
73
  triggerEl: triggerElRef.current,
73
74
  flyoutEl: flyoutElRef.current,
74
75
  triggerBounds,
75
76
  width,
76
- position: defaultPosition,
77
- fallbackPositions: cachedFallbackPositions,
78
- lastUsedFallback: lastUsedFallbackRef.current,
79
- onFallback: handleFallback,
77
+ position: changePositon ? defaultPosition : lastUsedPositionRef.current,
78
+ fallbackPositions: changePositon ? cachedFallbackPositions : [],
79
+ lastUsedPosition: lastUsedPositionRef.current,
80
+ onPositionChoose: handlePosition,
80
81
  rtl: isRTL,
81
82
  container,
82
83
  contentGap,
83
84
  contentShift,
84
85
  });
85
86
  if (nextFlyoutData) {
86
- dispatch({ type: "position", payload: { ...nextFlyoutData, sync: options?.sync } });
87
+ dispatch({
88
+ type: "position",
89
+ payload: { ...nextFlyoutData, sync: options?.sync },
90
+ });
87
91
  }
88
92
  }, [
89
93
  container,
@@ -96,7 +100,7 @@ const useFlyout = (args) => {
96
100
  width,
97
101
  contentGap,
98
102
  contentShift,
99
- handleFallback,
103
+ handlePosition,
100
104
  ]);
101
105
  React.useEffect(() => {
102
106
  if (state.status === "rendered")
@@ -13,7 +13,7 @@ declare const calculatePosition: (args: {
13
13
  } & Pick<T.Options, "position" | "rtl" | "width" | "contentGap" | "contentShift">) => {
14
14
  position: T.Position;
15
15
  styles: {
16
- width: number | undefined;
16
+ width: string | number | undefined;
17
17
  left: number | undefined;
18
18
  right: number | undefined;
19
19
  top: number | undefined;
@@ -111,7 +111,7 @@ const calculatePosition = (args) => {
111
111
  return {
112
112
  position,
113
113
  styles: {
114
- width: widthStyle,
114
+ width: widthStyle ?? width,
115
115
  left: right === null ? 0 : undefined,
116
116
  right: right === null ? undefined : 0,
117
117
  top: bottom === null ? 0 : undefined,