reshaped 3.9.1-canary.3 → 3.10.0-canary.10

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 (229) hide show
  1. package/dist/bundle.css +1 -1
  2. package/dist/bundle.d.ts +5 -12
  3. package/dist/bundle.js +2 -2
  4. package/dist/cli/theming/tailwind.js +1 -0
  5. package/dist/components/Accordion/Accordion.types.d.ts +3 -2
  6. package/dist/components/Accordion/AccordionControlled.js +1 -2
  7. package/dist/components/Accordion/AccordionTrigger.js +1 -1
  8. package/dist/components/ActionBar/ActionBar.js +2 -1
  9. package/dist/components/ActionBar/ActionBar.types.d.ts +3 -2
  10. package/dist/components/Actionable/Actionable.d.ts +2 -2
  11. package/dist/components/Actionable/Actionable.js +1 -1
  12. package/dist/components/Actionable/Actionable.types.d.ts +1 -1
  13. package/dist/components/Actionable/index.d.ts +1 -1
  14. package/dist/components/Alert/Alert.types.d.ts +3 -2
  15. package/dist/components/Autocomplete/Autocomplete.js +3 -5
  16. package/dist/components/Autocomplete/Autocomplete.types.d.ts +1 -1
  17. package/dist/components/Avatar/Avatar.js +2 -1
  18. package/dist/components/Avatar/Avatar.types.d.ts +5 -4
  19. package/dist/components/Badge/Badge.js +1 -1
  20. package/dist/components/Badge/Badge.types.d.ts +4 -4
  21. package/dist/components/Badge/BadgeContainer.js +1 -1
  22. package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
  23. package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +3 -3
  24. package/dist/components/Button/Button.js +2 -1
  25. package/dist/components/Button/Button.types.d.ts +3 -2
  26. package/dist/components/Button/ButtonGroup.js +1 -1
  27. package/dist/components/Calendar/CalendarDate.js +1 -1
  28. package/dist/components/Calendar/useCalendarKeyboardNavigation.js +1 -1
  29. package/dist/components/Card/Card.d.ts +6 -14
  30. package/dist/components/Card/Card.js +1 -1
  31. package/dist/components/Card/Card.types.d.ts +4 -3
  32. package/dist/components/Carousel/Carousel.js +3 -4
  33. package/dist/components/Carousel/Carousel.types.d.ts +3 -2
  34. package/dist/components/Carousel/CarouselControl.js +1 -2
  35. package/dist/components/Checkbox/Checkbox.js +2 -2
  36. package/dist/components/Checkbox/Checkbox.types.d.ts +4 -3
  37. package/dist/components/Container/Container.js +1 -1
  38. package/dist/components/Container/Container.types.d.ts +3 -2
  39. package/dist/components/ContextMenu/ContextMenu.js +1 -2
  40. package/dist/components/Dismissible/Dismissible.js +1 -1
  41. package/dist/components/Dismissible/Dismissible.types.d.ts +3 -3
  42. package/dist/components/Divider/Divider.js +2 -1
  43. package/dist/components/Divider/Divider.types.d.ts +3 -2
  44. package/dist/components/DropdownMenu/DropdownMenu.js +1 -3
  45. package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +1 -1
  46. package/dist/components/FileUpload/FileUpload.js +1 -2
  47. package/dist/components/FileUpload/FileUpload.types.d.ts +4 -3
  48. package/dist/components/Flyout/Flyout.module.css +1 -1
  49. package/dist/components/Flyout/Flyout.types.d.ts +9 -7
  50. package/dist/components/Flyout/FlyoutContent.js +3 -3
  51. package/dist/components/Flyout/FlyoutControlled.js +4 -6
  52. package/dist/components/Flyout/useFlyout.d.ts +2 -2
  53. package/dist/components/Flyout/useFlyout.js +5 -5
  54. package/dist/components/Flyout/utilities/safeArea.d.ts +2 -2
  55. package/dist/components/Flyout/utilities/safeArea.js +0 -14
  56. package/dist/components/Grid/Grid.js +2 -1
  57. package/dist/components/Grid/Grid.types.d.ts +5 -4
  58. package/dist/components/Hidden/Hidden.js +2 -1
  59. package/dist/components/HiddenInput/HiddenInput.js +1 -1
  60. package/dist/components/HiddenInput/HiddenInput.types.d.ts +3 -2
  61. package/dist/components/Hotkey/Hotkey.js +1 -1
  62. package/dist/components/Hotkey/Hotkey.types.d.ts +3 -3
  63. package/dist/components/Icon/Icon.js +1 -1
  64. package/dist/components/Icon/Icon.types.d.ts +3 -2
  65. package/dist/components/Image/Image.js +1 -1
  66. package/dist/components/Image/Image.types.d.ts +5 -4
  67. package/dist/components/Link/Link.js +1 -1
  68. package/dist/components/Loader/Loader.js +2 -1
  69. package/dist/components/Loader/Loader.types.d.ts +3 -2
  70. package/dist/components/MenuItem/MenuItem.js +2 -1
  71. package/dist/components/MenuItem/MenuItem.types.d.ts +3 -2
  72. package/dist/components/Modal/Modal.js +7 -6
  73. package/dist/components/Modal/Modal.types.d.ts +5 -4
  74. package/dist/components/NumberField/NumberFieldControlled.js +1 -2
  75. package/dist/components/Overlay/Overlay.js +7 -12
  76. package/dist/components/Overlay/Overlay.types.d.ts +5 -3
  77. package/dist/components/Pagination/Pagination.types.d.ts +3 -3
  78. package/dist/components/PinField/PinField.types.d.ts +4 -3
  79. package/dist/components/PinField/PinFieldControlled.js +1 -1
  80. package/dist/components/Popover/Popover.js +1 -1
  81. package/dist/components/Popover/Popover.types.d.ts +1 -1
  82. package/dist/components/Progress/Progress.js +1 -1
  83. package/dist/components/Progress/Progress.types.d.ts +3 -3
  84. package/dist/components/ProgressIndicator/ProgressIndicator.js +1 -1
  85. package/dist/components/ProgressIndicator/ProgressIndicator.types.d.ts +3 -3
  86. package/dist/components/Radio/Radio.js +2 -1
  87. package/dist/components/Radio/Radio.types.d.ts +4 -3
  88. package/dist/components/RadioGroup/RadioGroup.types.d.ts +3 -2
  89. package/dist/components/Reshaped/Reshaped.js +4 -11
  90. package/dist/components/Reshaped/Reshaped.types.d.ts +3 -2
  91. package/dist/components/Resizable/Resizable.js +1 -1
  92. package/dist/components/Resizable/ResizableHandle.js +1 -1
  93. package/dist/components/Scrim/Scrim.js +1 -1
  94. package/dist/components/Scrim/Scrim.types.d.ts +4 -4
  95. package/dist/components/ScrollArea/ScrollArea.js +2 -4
  96. package/dist/components/ScrollArea/ScrollArea.types.d.ts +5 -3
  97. package/dist/components/Select/Select.types.d.ts +5 -4
  98. package/dist/components/Select/SelectNative.js +1 -1
  99. package/dist/components/Select/SelectRoot.js +2 -1
  100. package/dist/components/Skeleton/Skeleton.js +1 -1
  101. package/dist/components/Skeleton/Skeleton.types.d.ts +3 -3
  102. package/dist/components/Slider/Slider.types.d.ts +3 -3
  103. package/dist/components/Slider/Slider.utilities.d.ts +7 -0
  104. package/dist/components/Slider/Slider.utilities.js +11 -0
  105. package/dist/components/Slider/SliderControlled.js +15 -8
  106. package/dist/components/Slider/SliderThumb.js +1 -1
  107. package/dist/components/Stepper/Stepper.types.d.ts +5 -4
  108. package/dist/components/Switch/Switch.js +2 -1
  109. package/dist/components/Switch/Switch.types.d.ts +4 -3
  110. package/dist/components/Table/Table.js +2 -1
  111. package/dist/components/Table/Table.types.d.ts +12 -12
  112. package/dist/components/Tabs/Tabs.types.d.ts +6 -6
  113. package/dist/components/Tabs/TabsItem.js +2 -3
  114. package/dist/components/Tabs/TabsList.js +1 -4
  115. package/dist/components/Tabs/TabsPanel.js +2 -2
  116. package/dist/components/Text/Text.js +2 -1
  117. package/dist/components/Text/Text.types.d.ts +3 -2
  118. package/dist/components/TextArea/TextArea.js +2 -1
  119. package/dist/components/TextArea/TextArea.types.d.ts +5 -4
  120. package/dist/components/TextField/TextField.js +2 -1
  121. package/dist/components/TextField/TextField.types.d.ts +4 -3
  122. package/dist/components/Theme/GlobalColorMode.js +1 -1
  123. package/dist/components/Theme/Theme.js +1 -2
  124. package/dist/components/Theme/Theme.types.d.ts +2 -1
  125. package/dist/components/Timeline/Timeline.js +1 -1
  126. package/dist/components/Timeline/Timeline.types.d.ts +5 -5
  127. package/dist/components/Toast/Toast.types.d.ts +3 -3
  128. package/dist/components/Toast/ToastContainer.js +2 -2
  129. package/dist/components/Toast/ToastRegion.js +2 -2
  130. package/dist/components/ToggleButton/ToggleButtonUncontrolled.js +1 -1
  131. package/dist/components/ToggleButtonGroup/ToggleButtonGroupControlled.js +1 -1
  132. package/dist/components/Tooltip/Tooltip.types.d.ts +1 -1
  133. package/dist/components/View/View.js +2 -1
  134. package/dist/components/View/View.types.d.ts +5 -4
  135. package/dist/components/_private/Aligner/Aligner.js +1 -1
  136. package/dist/components/_private/Aligner/Aligner.types.d.ts +3 -3
  137. package/dist/components/_private/Expandable/Expandable.js +2 -2
  138. package/dist/components/_private/Expandable/Expandable.types.d.ts +2 -2
  139. package/dist/components/_private/Portal/Portal.js +1 -2
  140. package/dist/hooks/_private/useDrag.js +2 -4
  141. package/dist/hooks/_private/useFadeSide.js +2 -3
  142. package/dist/hooks/_private/useSingletonViewport.d.ts +10 -0
  143. package/dist/hooks/_private/useSingletonViewport.js +52 -0
  144. package/dist/hooks/useResponsiveClientValue.js +15 -53
  145. package/dist/hooks/useViewport.d.ts +2 -0
  146. package/dist/hooks/useViewport.js +6 -0
  147. package/dist/index.d.ts +5 -12
  148. package/dist/index.js +3 -11
  149. package/dist/styles/mixin.d.ts +2 -2
  150. package/dist/styles/types.d.ts +2 -1
  151. package/dist/tests/ThemesPlayground.js +1 -1
  152. package/dist/themes/figma/tailwind.css +1 -1
  153. package/dist/themes/fragments/twitter/tailwind.css +1 -1
  154. package/dist/themes/reshaped/tailwind.css +1 -1
  155. package/dist/themes/slate/tailwind.css +1 -1
  156. package/dist/types/global.d.ts +0 -15
  157. package/dist/utilities/helpers.d.ts +0 -1
  158. package/dist/utilities/helpers.js +0 -14
  159. package/dist/utilities/props.d.ts +2 -5
  160. package/dist/utilities/props.js +0 -18
  161. package/package.json +4 -4
  162. package/dist/core/Actionable/Actionable.d.ts +0 -4
  163. package/dist/core/Actionable/Actionable.js +0 -73
  164. package/dist/core/Actionable/Actionable.types.d.ts +0 -34
  165. package/dist/core/Actionable/Actionable.types.js +0 -1
  166. package/dist/core/Actionable/index.d.ts +0 -2
  167. package/dist/core/Actionable/index.js +0 -1
  168. package/dist/hooks/_private/useSingletonEnvironment.d.ts +0 -9
  169. package/dist/hooks/_private/useSingletonEnvironment.js +0 -33
  170. package/dist/hooks/_private/useSingletonHotkeys.d.ts +0 -35
  171. package/dist/hooks/_private/useSingletonHotkeys.js +0 -191
  172. package/dist/hooks/_private/useSingletonKeyboardMode.d.ts +0 -13
  173. package/dist/hooks/_private/useSingletonKeyboardMode.js +0 -58
  174. package/dist/hooks/useHandlerRef.d.ts +0 -8
  175. package/dist/hooks/useHandlerRef.js +0 -16
  176. package/dist/hooks/useHotkeys.d.ts +0 -11
  177. package/dist/hooks/useHotkeys.js +0 -27
  178. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +0 -3
  179. package/dist/hooks/useIsomorphicLayoutEffect.js +0 -4
  180. package/dist/hooks/useKeyboardArrowNavigation.d.ts +0 -9
  181. package/dist/hooks/useKeyboardArrowNavigation.js +0 -62
  182. package/dist/hooks/useKeyboardMode.d.ts +0 -7
  183. package/dist/hooks/useKeyboardMode.js +0 -13
  184. package/dist/hooks/useOnClickOutside.d.ts +0 -5
  185. package/dist/hooks/useOnClickOutside.js +0 -63
  186. package/dist/hooks/useRTL.d.ts +0 -2
  187. package/dist/hooks/useRTL.js +0 -7
  188. package/dist/hooks/useScrollLock.d.ts +0 -10
  189. package/dist/hooks/useScrollLock.js +0 -25
  190. package/dist/hooks/useToggle.d.ts +0 -7
  191. package/dist/hooks/useToggle.js +0 -19
  192. package/dist/utilities/Chain.d.ts +0 -20
  193. package/dist/utilities/Chain.js +0 -60
  194. package/dist/utilities/a11y/TrapFocus.d.ts +0 -28
  195. package/dist/utilities/a11y/TrapFocus.js +0 -162
  196. package/dist/utilities/a11y/TrapScreenReader.d.ts +0 -15
  197. package/dist/utilities/a11y/TrapScreenReader.js +0 -42
  198. package/dist/utilities/a11y/focus.d.ts +0 -38
  199. package/dist/utilities/a11y/focus.js +0 -101
  200. package/dist/utilities/a11y/index.d.ts +0 -4
  201. package/dist/utilities/a11y/index.js +0 -3
  202. package/dist/utilities/a11y/keyboardMode.d.ts +0 -3
  203. package/dist/utilities/a11y/keyboardMode.js +0 -10
  204. package/dist/utilities/a11y/types.d.ts +0 -24
  205. package/dist/utilities/a11y/types.js +0 -1
  206. package/dist/utilities/css.d.ts +0 -7
  207. package/dist/utilities/css.js +0 -18
  208. package/dist/utilities/dom/event.d.ts +0 -7
  209. package/dist/utilities/dom/event.js +0 -11
  210. package/dist/utilities/dom/find.d.ts +0 -10
  211. package/dist/utilities/dom/find.js +0 -37
  212. package/dist/utilities/dom/index.d.ts +0 -3
  213. package/dist/utilities/dom/index.js +0 -3
  214. package/dist/utilities/dom/shadowDom.d.ts +0 -1
  215. package/dist/utilities/dom/shadowDom.js +0 -4
  216. package/dist/utilities/platform.d.ts +0 -1
  217. package/dist/utilities/platform.js +0 -16
  218. package/dist/utilities/scroll/disable.d.ts +0 -7
  219. package/dist/utilities/scroll/disable.js +0 -15
  220. package/dist/utilities/scroll/helpers.d.ts +0 -1
  221. package/dist/utilities/scroll/helpers.js +0 -17
  222. package/dist/utilities/scroll/index.d.ts +0 -2
  223. package/dist/utilities/scroll/index.js +0 -2
  224. package/dist/utilities/scroll/lock.d.ts +0 -5
  225. package/dist/utilities/scroll/lock.js +0 -32
  226. package/dist/utilities/scroll/lockSafari.d.ts +0 -2
  227. package/dist/utilities/scroll/lockSafari.js +0 -20
  228. package/dist/utilities/scroll/lockStandard.d.ts +0 -4
  229. package/dist/utilities/scroll/lockStandard.js +0 -15
