@central-ui/react 0.3.0 → 0.5.0

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 (75) hide show
  1. package/dist/components/accordion/index.d.ts +14 -14
  2. package/dist/components/accordion/index.js +19 -19
  3. package/dist/components/autocomplete/index.d.ts +51 -47
  4. package/dist/components/autocomplete/index.js +57 -57
  5. package/dist/components/avatar/index.d.ts +7 -6
  6. package/dist/components/avatar/index.js +9 -9
  7. package/dist/components/banner/index.js +1 -1
  8. package/dist/components/carousel/index.d.ts +31 -11
  9. package/dist/components/carousel/index.js +25 -21
  10. package/dist/components/checkbox/index.d.ts +12 -11
  11. package/dist/components/checkbox/index.js +21 -21
  12. package/dist/components/combobox/index.d.ts +56 -56
  13. package/dist/components/combobox/index.js +67 -68
  14. package/dist/components/datepicker/index.d.ts +8 -9
  15. package/dist/components/datepicker/index.js +13 -13
  16. package/dist/components/dialog/index.d.ts +18 -18
  17. package/dist/components/dialog/index.js +22 -21
  18. package/dist/components/drawer/index.d.ts +24 -24
  19. package/dist/components/drawer/index.js +28 -27
  20. package/dist/components/exception/index.d.ts +23 -11
  21. package/dist/components/exception/index.js +17 -17
  22. package/dist/components/fileupload/index.d.ts +8 -8
  23. package/dist/components/input/index.d.ts +14 -14
  24. package/dist/components/input/index.js +27 -27
  25. package/dist/components/menu/index.d.ts +37 -37
  26. package/dist/components/menu/index.js +47 -47
  27. package/dist/components/numberinput/index.d.ts +22 -22
  28. package/dist/components/numberinput/index.js +35 -35
  29. package/dist/components/otpinput/index.d.ts +12 -12
  30. package/dist/components/otpinput/index.js +21 -21
  31. package/dist/components/pagination/index.d.ts +158 -0
  32. package/dist/components/pagination/index.js +157 -0
  33. package/dist/components/passwordinput/index.d.ts +15 -15
  34. package/dist/components/passwordinput/index.js +27 -27
  35. package/dist/components/popover/index.d.ts +16 -16
  36. package/dist/components/popover/index.js +20 -19
  37. package/dist/components/radio/index.d.ts +12 -12
  38. package/dist/components/radio/index.js +25 -25
  39. package/dist/components/ratinginput/index.d.ts +1 -1
  40. package/dist/components/ratinginput/index.js +3 -3
  41. package/dist/components/select/index.d.ts +29 -29
  42. package/dist/components/select/index.js +33 -33
  43. package/dist/components/slider/index.d.ts +20 -20
  44. package/dist/components/slider/index.js +27 -27
  45. package/dist/components/stepper/index.d.ts +135 -44
  46. package/dist/components/stepper/index.js +185 -62
  47. package/dist/components/switch/index.d.ts +9 -9
  48. package/dist/components/switch/index.js +17 -17
  49. package/dist/components/table/index.d.ts +2 -2
  50. package/dist/components/table/index.js +16 -16
  51. package/dist/components/tabs/index.d.ts +10 -10
  52. package/dist/components/tabs/index.js +11 -11
  53. package/dist/components/textarea/index.d.ts +13 -13
  54. package/dist/components/textarea/index.js +25 -25
  55. package/dist/components/toast/index.d.ts +11 -11
  56. package/dist/components/toast/index.js +11 -11
  57. package/dist/components/toggle/index.d.ts +7 -7
  58. package/dist/components/toggle/index.js +9 -9
  59. package/dist/components/tooltip/index.d.ts +6 -6
  60. package/dist/components/tooltip/index.js +6 -7
  61. package/dist/components/tour/index.d.ts +2 -2
  62. package/dist/components/tour/index.js +5 -4
  63. package/dist/index.d.ts +1 -0
  64. package/dist/index.js +1 -0
  65. package/dist/utils/icons.d.ts +104 -23
  66. package/dist/utils/icons.js +16 -3
  67. package/package.json +69 -69
  68. package/src/presets/shopify-polaris/shopify-polaris-accordion.css +28 -28
  69. package/src/presets/shopify-polaris/shopify-polaris-pagination.css +55 -0
  70. package/src/presets/shopify-polaris/shopify-polaris-stepper.css +63 -27
  71. package/src/presets/shopify-polaris/shopify-polaris.css +1 -0
  72. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-accordion.css +28 -28
  73. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-pagination.css +49 -0
  74. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-stepper.css +64 -26
  75. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy.css +1 -0
@@ -21,17 +21,17 @@ import { parseDate, toCalendarDate, toCalendar, GregorianCalendar, } from '@inte
21
21
  import { useLocale } from 'react-aria/I18nProvider';
22
22
  import { useDateFormatter } from 'react-aria/useDateFormatter';
23
23
  import { mergeProps } from 'react-aria/mergeProps';
24
- import { cloneElement, createContext, forwardRef, useContext, Fragment, useState, useMemo, } from 'react';
24
+ import { cloneElement, createContext, useContext, Fragment, useState, useMemo, } from 'react';
25
25
  import { CalendarDays, Check, ChevronLeft, ChevronRight, LoaderCircle, } from "../../utils/icons.js";
26
26
  import { twMerge } from 'tailwind-merge';
27
27
  import { readValidation, validationAttributes, validationMessageContent } from "../../utils/Validation.js";
