reshaped 3.9.0-canary.1 → 3.9.0-canary.3

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 (150) hide show
  1. package/dist/bundle.css +1 -1
  2. package/dist/bundle.js +2 -31
  3. package/dist/cli/theming/index.js +4 -4
  4. package/dist/cli/theming/reshaped.config.js +1 -1
  5. package/dist/components/Accordion/Accordion.types.d.ts +1 -1
  6. package/dist/components/Accordion/AccordionControlled.js +2 -2
  7. package/dist/components/Accordion/AccordionTrigger.js +2 -2
  8. package/dist/components/Accordion/index.d.ts +1 -1
  9. package/dist/components/Accordion/index.js +1 -1
  10. package/dist/components/ActionBar/ActionBar.js +1 -1
  11. package/dist/components/ActionBar/ActionBar.types.d.ts +1 -1
  12. package/dist/components/Actionable/Actionable.js +1 -1
  13. package/dist/components/Alert/Alert.js +1 -1
  14. package/dist/components/Alert/Alert.types.d.ts +1 -1
  15. package/dist/components/Autocomplete/Autocomplete.js +6 -6
  16. package/dist/components/Autocomplete/Autocomplete.types.d.ts +3 -3
  17. package/dist/components/Avatar/Avatar.js +2 -2
  18. package/dist/components/Badge/Badge.js +4 -4
  19. package/dist/components/Badge/Badge.types.d.ts +1 -1
  20. package/dist/components/Breadcrumbs/Breadcrumbs.js +3 -3
  21. package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +1 -1
  22. package/dist/components/Breadcrumbs/BreadcrumbsItem.js +1 -1
  23. package/dist/components/Button/Button.js +2 -2
  24. package/dist/components/Button/Button.types.d.ts +3 -3
  25. package/dist/components/Calendar/Calendar.types.d.ts +22 -5
  26. package/dist/components/Calendar/CalendarControlled.js +45 -10
  27. package/dist/components/Calendar/CalendarControls.js +11 -11
  28. package/dist/components/Calendar/CalendarDate.js +5 -5
  29. package/dist/components/Calendar/CalendarMonth.js +3 -3
  30. package/dist/components/Calendar/CalendarYear.js +1 -1
  31. package/dist/components/Calendar/useCalendarKeyboardNavigation.js +1 -1
  32. package/dist/components/Card/Card.js +2 -2
  33. package/dist/components/Card/Card.types.d.ts +1 -1
  34. package/dist/components/Carousel/Carousel.js +4 -4
  35. package/dist/components/Carousel/Carousel.types.d.ts +1 -1
  36. package/dist/components/Carousel/CarouselControl.d.ts +1 -1
  37. package/dist/components/Carousel/CarouselControl.js +3 -3
  38. package/dist/components/Checkbox/Checkbox.js +3 -3
  39. package/dist/components/CheckboxGroup/CheckboxGroup.types.d.ts +1 -1
  40. package/dist/components/Container/Container.js +1 -1
  41. package/dist/components/Container/Container.types.d.ts +1 -1
  42. package/dist/components/ContextMenu/ContextMenu.js +1 -1
  43. package/dist/components/Dismissible/Dismissible.js +1 -1
  44. package/dist/components/Divider/Divider.d.ts +1 -1
  45. package/dist/components/Divider/Divider.js +1 -1
  46. package/dist/components/DropdownMenu/DropdownMenu.js +5 -5
  47. package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +4 -4
  48. package/dist/components/FileUpload/FileUpload.js +2 -2
  49. package/dist/components/FileUpload/FileUpload.types.d.ts +1 -1
  50. package/dist/components/Flyout/Flyout.js +1 -1
  51. package/dist/components/Flyout/Flyout.module.css +1 -1
  52. package/dist/components/Flyout/Flyout.types.d.ts +3 -1
  53. package/dist/components/Flyout/FlyoutContent.js +6 -5
  54. package/dist/components/Flyout/FlyoutControlled.js +8 -7
  55. package/dist/components/Flyout/index.d.ts +1 -1
  56. package/dist/components/Flyout/index.js +1 -1
  57. package/dist/components/Flyout/useFlyout.d.ts +1 -1
  58. package/dist/components/Flyout/useFlyout.js +1 -1
  59. package/dist/components/Flyout/utilities/flyout.d.ts +1 -1
  60. package/dist/components/Flyout/utilities/flyout.js +1 -1
  61. package/dist/components/FormControl/FormControlCaption.js +1 -1
  62. package/dist/components/FormControl/FormControlLabel.js +1 -1
  63. package/dist/components/FormControl/index.d.ts +2 -2
  64. package/dist/components/FormControl/index.js +2 -2
  65. package/dist/components/Grid/Grid.js +1 -1
  66. package/dist/components/Grid/Grid.types.d.ts +2 -2
  67. package/dist/components/Icon/Icon.js +1 -1
  68. package/dist/components/Image/Image.js +1 -1
  69. package/dist/components/Image/Image.types.d.ts +1 -1
  70. package/dist/components/Link/Link.js +1 -1
  71. package/dist/components/MenuItem/MenuItem.js +1 -1
  72. package/dist/components/MenuItem/MenuItem.types.d.ts +2 -2
  73. package/dist/components/Modal/Modal.js +7 -7
  74. package/dist/components/Modal/Modal.types.d.ts +1 -1
  75. package/dist/components/NumberField/NumberFieldControlled.js +7 -7
  76. package/dist/components/Overlay/Overlay.js +8 -8
  77. package/dist/components/PinField/PinFieldControlled.js +4 -4
  78. package/dist/components/Popover/Popover.js +3 -3
  79. package/dist/components/Popover/Popover.module.css +1 -1
  80. package/dist/components/Popover/Popover.types.d.ts +2 -2
  81. package/dist/components/Radio/Radio.js +3 -3
  82. package/dist/components/RadioGroup/RadioGroup.types.d.ts +1 -1
  83. package/dist/components/Reshaped/Reshaped.js +4 -4
  84. package/dist/components/Reshaped/Reshaped.types.d.ts +1 -1
  85. package/dist/components/Resizable/Resizable.js +2 -2
  86. package/dist/components/Resizable/Resizable.types.d.ts +1 -1
  87. package/dist/components/Resizable/ResizableHandle.js +1 -1
  88. package/dist/components/ScrollArea/ScrollArea.js +4 -4
  89. package/dist/components/Select/Select.types.d.ts +3 -3
  90. package/dist/components/Select/SelectCustomControlled.js +6 -3
  91. package/dist/components/Select/SelectEndContent.js +1 -1
  92. package/dist/components/Select/SelectGroup.js +1 -1
  93. package/dist/components/Select/SelectNative.js +2 -2
  94. package/dist/components/Select/SelectRoot.js +1 -1
  95. package/dist/components/Select/SelectTrigger.js +1 -1
  96. package/dist/components/Select/index.d.ts +1 -1
  97. package/dist/components/Select/index.js +1 -1
  98. package/dist/components/Skeleton/Skeleton.js +1 -1
  99. package/dist/components/Slider/SliderControlled.js +7 -7
  100. package/dist/components/Slider/SliderThumb.js +3 -3
  101. package/dist/components/Stepper/Stepper.js +4 -4
  102. package/dist/components/Switch/Switch.js +1 -1
  103. package/dist/components/Table/Table.js +2 -2
  104. package/dist/components/Tabs/Tabs.types.d.ts +1 -1
  105. package/dist/components/Tabs/TabsItem.js +2 -2
  106. package/dist/components/Tabs/TabsList.js +8 -8
  107. package/dist/components/Tabs/TabsPanel.js +2 -2
  108. package/dist/components/Text/Text.js +1 -1
  109. package/dist/components/Text/Text.module.css +1 -1
  110. package/dist/components/TextArea/TextArea.js +1 -1
  111. package/dist/components/TextArea/TextArea.types.d.ts +1 -1
  112. package/dist/components/TextField/TextField.js +2 -2
  113. package/dist/components/TextField/TextField.types.d.ts +2 -2
  114. package/dist/components/Theme/GlobalColorMode.js +1 -1
  115. package/dist/components/Theme/Theme.js +2 -2
  116. package/dist/components/Timeline/Timeline.js +1 -1
  117. package/dist/components/Toast/Toast.js +2 -2
  118. package/dist/components/Toast/Toast.types.d.ts +1 -1
  119. package/dist/components/Toast/ToastContainer.js +3 -3
  120. package/dist/components/Toast/ToastProvider.js +1 -1
  121. package/dist/components/Toast/ToastRegion.js +2 -2
  122. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.types.d.ts +1 -1
  123. package/dist/components/ToggleButtonGroup/ToggleButtonGroupControlled.js +1 -1
  124. package/dist/components/Tooltip/Tooltip.js +5 -3
  125. package/dist/components/View/View.js +2 -2
  126. package/dist/components/View/View.types.d.ts +1 -1
  127. package/dist/components/_private/Expandable/Expandable.js +2 -2
  128. package/dist/components/_private/Portal/Portal.js +1 -1
  129. package/dist/config/tailwind.js +2 -2
  130. package/dist/hooks/_private/useDrag.js +4 -4
  131. package/dist/hooks/_private/useFadeSide.js +1 -1
  132. package/dist/hooks/useResponsiveClientValue.js +1 -1
  133. package/dist/styles/mixin.js +1 -1
  134. package/dist/tests/ThemesPlayground.js +16 -16
  135. package/dist/themes/_generator/definitions/slate.js +1 -1
  136. package/dist/themes/_generator/tokens/color/utilities/generateColors.d.ts +1 -1
  137. package/dist/themes/_generator/tokens/color/utilities/generateMetaColors.d.ts +1 -1
  138. package/dist/themes/_generator/tokens/color/utilities/generateMetaColors.js +1 -1
  139. package/dist/themes/_generator/tokens/font/font.types.d.ts +2 -2
  140. package/dist/themes/_generator/tokens/transforms.js +1 -1
  141. package/dist/themes/_generator/tokens/types.d.ts +3 -3
  142. package/dist/themes/_generator/transform.d.ts +1 -1
  143. package/dist/themes/_generator/transform.js +3 -3
  144. package/dist/themes/index.d.ts +1 -1
  145. package/dist/types/config.d.ts +1 -1
  146. package/dist/utilities/a11y/TrapFocus.js +4 -4
  147. package/dist/utilities/scroll/lock.js +1 -1
  148. package/dist/utilities/scroll/lockStandard.js +1 -1
  149. package/dist/utilities/storybook/Example.js +1 -1
  150. package/package.json +4 -2
