reshaped 3.10.0-canary.6 → 3.10.0-canary.7

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 (174) hide show
  1. package/dist/bundle.d.ts +4 -11
  2. package/dist/bundle.js +2 -2
  3. package/dist/components/Accordion/Accordion.types.d.ts +3 -2
  4. package/dist/components/Accordion/AccordionControlled.js +1 -2
  5. package/dist/components/Accordion/AccordionTrigger.js +1 -1
  6. package/dist/components/ActionBar/ActionBar.js +1 -1
  7. package/dist/components/ActionBar/ActionBar.types.d.ts +3 -2
  8. package/dist/components/Actionable/Actionable.d.ts +2 -2
  9. package/dist/components/Actionable/Actionable.js +1 -1
  10. package/dist/components/Actionable/Actionable.types.d.ts +1 -1
  11. package/dist/components/Actionable/index.d.ts +1 -1
  12. package/dist/components/Alert/Alert.types.d.ts +3 -2
  13. package/dist/components/Autocomplete/Autocomplete.js +1 -3
  14. package/dist/components/Avatar/Avatar.js +1 -1
  15. package/dist/components/Avatar/Avatar.types.d.ts +5 -4
  16. package/dist/components/Badge/Badge.js +1 -1
  17. package/dist/components/Badge/Badge.types.d.ts +4 -4
  18. package/dist/components/Badge/BadgeContainer.js +1 -1
  19. package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
  20. package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +3 -3
  21. package/dist/components/Button/Button.js +1 -1
  22. package/dist/components/Button/Button.types.d.ts +3 -2
  23. package/dist/components/Button/ButtonGroup.js +1 -1
  24. package/dist/components/Calendar/CalendarDate.js +1 -1
  25. package/dist/components/Calendar/useCalendarKeyboardNavigation.js +1 -1
  26. package/dist/components/Card/Card.d.ts +6 -14
  27. package/dist/components/Card/Card.js +1 -1
  28. package/dist/components/Card/Card.types.d.ts +4 -3
  29. package/dist/components/Carousel/Carousel.js +2 -4
  30. package/dist/components/Carousel/Carousel.types.d.ts +3 -2
  31. package/dist/components/Carousel/CarouselControl.js +1 -2
  32. package/dist/components/Checkbox/Checkbox.js +1 -2
  33. package/dist/components/Checkbox/Checkbox.types.d.ts +4 -3
  34. package/dist/components/Container/Container.js +1 -1
  35. package/dist/components/Container/Container.types.d.ts +3 -2
  36. package/dist/components/ContextMenu/ContextMenu.js +1 -2
  37. package/dist/components/Dismissible/Dismissible.js +1 -1
  38. package/dist/components/Dismissible/Dismissible.types.d.ts +3 -3
  39. package/dist/components/Divider/Divider.js +1 -1
  40. package/dist/components/Divider/Divider.types.d.ts +3 -2
  41. package/dist/components/DropdownMenu/DropdownMenu.js +1 -3
  42. package/dist/components/FileUpload/FileUpload.js +1 -2
  43. package/dist/components/FileUpload/FileUpload.types.d.ts +4 -3
  44. package/dist/components/Flyout/Flyout.types.d.ts +6 -6
  45. package/dist/components/Flyout/FlyoutContent.js +1 -2
  46. package/dist/components/Flyout/FlyoutControlled.js +2 -6
  47. package/dist/components/Flyout/useFlyout.d.ts +2 -2
  48. package/dist/components/Flyout/useFlyout.js +2 -2
  49. package/dist/components/Flyout/utilities/safeArea.d.ts +2 -2
  50. package/dist/components/Grid/Grid.js +1 -1
  51. package/dist/components/Grid/Grid.types.d.ts +5 -4
  52. package/dist/components/Hidden/Hidden.js +1 -1
  53. package/dist/components/HiddenInput/HiddenInput.js +1 -1
  54. package/dist/components/HiddenInput/HiddenInput.types.d.ts +3 -2
  55. package/dist/components/Hotkey/Hotkey.js +1 -1
  56. package/dist/components/Hotkey/Hotkey.types.d.ts +3 -3
  57. package/dist/components/Icon/Icon.js +1 -1
  58. package/dist/components/Icon/Icon.types.d.ts +3 -2
  59. package/dist/components/Image/Image.js +1 -1
  60. package/dist/components/Image/Image.types.d.ts +5 -4
  61. package/dist/components/Link/Link.js +1 -1
  62. package/dist/components/Loader/Loader.js +1 -1
  63. package/dist/components/Loader/Loader.types.d.ts +3 -2
  64. package/dist/components/MenuItem/MenuItem.js +1 -1
  65. package/dist/components/MenuItem/MenuItem.types.d.ts +3 -2
  66. package/dist/components/Modal/Modal.js +2 -3
  67. package/dist/components/Modal/Modal.types.d.ts +4 -3
  68. package/dist/components/NumberField/NumberFieldControlled.js +1 -2
  69. package/dist/components/Overlay/Overlay.js +4 -10
  70. package/dist/components/Overlay/Overlay.types.d.ts +3 -3
  71. package/dist/components/Pagination/Pagination.types.d.ts +3 -3
  72. package/dist/components/PinField/PinField.types.d.ts +4 -3
  73. package/dist/components/PinField/PinFieldControlled.js +1 -1
  74. package/dist/components/Popover/Popover.js +1 -1
  75. package/dist/components/Progress/Progress.js +1 -1
  76. package/dist/components/Progress/Progress.types.d.ts +3 -3
  77. package/dist/components/ProgressIndicator/ProgressIndicator.js +1 -1
  78. package/dist/components/ProgressIndicator/ProgressIndicator.types.d.ts +3 -3
  79. package/dist/components/Radio/Radio.js +1 -1
  80. package/dist/components/Radio/Radio.types.d.ts +4 -3
  81. package/dist/components/RadioGroup/RadioGroup.types.d.ts +3 -2
  82. package/dist/components/Reshaped/Reshaped.js +4 -11
  83. package/dist/components/Reshaped/Reshaped.types.d.ts +3 -2
  84. package/dist/components/Resizable/Resizable.js +1 -1
  85. package/dist/components/Resizable/ResizableHandle.js +1 -1
  86. package/dist/components/Scrim/Scrim.js +1 -1
  87. package/dist/components/Scrim/Scrim.types.d.ts +4 -4
  88. package/dist/components/ScrollArea/ScrollArea.js +2 -4
  89. package/dist/components/ScrollArea/ScrollArea.types.d.ts +5 -3
  90. package/dist/components/Select/Select.types.d.ts +5 -4
  91. package/dist/components/Select/SelectNative.js +1 -1
  92. package/dist/components/Select/SelectRoot.js +1 -1
  93. package/dist/components/Skeleton/Skeleton.js +1 -1
  94. package/dist/components/Skeleton/Skeleton.types.d.ts +3 -3
  95. package/dist/components/Slider/Slider.types.d.ts +3 -3
  96. package/dist/components/Slider/SliderControlled.js +2 -4
  97. package/dist/components/Slider/SliderThumb.js +1 -1
  98. package/dist/components/Stepper/Stepper.types.d.ts +5 -4
  99. package/dist/components/Switch/Switch.js +1 -1
  100. package/dist/components/Switch/Switch.types.d.ts +4 -3
  101. package/dist/components/Table/Table.js +1 -1
  102. package/dist/components/Table/Table.types.d.ts +12 -12
  103. package/dist/components/Tabs/Tabs.types.d.ts +6 -6
  104. package/dist/components/Tabs/TabsItem.js +2 -3
  105. package/dist/components/Tabs/TabsList.js +1 -4
  106. package/dist/components/Tabs/TabsPanel.js +2 -2
  107. package/dist/components/Text/Text.js +1 -1
  108. package/dist/components/Text/Text.types.d.ts +3 -2
  109. package/dist/components/TextArea/TextArea.js +1 -1
  110. package/dist/components/TextArea/TextArea.types.d.ts +5 -4
  111. package/dist/components/TextField/TextField.js +1 -1
  112. package/dist/components/TextField/TextField.types.d.ts +4 -3
  113. package/dist/components/Theme/GlobalColorMode.js +1 -1
  114. package/dist/components/Theme/Theme.js +1 -2
  115. package/dist/components/Theme/Theme.types.d.ts +2 -1
  116. package/dist/components/Timeline/Timeline.js +1 -1
  117. package/dist/components/Timeline/Timeline.types.d.ts +5 -5
  118. package/dist/components/Toast/Toast.types.d.ts +3 -3
  119. package/dist/components/Toast/ToastContainer.js +2 -3
  120. package/dist/components/Toast/ToastRegion.js +2 -2
  121. package/dist/components/ToggleButton/ToggleButtonUncontrolled.js +1 -1
  122. package/dist/components/ToggleButtonGroup/ToggleButtonGroupControlled.js +1 -1
  123. package/dist/components/View/View.js +1 -1
  124. package/dist/components/View/View.types.d.ts +5 -4
  125. package/dist/components/_private/Aligner/Aligner.js +1 -1
  126. package/dist/components/_private/Aligner/Aligner.types.d.ts +3 -3
  127. package/dist/components/_private/Expandable/Expandable.js +2 -2
  128. package/dist/components/_private/Expandable/Expandable.types.d.ts +2 -2
  129. package/dist/components/_private/Portal/Portal.js +1 -2
  130. package/dist/hooks/_private/useDrag.js +2 -4
  131. package/dist/hooks/_private/useFadeSide.js +2 -3
  132. package/dist/hooks/_private/useSingletonViewport.d.ts +10 -0
  133. package/dist/hooks/_private/useSingletonViewport.js +52 -0
  134. package/dist/hooks/useResponsiveClientValue.js +15 -53
  135. package/dist/hooks/useViewport.d.ts +2 -0
  136. package/dist/hooks/useViewport.js +6 -0
  137. package/dist/index.d.ts +4 -11
  138. package/dist/index.js +2 -10
  139. package/dist/styles/mixin.d.ts +2 -2
  140. package/dist/styles/types.d.ts +2 -1
  141. package/dist/tests/ThemesPlayground.js +1 -1
  142. package/dist/types/global.d.ts +0 -15
  143. package/dist/utilities/props.d.ts +2 -1
  144. package/package.json +2 -2
  145. package/dist/core/Actionable/Actionable.d.ts +0 -4
  146. package/dist/core/Actionable/Actionable.js +0 -73
  147. package/dist/core/Actionable/Actionable.types.d.ts +0 -34
  148. package/dist/core/Actionable/Actionable.types.js +0 -1
  149. package/dist/core/Actionable/index.d.ts +0 -2
  150. package/dist/core/Actionable/index.js +0 -1
  151. package/dist/hooks/_private/useSingletonEnvironment.d.ts +0 -9
  152. package/dist/hooks/_private/useSingletonEnvironment.js +0 -33
  153. package/dist/hooks/_private/useSingletonHotkeys.d.ts +0 -35
  154. package/dist/hooks/_private/useSingletonHotkeys.js +0 -191
  155. package/dist/hooks/_private/useSingletonKeyboardMode.d.ts +0 -13
  156. package/dist/hooks/_private/useSingletonKeyboardMode.js +0 -58
  157. package/dist/hooks/useHandlerRef.d.ts +0 -8
  158. package/dist/hooks/useHandlerRef.js +0 -16
  159. package/dist/hooks/useHotkeys.d.ts +0 -11
  160. package/dist/hooks/useHotkeys.js +0 -27
  161. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +0 -3
  162. package/dist/hooks/useIsomorphicLayoutEffect.js +0 -4
  163. package/dist/hooks/useKeyboardArrowNavigation.d.ts +0 -9
  164. package/dist/hooks/useKeyboardArrowNavigation.js +0 -62
  165. package/dist/hooks/useKeyboardMode.d.ts +0 -7
  166. package/dist/hooks/useKeyboardMode.js +0 -13
  167. package/dist/hooks/useOnClickOutside.d.ts +0 -5
  168. package/dist/hooks/useOnClickOutside.js +0 -63
  169. package/dist/hooks/useRTL.d.ts +0 -2
  170. package/dist/hooks/useRTL.js +0 -7
  171. package/dist/hooks/useScrollLock.d.ts +0 -10
  172. package/dist/hooks/useScrollLock.js +0 -25
  173. package/dist/hooks/useToggle.d.ts +0 -7
  174. package/dist/hooks/useToggle.js +0 -19
