reshaped 3.9.0-canary.1 → 3.9.0-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/bundle.css +1 -1
  2. package/dist/bundle.js +11 -11
  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 +4 -4
  16. package/dist/components/Autocomplete/Autocomplete.types.d.ts +2 -2
  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 +7 -1
  26. package/dist/components/Calendar/CalendarControlled.js +4 -4
  27. package/dist/components/Calendar/CalendarControls.js +2 -2
  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 +3 -3
  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/FlyoutContent.js +4 -4
  52. package/dist/components/Flyout/FlyoutControlled.js +5 -5
  53. package/dist/components/Flyout/index.d.ts +1 -1
  54. package/dist/components/Flyout/index.js +1 -1
  55. package/dist/components/Flyout/useFlyout.d.ts +1 -1
  56. package/dist/components/Flyout/useFlyout.js +1 -1
  57. package/dist/components/Flyout/utilities/flyout.d.ts +1 -1
  58. package/dist/components/Flyout/utilities/flyout.js +1 -1
  59. package/dist/components/FormControl/FormControlCaption.js +1 -1
  60. package/dist/components/FormControl/FormControlLabel.js +1 -1
  61. package/dist/components/FormControl/index.d.ts +2 -2
  62. package/dist/components/FormControl/index.js +2 -2
  63. package/dist/components/Grid/Grid.js +1 -1
  64. package/dist/components/Grid/Grid.types.d.ts +2 -2
  65. package/dist/components/Icon/Icon.js +1 -1
  66. package/dist/components/Image/Image.js +1 -1
  67. package/dist/components/Image/Image.types.d.ts +1 -1
  68. package/dist/components/Link/Link.js +1 -1
  69. package/dist/components/MenuItem/MenuItem.js +1 -1
  70. package/dist/components/MenuItem/MenuItem.types.d.ts +2 -2
  71. package/dist/components/Modal/Modal.js +7 -7
  72. package/dist/components/Modal/Modal.types.d.ts +1 -1
  73. package/dist/components/NumberField/NumberFieldControlled.js +7 -7
  74. package/dist/components/Overlay/Overlay.js +8 -8
  75. package/dist/components/PinField/PinFieldControlled.js +4 -4
  76. package/dist/components/Popover/Popover.js +3 -3
  77. package/dist/components/Popover/Popover.types.d.ts +1 -1
  78. package/dist/components/Radio/Radio.js +3 -3
  79. package/dist/components/RadioGroup/RadioGroup.types.d.ts +1 -1
  80. package/dist/components/Reshaped/Reshaped.js +4 -4
  81. package/dist/components/Reshaped/Reshaped.types.d.ts +1 -1
  82. package/dist/components/Resizable/Resizable.js +2 -2
  83. package/dist/components/Resizable/Resizable.types.d.ts +1 -1
  84. package/dist/components/Resizable/ResizableHandle.js +1 -1
  85. package/dist/components/ScrollArea/ScrollArea.js +4 -4
  86. package/dist/components/Select/Select.types.d.ts +3 -3
  87. package/dist/components/Select/SelectCustomControlled.js +6 -3
  88. package/dist/components/Select/SelectEndContent.js +1 -1
  89. package/dist/components/Select/SelectGroup.js +1 -1
  90. package/dist/components/Select/SelectNative.js +2 -2
  91. package/dist/components/Select/SelectRoot.js +1 -1
  92. package/dist/components/Select/SelectTrigger.js +1 -1
  93. package/dist/components/Select/index.d.ts +1 -1
  94. package/dist/components/Select/index.js +1 -1
  95. package/dist/components/Skeleton/Skeleton.js +1 -1
  96. package/dist/components/Slider/SliderControlled.js +7 -7
  97. package/dist/components/Slider/SliderThumb.js +3 -3
  98. package/dist/components/Stepper/Stepper.js +4 -4
  99. package/dist/components/Switch/Switch.js +1 -1
  100. package/dist/components/Table/Table.js +2 -2
  101. package/dist/components/Tabs/Tabs.types.d.ts +1 -1
  102. package/dist/components/Tabs/TabsItem.js +2 -2
  103. package/dist/components/Tabs/TabsList.js +8 -8
  104. package/dist/components/Tabs/TabsPanel.js +2 -2
  105. package/dist/components/Text/Text.js +1 -1
  106. package/dist/components/Text/Text.module.css +1 -1
  107. package/dist/components/TextArea/TextArea.js +1 -1
  108. package/dist/components/TextArea/TextArea.types.d.ts +1 -1
  109. package/dist/components/TextField/TextField.js +2 -2
  110. package/dist/components/TextField/TextField.types.d.ts +2 -2
  111. package/dist/components/Theme/GlobalColorMode.js +1 -1
  112. package/dist/components/Theme/Theme.js +2 -2
  113. package/dist/components/Timeline/Timeline.js +1 -1
  114. package/dist/components/Toast/Toast.js +2 -2
  115. package/dist/components/Toast/Toast.types.d.ts +1 -1
  116. package/dist/components/Toast/ToastContainer.js +3 -3
  117. package/dist/components/Toast/ToastProvider.js +1 -1
  118. package/dist/components/Toast/ToastRegion.js +2 -2
  119. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.types.d.ts +1 -1
  120. package/dist/components/ToggleButtonGroup/ToggleButtonGroupControlled.js +1 -1
  121. package/dist/components/Tooltip/Tooltip.js +5 -3
  122. package/dist/components/View/View.js +2 -2
  123. package/dist/components/View/View.types.d.ts +1 -1
  124. package/dist/components/_private/Expandable/Expandable.js +2 -2
  125. package/dist/components/_private/Portal/Portal.js +1 -1
  126. package/dist/config/tailwind.js +2 -2
  127. package/dist/hooks/_private/useDrag.js +4 -4
  128. package/dist/hooks/_private/useFadeSide.js +1 -1
  129. package/dist/hooks/useResponsiveClientValue.js +1 -1
  130. package/dist/styles/mixin.js +1 -1
  131. package/dist/tests/ThemesPlayground.js +16 -16
  132. package/dist/themes/_generator/definitions/slate.js +1 -1
  133. package/dist/themes/_generator/tokens/color/utilities/generateColors.d.ts +1 -1
  134. package/dist/themes/_generator/tokens/color/utilities/generateMetaColors.d.ts +1 -1
  135. package/dist/themes/_generator/tokens/color/utilities/generateMetaColors.js +1 -1
  136. package/dist/themes/_generator/tokens/font/font.types.d.ts +2 -2
  137. package/dist/themes/_generator/tokens/transforms.js +1 -1
  138. package/dist/themes/_generator/tokens/types.d.ts +3 -3
  139. package/dist/themes/_generator/transform.d.ts +1 -1
  140. package/dist/themes/_generator/transform.js +3 -3
  141. package/dist/themes/index.d.ts +1 -1
  142. package/dist/types/config.d.ts +1 -1
  143. package/dist/utilities/a11y/TrapFocus.js +4 -4
  144. package/dist/utilities/scroll/lock.js +1 -1
  145. package/dist/utilities/scroll/lockStandard.js +1 -1
  146. package/dist/utilities/storybook/Example.js +1 -1
  147. package/package.json +4 -2
