@surflane/ui 0.9.0 → 0.10.1
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 +4 -4
- package/dist/accordion.d.ts +33 -17
- package/dist/accordion.js +10 -11
- package/dist/alert-dialog.d.ts +8 -4
- package/dist/alert-dialog.js +3 -4
- package/dist/app-shell.d.ts +81 -44
- package/dist/app-shell.js +67 -29
- package/dist/autocomplete.d.ts +117 -61
- package/dist/autocomplete.js +8 -8
- package/dist/avatar.d.ts +34 -17
- package/dist/avatar.js +8 -9
- package/dist/badge.d.ts +6 -10
- package/dist/badge.js +5 -6
- package/dist/bottom-navigation.d.ts +11 -41
- package/dist/bottom-navigation.js +9 -10
- package/dist/breadcrumbs.d.ts +21 -5
- package/dist/breadcrumbs.js +12 -14
- package/dist/button.d.ts +15 -8
- package/dist/button.js +8 -9
- package/dist/card.d.ts +610 -35
- package/dist/card.js +12 -12
- package/dist/chart.d.ts +9 -32
- package/dist/chart.js +65 -26
- package/dist/checkbox-group.d.ts +4 -1
- package/dist/checkbox-group.js +3 -4
- package/dist/checkbox.d.ts +13 -4
- package/dist/checkbox.js +6 -6
- package/dist/choice-label.d.ts +3 -11
- package/dist/choice-label.js +4 -4
- package/dist/class-names.d.ts +6 -0
- package/dist/class-names.js +18 -0
- package/dist/code.d.ts +13 -10
- package/dist/code.js +8 -5
- package/dist/collapsible.d.ts +25 -12
- package/dist/collapsible.js +7 -8
- package/dist/combobox.d.ts +145 -73
- package/dist/combobox.js +27 -27
- package/dist/context-menu.d.ts +106 -54
- package/dist/context-menu.js +4 -5
- package/dist/css/accordion.css +1 -1
- package/dist/css/alert-dialog.css +2 -2
- package/dist/css/all.css +7 -5
- package/dist/css/app-shell.css +1 -1
- package/dist/css/autocomplete.css +1 -1
- package/dist/css/avatar.css +2 -2
- package/dist/css/badge.css +2 -2
- package/dist/css/bottom-navigation.css +1 -1
- package/dist/css/breadcrumbs.css +3 -3
- package/dist/css/button.css +1 -1
- package/dist/css/card.css +3 -3
- package/dist/css/chart.css +2 -2
- package/dist/css/checkbox-group.css +1 -1
- package/dist/css/checkbox.css +1 -1
- package/dist/css/choice-label.css +1 -1
- package/dist/css/code.css +2 -2
- package/dist/css/collapsible.css +1 -1
- package/dist/css/combobox.css +1 -1
- package/dist/css/context-menu.css +1 -1
- package/dist/css/date-picker.css +1 -1
- package/dist/css/dialog.css +2 -2
- package/dist/css/drawer.css +2 -2
- package/dist/css/empty-state.css +2 -2
- package/dist/css/field.css +1 -1
- package/dist/css/fieldset.css +1 -1
- package/dist/css/file-upload.css +2 -2
- package/dist/css/filter-bar.css +1 -1
- package/dist/css/form.css +1 -1
- package/dist/css/icon.css +1 -1
- package/dist/css/inline-message.css +2 -2
- package/dist/css/input.css +1 -1
- package/dist/css/layout.css +2 -2
- package/dist/css/link.css +2 -2
- package/dist/css/list.css +2 -2
- package/dist/css/markdown.css +4 -4
- package/dist/css/menu.css +1 -1
- package/dist/css/menubar.css +1 -1
- package/dist/css/meter.css +1 -1
- package/dist/css/native-select.css +1 -1
- package/dist/css/navigation-menu.css +1 -1
- package/dist/css/number-field.css +1 -1
- package/dist/css/otp-field.css +1 -1
- package/dist/css/page-header.css +3 -3
- package/dist/css/pagination.css +2 -2
- package/dist/css/popover.css +1 -1
- package/dist/css/preview-card.css +2 -2
- package/dist/css/progress.css +1 -1
- package/dist/css/radio-group.css +1 -1
- package/dist/css/rules/accordion.css +5 -5
- package/dist/css/rules/alert-dialog.css +9 -9
- package/dist/css/rules/app-shell.css +274 -82
- package/dist/css/rules/avatar.css +7 -7
- package/dist/css/rules/badge.css +6 -6
- package/dist/css/rules/bar.css +11 -11
- package/dist/css/rules/base.css +30 -30
- package/dist/css/rules/bottom-navigation.css +57 -56
- package/dist/css/rules/breadcrumbs.css +2 -2
- package/dist/css/rules/button.css +66 -65
- package/dist/css/rules/card.css +3 -3
- package/dist/css/rules/chart.css +134 -124
- package/dist/css/rules/checkbox.css +5 -5
- package/dist/css/rules/choice-label.css +19 -18
- package/dist/css/rules/choice.css +65 -60
- package/dist/css/rules/code.css +2 -2
- package/dist/css/rules/collapsible.css +2 -2
- package/dist/css/rules/combobox.css +87 -83
- package/dist/css/rules/context-menu.css +1 -1
- package/dist/css/rules/date-picker.css +150 -144
- package/dist/css/rules/dialog.css +85 -79
- package/dist/css/rules/disclosure.css +49 -47
- package/dist/css/rules/drawer.css +6 -6
- package/dist/css/rules/empty-state.css +2 -2
- package/dist/css/rules/field-control.css +51 -42
- package/dist/css/rules/field.css +26 -24
- package/dist/css/rules/fieldset.css +10 -8
- package/dist/css/rules/file-upload.css +73 -72
- package/dist/css/rules/filter-bar.css +19 -18
- package/dist/css/rules/form.css +3 -3
- package/dist/css/rules/gauge.css +22 -22
- package/dist/css/rules/icon.css +16 -11
- package/dist/css/rules/inline-message.css +3 -3
- package/dist/css/rules/input-group.css +50 -43
- package/dist/css/rules/input.css +11 -11
- package/dist/css/rules/item.css +7 -7
- package/dist/css/rules/link.css +2 -2
- package/dist/css/rules/list.css +3 -3
- package/dist/css/rules/markdown.css +27 -27
- package/dist/css/rules/menu.css +45 -42
- package/dist/css/rules/menubar.css +6 -6
- package/dist/css/rules/navigation-menu.css +69 -66
- package/dist/css/rules/number-field.css +22 -21
- package/dist/css/rules/otp-field.css +28 -27
- package/dist/css/rules/panel.css +105 -100
- package/dist/css/rules/popover.css +23 -20
- package/dist/css/rules/popup.css +15 -14
- package/dist/css/rules/preview-card.css +20 -19
- package/dist/css/rules/progress.css +3 -3
- package/dist/css/rules/radio-group.css +8 -8
- package/dist/css/rules/scroll-area.css +50 -39
- package/dist/css/rules/select.css +39 -36
- package/dist/css/rules/sizing.css +119 -116
- package/dist/css/rules/skeleton.css +18 -11
- package/dist/css/rules/slider.css +43 -43
- package/dist/css/rules/sparkline.css +21 -21
- package/dist/css/rules/spinner.css +9 -9
- package/dist/css/rules/stat.css +32 -32
- package/dist/css/rules/switch.css +28 -21
- package/dist/css/rules/syntax-highlighter.css +37 -36
- package/dist/css/rules/table.css +10 -10
- package/dist/css/rules/tabs.css +53 -52
- package/dist/css/rules/textarea.css +9 -7
- package/dist/css/rules/toast.css +94 -90
- package/dist/css/rules/toggle.css +12 -12
- package/dist/css/rules/toolbar.css +27 -27
- package/dist/css/rules/tooltip.css +14 -14
- package/dist/css/rules/tree.css +38 -38
- package/dist/css/scroll-area.css +1 -1
- package/dist/css/select.css +1 -1
- package/dist/css/separator.css +2 -2
- package/dist/css/sheet.css +2 -2
- package/dist/css/sizing.css +1 -1
- package/dist/css/skeleton.css +1 -1
- package/dist/css/slider.css +1 -1
- package/dist/css/sparkline.css +1 -1
- package/dist/css/spinner.css +1 -1
- package/dist/css/stat.css +1 -1
- package/dist/css/styles.css +17 -17
- package/dist/css/switch.css +1 -1
- package/dist/css/syntax-highlighter.css +1 -1
- package/dist/css/table.css +2 -2
- package/dist/css/tabs.css +1 -1
- package/dist/css/textarea.css +1 -1
- package/dist/css/toast.css +1 -1
- package/dist/css/toggle-group.css +1 -1
- package/dist/css/toggle.css +1 -1
- package/dist/css/toolbar.css +1 -1
- package/dist/css/tooltip.css +1 -1
- package/dist/css/tree.css +1 -1
- package/dist/css/typography.css +2 -2
- package/dist/date-picker.js +28 -8
- package/dist/dialog.d.ts +20 -8
- package/dist/dialog.js +11 -12
- package/dist/drawer.d.ts +12 -4
- package/dist/drawer.js +5 -5
- package/dist/element-part.d.ts +8 -0
- package/dist/element-part.js +21 -0
- package/dist/empty-state.d.ts +602 -24
- package/dist/empty-state.js +9 -9
- package/dist/field.d.ts +60 -36
- package/dist/field.js +6 -6
- package/dist/fieldset.d.ts +19 -11
- package/dist/fieldset.js +2 -2
- package/dist/file-upload.d.ts +8 -23
- package/dist/file-upload.js +23 -16
- package/dist/filter-bar.d.ts +30 -10
- package/dist/filter-bar.js +16 -18
- package/dist/form.js +1 -1
- package/dist/icon.d.ts +9 -2
- package/dist/icon.js +6 -6
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -3
- package/dist/inline-message.d.ts +51 -27
- package/dist/inline-message.js +10 -11
- package/dist/input.d.ts +4 -2
- package/dist/input.js +3 -4
- package/dist/layout.d.ts +24 -12
- package/dist/layout.js +27 -27
- package/dist/link.d.ts +3 -1
- package/dist/link.js +3 -4
- package/dist/list.d.ts +43 -27
- package/dist/list.js +12 -13
- package/dist/markdown.d.ts +14 -6
- package/dist/markdown.js +28 -11
- package/dist/menu.d.ts +113 -57
- package/dist/menu.js +24 -25
- package/dist/menubar.d.ts +5 -3
- package/dist/menubar.js +1 -1
- package/dist/meter.d.ts +46 -26
- package/dist/meter.js +5 -5
- package/dist/native-select.d.ts +4 -2
- package/dist/native-select.js +2 -2
- package/dist/navigation-menu.d.ts +76 -40
- package/dist/navigation-menu.js +15 -16
- package/dist/number-field.d.ts +44 -19
- package/dist/number-field.js +12 -13
- package/dist/otp-field.d.ts +26 -9
- package/dist/otp-field.js +10 -11
- package/dist/page-header.js +3 -4
- package/dist/pagination.d.ts +11 -8
- package/dist/pagination.js +4 -5
- package/dist/panel.d.ts +3 -1
- package/dist/panel.js +5 -6
- package/dist/parts.d.ts +5 -7
- package/dist/parts.js +8 -16
- package/dist/popover.d.ts +20 -12
- package/dist/popover.js +3 -3
- package/dist/preview-card.d.ts +22 -10
- package/dist/preview-card.js +7 -8
- package/dist/progress.d.ts +46 -26
- package/dist/progress.js +5 -5
- package/dist/radio-group.d.ts +16 -8
- package/dist/radio-group.js +5 -5
- package/dist/scroll-area.d.ts +4 -2
- package/dist/scroll-area.js +6 -6
- package/dist/select.d.ts +3 -1
- package/dist/select.js +5 -5
- package/dist/separator.d.ts +5 -2
- package/dist/separator.js +3 -4
- package/dist/sheet.d.ts +12 -4
- package/dist/sheet.js +5 -5
- package/dist/size.d.ts +7 -0
- package/dist/size.js +9 -0
- package/dist/sizing.d.ts +8 -3
- package/dist/sizing.js +8 -10
- package/dist/skeleton.d.ts +3 -3
- package/dist/skeleton.js +4 -6
- package/dist/slider.d.ts +55 -31
- package/dist/slider.js +7 -7
- package/dist/sparkline.d.ts +5 -20
- package/dist/sparkline.js +5 -7
- package/dist/spinner.d.ts +4 -6
- package/dist/spinner.js +7 -8
- package/dist/stat.d.ts +34 -42
- package/dist/stat.js +9 -10
- package/dist/status.js +0 -1
- package/dist/switch.d.ts +17 -8
- package/dist/switch.js +4 -5
- package/dist/syntax-engine.js +9 -1
- package/dist/syntax-highlighter.d.ts +3 -7
- package/dist/syntax-highlighter.js +4 -4
- package/dist/syntax-highlighting.js +2 -2
- package/dist/table.d.ts +111 -75
- package/dist/table.js +32 -33
- package/dist/tabs.d.ts +46 -26
- package/dist/tabs.js +5 -5
- package/dist/textarea.d.ts +4 -2
- package/dist/textarea.js +3 -4
- package/dist/toast.d.ts +76 -42
- package/dist/toast.js +28 -28
- package/dist/toggle-group.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tone-transition.d.ts +1 -1
- package/dist/tone-transition.js +9 -8
- package/dist/toolbar.d.ts +55 -31
- package/dist/toolbar.js +6 -6
- package/dist/tooltip.d.ts +4 -1
- package/dist/tooltip.js +2 -2
- package/dist/tree.d.ts +12 -1
- package/dist/tree.js +13 -9
- package/dist/typography.d.ts +3 -1
- package/dist/typography.js +6 -8
- package/package.json +6 -5
package/dist/autocomplete.d.ts
CHANGED
|
@@ -4,44 +4,72 @@ declare const AutocompleteRoot: typeof BaseAutocomplete.Root;
|
|
|
4
4
|
export declare const Autocomplete: {
|
|
5
5
|
Root: typeof BaseAutocomplete.Root;
|
|
6
6
|
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/autocomplete").AutocompletePortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
Content:
|
|
7
|
+
Content: ({ side, align, sideOffset, collisionPadding, positionerProps, ref, ...props }: React.ComponentPropsWithoutRef<typeof BaseAutocomplete.Popup> & Pick<React.ComponentPropsWithoutRef<typeof BaseAutocomplete.Positioner>, "side" | "align" | "sideOffset" | "collisionPadding"> & {
|
|
8
8
|
positionerProps?: React.ComponentPropsWithoutRef<typeof BaseAutocomplete.Positioner>;
|
|
9
|
-
} &
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} & React.RefAttributes<HTMLDivElement
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
size?: import("./
|
|
24
|
-
} &
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} & React.RefAttributes<HTMLDivElement
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
size?: import("./
|
|
44
|
-
} &
|
|
9
|
+
} & {
|
|
10
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
Popup: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompletePopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
13
|
+
size?: import("./size.js").ComponentSize;
|
|
14
|
+
} & {
|
|
15
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
16
|
+
}) => React.JSX.Element;
|
|
17
|
+
Positioner: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompletePositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
18
|
+
size?: import("./size.js").ComponentSize;
|
|
19
|
+
} & {
|
|
20
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
21
|
+
}) => React.JSX.Element;
|
|
22
|
+
Input: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteInputProps, "ref"> & React.RefAttributes<HTMLInputElement>, "ref">, "size"> & {
|
|
23
|
+
size?: import("./size.js").ComponentSize;
|
|
24
|
+
} & {
|
|
25
|
+
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
26
|
+
}) => React.JSX.Element;
|
|
27
|
+
List: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteListProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
28
|
+
size?: import("./size.js").ComponentSize;
|
|
29
|
+
} & {
|
|
30
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
31
|
+
}) => React.JSX.Element;
|
|
32
|
+
Empty: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
33
|
+
size?: import("./size.js").ComponentSize;
|
|
34
|
+
} & {
|
|
35
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
36
|
+
}) => React.JSX.Element;
|
|
37
|
+
Status: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteStatusProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
38
|
+
size?: import("./size.js").ComponentSize;
|
|
39
|
+
} & {
|
|
40
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
41
|
+
}) => React.JSX.Element;
|
|
42
|
+
Group: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
43
|
+
size?: import("./size.js").ComponentSize;
|
|
44
|
+
} & {
|
|
45
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
46
|
+
}) => React.JSX.Element;
|
|
47
|
+
GroupLabel: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
48
|
+
size?: import("./size.js").ComponentSize;
|
|
49
|
+
} & {
|
|
50
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
51
|
+
}) => React.JSX.Element;
|
|
52
|
+
Clear: ({ ref, ...props }: React.ComponentPropsWithoutRef<typeof BaseAutocomplete.Clear> & {
|
|
53
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
54
|
+
}) => React.JSX.Element;
|
|
55
|
+
Trigger: ({ className, children, ref, ...props }: React.ComponentPropsWithoutRef<typeof BaseAutocomplete.Trigger> & {
|
|
56
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
57
|
+
}) => React.JSX.Element;
|
|
58
|
+
InputGroup: ({ ref, ...props }: Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteInputGroupProps & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
59
|
+
size?: import("./size.js").ComponentSize;
|
|
60
|
+
} & {
|
|
61
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
62
|
+
}) => React.JSX.Element;
|
|
63
|
+
Item: ({ ref, ...props }: Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteItemProps & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
64
|
+
size?: import("./size.js").ComponentSize;
|
|
65
|
+
} & {
|
|
66
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
67
|
+
}) => React.JSX.Element;
|
|
68
|
+
Separator: ({ ref, ...props }: Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
69
|
+
size?: import("./size.js").ComponentSize;
|
|
70
|
+
} & {
|
|
71
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
72
|
+
}) => React.JSX.Element;
|
|
45
73
|
Value: typeof BaseAutocomplete.Value;
|
|
46
74
|
Icon: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/autocomplete").AutocompleteIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
47
75
|
Backdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/autocomplete").AutocompleteBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -52,28 +80,56 @@ export declare const Autocomplete: {
|
|
|
52
80
|
useFilteredItems: typeof BaseAutocomplete.useFilteredItems;
|
|
53
81
|
};
|
|
54
82
|
export { AutocompleteRoot };
|
|
55
|
-
export declare const AutocompleteArrow: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/autocomplete").AutocompleteArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>, AutocompleteBackdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/autocomplete").AutocompleteBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>, AutocompleteClear:
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
size?: import("./
|
|
59
|
-
} &
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
size?: import("./
|
|
63
|
-
} &
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
size?: import("./
|
|
67
|
-
} &
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
size?: import("./
|
|
71
|
-
} &
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
size?: import("./
|
|
75
|
-
} &
|
|
76
|
-
|
|
77
|
-
}
|
|
83
|
+
export declare const AutocompleteArrow: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/autocomplete").AutocompleteArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>, AutocompleteBackdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/autocomplete").AutocompleteBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>, AutocompleteClear: ({ ref, ...props }: React.ComponentPropsWithoutRef<typeof BaseAutocomplete.Clear> & {
|
|
84
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
85
|
+
}) => React.JSX.Element, AutocompleteCollection: typeof BaseAutocomplete.Collection, AutocompleteEmpty: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
86
|
+
size?: import("./size.js").ComponentSize;
|
|
87
|
+
} & {
|
|
88
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
89
|
+
}) => React.JSX.Element, AutocompleteGroup: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
90
|
+
size?: import("./size.js").ComponentSize;
|
|
91
|
+
} & {
|
|
92
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
93
|
+
}) => React.JSX.Element, AutocompleteGroupLabel: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
94
|
+
size?: import("./size.js").ComponentSize;
|
|
95
|
+
} & {
|
|
96
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
97
|
+
}) => React.JSX.Element, AutocompleteIcon: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/autocomplete").AutocompleteIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>, AutocompleteInput: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteInputProps, "ref"> & React.RefAttributes<HTMLInputElement>, "ref">, "size"> & {
|
|
98
|
+
size?: import("./size.js").ComponentSize;
|
|
99
|
+
} & {
|
|
100
|
+
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
101
|
+
}) => React.JSX.Element, AutocompleteInputGroup: ({ ref, ...props }: Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteInputGroupProps & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
102
|
+
size?: import("./size.js").ComponentSize;
|
|
103
|
+
} & {
|
|
104
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
105
|
+
}) => React.JSX.Element, AutocompleteItem: ({ ref, ...props }: Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteItemProps & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
106
|
+
size?: import("./size.js").ComponentSize;
|
|
107
|
+
} & {
|
|
108
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
109
|
+
}) => React.JSX.Element, AutocompleteList: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteListProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
110
|
+
size?: import("./size.js").ComponentSize;
|
|
111
|
+
} & {
|
|
112
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
113
|
+
}) => React.JSX.Element, AutocompletePopup: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompletePopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
114
|
+
size?: import("./size.js").ComponentSize;
|
|
115
|
+
} & {
|
|
116
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
117
|
+
}) => React.JSX.Element, AutocompletePortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/autocomplete").AutocompletePortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>, AutocompletePositioner: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompletePositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
118
|
+
size?: import("./size.js").ComponentSize;
|
|
119
|
+
} & {
|
|
120
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
121
|
+
}) => React.JSX.Element, AutocompleteRow: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/autocomplete").AutocompleteRowProps, "ref"> & React.RefAttributes<HTMLDivElement>>, AutocompleteSeparator: ({ ref, ...props }: Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
122
|
+
size?: import("./size.js").ComponentSize;
|
|
123
|
+
} & {
|
|
124
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
125
|
+
}) => React.JSX.Element, AutocompleteStatus: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/autocomplete").AutocompleteStatusProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
126
|
+
size?: import("./size.js").ComponentSize;
|
|
127
|
+
} & {
|
|
128
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
129
|
+
}) => React.JSX.Element, AutocompleteTrigger: ({ className, children, ref, ...props }: React.ComponentPropsWithoutRef<typeof BaseAutocomplete.Trigger> & {
|
|
130
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
131
|
+
}) => React.JSX.Element, AutocompleteValue: typeof BaseAutocomplete.Value, AutocompleteContent: ({ side, align, sideOffset, collisionPadding, positionerProps, ref, ...props }: React.ComponentPropsWithoutRef<typeof BaseAutocomplete.Popup> & Pick<React.ComponentPropsWithoutRef<typeof BaseAutocomplete.Positioner>, "side" | "align" | "sideOffset" | "collisionPadding"> & {
|
|
78
132
|
positionerProps?: React.ComponentPropsWithoutRef<typeof BaseAutocomplete.Positioner>;
|
|
79
|
-
} &
|
|
133
|
+
} & {
|
|
134
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
135
|
+
}) => React.JSX.Element;
|
package/dist/autocomplete.js
CHANGED
|
@@ -15,12 +15,12 @@ const AutocompleteRoot = function AutocompleteRoot({ children, form, value, defa
|
|
|
15
15
|
setQuery(next);
|
|
16
16
|
}, children: [_jsx("span", { hidden: true, ref: anchor }), children] }, revision));
|
|
17
17
|
};
|
|
18
|
-
const AutoTrigger =
|
|
19
|
-
return (_jsx(BaseAutocomplete.Trigger, { "aria-label": 'Show suggestions', ...props, ref: ref, className: skin('
|
|
20
|
-
}
|
|
21
|
-
const AutoClear =
|
|
18
|
+
const AutoTrigger = function AutoTrigger({ className, children, ref, ...props }) {
|
|
19
|
+
return (_jsx(BaseAutocomplete.Trigger, { "aria-label": 'Show suggestions', ...props, ref: ref, className: skin('surf-combobox-action', className), children: children ?? _jsx(Icon, { name: 'chevron-down' }) }));
|
|
20
|
+
};
|
|
21
|
+
const AutoClear = function AutoClear({ ref, ...props }) {
|
|
22
22
|
return _jsx(Combobox.Clear, { "aria-label": 'Clear input', ...props, ref: ref });
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
export const Autocomplete = {
|
|
25
25
|
...BaseAutocomplete,
|
|
26
26
|
Root: AutocompleteRoot,
|
|
@@ -36,9 +36,9 @@ export const Autocomplete = {
|
|
|
36
36
|
GroupLabel: Combobox.GroupLabel,
|
|
37
37
|
Clear: AutoClear,
|
|
38
38
|
Trigger: AutoTrigger,
|
|
39
|
-
InputGroup: /* @__PURE__ */ part(BaseAutocomplete.InputGroup, '
|
|
40
|
-
Item: /* @__PURE__ */ part(BaseAutocomplete.Item, '
|
|
41
|
-
Separator: /* @__PURE__ */ part(BaseAutocomplete.Separator, '
|
|
39
|
+
InputGroup: /* @__PURE__ */ part(BaseAutocomplete.InputGroup, 'surf-combobox-group'),
|
|
40
|
+
Item: /* @__PURE__ */ part(BaseAutocomplete.Item, 'surf-combobox-item'),
|
|
41
|
+
Separator: /* @__PURE__ */ part(BaseAutocomplete.Separator, 'surf-combobox-separator'),
|
|
42
42
|
};
|
|
43
43
|
// Flat names for React Server Components, which cannot dot into client exports.
|
|
44
44
|
export { AutocompleteRoot };
|
package/dist/avatar.d.ts
CHANGED
|
@@ -1,24 +1,41 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { Avatar as BaseAvatar } from '@base-ui/react/avatar';
|
|
2
3
|
import { type ComponentSizeAlias } from './sizing.js';
|
|
3
|
-
declare const AvatarRoot:
|
|
4
|
+
declare const AvatarRoot: ({ size, className, ref, ...props }: React.ComponentPropsWithoutRef<typeof BaseAvatar.Root> & {
|
|
4
5
|
size?: ComponentSizeAlias;
|
|
5
|
-
} &
|
|
6
|
-
|
|
6
|
+
} & {
|
|
7
|
+
ref?: React.Ref<React.ComponentRef<typeof BaseAvatar.Root>>;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
declare const AvatarFallback: ({ children, className, ref, ...props }: React.ComponentPropsWithoutRef<typeof BaseAvatar.Fallback> & {
|
|
10
|
+
ref?: React.Ref<React.ComponentRef<typeof BaseAvatar.Fallback>>;
|
|
11
|
+
}) => React.JSX.Element;
|
|
7
12
|
export declare const Avatar: {
|
|
8
|
-
Root:
|
|
13
|
+
Root: ({ size, className, ref, ...props }: React.ComponentPropsWithoutRef<typeof BaseAvatar.Root> & {
|
|
9
14
|
size?: ComponentSizeAlias;
|
|
10
|
-
} &
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
15
|
+
} & {
|
|
16
|
+
ref?: React.Ref<React.ComponentRef<typeof BaseAvatar.Root>>;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
Status: ({ ref, ...props }: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "size"> & {
|
|
19
|
+
size?: import("./size.js").ComponentSize;
|
|
20
|
+
} & {
|
|
21
|
+
ref?: React.Ref<HTMLSpanElement> | undefined;
|
|
22
|
+
}) => React.JSX.Element;
|
|
23
|
+
Fallback: ({ children, className, ref, ...props }: React.ComponentPropsWithoutRef<typeof BaseAvatar.Fallback> & {
|
|
24
|
+
ref?: React.Ref<React.ComponentRef<typeof BaseAvatar.Fallback>>;
|
|
25
|
+
}) => React.JSX.Element;
|
|
26
|
+
Image: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/avatar").AvatarImageProps, "ref"> & React.RefAttributes<HTMLImageElement>, "ref">, "size"> & {
|
|
27
|
+
size?: import("./size.js").ComponentSize;
|
|
28
|
+
} & {
|
|
29
|
+
ref?: React.Ref<HTMLImageElement> | undefined;
|
|
30
|
+
}) => React.JSX.Element;
|
|
18
31
|
};
|
|
19
32
|
export { AvatarFallback, AvatarRoot };
|
|
20
|
-
export declare const AvatarImage:
|
|
21
|
-
size?: import("./
|
|
22
|
-
} &
|
|
23
|
-
|
|
24
|
-
}
|
|
33
|
+
export declare const AvatarImage: ({ ref, ...props }: Omit<Omit<Omit<import("@base-ui/react/avatar").AvatarImageProps, "ref"> & React.RefAttributes<HTMLImageElement>, "ref">, "size"> & {
|
|
34
|
+
size?: import("./size.js").ComponentSize;
|
|
35
|
+
} & {
|
|
36
|
+
ref?: React.Ref<HTMLImageElement> | undefined;
|
|
37
|
+
}) => React.JSX.Element, AvatarStatus: ({ ref, ...props }: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "size"> & {
|
|
38
|
+
size?: import("./size.js").ComponentSize;
|
|
39
|
+
} & {
|
|
40
|
+
ref?: React.Ref<HTMLSpanElement> | undefined;
|
|
41
|
+
}) => React.JSX.Element;
|
package/dist/avatar.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import { Icon } from './icon.js';
|
|
5
4
|
import { Avatar as BaseAvatar } from '@base-ui/react/avatar';
|
|
6
5
|
import { useComponentSize } from './sizing.js';
|
|
7
6
|
import { sizeName, skin, part } from './parts.js';
|
|
8
|
-
const AvatarRoot =
|
|
7
|
+
const AvatarRoot = function AvatarRoot({ size, className, ref, ...props }) {
|
|
9
8
|
const scheme = useComponentSize(size);
|
|
10
|
-
return (_jsx(BaseAvatar.Root, { ...props, ref: ref, "data-size": sizeName(size), "data-ui-size": scheme, className: skin('
|
|
11
|
-
}
|
|
12
|
-
const AvatarFallback =
|
|
13
|
-
return (_jsx(BaseAvatar.Fallback, { ...props, ref: ref, className: skin('
|
|
14
|
-
}
|
|
9
|
+
return (_jsx(BaseAvatar.Root, { ...props, ref: ref, "data-size": sizeName(size), "data-ui-size": scheme, className: skin('surf-avatar', className) }));
|
|
10
|
+
};
|
|
11
|
+
const AvatarFallback = function AvatarFallback({ children, className, ref, ...props }) {
|
|
12
|
+
return (_jsx(BaseAvatar.Fallback, { ...props, ref: ref, className: skin('surf-avatar-fallback', className), children: children ?? _jsx(Icon, { name: 'user' }) }));
|
|
13
|
+
};
|
|
15
14
|
export const Avatar = {
|
|
16
15
|
...BaseAvatar,
|
|
17
16
|
Root: AvatarRoot,
|
|
18
|
-
Status: /* @__PURE__ */ part('span', '
|
|
17
|
+
Status: /* @__PURE__ */ part('span', 'surf-avatar-status'),
|
|
19
18
|
Fallback: AvatarFallback,
|
|
20
|
-
Image: /* @__PURE__ */ part(BaseAvatar.Image, '
|
|
19
|
+
Image: /* @__PURE__ */ part(BaseAvatar.Image, 'surf-avatar-image'),
|
|
21
20
|
};
|
|
22
21
|
// Flat names for React Server Components, which cannot dot into client exports.
|
|
23
22
|
export { AvatarFallback, AvatarRoot };
|
package/dist/badge.d.ts
CHANGED
|
@@ -6,15 +6,11 @@ export type BadgeProps = React.ComponentPropsWithoutRef<'span'> & {
|
|
|
6
6
|
tone?: StatusTone;
|
|
7
7
|
icon?: React.ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export declare const Badge:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
icon?: React.ReactNode;
|
|
13
|
-
} & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
export declare const Badge: ({ tone, icon, children, className, size, ref, ...props }: BadgeProps & {
|
|
10
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
11
|
+
}) => React.JSX.Element;
|
|
14
12
|
/** Domain status labels and live announcements remain the caller's responsibility. */
|
|
15
|
-
export declare const StatusBadge:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
icon?: React.ReactNode;
|
|
19
|
-
} & React.RefAttributes<HTMLSpanElement>>;
|
|
13
|
+
export declare const StatusBadge: ({ tone, icon, ref, ...props }: BadgeProps & {
|
|
14
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
15
|
+
}) => React.JSX.Element;
|
|
20
16
|
export type { StatusTone } from './status.js';
|
package/dist/badge.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import { useComponentSize } from './sizing.js';
|
|
5
4
|
import { useToneTransition } from './tone-transition.js';
|
|
6
5
|
import { cx } from './parts.js';
|
|
7
6
|
import { StatusIcon } from './status.js';
|
|
8
|
-
export const Badge =
|
|
7
|
+
export const Badge = function Badge({ tone = 'neutral', icon, children, className, size, ref, ...props }) {
|
|
9
8
|
const scheme = useComponentSize(size);
|
|
10
9
|
const elementRef = useToneTransition(tone, ref);
|
|
11
|
-
return (_jsxs("span", { ...props, ref: elementRef, className: cx('
|
|
12
|
-
}
|
|
10
|
+
return (_jsxs("span", { ...props, ref: elementRef, className: cx('surf-badge', className), "data-tone": tone, "data-ui-size": scheme, children: [icon && (_jsx("span", { className: 'surf-badge-icon', "aria-hidden": 'true', children: icon })), children] }));
|
|
11
|
+
};
|
|
13
12
|
/** Domain status labels and live announcements remain the caller's responsibility. */
|
|
14
|
-
export const StatusBadge =
|
|
13
|
+
export const StatusBadge = function StatusBadge({ tone = 'neutral', icon, ref, ...props }) {
|
|
15
14
|
return (_jsx(Badge, { ...props, ref: ref, tone: tone, icon: icon === undefined ? _jsx(StatusIcon, { tone: tone }) : icon }));
|
|
16
|
-
}
|
|
15
|
+
};
|
|
@@ -22,45 +22,15 @@ export type BottomNavigationItemProps = Omit<useRender.ComponentProps<'a'>, 'ref
|
|
|
22
22
|
badgeLabel?: string;
|
|
23
23
|
};
|
|
24
24
|
export declare const BottomNavigation: {
|
|
25
|
-
Root:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/** fixed: pinned to the bottom of the viewport, above the safe area. static: in the
|
|
32
|
-
* flow, for a frame of your own. */
|
|
33
|
-
position?: "fixed" | "static";
|
|
34
|
-
} & React.RefAttributes<HTMLElement>>;
|
|
35
|
-
Item: React.ForwardRefExoticComponent<Omit<useRender.ComponentProps<"a", {}, import("@base-ui/react/types").HTMLProps>, "children" | "ref"> & {
|
|
36
|
-
icon: React.ReactNode;
|
|
37
|
-
label: string;
|
|
38
|
-
/** Marks the current destination with aria-current="page". */
|
|
39
|
-
current?: boolean;
|
|
40
|
-
/** A count, shown up to 99+, or true for a dot. */
|
|
41
|
-
badge?: number | boolean;
|
|
42
|
-
/** What the badge means, read after the label, such as "3 unread". A count reads
|
|
43
|
-
* as its number without it; a dot needs it. */
|
|
44
|
-
badgeLabel?: string;
|
|
45
|
-
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
25
|
+
Root: ({ visible, position, className, children, ref, ...props }: BottomNavigationRootProps & {
|
|
26
|
+
ref?: React.Ref<HTMLElement>;
|
|
27
|
+
}) => React.JSX.Element;
|
|
28
|
+
Item: ({ icon, label, current, badge, badgeLabel, render, className, ref, ...props }: BottomNavigationItemProps & {
|
|
29
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
30
|
+
}) => React.JSX.Element;
|
|
46
31
|
};
|
|
47
|
-
export declare const BottomNavigationRoot:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
visible?: "mobile" | "always";
|
|
53
|
-
/** fixed: pinned to the bottom of the viewport, above the safe area. static: in the
|
|
54
|
-
* flow, for a frame of your own. */
|
|
55
|
-
position?: "fixed" | "static";
|
|
56
|
-
} & React.RefAttributes<HTMLElement>>, BottomNavigationItem: React.ForwardRefExoticComponent<Omit<useRender.ComponentProps<"a", {}, import("@base-ui/react/types").HTMLProps>, "children" | "ref"> & {
|
|
57
|
-
icon: React.ReactNode;
|
|
58
|
-
label: string;
|
|
59
|
-
/** Marks the current destination with aria-current="page". */
|
|
60
|
-
current?: boolean;
|
|
61
|
-
/** A count, shown up to 99+, or true for a dot. */
|
|
62
|
-
badge?: number | boolean;
|
|
63
|
-
/** What the badge means, read after the label, such as "3 unread". A count reads
|
|
64
|
-
* as its number without it; a dot needs it. */
|
|
65
|
-
badgeLabel?: string;
|
|
66
|
-
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
32
|
+
export declare const BottomNavigationRoot: ({ visible, position, className, children, ref, ...props }: BottomNavigationRootProps & {
|
|
33
|
+
ref?: React.Ref<HTMLElement>;
|
|
34
|
+
}) => React.JSX.Element, BottomNavigationItem: ({ icon, label, current, badge, badgeLabel, render, className, ref, ...props }: BottomNavigationItemProps & {
|
|
35
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
36
|
+
}) => React.JSX.Element;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import { useRender } from '@base-ui/react/use-render';
|
|
5
4
|
import { cx } from './parts.js';
|
|
6
5
|
/** A phone's primary destinations along the bottom edge, within thumb reach. Pad the
|
|
7
|
-
* scrolling content by --size-bottom-navigation so the last line stays visible. */
|
|
8
|
-
const Root =
|
|
9
|
-
return (_jsx("nav", { ...props, ref: ref, "data-visible": visible, "data-position": position, className: cx('
|
|
10
|
-
}
|
|
6
|
+
* scrolling content by --surf-size-bottom-navigation so the last line stays visible. */
|
|
7
|
+
const Root = function BottomNavigationRoot({ visible = 'mobile', position = 'fixed', className, children, ref, ...props }) {
|
|
8
|
+
return (_jsx("nav", { ...props, ref: ref, "data-visible": visible, "data-position": position, className: cx('surf-bottom-nav', className), children: _jsx("ul", { role: 'list', className: 'surf-bottom-nav-list', children: children }) }));
|
|
9
|
+
};
|
|
11
10
|
/** One destination: an icon above its label. Pass a router's link element as
|
|
12
11
|
* `render` to keep client navigation. */
|
|
13
|
-
const Item =
|
|
12
|
+
const Item = function BottomNavigationItem({ icon, label, current, badge, badgeLabel, render, className, ref, ...props }) {
|
|
14
13
|
const count = typeof badge === 'number' && badge > 0
|
|
15
14
|
? badge > 99
|
|
16
15
|
? '99+'
|
|
@@ -25,12 +24,12 @@ const Item = /* @__PURE__ */ React.forwardRef(function BottomNavigationItem({ ic
|
|
|
25
24
|
props: {
|
|
26
25
|
...props,
|
|
27
26
|
'aria-current': current ? 'page' : props['aria-current'],
|
|
28
|
-
className: cx('
|
|
29
|
-
children: (_jsxs(_Fragment, { children: [_jsxs("span", { className: '
|
|
27
|
+
className: cx('surf-bottom-nav-item', className),
|
|
28
|
+
children: (_jsxs(_Fragment, { children: [_jsxs("span", { className: 'surf-bottom-nav-icon', "aria-hidden": 'true', children: [icon, shown && (_jsx("span", { className: 'surf-bottom-nav-badge', "data-dot": count ? undefined : '', children: count }))] }), _jsx("span", { className: 'surf-bottom-nav-label', children: label }), shown && spoken && (_jsxs("span", { className: 'surf-feedback-sr', children: [", ", spoken] }))] })),
|
|
30
29
|
},
|
|
31
30
|
});
|
|
32
|
-
return _jsx("li", { className: '
|
|
33
|
-
}
|
|
31
|
+
return _jsx("li", { className: 'surf-bottom-nav-entry', children: link });
|
|
32
|
+
};
|
|
34
33
|
export const BottomNavigation = { Root, Item };
|
|
35
34
|
// Flat names for React Server Components, which cannot dot into client exports.
|
|
36
35
|
export const { Root: BottomNavigationRoot, Item: BottomNavigationItem } = BottomNavigation;
|
package/dist/breadcrumbs.d.ts
CHANGED
|
@@ -2,12 +2,28 @@ import * as React from 'react';
|
|
|
2
2
|
declare function BreadcrumbSeparator({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
3
3
|
declare function BreadcrumbCurrent({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
4
4
|
export declare const Breadcrumbs: {
|
|
5
|
-
Root:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
Root: ({ className, "aria-label": label, ref, ...props }: React.ComponentPropsWithoutRef<"nav"> & {
|
|
6
|
+
ref?: React.Ref<HTMLElement>;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
List: ({ className, role, ref, ...props }: React.ComponentPropsWithoutRef<"ol"> & {
|
|
9
|
+
ref?: React.Ref<HTMLOListElement>;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
Item: ({ className, ref, ...props }: React.ComponentPropsWithoutRef<"li"> & {
|
|
12
|
+
ref?: React.Ref<HTMLLIElement>;
|
|
13
|
+
}) => React.JSX.Element;
|
|
14
|
+
Link: ({ render, className, ref, ...props }: import("./link.js").LinkProps & {
|
|
15
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
16
|
+
}) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
9
17
|
Separator: typeof BreadcrumbSeparator;
|
|
10
18
|
Current: typeof BreadcrumbCurrent;
|
|
11
19
|
};
|
|
12
|
-
export declare const BreadcrumbsRoot:
|
|
20
|
+
export declare const BreadcrumbsRoot: ({ className, "aria-label": label, ref, ...props }: React.ComponentPropsWithoutRef<"nav"> & {
|
|
21
|
+
ref?: React.Ref<HTMLElement>;
|
|
22
|
+
}) => React.JSX.Element, BreadcrumbsList: ({ className, role, ref, ...props }: React.ComponentPropsWithoutRef<"ol"> & {
|
|
23
|
+
ref?: React.Ref<HTMLOListElement>;
|
|
24
|
+
}) => React.JSX.Element, BreadcrumbsItem: ({ className, ref, ...props }: React.ComponentPropsWithoutRef<"li"> & {
|
|
25
|
+
ref?: React.Ref<HTMLLIElement>;
|
|
26
|
+
}) => React.JSX.Element, BreadcrumbsLink: ({ render, className, ref, ...props }: import("./link.js").LinkProps & {
|
|
27
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
28
|
+
}) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>, BreadcrumbsSeparator: typeof BreadcrumbSeparator, BreadcrumbsCurrent: typeof BreadcrumbCurrent;
|
|
13
29
|
export {};
|
package/dist/breadcrumbs.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import * as React from 'react';
|
|
4
2
|
import { Icon } from './icon.js';
|
|
5
|
-
import { cx } from './
|
|
3
|
+
import { cx } from './class-names.js';
|
|
6
4
|
import { Link } from './link.js';
|
|
7
|
-
const BreadcrumbRoot =
|
|
8
|
-
return (_jsx("nav", { ...props, ref: ref, "aria-label": label, className: cx('
|
|
9
|
-
}
|
|
10
|
-
const BreadcrumbList =
|
|
11
|
-
return (_jsx("ol", { ...props, role: role, ref: ref, className: cx('
|
|
12
|
-
}
|
|
13
|
-
const BreadcrumbItem =
|
|
14
|
-
return (_jsx("li", { ...props, ref: ref, className: cx('
|
|
15
|
-
}
|
|
5
|
+
const BreadcrumbRoot = function BreadcrumbRoot({ className, 'aria-label': label = 'Breadcrumb', ref, ...props }) {
|
|
6
|
+
return (_jsx("nav", { ...props, ref: ref, "aria-label": label, className: cx('surf-breadcrumbs', className) }));
|
|
7
|
+
};
|
|
8
|
+
const BreadcrumbList = function BreadcrumbList({ className, role = 'list', ref, ...props }) {
|
|
9
|
+
return (_jsx("ol", { ...props, role: role, ref: ref, className: cx('surf-breadcrumb-list', className) }));
|
|
10
|
+
};
|
|
11
|
+
const BreadcrumbItem = function BreadcrumbItem({ className, ref, ...props }) {
|
|
12
|
+
return (_jsx("li", { ...props, ref: ref, className: cx('surf-breadcrumb-item', className) }));
|
|
13
|
+
};
|
|
16
14
|
function BreadcrumbSeparator({ className, ...props }) {
|
|
17
|
-
return (_jsx("span", { ...props, className: cx('
|
|
15
|
+
return (_jsx("span", { ...props, className: cx('surf-breadcrumb-separator', className), "aria-hidden": 'true', children: _jsx(Icon, { name: 'chevron-forward' }) }));
|
|
18
16
|
}
|
|
19
17
|
function BreadcrumbCurrent({ className, ...props }) {
|
|
20
|
-
return (_jsx("span", { ...props, className: cx('
|
|
18
|
+
return (_jsx("span", { ...props, className: cx('surf-breadcrumb-current', className), "aria-current": 'page' }));
|
|
21
19
|
}
|
|
22
20
|
export const Breadcrumbs = {
|
|
23
21
|
Root: BreadcrumbRoot,
|