@@ -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 } from "@reshaped/utilities";
3
+ import { classNames, useHandlerRef } from "@reshaped/headless";
4
4
  import React from "react";
5
5
  import useElementId from "../../hooks/useElementId.js";
6
- import useHandlerRef from "../../hooks/useHandlerRef.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,6 +1,6 @@
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/utilities";
3
+ import { classNames } from "@reshaped/headless";
4
4
  import React from "react";
5
5
  import Actionable from "../Actionable/index.js";
6
6
  import Icon from "../Icon/index.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "@reshaped/utilities";
2
+ import { classNames } from "@reshaped/headless";
3
3
  import View from "../View/index.js";
4
4
  import { responsiveVariables } from "../../utilities/props.js";
5
5
  import s from "./ActionBar.module.css";
@@ -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,13 +1,11 @@
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) => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "@reshaped/utilities";
2
+ import { classNames } from "@reshaped/headless";
3
3
  import Icon from "../Icon/index.js";
4
4
  import Image from "../Image/index.js";
5
5
  import View from "../View/index.js";
@@ -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,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { classNames } from "@reshaped/utilities";
2
+ import { classNames } from "@reshaped/headless";
3
3
  import { forwardRef } from "react";
4
4
  import Actionable from "../Actionable/index.js";
5
5
  import Icon from "../Icon/index.js";