@@ -34,6 +34,7 @@ export const transformToTailwind = (theme) => {
34
34
  if (cssTokenName.startsWith("border-")) {
35
35
  const name = cssTokenName.replace("border-", "");
36
36
  variables[`--border-color-${name}`] = configValue;
37
+ variables[`--outline-color-${name}`] = configValue;
37
38
  return;
38
39
  }
39
40
  variables[`--color-${cssTokenName}`] = configValue;
@@ -1,3 +1,4 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type { IconProps } from "../Icon";
2
3
  import type React from "react";
3
4
  import type * as G from "../../types/global";
@@ -13,9 +14,9 @@ export type BaseProps = {
13
14
  /** Callback when the accordion is expanded or collapsed */
14
15
  onToggle?: (active: boolean) => void;
15
16
  /** Additional classname for the root element */
16
- className?: G.ClassName;
17
+ className?: ClassName;
17
18
  /** Additional attributes for the root element */
18
- attributes?: G.Attributes<"div">;
19
+ attributes?: Attributes<"div">;
19
20
  };
20
21
  export type TriggerProps = {
21
22
  /** Node or render function for inserting the trigger */
@@ -1,9 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { classNames, useHandlerRef } from "@reshaped/headless";
3
4
  import React from "react";
4
5
  import useElementId from "../../hooks/useElementId.js";
5
- import useHandlerRef from "../../hooks/useHandlerRef.js";
6
- import { classNames } from "../../utilities/props.js";
7
6
  import AccordionContext from "./Accordion.context.js";
8
7
  const AccordionControlled = (props) => {
9
8
  const { children, onToggle, active, iconPosition, iconSize, gap, className, attributes } = props;
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { classNames } from "@reshaped/headless";
3
4
  import React from "react";
4
5
  import Actionable from "../Actionable/index.js";
5
6
  import Icon from "../Icon/index.js";
6
7
  import View from "../View/index.js";
7
8
  import IconChevronDown from "../../icons/ChevronDown.js";
8
- import { classNames } from "../../utilities/props.js";
9
9
  import AccordionContext from "./Accordion.context.js";
10
10
  import s from "./Accordion.module.css";
11
11
  const AccordionTrigger = (props) => {
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "@reshaped/headless";
2
3
  import View from "../View/index.js";
3
- import { classNames, responsiveVariables } from "../../utilities/props.js";
4
+ import { responsiveVariables } from "../../utilities/props.js";
4
5
  import s from "./ActionBar.module.css";
5
6
  const fullWidthPositions = ["top", "bottom"];
6
7
  const ActionBar = (props) => {
@@ -1,3 +1,4 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type { ViewProps } from "../View";
2
3
  import type React from "react";
3
4
  import type * as G from "../../types/global";
@@ -17,7 +18,7 @@ export type Props = Pick<ViewProps, "paddingBlock" | "paddingInline" | "padding"
17
18
  /** Node for inserting the content */
18
19
  children?: React.ReactNode;
19
20
  /** Additional classname for the root element */
20
- className?: G.ClassName;
21
+ className?: ClassName;
21
22
  /** Additional attributes for the root element */
22
- attributes?: G.Attributes<"div">;
23
+ attributes?: Attributes<"div">;
23
24
  };
@@ -1,5 +1,5 @@
1
- import { type ActionableRef as UnstyledActionableRef } from "../../core/Actionable";
2
- declare const Actionable: import("react").ForwardRefExoticComponent<import("../../core/Actionable").ActionableProps & {
1
+ import { type ActionableRef as UnstyledActionableRef } from "@reshaped/headless";
2
+ declare const Actionable: import("react").ForwardRefExoticComponent<import("@reshaped/headless").ActionableProps & {
3
3
  touchHitbox?: boolean;
4
4
  fullWidth?: boolean;
5
5
  insetFocus?: boolean;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Actionable as UnstyledActionable, } from "@reshaped/headless";
3
4
  import { forwardRef } from "react";
4
- import UnstyledActionable from "../../core/Actionable/index.js";
5
5
  import s from "./Actionable.module.css";
6
6
  const Actionable = forwardRef((props, ref) => {
7
7
  const {
@@ -1,4 +1,4 @@
1
- import type { ActionableProps as UnstyledActionableProps } from "../../core/Actionable";
1
+ import type { ActionableProps as UnstyledActionableProps } from "@reshaped/headless";
2
2
  export type Props = UnstyledActionableProps & {
3
3
  /** Enable a minimum required touch hitbox */
4
4
  touchHitbox?: boolean;
@@ -1,3 +1,3 @@
1
1
  export { default } from "./Actionable";
2
2
  export type { Props as ActionableProps } from "./Actionable.types";
3
- export type { ActionableRef } from "../../core/Actionable";
3
+ export type { ActionableRef } from "@reshaped/headless";
@@ -1,3 +1,4 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type { IconProps } from "../Icon";
2
3
  import type React from "react";
3
4
  import type * as G from "../../types/global";
@@ -19,7 +20,7 @@ export type Props = {
19
20
  /** Apply negative margin and remove side borders, base unit token number multiplier */
20
21
  bleed?: G.Responsive<number>;
21
22
  /** Additional classname for the root element */
22
- className?: G.ClassName;
23
+ className?: ClassName;
23
24
  /** Additional attributes for the root element */
24
- attributes?: G.Attributes<"div">;
25
+ attributes?: Attributes<"div">;
25
26
  };
@@ -1,17 +1,15 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useIsomorphicLayoutEffect, useHotkeys, useHandlerRef } from "@reshaped/headless";
3
4
  import React from "react";
4
5
  import DropdownMenu from "../DropdownMenu/index.js";
5
6
  import TextField from "../TextField/index.js";
6
7
  import * as keys from "../../constants/keys.js";
7
8
  import useElementId from "../../hooks/useElementId.js";
8
- import useHandlerRef from "../../hooks/useHandlerRef.js";
9
- import useHotkeys from "../../hooks/useHotkeys.js";
10
- import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
11
9
  import s from "./Autocomplete.module.css";
12
10
  const AutocompleteContext = React.createContext({});
13
11
  const Autocomplete = (props) => {
14
- const { children, onChange, onInput, onItemSelect, name, containerRef, instanceRef, onBackspace, onEnter, active, onOpen, onClose, fallbackAdjustLayout, fallbackMinWidth, fallbackMinHeight, contentMaxHeight, ...textFieldProps } = props;
12
+ const { children, onChange, onInput, onItemSelect, name, containerRef, instanceRef, onBackspace, onEnter, active, onOpen, onClose, fallbackAdjustLayout, fallbackMinWidth, fallbackMinHeight, contentMaxHeight, contentZIndex, ...textFieldProps } = props;
15
13
  const [highlightedId, setHighlightedId] = React.useState();
16
14
  const onBackspaceRef = useHandlerRef(onBackspace);
17
15
  const contentRef = React.useRef(null);
@@ -120,7 +118,7 @@ const Autocomplete = (props) => {
120
118
  highlightedId,
121
119
  setHighlightedId,
122
120
  }), [highlightedId, handleItemClick]);
123
- return (_jsx(AutocompleteContext.Provider, { value: contextValue, children: _jsxs(DropdownMenu, { position: "bottom", width: "trigger", triggerType: "focus", trapFocusMode: false, active: isDropdownActive, onClose: handleClose, onOpen: handleOpen, containerRef: containerRef, fallbackAdjustLayout: fallbackAdjustLayout, fallbackMinWidth: fallbackMinWidth, fallbackMinHeight: fallbackMinHeight, contentMaxHeight: contentMaxHeight, disableHideAnimation: true, instanceRef: instanceRef, children: [_jsx(DropdownMenu.Trigger, { children: ({ ref, ...attributes }) => (_jsx(TextField, { ...textFieldProps, name: name, onChange: handleChange, focused: isDropdownActive, attributes: {
121
+ return (_jsx(AutocompleteContext.Provider, { value: contextValue, children: _jsxs(DropdownMenu, { position: "bottom", width: "trigger", triggerType: "focus", trapFocusMode: false, active: isDropdownActive, onClose: handleClose, onOpen: handleOpen, containerRef: containerRef, fallbackAdjustLayout: fallbackAdjustLayout, fallbackMinWidth: fallbackMinWidth, fallbackMinHeight: fallbackMinHeight, contentMaxHeight: contentMaxHeight, contentZIndex: contentZIndex, disableHideAnimation: true, instanceRef: instanceRef, children: [_jsx(DropdownMenu.Trigger, { children: ({ ref, ...attributes }) => (_jsx(TextField, { ...textFieldProps, name: name, onChange: handleChange, focused: isDropdownActive, attributes: {
124
122
  ...textFieldProps.attributes,
125
123
  // Ignoring the type check since TS can't infer the correct html element type
126
124
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -7,7 +7,7 @@ type SelectArgs = {
7
7
  /** Additional data that will be passed to the onItemSelect callback */
8
8
  data?: unknown;
9
9
  };
10
- export type Props = TextFieldProps & Pick<DropdownMenuProps, "containerRef" | "instanceRef" | "active" | "onOpen" | "onClose" | "fallbackAdjustLayout" | "fallbackMinWidth" | "fallbackMinHeight" | "contentMaxHeight"> & {
10
+ export type Props = TextFieldProps & Pick<DropdownMenuProps, "containerRef" | "instanceRef" | "active" | "onOpen" | "onClose" | "fallbackAdjustLayout" | "fallbackMinWidth" | "fallbackMinHeight" | "contentMaxHeight" | "contentZIndex"> & {
11
11
  /** Callback for when value changes from user input */
12
12
  onInput?: TextFieldProps["onChange"];
13
13
  /** Callback for when an item is selected in the dropdown */
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "@reshaped/headless";
2
3
  import Icon from "../Icon/index.js";
3
4
  import Image from "../Image/index.js";
4
5
  import View from "../View/index.js";
5
6
  import { resolveMixin } from "../../styles/mixin.js";
6
- import { classNames, responsivePropDependency } from "../../utilities/props.js";
7
+ import { responsivePropDependency } from "../../utilities/props.js";
7
8
  import s from "./Avatar.module.css";
8
9
  const Avatar = (props) => {
9
10
  const { color = "neutral", variant, src, size = 12, squared, initials, icon, className, renderImage, imageAttributes, attributes, } = props;
@@ -1,3 +1,4 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type { IconProps } from "../Icon";
2
3
  import type * as G from "../../types/global";
3
4
  export type Props = {
@@ -6,9 +7,9 @@ export type Props = {
6
7
  /** Image alt text */
7
8
  alt?: string;
8
9
  /** Additional attributes for the image element */
9
- imageAttributes?: G.Attributes<"img">;
10
+ imageAttributes?: Attributes<"img">;
10
11
  /** Render prop for the image element, useful for integrating with the Image component from third party frameworks */
11
- renderImage?: (attributes: Omit<G.Attributes<"img">, "src" | "alt"> & {
12
+ renderImage?: (attributes: Omit<Attributes<"img">, "src" | "alt"> & {
12
13
  src: string;
13
14
  alt: string;
14
15
  }) => React.ReactNode;
@@ -31,7 +32,7 @@ export type Props = {
31
32
  */
32
33
  size?: G.Responsive<number>;
33
34
  /** Additional classname for the root element */
34
- className?: G.ClassName;
35
+ className?: ClassName;
35
36
  /** Additional attributes for the root element */
36
- attributes?: G.Attributes<"div">;
37
+ attributes?: Attributes<"div">;
37
38
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { classNames } from "@reshaped/headless";
2
3
  import { forwardRef } from "react";
3
4
  import Actionable from "../Actionable/index.js";
4
5
  import Icon from "../Icon/index.js";
5
6
  import Text from "../Text/index.js";
6
7
  import IconClose from "../../icons/Close.js";
7
- import { classNames } from "../../utilities/props.js";
8
8
  import s from "./Badge.module.css";
9
9
  const Badge = forwardRef((props, ref) => {
10
10
  const { children, color, rounded, size = "medium", icon, endIcon, variant, hidden, highlighted, href, onClick, onDismiss, dismissAriaLabel, className, attributes, as, } = props;
@@ -1,7 +1,7 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type { ActionableProps } from "../Actionable";
2
3
  import type { IconProps } from "../Icon";
3
4
  import type React from "react";
4
- import type * as G from "../../types/global";
5
5
  type BaseProps = {
6
6
  /** Component color scheme
7
7
  * @default "neutral"
@@ -20,7 +20,7 @@ type BaseProps = {
20
20
  /** Transition the component to hidden state */
21
21
  hidden?: boolean;
22
22
  /** Additional classname for the root element */
23
- className?: G.ClassName;
23
+ className?: ClassName;
24
24
  } & Pick<ActionableProps, "href" | "onClick" | "attributes" | "as">;
25
25
  type WithChildren = BaseProps & {
26
26
  /** Node for inserting text or other content */
@@ -58,8 +58,8 @@ export type ContainerProps = {
58
58
  /** Node for inserting children to position the badge against */
59
59
  children: React.ReactNode;
60
60
  /** Additional classname for the root element */
61
- className?: G.ClassName;
61
+ className?: ClassName;
62
62
  /** Additional attributes for the root element */
63
- attributes?: G.Attributes<"div">;
63
+ attributes?: Attributes<"div">;
64
64
  };
65
65
  export {};
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "../../utilities/props.js";
2
+ import { classNames } from "@reshaped/headless";
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,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { classNames } from "@reshaped/headless";
3
4
  import React from "react";
4
5
  import Button from "../Button/index.js";
5
6
  import Icon from "../Icon/index.js";
@@ -7,7 +8,6 @@ import Text from "../Text/index.js";
7
8
  import View from "../View/index.js";
8
9
  import IconChevronRight from "../../icons/ChevronRight.js";
9
10
  import IconDotsHorizontal from "../../icons/DotsHorizontal.js";
10
- import { classNames } from "../../utilities/props.js";
11
11
  const Breadcrumbs = (props) => {
12
12
  const { children, separator, color, defaultVisibleItems, expandAriaLabel, disableExpand, ariaLabel, className, attributes, } = props;
13
13
  const visibleItems = defaultVisibleItems && defaultVisibleItems >= 2 ? defaultVisibleItems : null;
@@ -1,6 +1,6 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type { LinkProps } from "../Link";
2
3
  import type React from "react";
3
- import type * as G from "../../types/global";
4
4
  export type Props = {
5
5
  /** Node for inserting children to position items */
6
6
  children: React.ReactElement | React.ReactElement[];
@@ -19,8 +19,8 @@ export type Props = {
19
19
  /** aria-label attribute for the component */
20
20
  ariaLabel?: string;
21
21
  /** Additional classname for the root element */
22
- className?: G.ClassName;
22
+ className?: ClassName;
23
23
  /** Additional attributes for the root element */
24
- attributes?: G.Attributes<"nav">;
24
+ attributes?: Attributes<"nav">;
25
25
  };
26
26
  export type ItemProps = Pick<LinkProps, "icon" | "href" | "onClick" | "disabled" | "children">;
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { classNames } from "@reshaped/headless";
2
3
  import { forwardRef } from "react";
3
4
  import Actionable from "../Actionable/index.js";
4
5
  import Icon from "../Icon/index.js";
5
6
  import Loader from "../Loader/index.js";
6
- import { classNames, responsiveClassNames, responsivePropDependency } from "../../utilities/props.js";
7
+ import { responsiveClassNames, responsivePropDependency } from "../../utilities/props.js";
7
8
  import s from "./Button.module.css";
8
9
  const Button = forwardRef((props, ref) => {
9
10
  const { variant = "solid", color = "neutral", elevated, highlighted, fullWidth, loading, loadingAriaLabel, disabled, type, href, size = "medium", children, rounded, onClick, icon, endIcon, stopPropagation, as, render, className, attributes, } = props;
@@ -1,3 +1,4 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type { AlignerProps as BaseAlignerProps } from "../_private/Aligner";
2
3
  import type { ActionableProps } from "../Actionable";
3
4
  import type { IconProps } from "../Icon";
@@ -38,9 +39,9 @@ export type GroupProps = {
38
39
  /** Node for inserting child Button components */
39
40
  children: React.ReactNode;
40
41
  /** Additional classname for the root element */
41
- className?: G.ClassName;
42
+ className?: ClassName;
42
43
  /** Additional attributes for the root element */
43
- attributes?: G.Attributes<"div">;
44
+ attributes?: Attributes<"div">;
44
45
  };
45
46
  export type AlignerProps = BaseAlignerProps & {
46
47
  /**
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "../../utilities/props.js";
2
+ import { classNames } from "@reshaped/headless";
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, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { classNames } from "@reshaped/headless";
3
4
  import Actionable from "../Actionable/index.js";
4
- import { classNames } from "../../utilities/props.js";
5
5
  import s from "./Calendar.module.css";
6
6
  import { getLocalISODate } from "./Calendar.utils.js";
7
7
  const CalendarDate = (props) => {
@@ -1,6 +1,6 @@
1
+ import { useHotkeys } from "@reshaped/headless";
1
2
  import React from "react";
2
3
  import * as keys from "../../constants/keys.js";
3
- import useHotkeys from "../../hooks/useHotkeys.js";
4
4
  import { getFocusableDates } from "./Calendar.utils.js";
5
5
  const useCalendarKeyboardNavigation = (props) => {
6
6
  const { rootRef, changeToNextMonth, changeToPreviousMonth, monthDate, verticalDelta, min, max } = props;
@@ -1,16 +1,8 @@
1
1
  import React from "react";
2
- declare const Card: React.ForwardRefExoticComponent<{
3
- padding?: import("../..").Responsive<number>;
4
- bleed?: import("../..").Responsive<number>;
5
- selected?: boolean;
6
- elevated?: boolean;
7
- children?: React.ReactNode;
8
- onClick?: import("../Actionable").ActionableProps["onClick"];
9
- href?: string;
10
- className?: import("../../types/global").ClassName;
11
- attributes?: (import("../..").Attributes<keyof React.JSX.IntrinsicElements> & ((import("../..").Attributes<"button"> & Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "form" | "slot" | "style" | "title" | "disabled" | "key" | "value" | "hidden" | "color" | "content" | "children" | "className" | "ref" | "aria-orientation" | "role" | "translate" | "suppressHydrationWarning" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dir" | "name" | "type" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "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"> & {
12
- ref?: import("../../core/Actionable/Actionable.types").AttributesRef;
13
- }) | undefined)) | undefined;
14
- as?: keyof React.JSX.IntrinsicElements | undefined;
15
- } & Pick<import("../View").ViewProps, "height"> & React.RefAttributes<HTMLElement>>;
2
+ import type * as T from "./Card.types";
3
+ export type Component = {
4
+ <As extends keyof React.JSX.IntrinsicElements = "div">(props: T.Props<As> & React.RefAttributes<HTMLElement>): React.ReactNode;
5
+ displayName?: string;
6
+ };
7
+ declare const Card: Component;
16
8
  export default Card;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "@reshaped/headless";
2
3
  import { forwardRef } from "react";
3
4
  import Actionable from "../Actionable/index.js";
4
5
  import { resolveMixin } from "../../styles/mixin.js";
5
- import { classNames } from "../../utilities/props.js";
6
6
  import s from "./Card.module.css";
7
7
  const Card = forwardRef((props, ref) => {
8
8
  const { padding = 4 } = props;
@@ -1,7 +1,8 @@
1
1
  import type { ActionableProps } from "../Actionable";
2
2
  import type { ViewProps } from "../View";
3
- import type React from "react";
4
3
  import type * as G from "../../types/global";
4
+ import type { Attributes, ClassName } from "@reshaped/headless";
5
+ import type React from "react";
5
6
  export type Props<TagName extends keyof React.JSX.IntrinsicElements | void = void> = {
6
7
  /** Component padding, base unit multiplier */
7
8
  padding?: G.Responsive<number>;
@@ -18,9 +19,9 @@ export type Props<TagName extends keyof React.JSX.IntrinsicElements | void = voi
18
19
  /** URL to navigate to when the component is clicked, turns component into a link */
19
20
  href?: string;
20
21
  /** Additional classname for the root element */
21
- className?: G.ClassName;
22
+ className?: ClassName;
22
23
  /** Additional attributes for the root element */
23
- attributes?: G.Attributes<TagName> & ActionableProps["attributes"];
24
+ attributes?: Attributes<TagName> & ActionableProps["attributes"];
24
25
  /** Custom component tag name
25
26
  * @default "div"
26
27
  */
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { classNames, useIsomorphicLayoutEffect, useRTL } from "@reshaped/headless";
4
+ import { rafThrottle } from "@reshaped/headless/internal";
3
5
  import React from "react";
4
6
  import View from "../View/index.js";
5
- import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
6
- import useRTL from "../../hooks/useRTL.js";
7
- import { rafThrottle } from "../../utilities/helpers.js";
8
- import { classNames, responsiveVariables, responsiveClassNames } from "../../utilities/props.js";
7
+ import { responsiveVariables, responsiveClassNames } from "../../utilities/props.js";
9
8
  import s from "./Carousel.module.css";
10
9
  import CarouselControl from "./CarouselControl.js";
11
10
  const Carousel = (props) => {
@@ -1,3 +1,4 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type { ActionableRef } from "../Actionable";
2
3
  import type React from "react";
3
4
  import type * as G from "../../types/global";
@@ -38,7 +39,7 @@ export type Props = {
38
39
  /** Callback when the carousel scrolls */
39
40
  onScroll?: (e: React.UIEvent<HTMLUListElement>) => void;
40
41
  /** Additional classname for the root element */
41
- className?: G.ClassName;
42
+ className?: ClassName;
42
43
  /** Additional attributes for the root element */
43
- attributes?: G.Attributes<"div">;
44
+ attributes?: Attributes<"div">;
44
45
  };
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { classNames, useIsomorphicLayoutEffect } from "@reshaped/headless";
3
4
  import { forwardRef, useState } from "react";
4
5
  import Button from "../Button/index.js";
5
- import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
6
6
  import IconChevronLeft from "../../icons/ChevronLeft.js";
7
7
  import IconChevronRight from "../../icons/ChevronRight.js";
8
- import { classNames } from "../../utilities/props.js";
9
8
  import s from "./Carousel.module.css";
10
9
  const CarouselControl = forwardRef((props, ref) => {
11
10
  const { type, scrollElRef, oppositeControlElRef, scrollPosition, onClick, isRTL, mounted } = props;
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { classNames, useIsomorphicLayoutEffect } from "@reshaped/headless";
3
4
  import React from "react";
4
5
  import { useCheckboxGroup } from "../CheckboxGroup/index.js";
5
6
  import { useFormControl } from "../FormControl/index.js";
6
7
  import HiddenInput from "../HiddenInput/index.js";
7
8
  import Icon from "../Icon/index.js";
8
9
  import Text from "../Text/index.js";
9
- import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
10
10
  import IconCheckmark from "../../icons/Checkmark.js";
11
- import { classNames, responsiveClassNames, responsivePropDependency } from "../../utilities/props.js";
11
+ import { responsiveClassNames, responsivePropDependency } from "../../utilities/props.js";
12
12
  import s from "./Checkbox.module.css";
13
13
  const Checkbox = (props) => {
14
14
  const { children, value, onChange, onFocus, onBlur, indeterminate, size = "medium", className, attributes, inputAttributes, } = props;
@@ -1,3 +1,4 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type React from "react";
2
3
  import type * as G from "../../types/global";
3
4
  type BaseProps = {
@@ -24,11 +25,11 @@ type BaseProps = {
24
25
  /** Callback when the component is blurred */
25
26
  onBlur?: (e: React.FocusEvent) => void;
26
27
  /** Additional classname for the root element */
27
- className?: G.ClassName;
28
+ className?: ClassName;
28
29
  /** Additional attributes for the root element */
29
- attributes?: G.Attributes<"label">;
30
+ attributes?: Attributes<"label">;
30
31
  /** Additional attributes for the input element */
31
- inputAttributes?: G.Attributes<"input">;
32
+ inputAttributes?: Attributes<"input">;
32
33
  };
33
34
  export type ControlledProps = BaseProps & {
34
35
  /** Component checked state, enables controlled mode */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "@reshaped/headless";
2
3
  import View from "../View/index.js";
3
- import { classNames } from "../../utilities/props.js";
4
4
  import s from "./Container.module.css";
5
5
  const Container = (props) => {
6
6
  const { children, padding = 4, width, align, justify, height, maxHeight, className, attributes, } = props;
@@ -1,3 +1,4 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type { ViewProps } from "../View";
2
3
  import type React from "react";
3
4
  import type * as G from "../../types/global";
@@ -13,7 +14,7 @@ export type Props = Pick<ViewProps, "align" | "justify" | "height" | "maxHeight"
13
14
  /** Node for inserting children */
14
15
  children?: React.ReactNode;
15
16
  /** Additional classname for the root element */
16
- className?: G.ClassName;
17
+ className?: ClassName;
17
18
  /** Additional attributes for the root element */
18
- attributes?: G.Attributes<"div">;
19
+ attributes?: Attributes<"div">;
19
20
  };
@@ -1,9 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useHandlerRef, useScrollLock } from "@reshaped/headless";
3
4
  import React from "react";
4
5
  import DropdownMenu from "../DropdownMenu/index.js";
5
- import useHandlerRef from "../../hooks/useHandlerRef.js";
6
- import useScrollLock from "../../hooks/useScrollLock.js";
7
6
  import s from "./ContextMenu.module.css";
8
7
  const ContextMenu = (props) => {
9
8
  const { position = "end-top", onOpen, onClose, ...dropdownMenuProps } = props;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { classNames } from "@reshaped/headless";
3
4
  import Button from "../Button/index.js";
4
5
  import IconClose from "../../icons/Close.js";
5
- import { classNames } from "../../utilities/props.js";
6
6
  import s from "./Dismissible.module.css";
7
7
  const Dismissible = (props) => {
8
8
  const { children, align, onClose, hideCloseButton, variant, closeAriaLabel, className, attributes, } = props;
@@ -1,5 +1,5 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type React from "react";
2
- import type * as G from "../../types/global";
3
3
  type WithClose = {
4
4
  /** Hide the close button */
5
5
  hideCloseButton: true;
@@ -23,8 +23,8 @@ export type Props = CloseProps & {
23
23
  /** Callback when the component is dismissed */
24
24
  onClose?: () => void;
25
25
  /** Additional classname for the root element */
26
- className?: G.ClassName;
26
+ className?: ClassName;
27
27
  /** Additional attributes for the root element */
28
- attributes?: G.Attributes<"div">;
28
+ attributes?: Attributes<"div">;
29
29
  };
30
30
  export {};
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "@reshaped/headless";
2
3
  import Text from "../Text/index.js";
3
- import { classNames, responsiveClassNames } from "../../utilities/props.js";
4
+ import { responsiveClassNames } from "../../utilities/props.js";
4
5
  import s from "./Divider.module.css";
5
6
  const Divider = (props) => {
6
7
  const { vertical, blank, children, contentPosition = "center", color, offset, className, attributes, } = props;
@@ -1,3 +1,4 @@
1
+ import type { Attributes, ClassName } from "@reshaped/headless";
1
2
  import type React from "react";
2
3
  import type * as G from "../../types/global";
3
4
  export type Props = {
@@ -16,7 +17,7 @@ export type Props = {
16
17
  /** Node for inserting text labels or custom components as a part of divider */
17
18
  children?: React.ReactNode;
18
19
  /** Additional classname for the root element */
19
- className?: G.ClassName;
20
+ className?: ClassName;
20
21
  /** Additional attributes for the root element */
21
- attributes?: G.Attributes<"hr">;
22
+ attributes?: Attributes<"hr">;
22
23
  };