28
- const SinglePicker = /* @__PURE__ */ forwardRef(function SinglePicker({ mode, locale, validation, presets, value, defaultValue, minValue, maxValue, placeholderValue, onValueChange, disabled, readOnly, required, open, isDateUnavailable, ...props }, ref) {
28
+ function SinglePicker({ mode, locale, validation, presets, value, defaultValue, minValue, maxValue, placeholderValue, onValueChange, disabled, readOnly, required, open, isDateUnavailable, ref, ...props }) {
29
29
  return (_jsx(AriaDatePicker, { ...props, isDisabled: disabled, isReadOnly: readOnly, isRequired: required,
30
30
  // An error validation marks it invalid; otherwise Aria keeps running its own validation
31
31
  isInvalid: readValidation(validation).state === 'error' || undefined, isOpen: open, ref: ref, style: { display: 'contents' }, granularity: "day", value: parseDateString(value), defaultValue: parseDateString(defaultValue), minValue: parseDateString(minValue), maxValue: parseDateString(maxValue), placeholderValue: parseDateString(placeholderValue), onChange: (date) => onValueChange?.(date ? toGregorianDateString(date) : null), isDateUnavailable: isDateUnavailable &&
32
32
  ((date) => isDateUnavailable(toGregorianDateString(date))) }));
33
- });
34
- const RangePicker = /* @__PURE__ */ forwardRef(function RangePicker({ mode, locale, validation, presets, value, defaultValue, minValue, maxValue, placeholderValue, onValueChange, disabled, readOnly, required, open, isDateUnavailable, ...props }, ref) {
33
+ }
34
+ function RangePicker({ mode, locale, validation, presets, value, defaultValue, minValue, maxValue, placeholderValue, onValueChange, disabled, readOnly, required, open, isDateUnavailable, ref, ...props }) {
35
35
  return (_jsx(AriaDateRangePicker, { ...props, isDisabled: disabled, isReadOnly: readOnly, isRequired: required,
36
36
  // An error validation marks it invalid; otherwise Aria keeps running its own validation
37
37
  isInvalid: readValidation(validation).state === 'error' || undefined, isOpen: open, ref: ref, style: { display: 'contents' }, granularity: "day", value: parseDateRange(value), defaultValue: parseDateRange(defaultValue), minValue: parseDateString(minValue), maxValue: parseDateString(maxValue), placeholderValue: parseDateString(placeholderValue), onChange: (range) => onValueChange?.(range
@@ -41,7 +41,7 @@ const RangePicker = /* @__PURE__ */ forwardRef(function RangePicker({ mode, loca
41
41
  }
42
42
  : null), isDateUnavailable: isDateUnavailable &&
43
43
  ((date, anchor) => isDateUnavailable(toGregorianDateString(date), anchor ? toGregorianDateString(anchor) : null)) }));
44
- });
44
+ }
45
45
  function Picker({ pickerRef, ...props }) {
46
46
  if (props.mode === 'range')
47
47
  return _jsx(RangePicker, { ...props, ref: pickerRef });
@@ -123,7 +123,7 @@ function Picker({ pickerRef, ...props }) {
123
123
  * }
124
124
  * </DatePicker.PresetsList>
125
125
  */
126
- export const Root = /* @__PURE__ */ forwardRef(function Root(props, ref) {
126
+ export function Root({ ref, ...props }) {
127
127
  const [buttonAnchor, setButtonAnchor] = useState(null);
128
128
  const buttonAnchorRef = useMemo(() => ({ current: buttonAnchor }), [buttonAnchor]);
129
129
  return (_jsx(I18nProvider, { locale: props.locale ?? 'en-US', children: _jsx(ConfigurationContext.Provider, { value: {
@@ -135,7 +135,7 @@ export const Root = /* @__PURE__ */ forwardRef(function Root(props, ref) {
135
135
  readOnly: props.readOnly ?? false,
136
136
  validation: readValidation(props.validation),
137
137
  }, children: _jsx(Picker, { ...props, pickerRef: ref }) }) }));
138
- });
138
+ }
139
139
  export function Container({ disableStyle, className, ...props }) {
140
140
  return (_jsx("div", { ...props, ...usePartAttributes(), "data-component": "datepicker-container", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
141
141
  }
@@ -273,14 +273,14 @@ export function OpenButtonIcon({ disableStyle, children = _jsx(CalendarDays, {})
273
273
  });
274
274
  }
275
275
  /** Use the same calendar composition for both trigger choices. Opening and focus management are handled by the picker; do not add your own popup visibility condition. */
276
- export const Popup = /* @__PURE__ */ forwardRef(function Popup({ disableStyle, ...props }, ref) {
276
+ export function Popup({ disableStyle, ref, ...props }) {
277
277
  // The Popover supplies dialog semantics itself. Merge DatePicker's generated dialog
278
278
  // id/labeling onto that same element instead of adding another Dialog wrapper.
279
279
  const context = useContext(ConfigurationContext);
280
280
  const [mergedProps, mergedRef] = useContextProps(props, ref, DialogContext);
281
281
  const { className, style, placement = 'bottom end', offset = 5, ...rest } = mergedProps;
282
282
  return (_jsx(AriaPopover, { ...(context.buttonAnchorRef?.current ? { triggerRef: context.buttonAnchorRef } : {}), ...rest, ref: mergedRef, placement: placement, offset: offset, style: { minWidth: 'var(--trigger-width)', ...style }, "data-component": "datepicker-popup", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
283
- });
283
+ }
284
284
  function SingleCalendar({ disableStyle, className, focusedValue, defaultFocusedValue, onFocusChange, ...props }) {
285
285
  return (_jsx(AriaCalendar, { ...props, firstDayOfWeek: "mon", pageBehavior: "single", focusedValue: parseDateString(focusedValue), defaultFocusedValue: parseDateString(defaultFocusedValue), onFocusChange: onFocusChange && ((date) => onFocusChange(toGregorianDateString(date))), "data-component": "datepicker-calendar", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
286
286
  }
@@ -341,11 +341,11 @@ export function Item({ disableStyle, value, className, textValue, ...props }) {
341
341
  calendar.isReadOnly ||
342
342
  dates.some((date) => calendar.isInvalid(date) || calendar.isCellUnavailable(date)), "data-component": "datepicker-item", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
343
343
  }
344
- export const ItemText = /* @__PURE__ */ forwardRef(function ItemText({ disableStyle, className, ...props }, ref) {
344
+ export function ItemText({ disableStyle, className, ref, ...props }) {
345
345
  return (_jsx(Text, { ...props, ref: ref, slot: "label", "data-component": "datepicker-itemtext", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
346
- });
346
+ }
347
347
  /** Tracks the surrounding item state automatically. Keep it mounted; do not add your own visibility condition. Use the supplied default visual unless customization is needed. */
348
- export const ItemIndicator = /* @__PURE__ */ forwardRef(function ItemIndicator({ disableStyle, children, ...props }, ref) {
348
+ export function ItemIndicator({ disableStyle, children, ref, ...props }) {
349
349
  // ListBoxItem supplies this public Aria context, including for controlled selection.
350
350
  // Read visibility directly so no measured div or shared-element animation is needed.
351
351
  const selection = useSlottedContext(SelectionIndicatorContext);
@@ -362,7 +362,7 @@ export const ItemIndicator = /* @__PURE__ */ forwardRef(function ItemIndicator({
362
362
  'data-style-disabled': disableStyle ? '' : undefined,
363
363
  };
364
364
  return cloneElement(children ?? _jsx(Check, {}), iconProps);
365
- });
365
+ }
366
366
  export function Actions({ disableStyle, className, ...props }) {
367
367
  return (_jsx("div", { ...props, "data-component": "datepicker-actions", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
368
368
  }
@@ -1,6 +1,6 @@
1
1
  import type { StyleProps } from '../../types/Style.ts';
2
2
  import { Dialog as BaseDialog } from '@base-ui/react/dialog';
3
- import type { ReactElement } from 'react';
3
+ import type { ComponentProps, ReactElement } from 'react';
4
4
  import type { SVGIconProps } from '../../types/Icon.ts';
5
5
  import type { AsChildProps } from '../../utils/asChild.ts';
6
6
  /**
@@ -43,33 +43,33 @@ import type { AsChildProps } from '../../utils/asChild.ts';
43
43
  */
44
44
  export declare function Root<Payload = unknown>(props: BaseDialog.Root.Props<Payload>): import("react").JSX.Element;
45
45
  /** Opens the dialog. Pass asChild to give this behavior to your own button, like your app's Button. */
46
- export declare const OpenButton: import("react").ForwardRefExoticComponent<Omit<Omit<BaseDialog.Trigger.Props<unknown>, "className" | "render"> & {
46
+ export declare function OpenButton({ asChild, disableStyle, children, ref, ...props }: Omit<BaseDialog.Trigger.Props, 'className' | 'render'> & {
47
47
  className?: string;
48
- } & AsChildProps & StyleProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
49
- export type PopupProps = Omit<BaseDialog.Popup.Props, 'className'> & {
48
+ } & AsChildProps & StyleProps): import("react").JSX.Element;
49
+ export type PopupProps = Omit<BaseDialog.Popup.Props, 'className' | 'render'> & {
50
50
  className?: string;
51
51
  } & Pick<BaseDialog.Portal.Props, 'container' | 'keepMounted'> & StyleProps;
52
52
  /** Already includes the portal. Keep it in the matching Root and let the native open state control visibility. */
53
- export declare const Popup: import("react").ForwardRefExoticComponent<Omit<PopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
54
- export type BackdropProps = Omit<BaseDialog.Backdrop.Props, 'className'> & {
53
+ export declare function Popup({ disableStyle, container, keepMounted, className, style, ref, ...props }: PopupProps): import("react").JSX.Element;
54
+ export type BackdropProps = Omit<BaseDialog.Backdrop.Props, 'className' | 'render'> & {
55
55
  className?: string;
56
56
  } & Pick<BaseDialog.Portal.Props, 'container' | 'keepMounted'> & StyleProps;
57
- export declare const Backdrop: import("react").ForwardRefExoticComponent<Omit<BackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
58
- export declare const Header: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
59
- export declare const Body: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
60
- export declare const Footer: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
61
- export declare const Title: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogTitleProps, "className"> & {
57
+ export declare function Backdrop({ disableStyle, container, keepMounted, className, ref, ...props }: BackdropProps): import("react").JSX.Element;
58
+ export declare function Header({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
59
+ export declare function Body({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
60
+ export declare function Footer({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
61
+ export declare function Title({ disableStyle, className, ref, ...props }: (Omit<BaseDialog.Title.Props, 'className' | 'render'> & {
62
62
  className?: string;
63
- } & StyleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
64
- export declare const Description: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogDescriptionProps, "className"> & {
63
+ }) & StyleProps): import("react").JSX.Element;
64
+ export declare function Description({ disableStyle, className, ref, ...props }: (Omit<BaseDialog.Description.Props, 'className' | 'render'> & {
65
65
  className?: string;
66
- } & StyleProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
66
+ }) & StyleProps): import("react").JSX.Element;
67
67
  /** Icon-only: put just a CloseButtonIcon inside, never text like "Close". Name it for screen readers with aria-label instead, e.g. aria-label="Close". Pass asChild to give closing behavior to your own button instead, like a "Done" Button. */
68
- export declare const CloseButton: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "className" | "render"> & {
68
+ export declare function CloseButton({ asChild, disableStyle, children, ref, ...props }: Omit<BaseDialog.Close.Props, 'className' | 'render'> & {
69
69
  className?: string;
70
- } & AsChildProps & StyleProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
70
+ } & AsChildProps & StyleProps): import("react").JSX.Element;
71
71
  /** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
72
- export declare const CloseButtonIcon: import("react").ForwardRefExoticComponent<Omit<SVGIconProps & {
72
+ export declare function CloseButtonIcon({ disableStyle, children, className, ref, ...props }: (SVGIconProps & {
73
73
  /** Omit for the supplied default icon; pass a child only to replace it. */
74
74
  children?: ReactElement<SVGIconProps>;
75
- } & StyleProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
75
+ }) & StyleProps): import("react").FunctionComponentElement<any>;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Dialog as BaseDialog } from '@base-ui/react/dialog';
3
- import { cloneElement, forwardRef } from 'react';
3
+ import { cloneElement } from 'react';
4
4
  import { twMerge } from 'tailwind-merge';
5
5
  import { X } from "../../utils/icons.js";
6
6
  import { asChildRendering } from "../../utils/asChild.js";
@@ -46,12 +46,12 @@ export function Root(props) {
46
46
  return _jsx(BaseDialog.Root, { ...props });
47
47
  }
48
48
  /** Opens the dialog. Pass asChild to give this behavior to your own button, like your app's Button. */
49
- export const OpenButton = /* @__PURE__ */ forwardRef(function OpenButton({ asChild, disableStyle, children, ...props }, ref) {
49
+ export function OpenButton({ asChild, disableStyle, children, ref, ...props }) {
50
50
  const rendering = asChildRendering({ asChild, children, component: 'dialog-openbutton', disableStyle });
51
51
  return _jsx(BaseDialog.Trigger, { ...props, ref: ref, ...rendering });
52
- });
52
+ }
53
53
  /** Already includes the portal. Keep it in the matching Root and let the native open state control visibility. */
54
- export const Popup = /* @__PURE__ */ forwardRef(function Popup({ disableStyle, container, keepMounted, className, style, ...props }, ref) {
54
+ export function Popup({ disableStyle, container, keepMounted, className, style, ref, ...props }) {
55
55
  const baseStyle = {
56
56
  position: 'fixed',
57
57
  top: '50%',
@@ -62,32 +62,32 @@ export const Popup = /* @__PURE__ */ forwardRef(function Popup({ disableStyle, c
62
62
  return (_jsx(BaseDialog.Portal, { container: container, keepMounted: keepMounted, children: _jsx(BaseDialog.Viewport, { children: _jsx(BaseDialog.Popup, { ...props, ref: ref, "data-component": "dialog-popup", "data-style-disabled": disableStyle ? '' : undefined, className: className, style: typeof style === 'function'
63
63
  ? (state) => ({ ...baseStyle, ...style(state) })
64
64
  : { ...baseStyle, ...style } }) }) }));
65
- });
66
- export const Backdrop = /* @__PURE__ */ forwardRef(function Backdrop({ disableStyle, container, keepMounted, className, ...props }, ref) {
65
+ }
66
+ export function Backdrop({ disableStyle, container, keepMounted, className, ref, ...props }) {
67
67
  return (_jsx(BaseDialog.Portal, { container: container, keepMounted: keepMounted, children: _jsx(BaseDialog.Backdrop, { ...props, ref: ref, "data-component": "dialog-backdrop", "data-style-disabled": disableStyle ? '' : undefined, className: className }) }));
68
- });
69
- export const Header = /* @__PURE__ */ forwardRef(function Header({ disableStyle, className, ...props }, ref) {
68
+ }
69
+ export function Header({ disableStyle, className, ref, ...props }) {
70
70
  return (_jsx("div", { ...props, ref: ref, "data-component": "dialog-header", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
71
- });
72
- export const Body = /* @__PURE__ */ forwardRef(function Body({ disableStyle, className, ...props }, ref) {
71
+ }
72
+ export function Body({ disableStyle, className, ref, ...props }) {
73
73
  return (_jsx("div", { ...props, ref: ref, "data-component": "dialog-body", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
74
- });
75
- export const Footer = /* @__PURE__ */ forwardRef(function Footer({ disableStyle, className, ...props }, ref) {
74
+ }
75
+ export function Footer({ disableStyle, className, ref, ...props }) {
76
76
  return (_jsx("div", { ...props, ref: ref, "data-component": "dialog-footer", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
77
- });
78
- export const Title = /* @__PURE__ */ forwardRef(function Title({ disableStyle, className, ...props }, ref) {
77
+ }
78
+ export function Title({ disableStyle, className, ref, ...props }) {
79
79
  return (_jsx(BaseDialog.Title, { ...props, ref: ref, "data-component": "dialog-title", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
80
- });
81
- export const Description = /* @__PURE__ */ forwardRef(function Description({ disableStyle, className, ...props }, ref) {
80
+ }
81
+ export function Description({ disableStyle, className, ref, ...props }) {
82
82
  return (_jsx(BaseDialog.Description, { ...props, ref: ref, "data-component": "dialog-description", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
83
- });
83
+ }
84
84
  /** Icon-only: put just a CloseButtonIcon inside, never text like "Close". Name it for screen readers with aria-label instead, e.g. aria-label="Close". Pass asChild to give closing behavior to your own button instead, like a "Done" Button. */
85
- export const CloseButton = /* @__PURE__ */ forwardRef(function CloseButton({ asChild, disableStyle, children, ...props }, ref) {
85
+ export function CloseButton({ asChild, disableStyle, children, ref, ...props }) {
86
86
  const rendering = asChildRendering({ asChild, children, component: 'dialog-closebutton', disableStyle });
87
87
  return _jsx(BaseDialog.Close, { ...props, ref: ref, ...rendering });
88
- });
88
+ }
89
89
  /** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
90
- export const CloseButtonIcon = /* @__PURE__ */ forwardRef(function CloseButtonIcon({ disableStyle, children, className, ...props }, ref) {
90
+ export function CloseButtonIcon({ disableStyle, children, className, ref, ...props }) {
91
91
  return cloneElement(children ?? _jsx(X, {}), {
92
92
  ...props,
93
93
  ref,
@@ -97,5 +97,6 @@ export const CloseButtonIcon = /* @__PURE__ */ forwardRef(function CloseButtonIc
97
97
  'data-style-disabled': disableStyle ? '' : undefined,
98
98
  },
99
99
  className: twMerge(children?.props.className, className),
100
+ strokeWidth: props.strokeWidth ?? children?.props.strokeWidth ?? 2,
100
101
  });
101
- });
102
+ }
@@ -1,7 +1,7 @@
1
1
  import type { StyleProps } from '../../types/Style.ts';
2
2
  import type { AsChildProps } from '../../utils/asChild.ts';
3
3
  import { Drawer as BaseDrawer } from '@base-ui/react/drawer';
4
- import type { ReactElement } from 'react';
4
+ import type { ComponentProps, ReactElement } from 'react';
5
5
  import type { SVGIconProps } from '../../types/Icon.ts';
6
6
  /**
7
7
  * Choose swipeDirection on Root and keep trigger and Popup in that Root. Popup already includes its portal. Provider and Indent parts are for an optional indented-background composition, not required for a basic drawer.
@@ -47,44 +47,44 @@ export declare function Root<Payload = unknown>({ swipeDirection, ...props }: Ba
47
47
  /** Optional: use around IndentBackground, Indent and drawers when app indentation is needed. */
48
48
  export declare const Provider: typeof BaseDrawer.Provider;
49
49
  /** Optional: background layer for app indentation; use with Indent inside Provider. */
50
- export declare const IndentBackground: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").DrawerIndentBackgroundProps, "className"> & {
50
+ export declare function IndentBackground({ disableStyle, className, ref, ...props }: (Omit<BaseDrawer.IndentBackground.Props, 'className' | 'render'> & {
51
51
  className?: string;
52
- } & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
52
+ }) & StyleProps): import("react").JSX.Element;
53
53
  /** Optional: wraps the app content when indentation is needed; use inside Provider. */
54
- export declare const Indent: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").DrawerIndentProps, "className"> & {
54
+ export declare function Indent({ disableStyle, className, ref, ...props }: (Omit<BaseDrawer.Indent.Props, 'className' | 'render'> & {
55
55
  className?: string;
56
- } & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
56
+ }) & StyleProps): import("react").JSX.Element;
57
57
  /** Optional: a custom swipe-to-open area outside Popup but inside Root. Unpainted by default; style its size and position at the call site. */
58
- export declare const SwipeArea: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").DrawerSwipeAreaProps, "className"> & {
58
+ export declare function SwipeArea({ disableStyle, className, ref, ...props }: (Omit<BaseDrawer.SwipeArea.Props, 'className' | 'render'> & {
59
59
  className?: string;
60
- } & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
60
+ }) & StyleProps): import("react").JSX.Element;
61
61
  /** Opens the drawer. Pass asChild to give this behavior to your own element, like your app's Button. */
62
- export declare const OpenButton: import("react").ForwardRefExoticComponent<Omit<Omit<BaseDrawer.Trigger.Props<unknown>, "className" | "render"> & {
62
+ export declare function OpenButton({ asChild, disableStyle, children, ref, ...props }: Omit<BaseDrawer.Trigger.Props, 'className' | 'render'> & {
63
63
  className?: string;
64
- } & AsChildProps & StyleProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
65
- export type PopupProps = Omit<BaseDrawer.Popup.Props, 'className'> & {
64
+ } & AsChildProps & StyleProps): import("react").JSX.Element;
65
+ export type PopupProps = Omit<BaseDrawer.Popup.Props, 'className' | 'render'> & {
66
66
  className?: string;
67
67
  } & Pick<BaseDrawer.Portal.Props, 'container' | 'keepMounted'> & StyleProps;
68
68
  /** Already includes the portal. Keep it in the matching Root and let the native open state control visibility. */
69
- export declare const Popup: import("react").ForwardRefExoticComponent<Omit<PopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
70
- export declare const Backdrop: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").DrawerBackdropProps, "className"> & {
69
+ export declare function Popup({ disableStyle, container, keepMounted, className, style, ref, ...props }: PopupProps): import("react").JSX.Element;
70
+ export declare function Backdrop({ disableStyle, container, keepMounted, className, ref, ...props }: (Omit<BaseDrawer.Backdrop.Props, 'className' | 'render'> & {
71
71
  className?: string;
72
- } & Pick<import("@base-ui/react").DrawerPortalProps, "keepMounted" | "container"> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
73
- export declare const Header: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
74
- export declare const Body: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
75
- export declare const Footer: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
76
- export declare const Title: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").DrawerTitleProps, "className"> & {
72
+ } & Pick<BaseDrawer.Portal.Props, 'container' | 'keepMounted'>) & StyleProps): import("react").JSX.Element;
73
+ export declare function Header({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
74
+ export declare function Body({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
75
+ export declare function Footer({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
76
+ export declare function Title({ disableStyle, className, ref, ...props }: (Omit<BaseDrawer.Title.Props, 'className' | 'render'> & {
77
77
  className?: string;
78
- } & StyleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
79
- export declare const Description: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").DrawerDescriptionProps, "className"> & {
78
+ }) & StyleProps): import("react").JSX.Element;
79
+ export declare function Description({ disableStyle, className, ref, ...props }: (Omit<BaseDrawer.Description.Props, 'className' | 'render'> & {
80
80
  className?: string;
81
- } & StyleProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
81
+ }) & StyleProps): import("react").JSX.Element;
82
82
  /** Icon-only: put just a CloseButtonIcon inside, never text like "Close". Name it for screen readers with aria-label instead, e.g. aria-label="Close drawer". Pass asChild to give closing behavior to your own button instead, like a "Done" Button. */
83
- export declare const CloseButton: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").DrawerCloseProps, "className" | "render"> & {
83
+ export declare function CloseButton({ asChild, disableStyle, children, ref, ...props }: Omit<BaseDrawer.Close.Props, 'className' | 'render'> & {
84
84
  className?: string;
85
- } & AsChildProps & StyleProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
85
+ } & AsChildProps & StyleProps): import("react").JSX.Element;
86
86
  /** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
87
- export declare const CloseButtonIcon: import("react").ForwardRefExoticComponent<Omit<SVGIconProps & {
87
+ export declare function CloseButtonIcon({ disableStyle, children, className, ref, ...props }: (SVGIconProps & {
88
88
  /** Omit for the supplied default icon; pass a child only to replace it. */
89
89
  children?: ReactElement<SVGIconProps>;
90
- } & StyleProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
90
+ }) & StyleProps): import("react").FunctionComponentElement<any>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { asChildRendering } from "../../utils/asChild.js";
3
3
  import { Drawer as BaseDrawer } from '@base-ui/react/drawer';
4
- import { cloneElement, forwardRef } from 'react';
4
+ import { cloneElement } from 'react';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { X } from "../../utils/icons.js";
7
7
  /**
@@ -50,24 +50,24 @@ export function Root({ swipeDirection = 'right', ...props }) {
50
50
  /** Optional: use around IndentBackground, Indent and drawers when app indentation is needed. */
51
51
  export const Provider = BaseDrawer.Provider;
52
52
  /** Optional: background layer for app indentation; use with Indent inside Provider. */
53
- export const IndentBackground = /* @__PURE__ */ forwardRef(function IndentBackground({ disableStyle, className, ...props }, ref) {
53
+ export function IndentBackground({ disableStyle, className, ref, ...props }) {
54
54
  return (_jsx(BaseDrawer.IndentBackground, { ...props, ref: ref, "data-component": "drawer-indentbackground", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
55
- });
55
+ }
56
56
  /** Optional: wraps the app content when indentation is needed; use inside Provider. */
57
- export const Indent = /* @__PURE__ */ forwardRef(function Indent({ disableStyle, className, ...props }, ref) {
57
+ export function Indent({ disableStyle, className, ref, ...props }) {
58
58
  return (_jsx(BaseDrawer.Indent, { ...props, ref: ref, "data-component": "drawer-indent", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
59
- });
59
+ }
60
60
  /** Optional: a custom swipe-to-open area outside Popup but inside Root. Unpainted by default; style its size and position at the call site. */
61
- export const SwipeArea = /* @__PURE__ */ forwardRef(function SwipeArea({ disableStyle, className, ...props }, ref) {
61
+ export function SwipeArea({ disableStyle, className, ref, ...props }) {
62
62
  return (_jsx(BaseDrawer.SwipeArea, { ...props, ref: ref, "data-component": "drawer-swipearea", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
63
- });
63
+ }
64
64
  /** Opens the drawer. Pass asChild to give this behavior to your own element, like your app's Button. */
65
- export const OpenButton = /* @__PURE__ */ forwardRef(function OpenButton({ asChild, disableStyle, children, ...props }, ref) {
65
+ export function OpenButton({ asChild, disableStyle, children, ref, ...props }) {
66
66
  const rendering = asChildRendering({ asChild, children, component: 'drawer-openbutton', disableStyle });
67
67
  return _jsx(BaseDrawer.Trigger, { ...props, ref: ref, ...rendering });
68
- });
68
+ }
69
69
  /** Already includes the portal. Keep it in the matching Root and let the native open state control visibility. */
70
- export const Popup = /* @__PURE__ */ forwardRef(function Popup({ disableStyle, container, keepMounted, className, style, ...props }, ref) {
70
+ export function Popup({ disableStyle, container, keepMounted, className, style, ref, ...props }) {
71
71
  return (_jsx(BaseDrawer.Portal, { container: container, keepMounted: keepMounted, children: _jsx(BaseDrawer.Viewport, { children: _jsx(BaseDrawer.Popup, { ...props, ref: ref, "data-component": "drawer-popup", "data-style-disabled": disableStyle ? '' : undefined, className: className, style: (state) => {
72
72
  const vertical = state.swipeDirection === 'up' || state.swipeDirection === 'down';
73
73
  // Sliding in and out from the side it swipes towards, otherwise following the finger (and the snap point, vertically)
@@ -96,32 +96,32 @@ export const Popup = /* @__PURE__ */ forwardRef(function Popup({ disableStyle, c
96
96
  ...(typeof style === 'function' ? style(state) : style),
97
97
  };
98
98
  } }) }) }));
99
- });
100
- export const Backdrop = /* @__PURE__ */ forwardRef(function Backdrop({ disableStyle, container, keepMounted, className, ...props }, ref) {
99
+ }
100
+ export function Backdrop({ disableStyle, container, keepMounted, className, ref, ...props }) {
101
101
  return (_jsx(BaseDrawer.Portal, { container: container, keepMounted: keepMounted, children: _jsx(BaseDrawer.Backdrop, { ...props, ref: ref, "data-component": "drawer-backdrop", "data-style-disabled": disableStyle ? '' : undefined, className: className }) }));
102
- });
103
- export const Header = /* @__PURE__ */ forwardRef(function Header({ disableStyle, className, ...props }, ref) {
102
+ }
103
+ export function Header({ disableStyle, className, ref, ...props }) {
104
104
  return (_jsx("div", { ...props, ref: ref, "data-component": "drawer-header", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
105
- });
106
- export const Body = /* @__PURE__ */ forwardRef(function Body({ disableStyle, className, ...props }, ref) {
105
+ }
106
+ export function Body({ disableStyle, className, ref, ...props }) {
107
107
  return (_jsx("div", { ...props, ref: ref, "data-component": "drawer-body", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
108
- });
109
- export const Footer = /* @__PURE__ */ forwardRef(function Footer({ disableStyle, className, ...props }, ref) {
108
+ }
109
+ export function Footer({ disableStyle, className, ref, ...props }) {
110
110
  return (_jsx("div", { ...props, ref: ref, "data-component": "drawer-footer", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
111
- });
112
- export const Title = /* @__PURE__ */ forwardRef(function Title({ disableStyle, className, ...props }, ref) {
111
+ }
112
+ export function Title({ disableStyle, className, ref, ...props }) {
113
113
  return (_jsx(BaseDrawer.Title, { ...props, ref: ref, "data-component": "drawer-title", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
114
- });
115
- export const Description = /* @__PURE__ */ forwardRef(function Description({ disableStyle, className, ...props }, ref) {
114
+ }
115
+ export function Description({ disableStyle, className, ref, ...props }) {
116
116
  return (_jsx(BaseDrawer.Description, { ...props, ref: ref, "data-component": "drawer-description", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
117
- });
117
+ }
118
118
  /** Icon-only: put just a CloseButtonIcon inside, never text like "Close". Name it for screen readers with aria-label instead, e.g. aria-label="Close drawer". Pass asChild to give closing behavior to your own button instead, like a "Done" Button. */
119
- export const CloseButton = /* @__PURE__ */ forwardRef(function CloseButton({ asChild, disableStyle, children, ...props }, ref) {
119
+ export function CloseButton({ asChild, disableStyle, children, ref, ...props }) {
120
120
  const rendering = asChildRendering({ asChild, children, component: 'drawer-closebutton', disableStyle });
121
121
  return _jsx(BaseDrawer.Close, { ...props, ref: ref, ...rendering });
122
- });
122
+ }
123
123
  /** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
124
- export const CloseButtonIcon = /* @__PURE__ */ forwardRef(function CloseButtonIcon({ disableStyle, children, className, ...props }, ref) {
124
+ export function CloseButtonIcon({ disableStyle, children, className, ref, ...props }) {
125
125
  return cloneElement(children ?? _jsx(X, {}), {
126
126
  ...props,
127
127
  ref,
@@ -131,5 +131,6 @@ export const CloseButtonIcon = /* @__PURE__ */ forwardRef(function CloseButtonIc
131
131
  'data-style-disabled': disableStyle ? '' : undefined,
132
132
  },
133
133
  className: twMerge(children?.props.className, className),
134
+ strokeWidth: props.strokeWidth ?? children?.props.strokeWidth ?? 2,
134
135
  });
135
- });
136
+ }
@@ -1,5 +1,5 @@
1
1
  import type { StyleProps } from '../../types/Style.ts';
2
- import type { ComponentProps, HTMLAttributes, ImgHTMLAttributes, ReactElement, ReactNode } from 'react';
2
+ import type { ComponentProps, HTMLAttributes, ImgHTMLAttributes, ReactElement, ReactNode, Ref } from 'react';
3
3
  type Tone = 'neutral' | 'critical';
4
4
  /**
5
5
  * Explains why something can't be shown, like a page that doesn't exist or a section the user isn't allowed to see. It isn't an error, just a normal state of the app.
@@ -68,19 +68,31 @@ export declare function Root({ tone, children, }: {
68
68
  children: ReactNode;
69
69
  }): import("react").JSX.Element;
70
70
  /** Centers the panel and fills its container's height. */
71
- export declare const Surface: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & StyleProps & import("react").RefAttributes<HTMLDivElement>>;
72
- export declare const Body: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
71
+ export declare function Surface({ disableStyle, className, ref, ...props }: HTMLAttributes<HTMLDivElement> & {
72
+ ref?: Ref<HTMLDivElement>;
73
+ } & StyleProps): import("react").JSX.Element;
74
+ export declare function Body({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
73
75
  /** Renders an h2, so screen-reader users find it when jumping between headings, whether the panel fills a page or one section of it. */
74
- export declare const Title: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & StyleProps & import("react").RefAttributes<HTMLHeadingElement>>;
75
- export declare const Description: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & StyleProps & import("react").RefAttributes<HTMLParagraphElement>>;
76
- export declare const Image: import("react").ForwardRefExoticComponent<ImgHTMLAttributes<HTMLImageElement> & StyleProps & import("react").RefAttributes<HTMLImageElement>>;
76
+ export declare function Title({ disableStyle, className, ref, ...props }: HTMLAttributes<HTMLHeadingElement> & {
77
+ ref?: Ref<HTMLHeadingElement>;
78
+ } & StyleProps): import("react").JSX.Element;
79
+ export declare function Description({ disableStyle, className, ref, ...props }: HTMLAttributes<HTMLParagraphElement> & {
80
+ ref?: Ref<HTMLParagraphElement>;
81
+ } & StyleProps): import("react").JSX.Element;
82
+ export declare function Image({ disableStyle, className, ref, ...props }: ImgHTMLAttributes<HTMLImageElement> & {
83
+ ref?: Ref<HTMLImageElement>;
84
+ } & StyleProps): import("react").JSX.Element;
77
85
  /** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
78
- export declare const Icon: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").SVGProps<SVGSVGElement>, "children"> & {
86
+ export declare function Icon({ disableStyle, children, className, ref, ...props }: (Omit<ComponentProps<'svg'>, 'children'> & {
79
87
  /** Supply the decorative icon; the wrapper forwards the relevant state and preserves its classes. */
80
- children: ReactElement<ComponentProps<"svg">>;
81
- } & StyleProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
88
+ children: ReactElement<ComponentProps<'svg'>>;
89
+ }) & StyleProps): ReactElement<import("react").SVGProps<SVGSVGElement>, string | import("react").JSXElementConstructor<any>>;
82
90
  /** Takes your own buttons, like a primary "Go to dashboard"; it creates no actions itself. */
83
- export declare const ActionsList: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & StyleProps & import("react").RefAttributes<HTMLDivElement>>;
91
+ export declare function ActionsList({ disableStyle, className, ref, ...props }: HTMLAttributes<HTMLDivElement> & {
92
+ ref?: Ref<HTMLDivElement>;
93
+ } & StyleProps): import("react").JSX.Element;
84
94
  /** A small footnote below the actions, like "Still stuck? Contact support" with a link. */
85
- export declare const HelpText: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & StyleProps & import("react").RefAttributes<HTMLParagraphElement>>;
95
+ export declare function HelpText({ disableStyle, className, ref, ...props }: HTMLAttributes<HTMLParagraphElement> & {
96
+ ref?: Ref<HTMLParagraphElement>;
97
+ } & StyleProps): import("react").JSX.Element;
86
98
  export {};
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cloneElement, createContext, forwardRef, useContext } from 'react';
2
+ import { cloneElement, createContext, useContext } from 'react';
3
3
  import { twMerge } from 'tailwind-merge';
4
4
  const ToneContext = /* @__PURE__ */ createContext(null);
5
5
  /**
@@ -62,29 +62,29 @@ export function Root({ tone = 'neutral', children, }) {
62
62
  return _jsx(ToneContext.Provider, { value: tone, children: children });
63
63
  }
64
64
  /** Centers the panel and fills its container's height. */
65
- export const Surface = /* @__PURE__ */ forwardRef(function Surface({ disableStyle, className, ...props }, ref) {
65
+ export function Surface({ disableStyle, className, ref, ...props }) {
66
66
  const tone = useTone('Surface');
67
67
  return (_jsx("div", { ...props, ref: ref, "data-component": "exception-surface", "data-style-disabled": disableStyle ? '' : undefined, "data-tone": tone, className: className }));
68
- });
69
- export const Body = /* @__PURE__ */ forwardRef(function Body({ disableStyle, className, ...props }, ref) {
68
+ }
69
+ export function Body({ disableStyle, className, ref, ...props }) {
70
70
  const tone = useTone('Body');
71
71
  return (_jsx("div", { ...props, ref: ref, "data-component": "exception-body", "data-style-disabled": disableStyle ? '' : undefined, "data-tone": tone, className: className }));
72
- });
72
+ }
73
73
  /** Renders an h2, so screen-reader users find it when jumping between headings, whether the panel fills a page or one section of it. */
74
- export const Title = /* @__PURE__ */ forwardRef(function Title({ disableStyle, className, ...props }, ref) {
74
+ export function Title({ disableStyle, className, ref, ...props }) {
75
75
  const tone = useTone('Title');
76
76
  return (_jsx("h2", { ...props, ref: ref, "data-component": "exception-title", "data-style-disabled": disableStyle ? '' : undefined, "data-tone": tone, className: className }));
77
- });
78
- export const Description = /* @__PURE__ */ forwardRef(function Description({ disableStyle, className, ...props }, ref) {
77
+ }
78
+ export function Description({ disableStyle, className, ref, ...props }) {
79
79
  const tone = useTone('Description');
80
80
  return (_jsx("p", { ...props, ref: ref, "data-component": "exception-description", "data-style-disabled": disableStyle ? '' : undefined, "data-tone": tone, className: className }));
81
- });
82
- export const Image = /* @__PURE__ */ forwardRef(function Image({ disableStyle, className, ...props }, ref) {
81
+ }
82
+ export function Image({ disableStyle, className, ref, ...props }) {
83
83
  const tone = useTone('Image');
84
84
  return (_jsx("img", { alt: "", ...props, ref: ref, "data-component": "exception-image", "data-style-disabled": disableStyle ? '' : undefined, "data-tone": tone, className: className }));
85
- });
85
+ }
86
86
  /** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
87
- export const Icon = /* @__PURE__ */ forwardRef(function Icon({ disableStyle, children, className, ...props }, ref) {
87
+ export function Icon({ disableStyle, children, className, ref, ...props }) {
88
88
  const tone = useTone('Icon');
89
89
  return cloneElement(children, {
90
90
  ...props,
@@ -97,17 +97,17 @@ export const Icon = /* @__PURE__ */ forwardRef(function Icon({ disableStyle, chi
97
97
  className: twMerge(children.props.className, className),
98
98
  strokeWidth: props.strokeWidth ?? children.props.strokeWidth ?? 1.5,
99
99
  });
100
- });
100
+ }
101
101
  /** Takes your own buttons, like a primary "Go to dashboard"; it creates no actions itself. */
102
- export const ActionsList = /* @__PURE__ */ forwardRef(function ActionsList({ disableStyle, className, ...props }, ref) {
102
+ export function ActionsList({ disableStyle, className, ref, ...props }) {
103
103
  const tone = useTone('ActionsList');
104
104
  return (_jsx("div", { ...props, ref: ref, "data-component": "exception-actionslist", "data-style-disabled": disableStyle ? '' : undefined, "data-tone": tone, className: className }));
105
- });
105
+ }
106
106
  /** A small footnote below the actions, like "Still stuck? Contact support" with a link. */
107
- export const HelpText = /* @__PURE__ */ forwardRef(function HelpText({ disableStyle, className, ...props }, ref) {
107
+ export function HelpText({ disableStyle, className, ref, ...props }) {
108
108
  const tone = useTone('HelpText');
109
109
  return (_jsx("p", { ...props, ref: ref, "data-component": "exception-helptext", "data-style-disabled": disableStyle ? '' : undefined, "data-tone": tone, className: className }));
110
- });
110
+ }
111
111
  function useTone(part) {
112
112
  const tone = useContext(ToneContext);
113
113
  if (!tone)
@@ -48,8 +48,8 @@ import type { ComponentProps, ReactElement, ReactNode } from 'react';
48
48
  */
49
49
  export declare function Root({ children, ...props }: Omit<ArkFileUpload.RootProps, 'asChild'>): import("react").JSX.Element;
50
50
  export declare function Container({ disableStyle, className, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
51
- export declare function Label({ disableStyle, className, ...props }: ArkFileUpload.LabelProps & StyleProps): import("react").JSX.Element;
52
- export declare function Dropzone({ disableStyle, children, className, ...props }: ArkFileUpload.DropzoneProps & StyleProps): import("react").JSX.Element;
51
+ export declare function Label({ disableStyle, className, ...props }: Omit<ArkFileUpload.LabelProps, 'asChild'> & StyleProps): import("react").JSX.Element;
52
+ export declare function Dropzone({ disableStyle, children, className, ...props }: Omit<ArkFileUpload.DropzoneProps, 'asChild'> & StyleProps): import("react").JSX.Element;
53
53
  /** Opens the file picker. Pass asChild to give this behavior to your own button, like an "Upload" Button; it keeps the state data attributes but none of this part's styling. */
54
54
  export declare function PickerButton({ asChild, disableStyle, ...props }: ArkFileUpload.TriggerProps & StyleProps): import("react").JSX.Element;
55
55
  /** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
@@ -70,16 +70,16 @@ export declare function FileList({ disableStyle, children, className, style, onC
70
70
  errors: FileUploadFileRejection['errors'];
71
71
  }) => ReactNode;
72
72
  }) & StyleProps): import("react").JSX.Element;
73
- export declare function File({ disableStyle, status, className, children, ...props }: (ArkFileUpload.ItemProps & {
73
+ export declare function File({ disableStyle, status, className, children, ...props }: (Omit<ArkFileUpload.ItemProps, 'asChild'> & {
74
74
  /** Pass the status from the FileList entry so rejected files get the matching error/removal behavior. */
75
75
  status: 'accepted' | 'rejected';
76
76
  }) & StyleProps): import("react").JSX.Element;
77
77
  /** Reads the surrounding File automatically. Omit children to keep the supplied text; override only for custom presentation. */
78
78
  export declare function FileErrorText({ disableStyle, children, className, ...props }: ComponentProps<'p'> & StyleProps): import("react").JSX.Element;
79
- export declare function FilePreview({ disableStyle, className, ...props }: ArkFileUpload.ItemPreviewProps & StyleProps): import("react").JSX.Element;
80
- export declare function FilePreviewImage({ disableStyle, className, ...props }: ArkFileUpload.ItemPreviewImageProps & StyleProps): import("react").JSX.Element;
79
+ export declare function FilePreview({ disableStyle, className, ...props }: Omit<ArkFileUpload.ItemPreviewProps, 'asChild'> & StyleProps): import("react").JSX.Element;
80
+ export declare function FilePreviewImage({ disableStyle, className, ...props }: Omit<ArkFileUpload.ItemPreviewImageProps, 'asChild'> & StyleProps): import("react").JSX.Element;
81
81
  /** Chooses image preview versus fallback from the file type automatically. Supply fallback content for non-image files; do not add a second file-type condition. */
82
- export declare function FileThumbnail({ disableStyle, children, className, ...props }: Omit<ArkFileUpload.ItemPreviewProps, 'type' | 'children'> & {
82
+ export declare function FileThumbnail({ disableStyle, children, className, ...props }: Omit<ArkFileUpload.ItemPreviewProps, 'asChild' | 'type' | 'children'> & {
83
83
  children?: ReactNode;
84
84
  } & StyleProps): import("react").JSX.Element;
85
85
  /** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
@@ -88,9 +88,9 @@ export declare function FileThumbnailIcon({ disableStyle, children, className, .
88
88
  children?: ReactElement<ComponentProps<'svg'>>;
89
89
  }) & StyleProps): ReactElement<import("react").SVGProps<SVGSVGElement>, string | import("react").JSXElementConstructor<any>>;
90
90
  /** Reads the surrounding File automatically. Omit children to keep the supplied text; override only for custom presentation. */
91
- export declare function FileName({ disableStyle, className, ...props }: ArkFileUpload.ItemNameProps & StyleProps): import("react").JSX.Element;
91
+ export declare function FileName({ disableStyle, className, ...props }: Omit<ArkFileUpload.ItemNameProps, 'asChild'> & StyleProps): import("react").JSX.Element;
92
92
  /** Reads the surrounding File automatically. Omit children to keep the supplied text; override only for custom presentation. */
93
- export declare function FileSize({ disableStyle, className, ...props }: ArkFileUpload.ItemSizeTextProps & StyleProps): import("react").JSX.Element;
93
+ export declare function FileSize({ disableStyle, className, ...props }: Omit<ArkFileUpload.ItemSizeTextProps, 'asChild'> & StyleProps): import("react").JSX.Element;
94
94
  /** Removes the surrounding file automatically, including rejected entries. No extra removal click handler needed. */
95
95
  export declare function FileRemoveButton({ disableStyle, children, className, ...props }: (Omit<ArkFileUpload.ItemDeleteTriggerProps, 'asChild' | 'children'> & {
96
96
  children?: ReactNode;