@@ -1,5 +1,5 @@
1
- import type React from "react";
2
1
  import type { IconProps } from "../Icon";
2
+ import type React from "react";
3
3
  import type * as G from "../../types/global";
4
4
  export type Status = "entering" | "entered" | "exited";
5
5
  export type TimeoutAlias = "short" | "long";
@@ -1,12 +1,12 @@
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/props.js";
5
- import { onNextFrame } from "../../utilities/animation.js";
6
4
  import { checkKeyboardMode, TrapFocus } from "../../utilities/a11y/index.js";
5
+ import { onNextFrame } from "../../utilities/animation.js";
6
+ import { classNames } from "../../utilities/props.js";
7
7
  import Toast from "./Toast.js";
8
- import ToastContext from "./Toast.context.js";
9
8
  import { timeouts } from "./Toast.constants.js";
9
+ import ToastContext from "./Toast.context.js";
10
10
  import s from "./Toast.module.css";
11
11
  const ToastContainer = (props) => {
12
12
  const { toastProps, id, status, inspected, index } = props;
@@ -1,10 +1,10 @@
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 { positions, defaultContextData } from "./Toast.constants.js";
4
5
  import ToastContext from "./Toast.context.js";
5
6
  import ToastRegion from "./ToastRegion.js";
6
7
  import useToast from "./useToast.js";
7
- import { positions, defaultContextData } from "./Toast.constants.js";
8
8
  let counter = 0;
9
9
  const generateId = () => `__rs-toast-${counter++}`;
10
10
  const toastReducer = (state, action) => {
@@ -1,11 +1,11 @@
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/props.js";
5
4
  import { focusableSelector } from "../../utilities/a11y/index.js";
6
- import ToastContainer from "./ToastContainer.js";
5
+ import { classNames } from "../../utilities/props.js";
7
6
  import ToastContext from "./Toast.context.js";
8
7
  import s from "./Toast.module.css";
8
+ import ToastContainer from "./ToastContainer.js";
9
9
  const ToastRegion = (props) => {
10
10
  const { position, nested } = props;
11
11
  const { queues, options } = React.useContext(ToastContext);
@@ -1,6 +1,6 @@
1
- import type React from "react";
2
1
  import type { ButtonGroupProps } from "../Button";
3
2
  import type { ToggleButtonProps } from "../ToggleButton";
3
+ import type React from "react";
4
4
  type BaseProps = {
5
5
  /** Selection mode for the toggle button group
6
6
  * @default "single"
@@ -2,8 +2,8 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import Button from "../Button/index.js";
5
- import Context from "./ToggleButtonGroup.context.js";
6
5
  import useKeyboardArrowNavigation from "../../hooks/useKeyboardArrowNavigation.js";
6
+ import Context from "./ToggleButtonGroup.context.js";
7
7
  const ToggleButtonGroupControlled = (props) => {
8
8
  const { onChange, value, selectionMode = "single", children, color, selectedColor, ...buttonGroupProps } = props;
9
9
  const rootRef = React.useRef(null);
@@ -1,14 +1,16 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import Theme from "../Theme/index.js";
4
- import Text from "../Text/index.js";
5
3
  import Flyout from "../Flyout/index.js";
4
+ import Text from "../Text/index.js";
5
+ import Theme from "../Theme/index.js";
6
6
  import s from "./Tooltip.module.css";
7
7
  const Tooltip = (props) => {
8
8
  const { text, children, position = "bottom", color = "inverted", ...flyoutProps } = props;
9
9
  if (!text)
10
10
  return children({ ref: null });
11
- return (_jsxs(Flyout, { ...flyoutProps, position: position, triggerType: "hover", groupTimeouts: true, children: [_jsx(Flyout.Trigger, { children: children }), _jsx(Flyout.Content, { children: _jsx(Theme, { colorMode: color, children: _jsx(Text, { variant: "caption-1", className: s.root, children: text }) }) })] }));
11
+ return (_jsxs(Flyout, { ...flyoutProps, position: position, triggerType: "hover",
12
+ // Disable group timeouts by default since it's not controlled by the default user events
13
+ groupTimeouts: flyoutProps.active === undefined ? true : false, children: [_jsx(Flyout.Trigger, { children: children }), _jsx(Flyout.Content, { children: _jsx(Theme, { colorMode: color, children: _jsx(Text, { variant: "caption-1", className: s.root, children: text }) }) })] }));
12
14
  };
13
15
  Tooltip.displayName = "Tooltip";
14
16
  export default Tooltip;
@@ -1,11 +1,11 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React, { isValidElement } from "react";
4
- import { classNames, responsiveClassNames, responsiveVariables } from "../../utilities/props.js";
5
4
  import Divider from "../Divider/index.js";
6
5
  import Hidden from "../Hidden/index.js";
7
- import s from "./View.module.css";
8
6
  import { resolveMixin } from "../../styles/mixin.js";
7
+ import { classNames, responsiveClassNames, responsiveVariables } from "../../utilities/props.js";
8
+ import s from "./View.module.css";
9
9
  export const ViewItem = (props) => {
10
10
  const { columns, grow, shrink, gapBefore,
11
11
  // Using any here to let TS save on type resolving, otherwise TS throws an error due to the type complexity
@@ -1,6 +1,6 @@
1
1
  import type React from "react";
2
- import type * as G from "../../types/global";
3
2
  import type * as TStyles from "../../styles/types";
3
+ import type * as G from "../../types/global";
4
4
  type Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "auto";
5
5
  export type Direction = "row" | "column" | "row-reverse" | "column-reverse";
6
6
  export type Props<TagName extends keyof React.JSX.IntrinsicElements = "div"> = {
@@ -1,9 +1,9 @@
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/props.js";
5
- import { onNextFrame } from "../../../utilities/animation.js";
6
4
  import useIsomorphicLayoutEffect from "../../../hooks/useIsomorphicLayoutEffect.js";
5
+ import { onNextFrame } from "../../../utilities/animation.js";
6
+ import { classNames } from "../../../utilities/props.js";
7
7
  import s from "./Expandable.module.css";
8
8
  const Expandable = (props) => {
9
9
  const { children, active, attributes } = props;
@@ -3,9 +3,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import ReactDOM from "react-dom";
5
5
  import Theme from "../../Theme/index.js";
6
- import s from "./Portal.module.css";
7
6
  import useIsomorphicLayoutEffect from "../../../hooks/useIsomorphicLayoutEffect.js";
8
7
  import useToggle from "../../../hooks/useToggle.js";
8
+ import s from "./Portal.module.css";
9
9
  const PortalScopeContext = React.createContext({});
10
10
  export const usePortalScope = () => {
11
11
  return React.useContext(PortalScopeContext);
@@ -1,7 +1,7 @@
1
+ import { bgWithDynamicForeground } from "../themes/_generator/constants.js";
1
2
  import reshapedDefinition from "../themes/_generator/definitions/reshaped.js";
2
- import { camelToKebab } from "../utilities/string.js";
3
3
  import mergeDefinitions from "../themes/_generator/utilities/mergeDefinitions.js";
4
- import { bgWithDynamicForeground } from "../themes/_generator/constants.js";
4
+ import { camelToKebab } from "../utilities/string.js";
5
5
  export const getTheme = (theme) => {
6
6
  const config = {
7
7
  backgroundColor: {},
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import React from "react";
3
+ import * as keys from "../../constants/keys.js";
4
+ import useHandlerRef from "../useHandlerRef.js";
5
+ import useHotkeys from "../useHotkeys.js";
6
+ import useToggle from "../useToggle.js";
3
7
  import { disableUserSelect, enableUserSelect } from "../../utilities/dom/index.js";
4
8
  import { disableScroll, enableScroll } from "../../utilities/scroll/index.js";
5
- import useToggle from "../useToggle.js";
6
- import useHotkeys from "../useHotkeys.js";
7
- import useHandlerRef from "../useHandlerRef.js";
8
- import * as keys from "../../constants/keys.js";
9
9
  const useDrag = (cb, options) => {
10
10
  const { disabled, containerRef: passedContainerRef, orientation = "all" } = options || {};
11
11
  const cbRef = useHandlerRef(cb);
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import React from "react";
3
- import useRTL from "../useRTL.js";
4
3
  import useIsomorphicLayoutEffect from "../useIsomorphicLayoutEffect.js";
4
+ import useRTL from "../useRTL.js";
5
5
  import { rafThrottle } from "../../utilities/helpers.js";
6
6
  const useFadeSide = (scrollableRef, options = {}) => {
7
7
  const { disabled } = options;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import React from "react";
3
+ import defaultBreakpoints from "../constants/breakpoints.js";
3
4
  import { SingletonEnvironmentContext } from "./_private/useSingletonEnvironment.js";
4
5
  import useIsomorphicLayoutEffect from "./useIsomorphicLayoutEffect.js";
5
- import defaultBreakpoints from "../constants/breakpoints.js";
6
6
  const useResponsiveClientValue = (value) => {
7
7
  const { defaultViewport } = React.useContext(SingletonEnvironmentContext);
8
8
  const [viewport, setViewport] = React.useState(defaultViewport);
@@ -9,11 +9,11 @@ import maxHeight from "./resolvers/maxHeight/index.js";
9
9
  import maxWidth from "./resolvers/maxWidth/index.js";
10
10
  import minHeight from "./resolvers/minHeight/index.js";
11
11
  import minWidth from "./resolvers/minWidth/index.js";
12
+ import padding, { paddingTop, paddingBottom, paddingStart, paddingEnd, paddingInline, paddingBlock, } from "./resolvers/padding/index.js";
12
13
  import position from "./resolvers/position/index.js";
13
14
  import radius from "./resolvers/radius/index.js";
14
15
  import textAlign from "./resolvers/textAlign/index.js";
15
16
  import width from "./resolvers/width/index.js";
16
- import padding, { paddingTop, paddingBottom, paddingStart, paddingEnd, paddingInline, paddingBlock, } from "./resolvers/padding/index.js";
17
17
  const mixinMap = {
18
18
  align,
19
19
  aspectRatio,
@@ -1,27 +1,27 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import View from "../components/View/index.js";
3
- import Text from "../components/Text/index.js";
4
- import Divider from "../components/Divider/index.js";
5
- import Card from "../components/Card/index.js";
2
+ import React from "react";
3
+ import Alert from "../components/Alert/index.js";
4
+ import Avatar from "../components/Avatar/index.js";
5
+ import Badge from "../components/Badge/index.js";
6
6
  import Button from "../components/Button/index.js";
7
+ import Card from "../components/Card/index.js";
8
+ import Checkbox from "../components/Checkbox/index.js";
9
+ import CheckboxGroup from "../components/CheckboxGroup/index.js";
10
+ import Divider from "../components/Divider/index.js";
11
+ import DropdownMenu from "../components/DropdownMenu/index.js";
12
+ import FormControl from "../components/FormControl/index.js";
7
13
  import Grid from "../components/Grid/index.js";
8
- import Avatar from "../components/Avatar/index.js";
9
14
  import Image from "../components/Image/index.js";
10
- import IconChevronRight from "../icons/ChevronRight.js";
11
- import TextField from "../components/TextField/index.js";
12
- import FormControl from "../components/FormControl/index.js";
13
15
  import Link from "../components/Link/index.js";
14
- import useToggle from "../hooks/useToggle.js";
15
16
  import Switch from "../components/Switch/index.js";
16
- import Badge from "../components/Badge/index.js";
17
- import Alert from "../components/Alert/index.js";
18
- import IconZap from "../icons/Zap.js";
19
- import CheckboxGroup from "../components/CheckboxGroup/index.js";
20
- import Checkbox from "../components/Checkbox/index.js";
21
- import React from "react";
22
17
  import Table from "../components/Table/index.js";
23
- import DropdownMenu from "../components/DropdownMenu/index.js";
18
+ import Text from "../components/Text/index.js";
19
+ import TextField from "../components/TextField/index.js";
20
+ import View from "../components/View/index.js";
21
+ import useToggle from "../hooks/useToggle.js";
24
22
  import IconChevronDown from "../icons/ChevronDown.js";
23
+ import IconChevronRight from "../icons/ChevronRight.js";
24
+ import IconZap from "../icons/Zap.js";
25
25
  const Color = (props) => {
26
26
  return (_jsx(View, { padding: 2, height: 25, gap: 2, direction: "row", borderRadius: "medium", backgroundColor: props.backgroundColor, borderColor: props.borderColor, attributes: {
27
27
  style: {
@@ -1,5 +1,5 @@
1
- import reshapedDefinition from "./reshaped.js";
2
1
  import generateColors from "../tokens/color/utilities/generateColors.js";
2
+ import reshapedDefinition from "./reshaped.js";
3
3
  const theme = {
4
4
  ...reshapedDefinition,
5
5
  color: generateColors(),
@@ -1,4 +1,4 @@
1
- import type { PassedThemeDefinition } from "../../types";
2
1
  import { type ColorValue, Hue } from "../color.types";
2
+ import type { PassedThemeDefinition } from "../../types";
3
3
  declare const generateColors: (args?: Partial<Record<Hue, ColorValue>>) => NonNullable<PassedThemeDefinition["color"]>;
4
4
  export default generateColors;
@@ -1,4 +1,4 @@
1
- import type * as T from "../../../types";
2
1
  import { PassedThemeDefinition } from "../../types";
2
+ import type * as T from "../../../types";
3
3
  declare const generateMetaColors: (definition: PassedThemeDefinition, themeOptions?: T.PublicOptions["themeOptions"]) => PassedThemeDefinition["color"] | undefined;
4
4
  export default generateMetaColors;
@@ -1,7 +1,7 @@
1
1
  import { capitalize } from "../../../../../utilities/string.js";
2
2
  import { bgWithDynamicForeground } from "../../../constants.js";
3
- import { hexToOklch, oklchToRgb, tokenToOklchToken } from "./convert.js";
4
3
  import { getOnColor } from "./a11y.js";
4
+ import { hexToOklch, oklchToRgb, tokenToOklchToken } from "./convert.js";
5
5
  const whiteColor = hexToOklch("#ffffff");
6
6
  const blackColor = hexToOklch("#000000");
7
7
  const generateMetaColors = (definition, themeOptions = {}) => {
@@ -1,6 +1,6 @@
1
- import type * as TUnit from "../unit/unit.types";
2
- import type * as TFontWeight from "../fontWeight/fontWeight.types";
3
1
  import type * as TFontFamily from "../fontFamily/fontFamily.types";
2
+ import type * as TFontWeight from "../fontWeight/fontWeight.types";
3
+ import type * as TUnit from "../unit/unit.types";
4
4
  export type Name = "title1" | "title2" | "title3" | "title4" | "title5" | "title6" | "featured1" | "featured2" | "featured3" | "body1" | "body2" | "body3" | "caption1" | "caption2";
5
5
  export type Token = {
6
6
  fontSize: TUnit.Token;
@@ -4,9 +4,9 @@ import easing from "./easing/easing.transforms.js";
4
4
  import font from "./font/font.transforms.js";
5
5
  import fontFamily from "./fontFamily/fontFamily.transforms.js";
6
6
  import fontWeight from "./fontWeight/fontWeight.transforms.js";
7
+ import radius from "./radius/radius.transforms.js";
7
8
  import shadow from "./shadow/shadow.transforms.js";
8
9
  import unit from "./unit/unit.transforms.js";
9
- import radius from "./radius/radius.transforms.js";
10
10
  import viewport from "./viewport/viewport.transforms.js";
11
11
  import zIndex from "./zIndex/zIndex.transforms.js";
12
12
  export const css = {
@@ -1,15 +1,15 @@
1
+ import { PartialDeep, PrivateOptions } from "../types";
2
+ import * as TZIndex from "./zIndex/zIndex.types";
1
3
  import type * as TColor from "./color/color.types";
2
4
  import type * as TDuration from "./duration/duration.types";
3
5
  import type * as TEasing from "./easing/easing.types";
4
6
  import type * as TFont from "./font/font.types";
5
7
  import type * as TFontFamily from "./fontFamily/fontFamily.types";
6
8
  import type * as TFontWeight from "./fontWeight/fontWeight.types";
9
+ import type * as TRadius from "./radius/radius.types";
7
10
  import type * as TShadow from "./shadow/shadow.types";
8
11
  import type * as TUnit from "./unit/unit.types";
9
- import type * as TRadius from "./radius/radius.types";
10
12
  import type * as TViewport from "./viewport/viewport.types";
11
- import * as TZIndex from "./zIndex/zIndex.types";
12
- import { PartialDeep, PrivateOptions } from "../types";
13
13
  export type TokenType = "fontFamily" | "fontWeight" | "unit" | "radius" | "viewport" | "font" | "color" | "duration" | "easing" | "shadow" | "zIndex";
14
14
  type TokenSet<Name extends string, Token> = Record<Name, Token> & {
15
15
  [tokenName: string]: Token;
@@ -1,5 +1,5 @@
1
- import type * as T from "./types";
2
1
  import type { PassedThemeDefinition, GeneratedThemeDefinition } from "./tokens/types";
2
+ import type * as T from "./types";
3
3
  declare const transform: (name: string, definition: PassedThemeDefinition, options: T.PrivateOptions) => {
4
4
  variables: string;
5
5
  media: string | undefined;
@@ -1,8 +1,8 @@
1
- import * as transforms from "./tokens/transforms.js";
1
+ import { formatHex8, formatHex } from "culori/fn";
2
+ import generateMetaColors from "./tokens/color/utilities/generateMetaColors.js";
2
3
  import { variablesTemplate, mediaTemplate } from "./tokens/css.js";
4
+ import * as transforms from "./tokens/transforms.js";
3
5
  import { generateUnits } from "./tokens/unit/utilities/generate.js";
4
- import generateMetaColors from "./tokens/color/utilities/generateMetaColors.js";
5
- import { formatHex8, formatHex } from "culori/fn";
6
6
  const transform = (name, definition, options) => {
7
7
  const { isFragment, themeOptions } = options;
8
8
  const generatedUnits = generateUnits(definition);
@@ -1,5 +1,5 @@
1
- import type * as T from "./_generator/types";
2
1
  import type { PassedThemeDefinition } from "./_generator/tokens/types";
2
+ import type * as T from "./_generator/types";
3
3
  /**
4
4
  * Exported types
5
5
  */
@@ -1,5 +1,5 @@
1
- import type { PassedThemeDefinition } from "../themes/_generator/tokens/types";
2
1
  import type { HexColor, Hue, OklchColor } from "../themes/_generator/tokens/color/color.types";
2
+ import type { PassedThemeDefinition } from "../themes/_generator/tokens/types";
3
3
  export type ReshapedConfig = {
4
4
  themes?: Record<string, PassedThemeDefinition>;
5
5
  themeFragments?: Record<string, PassedThemeDefinition>;
@@ -1,10 +1,10 @@
1
1
  var _a;
2
- import Chain from "../Chain.js";
3
2
  import * as keys from "../../constants/keys.js";
4
- import TrapScreenReader from "./TrapScreenReader.js";
5
- import { getActiveElement, getFocusableElements, focusElement, getFocusData } from "./focus.js";
3
+ import Chain from "../Chain.js";
6
4
  import { getShadowRoot } from "../dom/index.js";
5
+ import { getActiveElement, getFocusableElements, focusElement, getFocusData } from "./focus.js";
7
6
  import { checkKeyboardMode } from "./keyboardMode.js";
7
+ import TrapScreenReader from "./TrapScreenReader.js";
8
8
  class TrapFocus {
9
9
  static chain = new Chain();
10
10
  #chainId;
@@ -45,7 +45,7 @@ class TrapFocus {
45
45
  target: isPrev ? "prev" : "next",
46
46
  options: {
47
47
  additionalElement: includeTrigger ? this.#trigger : undefined,
48
- circular: mode !== "action-menu" && mode !== "action-bar",
48
+ circular: true,
49
49
  },
50
50
  });
51
51
  // Release the trap when tab is used in navigation modes that support arrows
@@ -1,5 +1,5 @@
1
- import { isIOS } from "../platform.js";
2
1
  import { findClosestScrollableContainer } from "../dom/index.js";
2
+ import { isIOS } from "../platform.js";
3
3
  import lockSafariScroll from "./lockSafari.js";
4
4
  import lockStandardScroll from "./lockStandard.js";
5
5
  let bodyLockedCount = 0;
@@ -1,5 +1,5 @@
1
- import { getScrollbarWidth } from "./helpers.js";
2
1
  import { StyleCache } from "../css.js";
2
+ import { getScrollbarWidth } from "./helpers.js";
3
3
  const styleCache = new StyleCache();
4
4
  const lockStandardScroll = (args) => {
5
5
  const { container } = args;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import View from "../../components/View/index.js";
3
2
  import Text from "../../components/Text/index.js";
3
+ import View from "../../components/View/index.js";
4
4
  const Example = (props) => {
5
5
  return (_jsxs(View, { gap: 3, attributes: props.title ? { style: { marginTop: -17 } } : undefined, children: [props.title && (_jsx(View, { bleed: 4, paddingInline: 4, paddingBlock: 3, backgroundColor: "neutral-faded", borderColor: "neutral-faded", position: "sticky", insetTop: 0, zIndex: 100, children: props.title })), props.children] }));
6
6
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reshaped",
3
3
  "description": "Professionally crafted design system in React & Figma for building products of any scale and complexity",
4
- "version": "3.9.0-canary.1",
4
+ "version": "3.9.0-canary.3",
5
5
  "license": "MIT",
6
6
  "email": "hello@reshaped.so",
7
7
  "homepage": "https://reshaped.so",
@@ -97,12 +97,14 @@
97
97
  "@types/react-dom": "19.2.2",
98
98
  "@vitejs/plugin-react": "5.1.0",
99
99
  "@vitest/browser": "4.0.4",
100
+ "@vitest/browser-playwright": "4.0.4",
100
101
  "@vitest/coverage-istanbul": "4.0.4",
101
102
  "@vitest/coverage-v8": "4.0.4",
102
- "@vitest/browser-playwright": "4.0.4",
103
103
  "chromatic": "13.3.2",
104
104
  "eslint": "9.38.0",
105
105
  "eslint-config-prettier": "10.1.8",
106
+ "eslint-import-resolver-typescript": "^4.4.4",
107
+ "eslint-plugin-import": "2.32.0",
106
108
  "eslint-plugin-jsx-a11y": "6.10.2",
107
109
  "eslint-plugin-prettier": "5.5.4",
108
110
  "eslint-plugin-react": "7.37.5",