@@ -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 "@reshaped/utilities";
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,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { classNames } from "@reshaped/utilities";
3
+ import { classNames } from "@reshaped/headless";
4
4
  import React from "react";
5
5
  import Button from "../Button/index.js";
6
6
  import Icon from "../Icon/index.js";
@@ -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,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { classNames } from "@reshaped/utilities";
2
+ import { classNames } from "@reshaped/headless";
3
3
  import { forwardRef } from "react";
4
4
  import Actionable from "../Actionable/index.js";
5
5
  import Icon from "../Icon/index.js";
@@ -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 "@reshaped/utilities";
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,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { classNames } from "@reshaped/utilities";
3
+ import { classNames } from "@reshaped/headless";
4
4
  import Actionable from "../Actionable/index.js";
5
5
  import s from "./Calendar.module.css";
6
6
  import { getLocalISODate } from "./Calendar.utils.js";
@@ -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,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "@reshaped/utilities";
2
+ import { classNames } from "@reshaped/headless";
3
3
  import { forwardRef } from "react";
4
4
  import Actionable from "../Actionable/index.js";
5
5
  import { resolveMixin } from "../../styles/mixin.js";
@@ -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,9 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { classNames } from "@reshaped/utilities";
4
- import { rafThrottle } from "@reshaped/utilities/internal";
3
+ import { classNames, useIsomorphicLayoutEffect, useRTL } from "@reshaped/headless";
4
+ import { rafThrottle } from "@reshaped/headless/internal";
5
5
  import React from "react";
