@jfrader/ui 0.1.1 → 0.2.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 (167) hide show
  1. package/README.md +3 -1
  2. package/dist/accordion-CkOZ-tvs.js +178 -0
  3. package/dist/accordion.js +2 -1
  4. package/dist/alert-Dsjx14UW.js +131 -0
  5. package/dist/alert.js +2 -1
  6. package/dist/avatar-BRGKkoSr.js +127 -0
  7. package/dist/avatar.js +2 -1
  8. package/dist/badge-DLxUMsCx.js +104 -0
  9. package/dist/badge.js +2 -1
  10. package/dist/breadcrumbs-694hF_hm.js +131 -0
  11. package/dist/breadcrumbs.js +2 -1
  12. package/dist/button-CoaIcykB.js +190 -0
  13. package/dist/button.js +2 -1
  14. package/dist/calendar-Doj7PTdG.js +379 -0
  15. package/dist/calendar.js +2 -1
  16. package/dist/card-2IM71XZj.js +134 -0
  17. package/dist/card.js +2 -1
  18. package/dist/checkbox-B7xGNFzp.js +136 -0
  19. package/dist/checkbox.js +2 -1
  20. package/dist/{choice-control-DCyQ_hVw.js → choice-control-ByFogYcT.js} +2 -1
  21. package/dist/{collection-registry-C2jnQa7X.js → collection-registry-1l9f3XJZ.js} +3 -2
  22. package/dist/combobox-Bjhxv5U3.js +311 -0
  23. package/dist/combobox.js +2 -1
  24. package/dist/command-palette-BhJwm6cS.js +344 -0
  25. package/dist/command-palette.js +2 -1
  26. package/dist/container-BhnrGPu-.js +36 -0
  27. package/dist/container.js +2 -1
  28. package/dist/{css-CW_HG55W.js → css-Cgj6sCHn.js} +1 -0
  29. package/dist/date-picker-Jk8SpoiO.js +245 -0
  30. package/dist/date-picker.js +2 -1
  31. package/dist/dialog-fhS07G41.js +187 -0
  32. package/dist/dialog.js +2 -1
  33. package/dist/{disclosure-caret-BC6P8AsM.js → disclosure-caret-C5T3fcl6.js} +1 -0
  34. package/dist/divider-v_78HYF5.js +79 -0
  35. package/dist/divider.js +2 -1
  36. package/dist/{field-anatomy-DKkB268x.js → field-anatomy-BzGw1Ch9.js} +4 -3
  37. package/dist/flex-COZzFqI8.js +22 -0
  38. package/dist/flex.js +2 -1
  39. package/dist/{focus-ring-qOS3rPlM.js → focus-ring-BK5W5_NY.js} +1 -0
  40. package/dist/{icon-wrapper-BKo4FI-O.js → icon-wrapper-CFWzew5m.js} +2 -1
  41. package/dist/index.js +37 -36
  42. package/dist/kbd-CeP8Kfvp.js +61 -0
  43. package/dist/kbd.js +2 -1
  44. package/dist/{layout-style-B_6YHQ6Q.js → layout-style-7ZTOiWGR.js} +2 -1
  45. package/dist/{loading-ring-CTpT-IrT.js → loading-ring-BpdB0aFi.js} +2 -1
  46. package/dist/{media-8K3xDAxM.js → media-D_eA_I-e.js} +1 -0
  47. package/dist/menu-B6KCbLCr.js +196 -0
  48. package/dist/menu.js +2 -1
  49. package/dist/navigation-BDht6S2-.js +182 -0
  50. package/dist/navigation.js +2 -1
  51. package/dist/pagination-B50PCaDU.js +151 -0
  52. package/dist/pagination.js +2 -1
  53. package/dist/{part-id-Bg1LSlk7.js → part-id-D0zksy32.js} +1 -0
  54. package/dist/pill-2_XzBdkD.js +51 -0
  55. package/dist/pill.js +2 -1
  56. package/dist/popover-DRHbeIVq.js +103 -0
  57. package/dist/popover.js +2 -1
  58. package/dist/progress-CpsskKTD.js +85 -0
  59. package/dist/progress.js +2 -1
  60. package/dist/radio-group-DPI5KUCj.js +136 -0
  61. package/dist/radio-group.js +2 -1
  62. package/dist/{renderable-DwPvt1I8.js → renderable-DzcIj1Lo.js} +1 -0
  63. package/dist/{roving-focus-DeEZ55-T.js → roving-focus-CYlo_Kf8.js} +1 -0
  64. package/dist/select-C1xGrOhT.js +266 -0
  65. package/dist/select.js +2 -1
  66. package/dist/skeleton-DitdP-yz.js +49 -0
  67. package/dist/skeleton.js +2 -1
  68. package/dist/spinner-CFq5HPoo.js +51 -0
  69. package/dist/spinner.js +2 -1
  70. package/dist/stack-D_g6NJzo.js +21 -0
  71. package/dist/stack.js +2 -1
  72. package/dist/{surface-Bo_aSQOb.js → surface-DZ4d-2aL.js} +1 -0
  73. package/dist/switch-B5TTU-oJ.js +138 -0
  74. package/dist/switch.js +2 -1
  75. package/dist/tabs-C26PWl2c.js +183 -0
  76. package/dist/tabs.js +2 -1
  77. package/dist/text-field-8PQAqRpM.js +75 -0
  78. package/dist/text-field.js +2 -1
  79. package/dist/textarea-CcGWuntL.js +85 -0
  80. package/dist/textarea.js +2 -1
  81. package/dist/theme-root-BRLIA4eb.js +22 -0
  82. package/dist/theme-root.js +2 -1
  83. package/dist/toast-B1PXuwZ4.js +277 -0
  84. package/dist/toast.js +2 -1
  85. package/dist/toggle-group-N_owicT0.js +156 -0
  86. package/dist/toggle-group.js +2 -1
  87. package/dist/tooltip-BJPisf60.js +98 -0
  88. package/dist/tooltip.js +2 -1
  89. package/dist/{trigger-style-f54idgjT.js → trigger-style-B1GFmH7M.js} +2 -1
  90. package/dist/types/components/accordion/accordion.d.ts +13 -9
  91. package/dist/types/components/alert/alert.d.ts +6 -3
  92. package/dist/types/components/avatar/avatar.d.ts +6 -3
  93. package/dist/types/components/badge/badge.d.ts +6 -3
  94. package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +8 -5
  95. package/dist/types/components/button/button.d.ts +6 -3
  96. package/dist/types/components/calendar/calendar.d.ts +11 -7
  97. package/dist/types/components/card/card.d.ts +20 -13
  98. package/dist/types/components/checkbox/checkbox.d.ts +6 -3
  99. package/dist/types/components/combobox/combobox.d.ts +12 -8
  100. package/dist/types/components/command-palette/command-palette.d.ts +22 -15
  101. package/dist/types/components/container/container.d.ts +6 -3
  102. package/dist/types/components/date-picker/date-picker.d.ts +6 -4
  103. package/dist/types/components/dialog/dialog.d.ts +16 -11
  104. package/dist/types/components/divider/divider.d.ts +6 -3
  105. package/dist/types/components/flex/flex.d.ts +6 -3
  106. package/dist/types/components/kbd/kbd.d.ts +8 -5
  107. package/dist/types/components/menu/menu.d.ts +13 -9
  108. package/dist/types/components/navigation/navigation.d.ts +11 -7
  109. package/dist/types/components/pagination/pagination.d.ts +6 -3
  110. package/dist/types/components/pill/pill.d.ts +6 -3
  111. package/dist/types/components/popover/popover.d.ts +7 -5
  112. package/dist/types/components/progress/progress.d.ts +6 -3
  113. package/dist/types/components/radio-group/radio-group.d.ts +8 -5
  114. package/dist/types/components/select/select.d.ts +13 -9
  115. package/dist/types/components/skeleton/skeleton.d.ts +6 -3
  116. package/dist/types/components/spinner/spinner.d.ts +6 -3
  117. package/dist/types/components/stack/stack.d.ts +4 -1
  118. package/dist/types/components/switch/switch.d.ts +6 -3
  119. package/dist/types/components/tabs/tabs.d.ts +14 -9
  120. package/dist/types/components/text-field/text-field.d.ts +6 -3
  121. package/dist/types/components/textarea/textarea.d.ts +6 -3
  122. package/dist/types/components/theme-root/theme-root.d.ts +6 -3
  123. package/dist/types/components/toast/toast.d.ts +6 -4
  124. package/dist/types/components/toggle-group/toggle-group.d.ts +7 -5
  125. package/dist/types/components/tooltip/tooltip.d.ts +7 -5
  126. package/dist/types/overlay/use-native-dialog.d.ts +2 -2
  127. package/dist/{use-controlled-state-DQXkiTQI.js → use-controlled-state-CVXDa-qM.js} +1 -0
  128. package/dist/{use-native-dialog-BCp1chwO.js → use-native-dialog-DWpIUVO1.js} +1 -0
  129. package/dist/{use-overlay-floating-CsZd3qxa.js → use-overlay-floating-efeqppiw.js} +1 -0
  130. package/dist/{visually-hidden-BXVyhj0y.js → visually-hidden-DCWhf0Cb.js} +2 -1
  131. package/package.json +4 -4
  132. package/dist/accordion-Dl-kvgPQ.js +0 -168
  133. package/dist/alert-BzntPa_5.js +0 -129
  134. package/dist/avatar-Dk2ES3ru.js +0 -124
  135. package/dist/badge-DZefC7rm.js +0 -102
  136. package/dist/breadcrumbs-5MCZ_Jr3.js +0 -125
  137. package/dist/button-qy-50NPd.js +0 -187
  138. package/dist/calendar-DcCAiN3b.js +0 -372
  139. package/dist/card-L-Z_1vZN.js +0 -120
  140. package/dist/checkbox-B7em7B-6.js +0 -134
  141. package/dist/combobox-DQcXR94r.js +0 -301
  142. package/dist/command-palette-BRJ8A5De.js +0 -328
  143. package/dist/container-COHiEjI8.js +0 -34
  144. package/dist/date-picker-D1GwiRB9.js +0 -239
  145. package/dist/dialog-CYf9fCZO.js +0 -175
  146. package/dist/divider-bi7OgCI5.js +0 -76
  147. package/dist/flex-CDFDDaiu.js +0 -21
  148. package/dist/kbd-DpiJgDJ2.js +0 -55
  149. package/dist/menu-A9fZUaAG.js +0 -186
  150. package/dist/navigation-Cemnmc_J.js +0 -174
  151. package/dist/pagination-orCjUsn_.js +0 -148
  152. package/dist/pill-Dg2JJHHW.js +0 -49
  153. package/dist/popover-D_YU34WS.js +0 -97
  154. package/dist/progress-XdvBG0Vv.js +0 -83
  155. package/dist/radio-group-CxMJ2Vq7.js +0 -130
  156. package/dist/select-mwFbmzsn.js +0 -256
  157. package/dist/skeleton-qas9ZKK9.js +0 -47
  158. package/dist/spinner-ros2CfIf.js +0 -49
  159. package/dist/stack-Hs8THnIL.js +0 -20
  160. package/dist/switch-E375Bz4X.js +0 -135
  161. package/dist/tabs-CBwRiuul.js +0 -173
  162. package/dist/text-field-BlP8qGn_.js +0 -73
  163. package/dist/textarea-CUG26CH2.js +0 -83
  164. package/dist/theme-root-CrdzwfSo.js +0 -20
  165. package/dist/toast-D_dnqnn-.js +0 -270
  166. package/dist/toggle-group-B7gXCea8.js +0 -150
  167. package/dist/tooltip-BJ2hLV1b.js +0 -92
