@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.
- package/README.md +3 -1
- package/dist/accordion-CkOZ-tvs.js +178 -0
- package/dist/accordion.js +2 -1
- package/dist/alert-Dsjx14UW.js +131 -0
- package/dist/alert.js +2 -1
- package/dist/avatar-BRGKkoSr.js +127 -0
- package/dist/avatar.js +2 -1
- package/dist/badge-DLxUMsCx.js +104 -0
- package/dist/badge.js +2 -1
- package/dist/breadcrumbs-694hF_hm.js +131 -0
- package/dist/breadcrumbs.js +2 -1
- package/dist/button-CoaIcykB.js +190 -0
- package/dist/button.js +2 -1
- package/dist/calendar-Doj7PTdG.js +379 -0
- package/dist/calendar.js +2 -1
- package/dist/card-2IM71XZj.js +134 -0
- package/dist/card.js +2 -1
- package/dist/checkbox-B7xGNFzp.js +136 -0
- package/dist/checkbox.js +2 -1
- package/dist/{choice-control-DCyQ_hVw.js → choice-control-ByFogYcT.js} +2 -1
- package/dist/{collection-registry-C2jnQa7X.js → collection-registry-1l9f3XJZ.js} +3 -2
- package/dist/combobox-Bjhxv5U3.js +311 -0
- package/dist/combobox.js +2 -1
- package/dist/command-palette-BhJwm6cS.js +344 -0
- package/dist/command-palette.js +2 -1
- package/dist/container-BhnrGPu-.js +36 -0
- package/dist/container.js +2 -1
- package/dist/{css-CW_HG55W.js → css-Cgj6sCHn.js} +1 -0
- package/dist/date-picker-Jk8SpoiO.js +245 -0
- package/dist/date-picker.js +2 -1
- package/dist/dialog-fhS07G41.js +187 -0
- package/dist/dialog.js +2 -1
- package/dist/{disclosure-caret-BC6P8AsM.js → disclosure-caret-C5T3fcl6.js} +1 -0
- package/dist/divider-v_78HYF5.js +79 -0
- package/dist/divider.js +2 -1
- package/dist/{field-anatomy-DKkB268x.js → field-anatomy-BzGw1Ch9.js} +4 -3
- package/dist/flex-COZzFqI8.js +22 -0
- package/dist/flex.js +2 -1
- package/dist/{focus-ring-qOS3rPlM.js → focus-ring-BK5W5_NY.js} +1 -0
- package/dist/{icon-wrapper-BKo4FI-O.js → icon-wrapper-CFWzew5m.js} +2 -1
- package/dist/index.js +37 -36
- package/dist/kbd-CeP8Kfvp.js +61 -0
- package/dist/kbd.js +2 -1
- package/dist/{layout-style-B_6YHQ6Q.js → layout-style-7ZTOiWGR.js} +2 -1
- package/dist/{loading-ring-CTpT-IrT.js → loading-ring-BpdB0aFi.js} +2 -1
- package/dist/{media-8K3xDAxM.js → media-D_eA_I-e.js} +1 -0
- package/dist/menu-B6KCbLCr.js +196 -0
- package/dist/menu.js +2 -1
- package/dist/navigation-BDht6S2-.js +182 -0
- package/dist/navigation.js +2 -1
- package/dist/pagination-B50PCaDU.js +151 -0
- package/dist/pagination.js +2 -1
- package/dist/{part-id-Bg1LSlk7.js → part-id-D0zksy32.js} +1 -0
- package/dist/pill-2_XzBdkD.js +51 -0
- package/dist/pill.js +2 -1
- package/dist/popover-DRHbeIVq.js +103 -0
- package/dist/popover.js +2 -1
- package/dist/progress-CpsskKTD.js +85 -0
- package/dist/progress.js +2 -1
- package/dist/radio-group-DPI5KUCj.js +136 -0
- package/dist/radio-group.js +2 -1
- package/dist/{renderable-DwPvt1I8.js → renderable-DzcIj1Lo.js} +1 -0
- package/dist/{roving-focus-DeEZ55-T.js → roving-focus-CYlo_Kf8.js} +1 -0
- package/dist/select-C1xGrOhT.js +266 -0
- package/dist/select.js +2 -1
- package/dist/skeleton-DitdP-yz.js +49 -0
- package/dist/skeleton.js +2 -1
- package/dist/spinner-CFq5HPoo.js +51 -0
- package/dist/spinner.js +2 -1
- package/dist/stack-D_g6NJzo.js +21 -0
- package/dist/stack.js +2 -1
- package/dist/{surface-Bo_aSQOb.js → surface-DZ4d-2aL.js} +1 -0
- package/dist/switch-B5TTU-oJ.js +138 -0
- package/dist/switch.js +2 -1
- package/dist/tabs-C26PWl2c.js +183 -0
- package/dist/tabs.js +2 -1
- package/dist/text-field-8PQAqRpM.js +75 -0
- package/dist/text-field.js +2 -1
- package/dist/textarea-CcGWuntL.js +85 -0
- package/dist/textarea.js +2 -1
- package/dist/theme-root-BRLIA4eb.js +22 -0
- package/dist/theme-root.js +2 -1
- package/dist/toast-B1PXuwZ4.js +277 -0
- package/dist/toast.js +2 -1
- package/dist/toggle-group-N_owicT0.js +156 -0
- package/dist/toggle-group.js +2 -1
- package/dist/tooltip-BJPisf60.js +98 -0
- package/dist/tooltip.js +2 -1
- package/dist/{trigger-style-f54idgjT.js → trigger-style-B1GFmH7M.js} +2 -1
- package/dist/types/components/accordion/accordion.d.ts +13 -9
- package/dist/types/components/alert/alert.d.ts +6 -3
- package/dist/types/components/avatar/avatar.d.ts +6 -3
- package/dist/types/components/badge/badge.d.ts +6 -3
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +8 -5
- package/dist/types/components/button/button.d.ts +6 -3
- package/dist/types/components/calendar/calendar.d.ts +11 -7
- package/dist/types/components/card/card.d.ts +20 -13
- package/dist/types/components/checkbox/checkbox.d.ts +6 -3
- package/dist/types/components/combobox/combobox.d.ts +12 -8
- package/dist/types/components/command-palette/command-palette.d.ts +22 -15
- package/dist/types/components/container/container.d.ts +6 -3
- package/dist/types/components/date-picker/date-picker.d.ts +6 -4
- package/dist/types/components/dialog/dialog.d.ts +16 -11
- package/dist/types/components/divider/divider.d.ts +6 -3
- package/dist/types/components/flex/flex.d.ts +6 -3
- package/dist/types/components/kbd/kbd.d.ts +8 -5
- package/dist/types/components/menu/menu.d.ts +13 -9
- package/dist/types/components/navigation/navigation.d.ts +11 -7
- package/dist/types/components/pagination/pagination.d.ts +6 -3
- package/dist/types/components/pill/pill.d.ts +6 -3
- package/dist/types/components/popover/popover.d.ts +7 -5
- package/dist/types/components/progress/progress.d.ts +6 -3
- package/dist/types/components/radio-group/radio-group.d.ts +8 -5
- package/dist/types/components/select/select.d.ts +13 -9
- package/dist/types/components/skeleton/skeleton.d.ts +6 -3
- package/dist/types/components/spinner/spinner.d.ts +6 -3
- package/dist/types/components/stack/stack.d.ts +4 -1
- package/dist/types/components/switch/switch.d.ts +6 -3
- package/dist/types/components/tabs/tabs.d.ts +14 -9
- package/dist/types/components/text-field/text-field.d.ts +6 -3
- package/dist/types/components/textarea/textarea.d.ts +6 -3
- package/dist/types/components/theme-root/theme-root.d.ts +6 -3
- package/dist/types/components/toast/toast.d.ts +6 -4
- package/dist/types/components/toggle-group/toggle-group.d.ts +7 -5
- package/dist/types/components/tooltip/tooltip.d.ts +7 -5
- package/dist/types/overlay/use-native-dialog.d.ts +2 -2
- package/dist/{use-controlled-state-DQXkiTQI.js → use-controlled-state-CVXDa-qM.js} +1 -0
- package/dist/{use-native-dialog-BCp1chwO.js → use-native-dialog-DWpIUVO1.js} +1 -0
- package/dist/{use-overlay-floating-CsZd3qxa.js → use-overlay-floating-efeqppiw.js} +1 -0
- package/dist/{visually-hidden-BXVyhj0y.js → visually-hidden-DCWhf0Cb.js} +2 -1
- package/package.json +4 -4
- package/dist/accordion-Dl-kvgPQ.js +0 -168
- package/dist/alert-BzntPa_5.js +0 -129
- package/dist/avatar-Dk2ES3ru.js +0 -124
- package/dist/badge-DZefC7rm.js +0 -102
- package/dist/breadcrumbs-5MCZ_Jr3.js +0 -125
- package/dist/button-qy-50NPd.js +0 -187
- package/dist/calendar-DcCAiN3b.js +0 -372
- package/dist/card-L-Z_1vZN.js +0 -120
- package/dist/checkbox-B7em7B-6.js +0 -134
- package/dist/combobox-DQcXR94r.js +0 -301
- package/dist/command-palette-BRJ8A5De.js +0 -328
- package/dist/container-COHiEjI8.js +0 -34
- package/dist/date-picker-D1GwiRB9.js +0 -239
- package/dist/dialog-CYf9fCZO.js +0 -175
- package/dist/divider-bi7OgCI5.js +0 -76
- package/dist/flex-CDFDDaiu.js +0 -21
- package/dist/kbd-DpiJgDJ2.js +0 -55
- package/dist/menu-A9fZUaAG.js +0 -186
- package/dist/navigation-Cemnmc_J.js +0 -174
- package/dist/pagination-orCjUsn_.js +0 -148
- package/dist/pill-Dg2JJHHW.js +0 -49
- package/dist/popover-D_YU34WS.js +0 -97
- package/dist/progress-XdvBG0Vv.js +0 -83
- package/dist/radio-group-CxMJ2Vq7.js +0 -130
- package/dist/select-mwFbmzsn.js +0 -256
- package/dist/skeleton-qas9ZKK9.js +0 -47
- package/dist/spinner-ros2CfIf.js +0 -49
- package/dist/stack-Hs8THnIL.js +0 -20
- package/dist/switch-E375Bz4X.js +0 -135
- package/dist/tabs-CBwRiuul.js +0 -173
- package/dist/text-field-BlP8qGn_.js +0 -73
- package/dist/textarea-CUG26CH2.js +0 -83
- package/dist/theme-root-CrdzwfSo.js +0 -20
- package/dist/toast-D_dnqnn-.js +0 -270
- package/dist/toggle-group-B7gXCea8.js +0 -150
- package/dist/tooltip-BJ2hLV1b.js +0 -92
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
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
|
|
17
|
+
export interface SelectTriggerProps extends ComponentPropsWithRef<'button'> {
|
|
18
18
|
id?: string;
|
|
19
19
|
}
|
|
20
|
-
export interface SelectValueProps extends
|
|
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
|
|
24
|
+
export interface SelectContentProps extends ComponentPropsWithRef<'div'> {
|
|
25
25
|
}
|
|
26
|
-
export interface SelectItemProps extends
|
|
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:
|
|
34
|
-
Value:
|
|
35
|
-
Content:
|
|
36
|
-
Item:
|
|
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 {
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
2
|
type Length = number | string;
|
|
3
|
-
export interface SkeletonProps extends Omit<
|
|
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
|
|
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 {
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
2
|
export type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
3
|
-
export interface SpinnerProps extends Omit<
|
|
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
|
|
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
|
|
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
|
|
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<
|
|
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
|
|
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
|
|
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<
|
|
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 =
|
|
12
|
-
export interface TabsTabProps extends
|
|
11
|
+
export type TabsListProps = ComponentPropsWithRef<'div'>;
|
|
12
|
+
export interface TabsTabProps extends ComponentPropsWithRef<'button'> {
|
|
13
13
|
value: string;
|
|
14
14
|
}
|
|
15
|
-
export interface TabsPanelProps extends
|
|
15
|
+
export interface TabsPanelProps extends ComponentPropsWithRef<'div'> {
|
|
16
16
|
value: string;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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 {
|
|
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<
|
|
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
|
|
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 {
|
|
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
|
|
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
|
|
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 {
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
export type ThemeName = 'dark' | 'light';
|
|
3
|
-
export interface ThemeRootProps extends
|
|
3
|
+
export interface ThemeRootProps extends ComponentPropsWithRef<'div'> {
|
|
4
4
|
theme?: ThemeName;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
}
|
|
7
|
-
export declare
|
|
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
|
|
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
|
|
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
|
-
|
|
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:
|
|
37
|
+
Viewport: typeof ToastViewport;
|
|
36
38
|
};
|
|
37
39
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
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<
|
|
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<
|
|
23
|
+
export interface ToggleGroupItemProps extends Omit<ComponentPropsWithRef<'button'>, 'value'> {
|
|
24
24
|
value: string;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
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
|
|
14
|
+
export interface TooltipTriggerProps extends ComponentPropsWithRef<'button'> {
|
|
15
15
|
}
|
|
16
|
-
export interface TooltipContentProps extends
|
|
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:
|
|
21
|
-
Content:
|
|
22
|
+
Trigger: typeof TooltipTrigger;
|
|
23
|
+
Content: typeof TooltipContent;
|
|
22
24
|
};
|
|
23
25
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
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:
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jfrader/ui",
|
|
3
|
-
"version": "0.
|
|
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.
|
|
180
|
+
"@jfrader/tokens": "0.2.0"
|
|
181
181
|
},
|
|
182
182
|
"peerDependencies": {
|
|
183
|
-
"react": "
|
|
184
|
-
"react-dom": "
|
|
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 };
|