6
6
  import View from "../View/index.js";
7
- import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
8
- import useRTL from "../../hooks/useRTL.js";
9
7
  import { responsiveVariables, responsiveClassNames } from "../../utilities/props.js";
10
8
  import s from "./Carousel.module.css";
11
9
  import CarouselControl from "./CarouselControl.js";
@@ -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,9 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { classNames } from "@reshaped/utilities";
3
+ import { classNames, useIsomorphicLayoutEffect } from "@reshaped/headless";
4
4
  import { forwardRef, useState } from "react";
5
5
  import Button from "../Button/index.js";
6
- import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
7
6
  import IconChevronLeft from "../../icons/ChevronLeft.js";
8
7
  import IconChevronRight from "../../icons/ChevronRight.js";
9
8
  import s from "./Carousel.module.css";
@@ -1,13 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { classNames } from "@reshaped/utilities";
3
+ import { classNames, useIsomorphicLayoutEffect } from "@reshaped/headless";
4
4
  import React from "react";
5
5
  import { useCheckboxGroup } from "../CheckboxGroup/index.js";
6
6
  import { useFormControl } from "../FormControl/index.js";
7
7
  import HiddenInput from "../HiddenInput/index.js";
8
8
  import Icon from "../Icon/index.js";
9
9
  import Text from "../Text/index.js";
10
- import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
11
10
  import IconCheckmark from "../../icons/Checkmark.js";