@@ -1,4 +1,4 @@
1
- import { type ButtonHTMLAttributes, type HTMLAttributes, type ReactNode } from 'react';
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
2
  import { type Placement } from '@floating-ui/react';
3
3
  export interface SelectProps {
4
4
  value?: string;
@@ -14,25 +14,29 @@ export interface SelectProps {
14
14
  name?: string;
15
15
  children?: ReactNode;
16
16
  }
17
- export interface SelectTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
17
+ export interface SelectTriggerProps extends ComponentPropsWithRef<'button'> {
18
18
  id?: string;
19
19
  }
20
- export interface SelectValueProps extends HTMLAttributes<HTMLSpanElement> {
20
+ export interface SelectValueProps extends ComponentPropsWithRef<'span'> {
21
21
  /** Shown when no option matches the selected value. */
22
22
  placeholder?: ReactNode;
23
23
  }
24
- export interface SelectContentProps extends HTMLAttributes<HTMLDivElement> {
24
+ export interface SelectContentProps extends ComponentPropsWithRef<'div'> {
25
25
  }
26
- export interface SelectItemProps extends HTMLAttributes<HTMLDivElement> {
26
+ export interface SelectItemProps extends ComponentPropsWithRef<'div'> {
27
27
  /** Unique within the select. */
28
28
  value: string;
29
29
  disabled?: boolean;
30
30
  }
31
31
  declare function SelectRoot({ value: valueProp, defaultValue, onValueChange, open: openProp, defaultOpen, onOpenChange, placement, disabled, name, children, }: SelectProps): import("@emotion/react/jsx-runtime").JSX.Element;
32
+ declare function SelectTrigger({ ref, id: idProp, disabled: disabledProp, onKeyDown, ...rest }: SelectTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
33
+ declare function SelectValue({ ref, placeholder, ...rest }: SelectValueProps): import("@emotion/react/jsx-runtime").JSX.Element;
34
+ declare function SelectContent({ ref, style, onMouseDown, children, ...rest }: SelectContentProps): import("@emotion/react/jsx-runtime").JSX.Element;
35
+ declare function SelectItem({ ref, value, disabled, onClick, children, ...rest }: SelectItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
32
36
  export declare const Select: typeof SelectRoot & {
33
- Trigger: import("react").ForwardRefExoticComponent<SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
34
- Value: import("react").ForwardRefExoticComponent<SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
35
- Content: import("react").ForwardRefExoticComponent<SelectContentProps & import("react").RefAttributes<HTMLDivElement>>;
36
- Item: import("react").ForwardRefExoticComponent<SelectItemProps & import("react").RefAttributes<HTMLDivElement>>;
37
+ Trigger: typeof SelectTrigger;
38
+ Value: typeof SelectValue;
39
+ Content: typeof SelectContent;
40
+ Item: typeof SelectItem;
37
41
  };
38
42
  export {};
@@ -1,11 +1,14 @@
1
- import { type HTMLAttributes } from 'react';
1
+ import type { ComponentPropsWithRef } from 'react';
2
2
  type Length = number | string;
3
- export interface SkeletonProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
3
+ export interface SkeletonProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
4
4
  width?: Length;
5
5
  height?: Length;
6
6
  /** Round placeholder; height follows width unless `height` is given. */
7
7
  circle?: boolean;
8
8
  radius?: Length;
9
9
  }
10
- export declare const Skeleton: import("react").ForwardRefExoticComponent<SkeletonProps & import("react").RefAttributes<HTMLDivElement>>;
10
+ export declare function Skeleton({ ref, width, height, circle, radius, style, ...rest }: SkeletonProps): import("@emotion/react/jsx-runtime").JSX.Element;
11
+ export declare namespace Skeleton {
12
+ var displayName: string;
13
+ }
11
14
  export {};
@@ -1,8 +1,11 @@
1
- import { type HTMLAttributes } from 'react';
1
+ import type { ComponentPropsWithRef } from 'react';
2
2
  export type SpinnerSize = 'sm' | 'md' | 'lg';
3
- export interface SpinnerProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
3
+ export interface SpinnerProps extends Omit<ComponentPropsWithRef<'span'>, 'children'> {
4
4
  size?: SpinnerSize;
5
5
  /** Accessible text announced for the status region. */
6
6
  label?: string;
7
7
  }
8
- export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLSpanElement>>;
8
+ export declare function Spinner({ ref, size, label, ...rest }: SpinnerProps): import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export declare namespace Spinner {
10
+ var displayName: string;
11
+ }
@@ -4,4 +4,7 @@ export type StackAlign = Exclude<FlexAlign, 'baseline'>;
4
4
  export interface StackProps extends Omit<FlexProps, 'direction' | 'inline' | 'align'> {
5
5
  align?: StackAlign;
6
6
  }
7
- export declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ export declare function Stack({ ref, gap, align, justify, wrap, ...rest }: StackProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare namespace Stack {
9
+ var displayName: string;
10
+ }
@@ -1,11 +1,11 @@
1
- import { type InputHTMLAttributes, type ReactNode } from 'react';
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
2
  import { type Interpolation, type Theme } from '../../styling/css';
3
3
  export type SwitchSize = 'sm' | 'md';
4
4
  export interface SwitchPartProps {
5
5
  className?: string;
6
6
  css?: Interpolation<Theme>;
7
7
  }
8
- export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
8
+ export interface SwitchProps extends Omit<ComponentPropsWithRef<'input'>, 'size' | 'type'> {
9
9
  label?: ReactNode;
10
10
  description?: ReactNode;
11
11
  size?: SwitchSize;
@@ -17,4 +17,7 @@ export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
17
17
  description?: SwitchPartProps;
18
18
  };
19
19
  }
20
- export declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
20
+ export declare function Switch({ ref, label, description, size, onChange, onCheckedChange, slotProps, className, dir, 'aria-labelledby': ariaLabelledByProp, 'aria-describedby': ariaDescribedByProp, ...rest }: SwitchProps): import("@emotion/react/jsx-runtime").JSX.Element;
21
+ export declare namespace Switch {
22
+ var displayName: string;
23
+ }
@@ -1,22 +1,27 @@
1
- import { type ButtonHTMLAttributes, type HTMLAttributes } from 'react';
1
+ import { type ComponentPropsWithRef } from 'react';
2
2
  export type TabsOrientation = 'horizontal' | 'vertical';
3
3
  export type TabsActivation = 'auto' | 'manual';
4
- export interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
4
+ export interface TabsProps extends Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'defaultValue'> {
5
5
  value?: string;
6
6
  defaultValue?: string;
7
7
  onValueChange?: (value: string) => void;
8
8
  orientation?: TabsOrientation;
9
9
  activation?: TabsActivation;
10
10
  }
11
- export type TabsListProps = HTMLAttributes<HTMLDivElement>;
12
- export interface TabsTabProps extends ButtonHTMLAttributes<HTMLButtonElement> {
11
+ export type TabsListProps = ComponentPropsWithRef<'div'>;
12
+ export interface TabsTabProps extends ComponentPropsWithRef<'button'> {
13
13
  value: string;
14
14
  }
15
- export interface TabsPanelProps extends HTMLAttributes<HTMLDivElement> {
15
+ export interface TabsPanelProps extends ComponentPropsWithRef<'div'> {
16
16
  value: string;
17
17
  }
18
- export declare const Tabs: import("react").ForwardRefExoticComponent<TabsProps & import("react").RefAttributes<HTMLDivElement>> & {
19
- List: import("react").ForwardRefExoticComponent<TabsListProps & import("react").RefAttributes<HTMLDivElement>>;
20
- Tab: import("react").ForwardRefExoticComponent<TabsTabProps & import("react").RefAttributes<HTMLButtonElement>>;
21
- Panel: import("react").ForwardRefExoticComponent<TabsPanelProps & import("react").RefAttributes<HTMLDivElement>>;
18
+ declare function TabsRoot({ ref, value: valueProp, defaultValue, onValueChange, orientation, activation, ...rest }: TabsProps): import("@emotion/react/jsx-runtime").JSX.Element;
19
+ declare function TabsList({ ref, onKeyDown, ...rest }: TabsListProps): import("@emotion/react/jsx-runtime").JSX.Element;
20
+ declare function TabsTab({ ref, value, disabled, onClick, onFocus, ...rest }: TabsTabProps): import("@emotion/react/jsx-runtime").JSX.Element;
21
+ declare function TabsPanel({ ref, value, tabIndex, 'aria-labelledby': ariaLabelledByProp, ...rest }: TabsPanelProps): import("@emotion/react/jsx-runtime").JSX.Element;
22
+ export declare const Tabs: typeof TabsRoot & {
23
+ List: typeof TabsList;
24
+ Tab: typeof TabsTab;
25
+ Panel: typeof TabsPanel;
22
26
  };
27
+ export {};
@@ -1,9 +1,9 @@
1
- import { type InputHTMLAttributes, type ReactNode } from 'react';
1
+ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  import { type FieldPartProps, type FieldSlotProps } from '../field/field-anatomy';
3
3
  export type TextFieldSize = 'sm' | 'md' | 'lg';
4
4
  export interface TextFieldPartProps extends FieldPartProps {
5
5
  }
6
- export interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
6
+ export interface TextFieldProps extends Omit<ComponentPropsWithRef<'input'>, 'size'> {
7
7
  label?: ReactNode;
8
8
  description?: ReactNode;
9
9
  error?: ReactNode;
@@ -11,4 +11,7 @@ export interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElemen
11
11
  onValueChange?: (value: string) => void;
12
12
  slotProps?: FieldSlotProps<TextFieldPartProps>;
13
13
  }
14
- export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLInputElement>>;
14
+ export declare function TextField({ ref, label, description, error, size, onChange, onValueChange, slotProps, className, required, id: idProp, 'aria-describedby': ariaDescribedByProp, 'aria-invalid': ariaInvalidProp, ...rest }: TextFieldProps): import("@emotion/react/jsx-runtime").JSX.Element;
15
+ export declare namespace TextField {
16
+ var displayName: string;
17
+ }
@@ -1,10 +1,10 @@
1
- import { type ReactNode, type TextareaHTMLAttributes } from 'react';
1
+ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  import { type FieldPartProps, type FieldSlotProps } from '../field/field-anatomy';
3
3
  export type TextareaSize = 'sm' | 'md' | 'lg';
4
4
  export type TextareaResize = 'none' | 'vertical';
5
5
  export interface TextareaPartProps extends FieldPartProps {
6
6
  }
7
- export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
7
+ export interface TextareaProps extends ComponentPropsWithRef<'textarea'> {
8
8
  label?: ReactNode;
9
9
  description?: ReactNode;
10
10
  error?: ReactNode;
@@ -14,4 +14,7 @@ export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElemen
14
14
  onValueChange?: (value: string) => void;
15
15
  slotProps?: FieldSlotProps<TextareaPartProps>;
16
16
  }
17
- export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
17
+ export declare function Textarea({ ref, label, description, error, size, resize, autoResize, rows, onChange, onValueChange, slotProps, className, required, id: idProp, 'aria-describedby': ariaDescribedByProp, 'aria-invalid': ariaInvalidProp, ...rest }: TextareaProps): import("@emotion/react/jsx-runtime").JSX.Element;
18
+ export declare namespace Textarea {
19
+ var displayName: string;
20
+ }
@@ -1,7 +1,10 @@
1
- import { type HTMLAttributes, type ReactNode } from 'react';
1
+ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  export type ThemeName = 'dark' | 'light';
3
- export interface ThemeRootProps extends HTMLAttributes<HTMLDivElement> {
3
+ export interface ThemeRootProps extends ComponentPropsWithRef<'div'> {
4
4
  theme?: ThemeName;
5
5
  children?: ReactNode;
6
6
  }
7
- export declare const ThemeRoot: import("react").ForwardRefExoticComponent<ThemeRootProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ export declare function ThemeRoot({ ref, theme, ...rest }: ThemeRootProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare namespace ThemeRoot {
9
+ var displayName: string;
10
+ }
@@ -1,4 +1,4 @@
1
- import { type HTMLAttributes, type MouseEvent, type ReactNode } from 'react';
1
+ import { type ComponentPropsWithRef, type MouseEvent, type ReactNode } from 'react';
2
2
  export type ToastTone = 'neutral' | 'success' | 'danger';
3
3
  export interface ToastAction {
4
4
  label: string;
@@ -22,7 +22,7 @@ export interface ToastProviderProps {
22
22
  /** Accessible label for each toast's close button. */
23
23
  dismissLabel?: string;
24
24
  }
25
- export interface ToastViewportProps extends HTMLAttributes<HTMLDivElement> {
25
+ export interface ToastViewportProps extends ComponentPropsWithRef<'div'> {
26
26
  }
27
27
  export interface ToastApi {
28
28
  toast: (options: ToastOptions) => string;
@@ -30,8 +30,10 @@ export interface ToastApi {
30
30
  }
31
31
  export declare function useToast(): ToastApi;
32
32
  declare function ToastProvider({ children, max, duration, dismissLabel, }: ToastProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
33
- export declare const Toast: typeof ToastProvider & {
33
+ declare function ToastViewport({ ref, ...props }: ToastViewportProps): import("@emotion/react/jsx-runtime").JSX.Element;
34
+ declare function ToastRoot(props: ToastProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
35
+ export declare const Toast: typeof ToastRoot & {
34
36
  Provider: typeof ToastProvider;
35
- Viewport: import("react").ForwardRefExoticComponent<ToastViewportProps & import("react").RefAttributes<HTMLDivElement>>;
37
+ Viewport: typeof ToastViewport;
36
38
  };
37
39
  export {};
@@ -1,7 +1,7 @@
1
- import { type ButtonHTMLAttributes, type HTMLAttributes } from 'react';
1
+ import { type ComponentPropsWithRef } from 'react';
2
2
  export type ToggleGroupType = 'single' | 'multiple';
3
3
  export type ToggleGroupOrientation = 'horizontal' | 'vertical';
4
- interface ToggleGroupBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
4
+ interface ToggleGroupBaseProps extends Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'defaultValue'> {
5
5
  orientation?: ToggleGroupOrientation;
6
6
  disabled?: boolean;
7
7
  allowEmpty?: boolean;
@@ -20,10 +20,12 @@ export interface ToggleGroupMultipleProps extends ToggleGroupBaseProps {
20
20
  onValueChange?: (value: string[]) => void;
21
21
  }
22
22
  export type ToggleGroupProps = ToggleGroupSingleProps | ToggleGroupMultipleProps;
23
- export interface ToggleGroupItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
23
+ export interface ToggleGroupItemProps extends Omit<ComponentPropsWithRef<'button'>, 'value'> {
24
24
  value: string;
25
25
  }
26
- export declare const ToggleGroup: import("react").ForwardRefExoticComponent<ToggleGroupProps & import("react").RefAttributes<HTMLDivElement>> & {
27
- Item: import("react").ForwardRefExoticComponent<ToggleGroupItemProps & import("react").RefAttributes<HTMLButtonElement>>;
26
+ declare function ToggleGroupRoot({ ref, type, value: valueProp, defaultValue, onValueChange, orientation, disabled, allowEmpty, label, 'aria-label': ariaLabelProp, onKeyDown, ...rest }: ToggleGroupProps): import("@emotion/react/jsx-runtime").JSX.Element;
27
+ declare function ToggleGroupItem({ ref, value, disabled: disabledProp, onClick, onFocus, ...rest }: ToggleGroupItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
28
+ export declare const ToggleGroup: typeof ToggleGroupRoot & {
29
+ Item: typeof ToggleGroupItem;
28
30
  };
29
31
  export {};
@@ -1,4 +1,4 @@
1
- import { type ButtonHTMLAttributes, type HTMLAttributes, type ReactNode } from 'react';
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
2
  import { type Placement } from '@floating-ui/react';
3
3
  export interface TooltipProps {
4
4
  open?: boolean;
@@ -11,13 +11,15 @@ export interface TooltipProps {
11
11
  closeDelay?: number;
12
12
  children?: ReactNode;
13
13
  }
14
- export interface TooltipTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
14
+ export interface TooltipTriggerProps extends ComponentPropsWithRef<'button'> {
15
15
  }
16
- export interface TooltipContentProps extends HTMLAttributes<HTMLDivElement> {
16
+ export interface TooltipContentProps extends ComponentPropsWithRef<'div'> {
17
17
  }
18
18
  declare function TooltipRoot({ open: openProp, defaultOpen, onOpenChange, placement, openDelay, closeDelay, children, }: TooltipProps): import("@emotion/react/jsx-runtime").JSX.Element;
19
+ declare function TooltipTrigger({ ref, 'aria-describedby': ariaDescribedByProp, ...rest }: TooltipTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
20
+ declare function TooltipContent({ ref, style, ...rest }: TooltipContentProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
19
21
  export declare const Tooltip: typeof TooltipRoot & {
20
- Trigger: import("react").ForwardRefExoticComponent<TooltipTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
21
- Content: import("react").ForwardRefExoticComponent<TooltipContentProps & import("react").RefAttributes<HTMLDivElement>>;
22
+ Trigger: typeof TooltipTrigger;
23
+ Content: typeof TooltipContent;
22
24
  };
23
25
  export {};
@@ -1,4 +1,4 @@
1
- import { type ForwardedRef, type MouseEvent, type MouseEventHandler, type MutableRefObject, type ReactEventHandler, type SyntheticEvent } from 'react';
1
+ import { type MouseEvent, type MouseEventHandler, type MutableRefObject, type ReactEventHandler, type Ref, type SyntheticEvent } from 'react';
2
2
  /** What Content needs from its Root; both Roots expose it through their context. */
3
3
  export interface NativeDialogController {
4
4
  open: boolean;
@@ -31,7 +31,7 @@ export declare function omitNativeOpen<P extends object>(props: P & {
31
31
  * Content half: syncs the native dialog to the logical `open`, and returns the `ref` and
32
32
  * event handlers to spread on the <dialog> (after the consumer's props).
33
33
  */
34
- export declare function useNativeDialog({ open, setOpen, requestClose, repairToken, setDialogElement }: NativeDialogController, { onCancel, onClick, onClose }: NativeDialogHandlers, forwardedRef: ForwardedRef<HTMLDialogElement>, contentRef?: MutableRefObject<HTMLDialogElement | null>): {
34
+ export declare function useNativeDialog({ open, setOpen, requestClose, repairToken, setDialogElement }: NativeDialogController, { onCancel, onClick, onClose }: NativeDialogHandlers, forwardedRef: Ref<HTMLDialogElement> | undefined, contentRef?: MutableRefObject<HTMLDialogElement | null>): {
35
35
  ref: (element: HTMLDialogElement | null) => void;
36
36
  onCancel: (event: SyntheticEvent<HTMLDialogElement>) => void;
37
37
  onClick: (event: MouseEvent<HTMLDialogElement>) => void;
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import { useCallback as e, useEffect as t, useRef as n, useState as r } from "react";
2
3
  //#region src/utils/use-latest-callback.ts
3
4
  function i(r) {
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import { useCallback as e, useEffect as t, useImperativeHandle as n, useRef as r, useState as i } from "react";
2
3
  //#region src/overlay/use-scroll-lock.ts
3
4
  var a = /* @__PURE__ */ new Map();
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import { autoUpdate as e, flip as t, offset as n, shift as r, useFloating as i } from "@floating-ui/react";
2
3
  //#region src/overlay/use-overlay-floating.ts
3
4
  var a = 8, o = 8;
@@ -1,4 +1,5 @@
1
- import { t as e } from "./css-CW_HG55W.js";
1
+ 'use client';
2
+ import { t as e } from "./css-Cgj6sCHn.js";
2
3
  //#region src/styling/visually-hidden.ts
3
4
  var t = e({
4
5
  position: "absolute",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jfrader/ui",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "React components styled with Emotion and themed through CSS custom properties.",
5
5
  "keywords": [
6
6
  "react",
@@ -177,11 +177,11 @@
177
177
  "dependencies": {
178
178
  "@emotion/react": "^11.14.0",
179
179
  "@floating-ui/react": "^0.27.20",
180
- "@jfrader/tokens": "0.1.1"
180
+ "@jfrader/tokens": "0.2.0"
181
181
  },
182
182
  "peerDependencies": {
183
- "react": ">=18.2.0",
184
- "react-dom": ">=18.2.0"
183
+ "react": "^19.0.0",
184
+ "react-dom": "^19.0.0"
185
185
  },
186
186
  "devDependencies": {
187
187
  "@storybook/react-vite": "^10.6.1",
@@ -1,168 +0,0 @@
1
- import { t as e } from "./css-CW_HG55W.js";
2
- import { t } from "./disclosure-caret-BC6P8AsM.js";
3
- import { t as n } from "./focus-ring-qOS3rPlM.js";
4
- import { n as r } from "./media-8K3xDAxM.js";
5
- import { n as i } from "./roving-focus-DeEZ55-T.js";
6
- import { t as a } from "./use-controlled-state-DQXkiTQI.js";
7
- import { createContext as o, forwardRef as s, useContext as c, useId as l, useMemo as u } from "react";
8
- import { vars as d } from "@jfrader/tokens/vars";
9
- import { jsx as f } from "@emotion/react/jsx-runtime";
10
- //#region src/components/accordion/accordion.tsx
11
- var p = o(null), m = o(null);
12
- function h(e) {
13
- let t = c(p);
14
- if (!t) throw Error(`Accordion.${e} must be rendered inside <Accordion>.`);
15
- return t;
16
- }
17
- function g(e) {
18
- let t = c(m);
19
- if (!t) throw Error(`Accordion.${e} must be rendered inside <Accordion.Item>.`);
20
- return t;
21
- }
22
- var _ = "", v = {
23
- itemSelector: "[data-ui=\"accordion-trigger\"]:not([disabled])",
24
- ownerSelector: "[data-ui=\"accordion\"]"
25
- }, y = (e, t) => {
26
- if (t === "multiple" && Array.isArray(e)) return e;
27
- let n = Array.isArray(e) ? e[0] : e;
28
- return n === void 0 || n === _ ? [] : [n];
29
- }, b = e({
30
- borderBlockEnd: `1px solid ${d.color.border}`,
31
- "&:first-of-type": { borderBlockStart: `1px solid ${d.color.border}` }
32
- }), x = e({
33
- margin: 0,
34
- font: "inherit"
35
- }), S = e({
36
- appearance: "none",
37
- display: "flex",
38
- alignItems: "center",
39
- justifyContent: "space-between",
40
- gap: d.space[3],
41
- inlineSize: "100%",
42
- border: 0,
43
- background: "transparent",
44
- cursor: "pointer",
45
- paddingBlock: d.space[3],
46
- paddingInline: d.space[4],
47
- font: "inherit",
48
- fontSize: d.textSize.sm,
49
- fontWeight: d.fontWeight.medium,
50
- color: d.color.text,
51
- textAlign: "start",
52
- transitionProperty: "background-color",
53
- transitionDuration: d.motion.duration.fast,
54
- transitionTimingFunction: d.motion.easeStandard,
55
- "&::after": { ...t },
56
- "&[aria-expanded=\"true\"]::after": { transform: "rotate(90deg)" },
57
- "&[aria-expanded=\"true\"]:dir(rtl)::after": { transform: "rotate(-90deg)" },
58
- "&:hover:not(:disabled):not([aria-disabled=\"true\"])": { backgroundColor: d.color.surfaceHover },
59
- "&[aria-disabled=\"true\"]": { cursor: "default" },
60
- "&:disabled": {
61
- opacity: .55,
62
- cursor: "not-allowed"
63
- },
64
- "&:focus-visible": { ...n },
65
- [r]: {
66
- transitionDuration: "0s",
67
- "&::after": { transitionDuration: "0s" }
68
- }
69
- }), C = e({
70
- paddingBlock: d.space[3],
71
- paddingInline: d.space[4],
72
- color: d.color.textMuted,
73
- lineHeight: d.lineHeight.relaxed,
74
- "&[hidden]": { display: "none" }
75
- }), w = s(function({ value: e, defaultValue: t, onValueChange: n, type: r = "single", collapsible: o = !0, onKeyDown: s, ...c }, l) {
76
- let [d, m] = a(e, t, n), h = u(() => {
77
- let e = y(d, r), t = o || e.length > 1;
78
- return {
79
- openValues: e,
80
- toggle: (n) => {
81
- let i = e.includes(n);
82
- (!i || t) && m(r === "multiple" ? i ? e.filter((e) => e !== n) : [...e, n] : i ? _ : n);
83
- },
84
- canCollapse: t
85
- };
86
- }, [
87
- d,
88
- m,
89
- r,
90
- o
91
- ]), g = (e) => {
92
- s?.(e), !e.defaultPrevented && i(e, e.currentTarget, "vertical", v);
93
- };
94
- return /* @__PURE__ */ f(p.Provider, {
95
- value: h,
96
- children: /* @__PURE__ */ f("div", {
97
- ...c,
98
- ref: l,
99
- "data-ui": "accordion",
100
- onKeyDown: g
101
- })
102
- });
103
- }), T = s(function({ value: e, disabled: t = !1, ...n }, r) {
104
- let { openValues: i } = h("Item"), a = l(), o = i.includes(e), s = u(() => ({
105
- value: e,
106
- disabled: t,
107
- expanded: o,
108
- triggerId: `${a}-trigger`,
109
- panelId: `${a}-panel`
110
- }), [
111
- e,
112
- t,
113
- o,
114
- a
115
- ]);
116
- return /* @__PURE__ */ f(m.Provider, {
117
- value: s,
118
- children: /* @__PURE__ */ f("div", {
119
- ...n,
120
- ref: r,
121
- "data-ui": "accordion-item",
122
- "data-state": o ? "open" : "closed",
123
- "data-disabled": t ? "" : void 0,
124
- css: b
125
- })
126
- });
127
- }), E = s(function({ onClick: e, disabled: t, ...n }, r) {
128
- let { toggle: i, canCollapse: a } = h("Trigger"), { value: o, disabled: s, expanded: c, triggerId: l, panelId: u } = g("Trigger"), d = c && !a, p = (t) => {
129
- e?.(t), !t.defaultPrevented && i(o);
130
- };
131
- return /* @__PURE__ */ f("h3", {
132
- "data-ui": "accordion-heading",
133
- css: x,
134
- children: /* @__PURE__ */ f("button", {
135
- ...n,
136
- ref: r,
137
- type: "button",
138
- id: l,
139
- "data-ui": "accordion-trigger",
140
- "data-state": c ? "open" : "closed",
141
- "aria-expanded": c,
142
- "aria-controls": u,
143
- "aria-disabled": d || void 0,
144
- disabled: s || t,
145
- onClick: p,
146
- css: S
147
- })
148
- });
149
- }), D = s(function({ "aria-labelledby": e, ...t }, n) {
150
- let { expanded: r, triggerId: i, panelId: a } = g("Panel"), o = [e, i].filter(Boolean).join(" ");
151
- return /* @__PURE__ */ f("div", {
152
- ...t,
153
- ref: n,
154
- role: "region",
155
- id: a,
156
- "aria-labelledby": o,
157
- hidden: !r,
158
- "data-ui": "accordion-panel",
159
- "data-state": r ? "open" : "closed",
160
- css: C
161
- });
162
- }), O = Object.assign(w, {
163
- Item: T,
164
- Trigger: E,
165
- Panel: D
166
- });
167
- //#endregion
168
- export { O as t };