@@ -1,9 +1,9 @@
1
- import fs from "fs";
2
- import path from "path";
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
3
  import chalk from "chalk";
4
- import mergeDefinitions from "../../themes/_generator/utilities/mergeDefinitions.js";
5
- import transform from "../../themes/_generator/transform.js";
6
4
  import reshapedDefinition from "../../themes/_generator/definitions/reshaped.js";
5
+ import transform from "../../themes/_generator/transform.js";
6
+ import mergeDefinitions from "../../themes/_generator/utilities/mergeDefinitions.js";
7
7
  import { transformToTailwind } from "./tailwind.js";
8
8
  const transformDefinition = (name, definition, options) => {
9
9
  const { isFragment, outputPath } = options;
@@ -1,5 +1,5 @@
1
- import reshapedDefinition from "../../themes/_generator/definitions/reshaped.js";
2
1
  import figmaDefinition from "../../themes/_generator/definitions/figma.js";
2
+ import reshapedDefinition from "../../themes/_generator/definitions/reshaped.js";
3
3
  import slateDefinition from "../../themes/_generator/definitions/slate.js";
4
4
  const config = {
5
5
  themes: {
@@ -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 BaseProps = {
5
5
  /** Expand / collapse icon size in units */
@@ -1,10 +1,10 @@
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 useElementId from "../../hooks/useElementId.js";
6
- import AccordionContext from "./Accordion.context.js";
7
5
  import useHandlerRef from "../../hooks/useHandlerRef.js";
6
+ import { classNames } from "../../utilities/props.js";
7
+ import AccordionContext from "./Accordion.context.js";
8
8
  const AccordionControlled = (props) => {
9
9
  const { children, onToggle, active, iconPosition, iconSize, gap, className, attributes } = props;
10
10
  const rootClassNames = classNames(className);
@@ -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
3
  import React from "react";
4
- import { classNames } from "../../utilities/props.js";
5
4
  import Actionable from "../Actionable/index.js";
6
- import View from "../View/index.js";
7
5
  import Icon from "../Icon/index.js";
6
+ import View from "../View/index.js";
8
7
  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,6 @@
1
1
  import Accordion from "./Accordion";
2
- import AccordionTrigger from "./AccordionTrigger";
3
2
  import AccordionContent from "./AccordionContent";
3
+ import AccordionTrigger from "./AccordionTrigger";
4
4
  declare const AccordionRoot: typeof Accordion & {
5
5
  Trigger: typeof AccordionTrigger;
6
6
  Content: typeof AccordionContent;
@@ -1,6 +1,6 @@
1
1
  import Accordion from "./Accordion.js";
2
- import AccordionTrigger from "./AccordionTrigger.js";
3
2
  import AccordionContent from "./AccordionContent.js";
3
+ import AccordionTrigger from "./AccordionTrigger.js";
4
4
  const AccordionRoot = Accordion;
5
5
  AccordionRoot.Trigger = AccordionTrigger;
6
6
  AccordionRoot.Content = AccordionContent;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames, responsiveVariables } from "../../utilities/props.js";
3
2
  import View from "../View/index.js";
3
+ import { classNames, responsiveVariables } from "../../utilities/props.js";
4
4
  import s from "./ActionBar.module.css";
5
5
  const fullWidthPositions = ["top", "bottom"];
6
6
  const ActionBar = (props) => {
@@ -1,5 +1,5 @@
1
- import type React from "react";
2
1
  import type { ViewProps } from "../View";
2
+ import type React from "react";
3
3
  import type * as G from "../../types/global";
4
4
  export type Props = Pick<ViewProps, "paddingBlock" | "paddingInline" | "padding"> & {
5
5
  /** Show or hide the component */
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { forwardRef } from "react";
4
- import { classNames } from "../../utilities/props.js";
5
4
  import * as keys from "../../constants/keys.js";
5
+ import { classNames } from "../../utilities/props.js";
6
6
  import s from "./Actionable.module.css";
7
7
  const Actionable = forwardRef((props, ref) => {
8
8
  const { children, render, href, onClick, type, disabled, insetFocus, disableFocusRing, borderRadius, as, stopPropagation, fullWidth, touchHitbox, className, attributes, } = props;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Icon from "../Icon/index.js";
3
- import View from "../View/index.js";
4
3
  import Text from "../Text/index.js";
4
+ import View from "../View/index.js";
5
5
  import s from "./Alert.module.css";
6
6
  const Alert = (props) => {
7
7
  const { title, children, icon, actionsSlot, color = "neutral", inline, bleed, className, attributes, } = props;
@@ -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 Props = {
5
5
  /** SVG component for the icon */
@@ -1,14 +1,14 @@
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 TextField from "../TextField/index.js";
5
4
  import DropdownMenu from "../DropdownMenu/index.js";
5
+ import TextField from "../TextField/index.js";
6
6
  import * as keys from "../../constants/keys.js";
7
- import useHotkeys from "../../hooks/useHotkeys.js";
8
- import useHandlerRef from "../../hooks/useHandlerRef.js";
9
- import s from "./Autocomplete.module.css";
10
7
  import useElementId from "../../hooks/useElementId.js";
8
+ import useHandlerRef from "../../hooks/useHandlerRef.js";
9
+ import useHotkeys from "../../hooks/useHotkeys.js";
11
10
  import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
11
+ import s from "./Autocomplete.module.css";
12
12
  const AutocompleteContext = React.createContext({});
13
13
  const Autocomplete = (props) => {
14
14
  const { children, onChange, onInput, onItemSelect, name, containerRef, instanceRef, onBackspace, onEnter, active, onOpen, onClose, fallbackAdjustLayout, fallbackMinWidth, fallbackMinHeight, ...textFieldProps } = props;
@@ -1,6 +1,6 @@
1
- import type { TextFieldProps } from "../TextField";
2
- import type { MenuItemProps } from "../MenuItem";
3
1
  import type { DropdownMenuProps, DropdownMenuInstance } from "../DropdownMenu";
2
+ import type { MenuItemProps } from "../MenuItem";
3
+ import type { TextFieldProps } from "../TextField";
4
4
  type SelectArgs = {
5
5
  /** Value that will be passed to the input on selection */
6
6
  value: string;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames, responsivePropDependency } from "../../utilities/props.js";
3
- import { resolveMixin } from "../../styles/mixin.js";
4
2
  import Icon from "../Icon/index.js";
5
3
  import View from "../View/index.js";
4
+ import { resolveMixin } from "../../styles/mixin.js";
5
+ import { classNames, responsivePropDependency } from "../../utilities/props.js";
6
6
  import s from "./Avatar.module.css";
7
7
  const Avatar = (props) => {
8
8
  const { color = "neutral", variant, src, size = 12, squared, initials, icon, className, renderImage, imageAttributes: passedImageAttributes, attributes, } = props;
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { classNames } from "../../utilities/props.js";
3
- import Text from "../Text/index.js";
2
+ import { forwardRef } from "react";
3
+ import Actionable from "../Actionable/index.js";
4
4
  import Icon from "../Icon/index.js";
5
+ import Text from "../Text/index.js";
5
6
  import IconClose from "../../icons/Close.js";
6
- import Actionable from "../Actionable/index.js";
7
+ import { classNames } from "../../utilities/props.js";
7
8
  import s from "./Badge.module.css";
8
- import { forwardRef } from "react";
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, } = props;
11
11
  const isActionable = !!(onClick || href);
@@ -1,6 +1,6 @@
1
- import type React from "react";
2
1
  import type { ActionableProps } from "../Actionable";
3
2
  import type { IconProps } from "../Icon";
3
+ import type React from "react";
4
4
  import type * as G from "../../types/global";
5
5
  type BaseProps = {
6
6
  /** Component color scheme
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import { classNames } from "../../utilities/props.js";
5
- import View from "../View/index.js";
4
+ import Button from "../Button/index.js";
6
5
  import Icon from "../Icon/index.js";
7
6
  import Text from "../Text/index.js";
8
- import Button from "../Button/index.js";
7
+ import View from "../View/index.js";
9
8
  import IconChevronRight from "../../icons/ChevronRight.js";
10
9
  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,5 +1,5 @@
1
- import type React from "react";
2
1
  import type { LinkProps } from "../Link";
2
+ import type React from "react";
3
3
  import type * as G from "../../types/global";
4
4
  export type Props = {
5
5
  /** Node for inserting children to position items */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import Text from "../Text/index.js";
3
2
  import Link from "../Link/index.js";
3
+ import Text from "../Text/index.js";
4
4
  const BreadcrumbsItem = (props) => {
5
5
  const { children, onClick, href, icon, disabled } = props;
6
6
  if (!href && !onClick && !disabled) {
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { classNames, responsiveClassNames, responsivePropDependency } from "../../utilities/props.js";
3
+ import Actionable from "../Actionable/index.js";
4
4
  import Icon from "../Icon/index.js";
5
5
  import Loader from "../Loader/index.js";
6
- import Actionable from "../Actionable/index.js";
6
+ import { classNames, responsiveClassNames, responsivePropDependency } from "../../utilities/props.js";
7
7
  import s from "./Button.module.css";
8
8
  const Button = forwardRef((props, ref) => {
9
9
  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,7 +1,7 @@
1
- import type React from "react";
2
- import type { IconProps } from "../Icon";
3
- import type { ActionableProps } from "../Actionable";
4
1
  import type { AlignerProps as BaseAlignerProps } from "../_private/Aligner";
2
+ import type { ActionableProps } from "../Actionable";
3
+ import type { IconProps } from "../Icon";
4
+ import type React from "react";
5
5
  import type * as G from "../../types/global";
6
6
  export type Size = "xlarge" | "large" | "medium" | "small";
7
7
  export type Props = Pick<ActionableProps, "attributes" | "className" | "disabled" | "children" | "href" | "onClick" | "type" | "as" | "stopPropagation" | "render"> & {
@@ -28,6 +28,11 @@ export type BaseProps = {
28
28
  month: number;
29
29
  date: Date;
30
30
  }) => string;
31
+ /** Render a custom date slot content under the date number */
32
+ renderDateSlot?: (args: {
33
+ date: Date;
34
+ selected: boolean;
35
+ }) => React.ReactNode;
31
36
  /** Aria label for the previous month button */
32
37
  previousMonthAriaLabel?: string;
33
38
  nextMonthAriaLabel?: string;
@@ -106,7 +111,7 @@ export type MonthProps = {
106
111
  hoveredDate: Date | null;
107
112
  onDateHover: (date: Date) => void;
108
113
  onDateHoverEnd: (date: Date) => void;
109
- } & Pick<BaseProps, "max" | "min" | "firstWeekDay" | "selectedDates" | "renderMonthLabel" | "renderWeekDay" | "renderSelectedMonthLabel" | "renderDateAriaLabel"> & Pick<ControlledProps, "value" | "onChange" | "range">;
114
+ } & Pick<BaseProps, "max" | "min" | "firstWeekDay" | "selectedDates" | "renderMonthLabel" | "renderWeekDay" | "renderSelectedMonthLabel" | "renderDateAriaLabel" | "renderDateSlot"> & Pick<ControlledProps, "value" | "onChange" | "range">;
110
115
  export type YearProps = {
111
116
  monthDate: Date;
112
117
  onMonthClick: (month: number) => void;
@@ -119,6 +124,7 @@ export type DateProps = {
119
124
  startValue: Date | null;
120
125
  endValue: Date | null;
121
126
  renderAriaLabel?: MonthProps["renderDateAriaLabel"];
127
+ renderSlot?: MonthProps["renderDateSlot"];
122
128
  onDateFocus: (date: Date) => void;
123
129
  } & Pick<MonthProps, "hoveredDate" | "onDateHover" | "onDateHoverEnd" | "onChange" | "range" | "min" | "max" | "selectedDates">;
124
130
  export type ControlsProps = {
@@ -4,12 +4,12 @@ import React from "react";
4
4
  import View from "../View/index.js";
5
5
  import { onNextFrame } from "../../utilities/animation.js";
6
6
  import { setMonthToPrevious, setMonthToNext, setMonthTo, setYearToNext, setYearToPrevious, applyNavigationBounds, } from "./Calendar.utils.js";
7
- import useCalendarKeyboardNavigation from "./useCalendarKeyboardNavigation.js";
7
+ import CalendarControls from "./CalendarControls.js";
8
8
  import CalendarMonth from "./CalendarMonth.js";
9
9
  import CalendarYear from "./CalendarYear.js";
10
- import CalendarControls from "./CalendarControls.js";
10
+ import useCalendarKeyboardNavigation from "./useCalendarKeyboardNavigation.js";
11
11
  const CalendarControlled = (props) => {
12
- const { value, onChange, defaultMonth, min, max, range, firstWeekDay, selectedDates, renderMonthLabel, renderSelectedMonthLabel, renderWeekDay, previousMonthAriaLabel, previousYearAriaLabel, nextMonthAriaLabel, nextYearAriaLabel, monthSelectionAriaLabel, renderMonthAriaLabel, renderDateAriaLabel, } = props;
12
+ const { value, onChange, defaultMonth, min, max, range, firstWeekDay, selectedDates, renderMonthLabel, renderSelectedMonthLabel, renderWeekDay, previousMonthAriaLabel, previousYearAriaLabel, nextMonthAriaLabel, nextYearAriaLabel, monthSelectionAriaLabel, renderMonthAriaLabel, renderDateAriaLabel, renderDateSlot, } = props;
13
13
  const [selectionMode, setSelectionMode] = React.useState("date");
14
14
  const [monthDate, setMonthDate] = React.useState(defaultMonth || new Date());
15
15
  const [hoveredDate, setHoveredDate] = React.useState(null);
@@ -63,7 +63,7 @@ const CalendarControlled = (props) => {
63
63
  min,
64
64
  max,
65
65
  });
66
- return (_jsxs(View, { gap: 2, children: [_jsx(CalendarControls, { renderSelectedMonthLabel: renderSelectedMonthLabel, monthDate: monthDate, selectionMode: selectionMode, isFirstMonth: bounds.isFirstMonth, isLastMonth: bounds.isLastMonth, monthTitleRef: monthTitleRef, onMonthTitleClick: handleMonthTitleClick, onNextClick: handleNextClick, onPreviousClick: handlePreviousClick, previousMonthAriaLabel: previousMonthAriaLabel, previousYearAriaLabel: previousYearAriaLabel, nextMonthAriaLabel: nextMonthAriaLabel, nextYearAriaLabel: nextYearAriaLabel, monthSelectionAriaLabel: monthSelectionAriaLabel }), _jsxs(View.Item, { attributes: { ref: selectionRootRef }, children: [selectionMode === "date" && (_jsx(CalendarMonth, { date: monthDate, value: value, onChange: onChange, min: min, max: max, range: range, firstWeekDay: firstWeekDay, hoveredDate: hoveredDate, selectedDates: selectedDates, onDateHover: handleDateHover, onDateHoverEnd: handleDateHoverEnd, renderWeekDay: renderWeekDay, renderDateAriaLabel: renderDateAriaLabel })), selectionMode === "month" && (_jsx(CalendarYear, { monthDate: monthDate, onMonthClick: handleMonthClick, renderMonthLabel: renderMonthLabel, renderMonthAriaLabel: renderMonthAriaLabel, min: min, max: max }))] })] }));
66
+ return (_jsxs(View, { gap: 2, children: [_jsx(CalendarControls, { renderSelectedMonthLabel: renderSelectedMonthLabel, monthDate: monthDate, selectionMode: selectionMode, isFirstMonth: bounds.isFirstMonth, isLastMonth: bounds.isLastMonth, monthTitleRef: monthTitleRef, onMonthTitleClick: handleMonthTitleClick, onNextClick: handleNextClick, onPreviousClick: handlePreviousClick, previousMonthAriaLabel: previousMonthAriaLabel, previousYearAriaLabel: previousYearAriaLabel, nextMonthAriaLabel: nextMonthAriaLabel, nextYearAriaLabel: nextYearAriaLabel, monthSelectionAriaLabel: monthSelectionAriaLabel }), _jsxs(View.Item, { attributes: { ref: selectionRootRef }, children: [selectionMode === "date" && (_jsx(CalendarMonth, { date: monthDate, value: value, onChange: onChange, min: min, max: max, range: range, firstWeekDay: firstWeekDay, hoveredDate: hoveredDate, selectedDates: selectedDates, onDateHover: handleDateHover, onDateHoverEnd: handleDateHoverEnd, renderWeekDay: renderWeekDay, renderDateAriaLabel: renderDateAriaLabel, renderDateSlot: renderDateSlot })), selectionMode === "month" && (_jsx(CalendarYear, { monthDate: monthDate, onMonthClick: handleMonthClick, renderMonthLabel: renderMonthLabel, renderMonthAriaLabel: renderMonthAriaLabel, min: min, max: max }))] })] }));
67
67
  };
68
68
  CalendarControlled.displayName = "CalendarControlled";
69
69
  export default CalendarControlled;
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import Button from "../Button/index.js";
4
- import View from "../View/index.js";
5
4
  import Hidden from "../Hidden/index.js";
6
- import Text from "../Text/index.js";
7
5
  import HiddenVisually from "../HiddenVisually/index.js";
6
+ import Text from "../Text/index.js";
7
+ import View from "../View/index.js";
8
8
  import IconChevronLeft from "../../icons/ChevronLeft.js";
9
9
  import IconChevronRight from "../../icons/ChevronRight.js";
10
10
  import { onNextFrame } from "../../utilities/animation.js";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import Actionable from "../Actionable/index.js";
4
4
  import { classNames } from "../../utilities/props.js";
5
- import { getLocalISODate } from "./Calendar.utils.js";
6
5
  import s from "./Calendar.module.css";
6
+ import { getLocalISODate } from "./Calendar.utils.js";
7
7
  const CalendarDate = (props) => {
8
- const { date, isoDate, startValue, endValue, disabled, focusable, onChange, range, hoveredDate, onDateHover, onDateHoverEnd, onDateFocus, renderAriaLabel, selectedDates, } = props;
8
+ const { date, isoDate, startValue, endValue, disabled, focusable, onChange, range, hoveredDate, onDateHover, onDateHoverEnd, onDateFocus, selectedDates, renderAriaLabel, renderSlot, } = props;
9
9
  if (!date)
10
10
  return _jsx("td", { className: s.cell, "aria-hidden": "true" });
11
11
  const isoStartValue = startValue && getLocalISODate({ date: startValue });
@@ -61,7 +61,7 @@ const CalendarDate = (props) => {
61
61
  handleMouseEnter();
62
62
  onDateFocus(date);
63
63
  };
64
- return (_jsx("td", { className: dateClassNames, role: disabled ? "presentation" : "gridcell", children: _jsx(Actionable, { fullWidth: true, insetFocus: true, className: s["cell-button"], disabled: disabled, onClick: handleClick, attributes: {
64
+ return (_jsx("td", { className: dateClassNames, role: disabled ? "presentation" : "gridcell", children: _jsxs(Actionable, { fullWidth: true, insetFocus: true, className: s["cell-button"], disabled: disabled, onClick: handleClick, attributes: {
65
65
  role: "checkbox",
66
66
  tabIndex: focusable ? 0 : -1,
67
67
  "aria-hidden": disabled,
@@ -74,7 +74,7 @@ const CalendarDate = (props) => {
74
74
  onMouseLeave: handleMouseLeave,
75
75
  onFocus: handleFocus,
76
76
  onBlur: handleMouseLeave,
77
- }, children: date.getDate() }) }));
77
+ }, children: [date.getDate(), renderSlot?.({ date, selected: Boolean(selection && selection !== "range") })] }) }));
78
78
  };
79
79
  CalendarDate.displayName = "CalendarDate";
80
80
  export default CalendarDate;
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
+ import s from "./Calendar.module.css";
4
5
  import { getMonthWeeks, getWeekdayNames, getLocalISODate, isDateFocusable } from "./Calendar.utils.js";
5
6
  import CalendarDate from "./CalendarDate.js";
6
- import s from "./Calendar.module.css";
7
7
  const CalendarMonth = (props) => {
8
- const { date, value, onChange, min, max, range, firstWeekDay, selectedDates, hoveredDate, onDateHover, onDateHoverEnd, renderWeekDay, renderDateAriaLabel, } = props;
8
+ const { date, value, onChange, min, max, range, firstWeekDay, selectedDates, hoveredDate, onDateHover, onDateHoverEnd, renderWeekDay, renderDateAriaLabel, renderDateSlot, } = props;
9
9
  let foundFocusableDate = false;
10
10
  const [lastFocusedDate, setLastFocusedDate] = useState();
11
11
  const month = date.getMonth();
@@ -26,7 +26,7 @@ const CalendarMonth = (props) => {
26
26
  // eslint-disable-next-line react-hooks/immutability
27
27
  if (focusable)
28
28
  foundFocusableDate = true;
29
- return (_jsx(CalendarDate, { date: date, isoDate: isoDate, disabled: disabled, range: range, focusable: focusable, startValue: startValue, endValue: endValue, onChange: onChange, hoveredDate: hoveredDate, onDateHover: onDateHover, onDateHoverEnd: onDateHoverEnd, onDateFocus: setLastFocusedDate, renderAriaLabel: renderDateAriaLabel, selectedDates: selectedDates }, index));
29
+ return (_jsx(CalendarDate, { date: date, isoDate: isoDate, disabled: disabled, range: range, focusable: focusable, startValue: startValue, endValue: endValue, onChange: onChange, hoveredDate: hoveredDate, onDateHover: onDateHover, onDateHoverEnd: onDateHoverEnd, onDateFocus: setLastFocusedDate, renderAriaLabel: renderDateAriaLabel, selectedDates: selectedDates, renderSlot: renderDateSlot }, index));
30
30
  }) }, key));
31
31
  }) })] }));
32
32
  };
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import Actionable from "../Actionable/index.js";
4
4
  import { onNextFrame } from "../../utilities/animation.js";
5
- import { getMonthNames } from "./Calendar.utils.js";
6
5
  import s from "./Calendar.module.css";
6
+ import { getMonthNames } from "./Calendar.utils.js";
7
7
  const MONTHS_PER_ROW = 3;
8
8
  const CalendarYear = (props) => {
9
9
  const { renderMonthLabel, renderMonthAriaLabel, monthDate, min, max, onMonthClick } = props;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import useHotkeys from "../../hooks/useHotkeys.js";
3
2
  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,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { classNames } from "../../utilities/props.js";
4
3
  import Actionable from "../Actionable/index.js";
5
- import s from "./Card.module.css";
6
4
  import { resolveMixin } from "../../styles/mixin.js";
5
+ import { classNames } from "../../utilities/props.js";
6
+ import s from "./Card.module.css";
7
7
  const Card = forwardRef((props, ref) => {
8
8
  const { padding = 4 } = props;
9
9
  const { selected, elevated, bleed, height, onClick, href, children, className, attributes,
@@ -1,6 +1,6 @@
1
- import type React from "react";
2
1
  import type { ActionableProps } from "../Actionable";
3
2
  import type { ViewProps } from "../View";
3
+ import type React from "react";
4
4
  import type * as G from "../../types/global";
5
5
  export type Props<TagName extends keyof React.JSX.IntrinsicElements = "div"> = {
6
6
  /** Component padding, base unit multiplier */
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import { classNames, responsiveVariables, responsiveClassNames } from "../../utilities/props.js";
5
- import { rafThrottle } from "../../utilities/helpers.js";
6
4
  import View from "../View/index.js";
7
- import useRTL from "../../hooks/useRTL.js";
8
5
  import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
9
- import CarouselControl from "./CarouselControl.js";
6
+ import useRTL from "../../hooks/useRTL.js";
7
+ import { rafThrottle } from "../../utilities/helpers.js";
8
+ import { classNames, responsiveVariables, responsiveClassNames } from "../../utilities/props.js";
10
9
  import s from "./Carousel.module.css";
10
+ import CarouselControl from "./CarouselControl.js";
11
11
  const Carousel = (props) => {
12
12
  const { children, gap = 3, visibleItems, bleed, navigationDisplay, onChange, onScroll, instanceRef, className, attributes, } = props;
13
13
  const currentIndexRef = React.useRef(0);
@@ -1,6 +1,6 @@
1
+ import type { ActionableRef } from "../Actionable";
1
2
  import type React from "react";
2
3
  import type * as G from "../../types/global";
3
- import type { ActionableRef } from "../Actionable";
4
4
  export type Instance = {
5
5
  /** Scroll to the previous item */
6
6
  navigateBack: () => void;
@@ -1,4 +1,4 @@
1
- import type { ActionableRef } from "../Actionable";
2
1
  import * as T from "./Carousel.types";
2
+ import type { ActionableRef } from "../Actionable";
3
3
  declare const CarouselControl: import("react").ForwardRefExoticComponent<T.ControlProps & import("react").RefAttributes<ActionableRef>>;
4
4
  export default CarouselControl;
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { forwardRef, useState } from "react";
4
- import { classNames } from "../../utilities/props.js";
5
4
  import Button from "../Button/index.js";
6
- import IconChevronRight from "../../icons/ChevronRight.js";
7
- import IconChevronLeft from "../../icons/ChevronLeft.js";
8
5
  import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
6
+ import IconChevronLeft from "../../icons/ChevronLeft.js";
7
+ import IconChevronRight from "../../icons/ChevronRight.js";
8
+ import { classNames } from "../../utilities/props.js";
9
9
  import s from "./Carousel.module.css";
10
10
  const CarouselControl = forwardRef((props, ref) => {
11
11
  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
3
  import React from "react";
4
- import { classNames, responsiveClassNames, responsivePropDependency } from "../../utilities/props.js";
5
- import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
6
4
  import HiddenInput from "../_private/HiddenInput/index.js";
7
- import { useFormControl } from "../FormControl/index.js";
8
5
  import { useCheckboxGroup } from "../CheckboxGroup/index.js";
6
+ import { useFormControl } from "../FormControl/index.js";
9
7
  import Icon from "../Icon/index.js";
10
8
  import Text from "../Text/index.js";
9
+ import useIsomorphicLayoutEffect from "../../hooks/useIsomorphicLayoutEffect.js";
11
10
  import IconCheckmark from "../../icons/Checkmark.js";
11
+ import { classNames, 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,6 +1,6 @@
1
+ import type { CheckboxProps } from "../Checkbox";
1
2
  import type React from "react";
2
3
  import type * as G from "../../types/global";
3
- import type { CheckboxProps } from "../Checkbox";
4
4
  type BaseProps = {
5
5
  /** Component id attribute */
6
6
  id?: string;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from "../../utilities/props.js";
3
2
  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,5 +1,5 @@
1
- import type React from "react";
2
1
  import type { ViewProps } from "../View";
2
+ import type React from "react";
3
3
  import type * as G from "../../types/global";
4
4
  export type Props = Pick<ViewProps, "align" | "justify" | "height" | "maxHeight"> & {
5
5
  /** Component inline padding */
@@ -2,9 +2,9 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import DropdownMenu from "../DropdownMenu/index.js";
5
+ import useHandlerRef from "../../hooks/useHandlerRef.js";
5
6
  import useScrollLock from "../../hooks/useScrollLock.js";
6
7
  import s from "./ContextMenu.module.css";
7
- import useHandlerRef from "../../hooks/useHandlerRef.js";
8
8
  const ContextMenu = (props) => {
9
9
  const { position = "end-top", onOpen, onClose, ...dropdownMenuProps } = props;
10
10
  const [coordinates, setCoordinates] = React.useState();
@@ -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 "../../utilities/props.js";
4
3
  import Button from "../Button/index.js";
5
4
  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,4 +1,4 @@
1
- import type React from "react";
2
1
  import type * as T from "./Divider.types";
2
+ import type React from "react";
3
3
  declare const Divider: React.FC<T.Props>;
4
4
  export default Divider;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames, responsiveClassNames } from "../../utilities/props.js";
3
2
  import Text from "../Text/index.js";
3
+ import { classNames, responsiveClassNames } from "../../utilities/props.js";
4
4
  import s from "./Divider.module.css";
5
5
  const Divider = (props) => {
6
6
  const { vertical, blank, children, contentPosition = "center", color, offset, className, attributes, } = props;
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import Popover from "../Popover/index.js";
5
- import MenuItem from "../MenuItem/index.js";
6
- import Icon from "../Icon/index.js";
7
4
  import { useFlyoutContext } from "../Flyout/index.js";
8
- import IconChevronRight from "../../icons/ChevronRight.js";
5
+ import Icon from "../Icon/index.js";
6
+ import MenuItem from "../MenuItem/index.js";
7
+ import Popover from "../Popover/index.js";
8
+ import * as keys from "../../constants/keys.js";
9
9
  import useHotkeys from "../../hooks/useHotkeys.js";
10
10
  import useRTL from "../../hooks/useRTL.js";
11
+ import IconChevronRight from "../../icons/ChevronRight.js";
11
12
  import { classNames } from "../../utilities/props.js";
12
- import * as keys from "../../constants/keys.js";
13
13
  import s from "./DropdownMenu.module.css";
14
14
  const DropdownMenuSubContext = React.createContext(null);
15
15
  const DropdownMenuSubTriggerContext = React.createContext(false);
@@ -1,7 +1,7 @@
1
- import type React from "react";
2
- import type { PopoverProps, PopoverInstance } from "../Popover";
3
- import type { MenuItemProps } from "../MenuItem";
4
1
  import type { FlyoutContentProps } from "../Flyout";
2
+ import type { MenuItemProps } from "../MenuItem";
3
+ import type { PopoverProps, PopoverInstance } from "../Popover";
4
+ import type React from "react";
5
5
  export type Instance = PopoverInstance;
6
6
  export type Props = Pick<PopoverProps, "children" | "position" | "forcePosition" | "fallbackPositions" | "fallbackAdjustLayout" | "fallbackMinWidth" | "fallbackMinHeight" | "triggerType" | "contentGap" | "contentShift" | "onOpen" | "onClose" | "active" | "defaultActive" | "width" | "disableHideAnimation" | "disableCloseOnOutsideClick" | "instanceRef" | "containerRef" | "positionRef" | "originCoordinates" | "borderRadius" | "elevation" | "initialFocusRef"> & {
7
7
  /** Change component trap focus keyboard behavior and shortcuts */