12
11
  import { responsiveClassNames, responsivePropDependency } from "../../utilities/props.js";
13
12
  import s from "./Checkbox.module.css";
@@ -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,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "@reshaped/utilities";
2
+ import { classNames } from "@reshaped/headless";
3
3
  import View from "../View/index.js";
4
4
  import s from "./Container.module.css";
5
5
  const Container = (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,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { classNames } from "@reshaped/utilities";
3
+ import { classNames } from "@reshaped/headless";
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
+ 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,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "@reshaped/utilities";
2
+ import { classNames } from "@reshaped/headless";
3
3
  import Text from "../Text/index.js";
4
4
  import { responsiveClassNames } from "../../utilities/props.js";
5
5
  import s from "./Divider.module.css";
@@ -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
  };
@@ -1,14 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { classNames } from "@reshaped/utilities";
3
+ import { classNames, useHotkeys, useRTL } from "@reshaped/headless";
4
4
  import React from "react";
5
5
  import { useFlyoutContext } from "../Flyout/index.js";
6
6
  import Icon from "../Icon/index.js";
7
7
  import MenuItem from "../MenuItem/index.js";
8
8
  import Popover from "../Popover/index.js";
9
9
  import * as keys from "../../constants/keys.js";
10
- import useHotkeys from "../../hooks/useHotkeys.js";
11
- import useRTL from "../../hooks/useRTL.js";
12
10
  import IconChevronRight from "../../icons/ChevronRight.js";
13
11
  import s from "./DropdownMenu.module.css";
14
12
  const DropdownMenuSubContext = React.createContext(null);
@@ -1,9 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { classNames } from "@reshaped/utilities";
3
+ import { classNames, useToggle } from "@reshaped/headless";
4
4
  import HiddenVisually from "../HiddenVisually/index.js";
5
5
  import View from "../View/index.js";
6
- import useToggle from "../../hooks/useToggle.js";
7
6
  import s from "./FileUpload.module.css";
8
7
  export const FileUploadTrigger = (props) => {
9
8
  const { children } = 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";
@@ -19,11 +20,11 @@ export type Props = {
19
20
  /** Change component to render inline making it more compact */
20
21
  inline?: boolean;
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
  /** Additional attributes for the input element */
26
- inputAttributes?: G.Attributes<"input">;
27
+ inputAttributes?: Attributes<"input">;
27
28
  };
28
29
  export type TriggerProps = {
29
30
  /** Node for inserting children */
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import type { TrapMode } from "@reshaped/utilities/internal";
3
- import type * as G from "../../types/global";
2
+ import type { Attributes, ClassName } from "@reshaped/headless";
3
+ import type { TrapMode, Coordinates } from "@reshaped/headless/internal";
4
4
  /**
5
5
  * Utility
6
6
  */
@@ -115,7 +115,7 @@ type BaseProps = {
115
115
  */
116
116
  autoFocus?: boolean;
117
117
  /** Origin coordinates for the content when there is no trigger element */
118
- originCoordinates?: G.Coordinates;
118
+ originCoordinates?: Coordinates;
119
119
  /** Node for inserting children */
120
120
  children?: React.ReactNode;
121
121
  /** Callback when the content is opened */
@@ -139,7 +139,7 @@ type BaseProps = {
139
139
  /** Additional classname for the content element */
140
140
  contentClassName?: string;
141
141
  /** Additional attributes for the content element */
142
- contentAttributes?: G.Attributes<"div">;
142
+ contentAttributes?: Attributes<"div">;
143
143
  /** Ref accessor for the flyout methods */
144
144
  instanceRef?: React.Ref<Instance>;
145
145
  /** Container to render the content in using a portal, position is calculated based on the container bounds
@@ -166,9 +166,9 @@ export type ContentProps = {
166
166
  /** Node for inserting children */
167
167
  children?: React.ReactNode;
168
168
  /** Additional classname for the content element */
169
- className?: G.ClassName;
169
+ className?: ClassName;
170
170
  /** Additional attributes for the content element */
171
- attributes?: G.Attributes<"div">;
171
+ attributes?: Attributes<"div">;
172
172
  };
173
173
  export type ContextProps = {
174
174
  id: string;