@surflane/ui 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{disclosure.d.ts → accordion.d.ts} +1 -17
- package/dist/{disclosure.js → accordion.js} +3 -17
- package/dist/alert-dialog.d.ts +31 -0
- package/dist/alert-dialog.js +22 -0
- package/dist/app-shell.js +9 -9
- package/dist/{input-extensions.d.ts → autocomplete.d.ts} +4 -42
- package/dist/{input-extensions.js → autocomplete.js} +7 -26
- package/dist/avatar.js +3 -5
- package/dist/badge.d.ts +20 -0
- package/dist/badge.js +16 -0
- package/dist/{navigation.d.ts → breadcrumbs.d.ts} +2 -6
- package/dist/breadcrumbs.js +31 -0
- package/dist/button.d.ts +11 -0
- package/dist/button.js +27 -4
- package/dist/{content.d.ts → card.d.ts} +6 -24
- package/dist/card.js +26 -0
- package/dist/chart.d.ts +19 -0
- package/dist/chart.js +24 -6
- package/dist/checkbox-group.d.ts +2 -0
- package/dist/checkbox-group.js +16 -0
- package/dist/checkbox.d.ts +9 -0
- package/dist/checkbox.js +29 -0
- package/dist/choice-label.d.ts +25 -0
- package/dist/choice-label.js +14 -0
- package/dist/choice.d.ts +7 -0
- package/dist/choice.js +3 -0
- package/dist/code.d.ts +21 -0
- package/dist/{content.js → code.js} +5 -30
- package/dist/collapsible.d.ts +18 -0
- package/dist/collapsible.js +21 -0
- package/dist/{advanced-forms.d.ts → combobox.d.ts} +5 -25
- package/dist/{advanced-forms.js → combobox.js} +13 -49
- package/dist/{context-overlays.d.ts → context-menu.d.ts} +6 -28
- package/dist/{context-overlays.js → context-menu.js} +5 -25
- package/dist/date-picker.js +3 -2
- package/dist/dialog.d.ts +6 -24
- package/dist/dialog.js +7 -20
- package/dist/{panels.d.ts → drawer.d.ts} +3 -34
- package/dist/drawer.js +47 -0
- package/dist/empty-state.d.ts +29 -0
- package/dist/empty-state.js +19 -0
- package/dist/field.d.ts +42 -0
- package/dist/field.js +21 -0
- package/dist/fieldset.d.ts +14 -0
- package/dist/fieldset.js +10 -0
- package/dist/file-upload.d.ts +3 -1
- package/dist/file-upload.js +7 -5
- package/dist/filter-bar.js +1 -1
- package/dist/form.d.ts +2 -0
- package/dist/form.js +7 -0
- package/dist/icon.d.ts +10 -0
- package/dist/icon.js +18 -3
- package/dist/index.d.ts +56 -29
- package/dist/index.js +70 -32
- package/dist/{messages.d.ts → inline-message.d.ts} +0 -28
- package/dist/{messages.js → inline-message.js} +3 -18
- package/dist/input.js +2 -2
- package/dist/{foundations.d.ts → layout.d.ts} +5 -23
- package/dist/{foundations.js → layout.js} +4 -19
- package/dist/link.d.ts +6 -0
- package/dist/link.js +17 -0
- package/dist/list.d.ts +33 -0
- package/dist/list.js +21 -0
- package/dist/markdown.js +4 -5
- package/dist/menu.d.ts +7 -5
- package/dist/menu.js +12 -8
- package/dist/menubar.d.ts +4 -0
- package/dist/menubar.js +4 -0
- package/dist/meter.d.ts +29 -0
- package/dist/meter.js +13 -0
- package/dist/native-select.d.ts +8 -0
- package/dist/native-select.js +54 -0
- package/dist/navigation-menu.js +8 -5
- package/dist/number-field.d.ts +23 -0
- package/dist/number-field.js +33 -0
- package/dist/page-header.d.ts +12 -0
- package/dist/page-header.js +9 -0
- package/dist/pagination.js +3 -4
- package/dist/panel.d.ts +13 -0
- package/dist/panel.js +13 -0
- package/dist/parts.d.ts +19 -1
- package/dist/parts.js +32 -6
- package/dist/popover.d.ts +23 -6
- package/dist/popover.js +17 -7
- package/dist/preview-card.d.ts +29 -0
- package/dist/preview-card.js +27 -0
- package/dist/progress.d.ts +29 -0
- package/dist/progress.js +13 -0
- package/dist/radio-group.d.ts +16 -0
- package/dist/radio-group.js +31 -0
- package/dist/scroll-area.js +3 -4
- package/dist/select.d.ts +8 -8
- package/dist/select.js +19 -54
- package/dist/separator.d.ts +4 -0
- package/dist/separator.js +8 -0
- package/dist/sheet.d.ts +29 -0
- package/dist/sheet.js +39 -0
- package/dist/skeleton.d.ts +8 -0
- package/dist/skeleton.js +8 -0
- package/dist/slider.d.ts +40 -0
- package/dist/slider.js +27 -0
- package/dist/spinner.d.ts +13 -0
- package/dist/spinner.js +10 -0
- package/dist/status.d.ts +1 -19
- package/dist/status.js +10 -14
- package/dist/switch.d.ts +13 -0
- package/dist/switch.js +25 -0
- package/dist/syntax-highlighter.js +2 -1
- package/dist/{data.d.ts → table.d.ts} +8 -32
- package/dist/{data.js → table.js} +15 -30
- package/dist/textarea.d.ts +7 -0
- package/dist/textarea.js +12 -0
- package/dist/toast.js +7 -6
- package/dist/toggle-group.d.ts +5 -0
- package/dist/toggle-group.js +7 -0
- package/dist/toggle.d.ts +7 -0
- package/dist/toggle.js +9 -0
- package/dist/{commands.d.ts → toolbar.d.ts} +0 -13
- package/dist/toolbar.js +14 -0
- package/dist/tooltip.d.ts +3 -2
- package/dist/tooltip.js +2 -2
- package/dist/tree.js +4 -2
- package/dist/typography.d.ts +12 -0
- package/dist/typography.js +14 -0
- package/package.json +237 -21
- package/src/styles.css +359 -191
- package/dist/chevron.d.ts +0 -3
- package/dist/chevron.js +0 -6
- package/dist/commands.js +0 -27
- package/dist/feedback.d.ts +0 -76
- package/dist/feedback.js +0 -35
- package/dist/forms.d.ts +0 -91
- package/dist/forms.js +0 -109
- package/dist/navigation.js +0 -41
- package/dist/panels.js +0 -100
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu';
|
|
3
|
-
import {
|
|
3
|
+
import { type Placement } from './parts.js';
|
|
4
4
|
/** Same menu anatomy and styling, with the context-specific cursor positioner. */
|
|
5
5
|
export declare const ContextMenu: {
|
|
6
6
|
Trigger: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuTriggerProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
7
7
|
size?: import("./sizing.js").ComponentSize;
|
|
8
8
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/context-menu").ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
10
|
Positioner: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuPositionerProps & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
10
11
|
size?: import("./sizing.js").ComponentSize;
|
|
11
12
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
Content: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
|
+
Content: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & Placement<React.ForwardRefExoticComponent<import("@base-ui/react/context-menu").ContextMenuPositionerProps & React.RefAttributes<HTMLDivElement>>> & {
|
|
14
|
+
/** @deprecated Pass side, align, sideOffset and collisionPadding directly. */
|
|
13
15
|
positionerProps?: React.ComponentPropsWithoutRef<typeof BaseContextMenu.Positioner>;
|
|
14
16
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
17
|
Popup: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
@@ -40,30 +42,11 @@ export declare const ContextMenu: {
|
|
|
40
42
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
41
43
|
Root: typeof BaseContextMenu.Root;
|
|
42
44
|
Backdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/context-menu").ContextMenuBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
-
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/context-menu").ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
45
|
Arrow: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/context-menu").ContextMenuArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
46
|
Group: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/context-menu").ContextMenuGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
47
|
RadioGroup: React.NamedExoticComponent<Omit<import("@base-ui/react/context-menu").ContextMenuRadioGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
47
48
|
SubmenuRoot: typeof BaseContextMenu.SubmenuRoot;
|
|
48
49
|
};
|
|
49
|
-
declare function PreviewTrigger<Payload>(props: BasePreviewCard.Trigger.Props<Payload> & React.RefAttributes<HTMLElement>): React.JSX.Element;
|
|
50
|
-
export declare const PreviewCard: {
|
|
51
|
-
Trigger: typeof PreviewTrigger;
|
|
52
|
-
Positioner: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/preview-card").PreviewCardPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
53
|
-
size?: import("./sizing.js").ComponentSize;
|
|
54
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
-
Popup: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/preview-card").PreviewCardPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
-
Content: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/preview-card").PreviewCardPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
57
|
-
positionerProps?: React.ComponentPropsWithoutRef<typeof BasePreviewCard.Positioner>;
|
|
58
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
59
|
-
Root: <Payload>(props: BasePreviewCard.Root.Props<Payload>) => React.JSX.Element;
|
|
60
|
-
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/preview-card").PreviewCardPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
-
Arrow: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/preview-card").PreviewCardArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
-
Backdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/preview-card").PreviewCardBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
-
Viewport: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/preview-card").PreviewCardViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
-
createHandle: typeof BasePreviewCard.createHandle;
|
|
65
|
-
Handle: typeof BasePreviewCard.Handle;
|
|
66
|
-
};
|
|
67
50
|
export declare const ContextMenuArrow: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/context-menu").ContextMenuArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>, ContextMenuBackdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/context-menu").ContextMenuBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>, ContextMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuCheckboxItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "size"> & {
|
|
68
51
|
size?: import("./sizing.js").ComponentSize;
|
|
69
52
|
} & React.RefAttributes<HTMLDivElement>>, ContextMenuCheckboxItemIndicator: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuCheckboxItemIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>, ContextMenuGroup: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/context-menu").ContextMenuGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, ContextMenuGroupLabel: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
@@ -84,12 +67,7 @@ export declare const ContextMenuArrow: React.ForwardRefExoticComponent<Omit<impo
|
|
|
84
67
|
indicator?: React.ReactNode;
|
|
85
68
|
} & React.RefAttributes<HTMLDivElement>>, ContextMenuTrigger: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuTriggerProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
86
69
|
size?: import("./sizing.js").ComponentSize;
|
|
87
|
-
} & React.RefAttributes<HTMLDivElement>>, ContextMenuContent: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
70
|
+
} & React.RefAttributes<HTMLDivElement>>, ContextMenuContent: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/context-menu").ContextMenuPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & Placement<React.ForwardRefExoticComponent<import("@base-ui/react/context-menu").ContextMenuPositionerProps & React.RefAttributes<HTMLDivElement>>> & {
|
|
71
|
+
/** @deprecated Pass side, align, sideOffset and collisionPadding directly. */
|
|
88
72
|
positionerProps?: React.ComponentPropsWithoutRef<typeof BaseContextMenu.Positioner>;
|
|
89
73
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
90
|
-
export declare const PreviewCardArrow: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/preview-card").PreviewCardArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>, PreviewCardBackdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/preview-card").PreviewCardBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>, PreviewCardHandle: typeof BasePreviewCard.Handle, PreviewCardPopup: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/preview-card").PreviewCardPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>, PreviewCardPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/preview-card").PreviewCardPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>, PreviewCardPositioner: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/preview-card").PreviewCardPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
91
|
-
size?: import("./sizing.js").ComponentSize;
|
|
92
|
-
} & React.RefAttributes<HTMLDivElement>>, PreviewCardRoot: <Payload>(props: BasePreviewCard.Root.Props<Payload>) => React.JSX.Element, PreviewCardTrigger: typeof PreviewTrigger, PreviewCardViewport: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/preview-card").PreviewCardViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>, PreviewCardContent: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/preview-card").PreviewCardPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
93
|
-
positionerProps?: React.ComponentPropsWithoutRef<typeof BasePreviewCard.Positioner>;
|
|
94
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
95
|
-
export {};
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu';
|
|
5
|
-
import { PreviewCard as BasePreviewCard } from '@base-ui/react/preview-card';
|
|
6
5
|
import { Menu } from './menu.js';
|
|
7
|
-
import { part,
|
|
8
|
-
const ContextPositioner = /* @__PURE__ */ part(BaseContextMenu.Positioner, 'pui-positioner');
|
|
9
|
-
const ContextContent = /* @__PURE__ */ React.forwardRef(function ContextContent({ positionerProps, ...props }, ref) {
|
|
10
|
-
return (_jsx(ContextPositioner, { ...positionerProps, children: _jsx(Menu.Popup, { ...props, ref: ref }) }));
|
|
6
|
+
import { OwnPortal, defined, part, scopedPortal, } from './parts.js';
|
|
7
|
+
const ContextPositioner = /* @__PURE__ */ part(BaseContextMenu.Positioner, 'pui-positioner', { portal: true });
|
|
8
|
+
const ContextContent = /* @__PURE__ */ React.forwardRef(function ContextContent({ side, align, sideOffset, collisionPadding, positionerProps, ...props }, ref) {
|
|
9
|
+
return (_jsx(OwnPortal, { portal: BaseContextMenu.Portal, children: _jsx(ContextPositioner, { ...positionerProps, ...defined({ side, align, sideOffset, collisionPadding }), children: _jsx(Menu.Popup, { ...props, ref: ref }) }) }));
|
|
11
10
|
});
|
|
12
11
|
/** Same menu anatomy and styling, with the context-specific cursor positioner. */
|
|
13
12
|
export const ContextMenu = {
|
|
14
13
|
...BaseContextMenu,
|
|
15
14
|
Trigger: /* @__PURE__ */ part(BaseContextMenu.Trigger, 'pui-context-trigger'),
|
|
15
|
+
Portal: /* @__PURE__ */ scopedPortal(BaseContextMenu.Portal),
|
|
16
16
|
Positioner: ContextPositioner,
|
|
17
17
|
Content: ContextContent,
|
|
18
18
|
Popup: Menu.Popup,
|
|
@@ -26,25 +26,5 @@ export const ContextMenu = {
|
|
|
26
26
|
Separator: Menu.Separator,
|
|
27
27
|
SubmenuTrigger: Menu.SubmenuTrigger,
|
|
28
28
|
};
|
|
29
|
-
const PreviewPositioner = /* @__PURE__ */ part(BasePreviewCard.Positioner, 'pui-positioner');
|
|
30
|
-
// The preview is visual enhancement; its destination is the accessible interface.
|
|
31
|
-
const PreviewPopup = /* @__PURE__ */ React.forwardRef(function PreviewPopup({ className, ...props }, ref) {
|
|
32
|
-
return (_jsx(BasePreviewCard.Popup, { ...props, ref: ref, "aria-hidden": 'true', className: skin('pui-preview-card', className) }));
|
|
33
|
-
});
|
|
34
|
-
function PreviewTrigger(props) {
|
|
35
|
-
const { className, ...rest } = props;
|
|
36
|
-
return (_jsx(BasePreviewCard.Trigger, { ...rest, className: skin('pui-link pui-preview-trigger', className) }));
|
|
37
|
-
}
|
|
38
|
-
const PreviewContent = /* @__PURE__ */ React.forwardRef(function PreviewContent({ positionerProps, ...props }, ref) {
|
|
39
|
-
return (_jsx(PreviewPositioner, { sideOffset: 8, collisionPadding: 12, ...positionerProps, children: _jsx(PreviewPopup, { ...props, ref: ref }) }));
|
|
40
|
-
});
|
|
41
|
-
export const PreviewCard = {
|
|
42
|
-
...BasePreviewCard,
|
|
43
|
-
Trigger: PreviewTrigger,
|
|
44
|
-
Positioner: PreviewPositioner,
|
|
45
|
-
Popup: PreviewPopup,
|
|
46
|
-
Content: PreviewContent,
|
|
47
|
-
};
|
|
48
29
|
// Flat names for React Server Components, which cannot dot into client exports.
|
|
49
30
|
export const { Arrow: ContextMenuArrow, Backdrop: ContextMenuBackdrop, CheckboxItem: ContextMenuCheckboxItem, CheckboxItemIndicator: ContextMenuCheckboxItemIndicator, Group: ContextMenuGroup, GroupLabel: ContextMenuGroupLabel, Item: ContextMenuItem, LinkItem: ContextMenuLinkItem, Popup: ContextMenuPopup, Portal: ContextMenuPortal, Positioner: ContextMenuPositioner, RadioGroup: ContextMenuRadioGroup, RadioItem: ContextMenuRadioItem, RadioItemIndicator: ContextMenuRadioItemIndicator, Root: ContextMenuRoot, Separator: ContextMenuSeparator, SubmenuRoot: ContextMenuSubmenuRoot, SubmenuTrigger: ContextMenuSubmenuTrigger, Trigger: ContextMenuTrigger, Content: ContextMenuContent, } = ContextMenu;
|
|
50
|
-
export const { Arrow: PreviewCardArrow, Backdrop: PreviewCardBackdrop, Handle: PreviewCardHandle, Popup: PreviewCardPopup, Portal: PreviewCardPortal, Positioner: PreviewCardPositioner, Root: PreviewCardRoot, Trigger: PreviewCardTrigger, Viewport: PreviewCardViewport, Content: PreviewCardContent, } = PreviewCard;
|
package/dist/date-picker.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Icon } from './icon.js';
|
|
3
4
|
import { useComponentSize } from './sizing.js';
|
|
4
5
|
import { DatePicker as AriaDatePicker, DateInput, DateSegment, Group, Label, Text, FieldError, Calendar, CalendarGrid, CalendarGridHeader, CalendarGridBody, CalendarHeaderCell, CalendarCell, Button, Popover, } from 'react-aria-components/DatePicker';
|
|
5
6
|
import { DateRangePicker as AriaDateRangePicker, RangeCalendar, } from 'react-aria-components/DateRangePicker';
|
|
@@ -16,11 +17,11 @@ function FieldHelp({ description, errorMessage, }) {
|
|
|
16
17
|
return (_jsxs(_Fragment, { children: [description && (_jsx(Text, { slot: 'description', className: 'pui-field-description', children: description })), _jsx(FieldError, { className: 'pui-field-error', children: errorMessage })] }));
|
|
17
18
|
}
|
|
18
19
|
function CalendarButton() {
|
|
19
|
-
return (_jsx(Button, { className: 'pui-date-trigger', children:
|
|
20
|
+
return (_jsx(Button, { className: 'pui-date-trigger', children: _jsx(Icon, { name: 'calendar' }) }));
|
|
20
21
|
}
|
|
21
22
|
function CalendarContents() {
|
|
22
23
|
const { locale } = useLocale();
|
|
23
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: 'pui-calendar-header', children: [_jsx(Button, { slot: 'previous', className: 'pui-calendar-nav', children: _jsx(
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: 'pui-calendar-header', children: [_jsx(Button, { slot: 'previous', className: 'pui-calendar-nav', children: _jsx(Icon, { name: 'chevron-back' }) }), _jsx(Heading, { className: 'pui-calendar-heading' }), _jsx(Button, { slot: 'next', className: 'pui-calendar-nav', children: _jsx(Icon, { name: 'chevron-forward' }) })] }), _jsxs(CalendarGrid, { className: 'pui-calendar-grid', weekdayStyle: 'short', children: [_jsx(CalendarGridHeader, { children: (day) => (_jsx(CalendarHeaderCell, { className: 'pui-calendar-weekday', children: day })) }), _jsx(CalendarGridBody, { children: (date) => (_jsx(CalendarCell, { date: date, className: 'pui-calendar-day', children: ({ formattedDate }) => locale.startsWith('ko') ? `${formattedDate}일` : formattedDate })) })] })] }));
|
|
24
25
|
}
|
|
25
26
|
function CalendarPopup({ label, range }) {
|
|
26
27
|
const scheme = useComponentSize();
|
package/dist/dialog.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { type ComponentSizeAlias } from './sizing.js';
|
|
2
3
|
import { Dialog as BaseDialog } from '@base-ui/react/dialog';
|
|
3
|
-
import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
|
|
4
4
|
/** Visible icon close action; inherits Dialog focus and dismissal behavior. */
|
|
5
5
|
declare const DialogCloseButton: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/dialog").DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref">, "children"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
declare const DialogContent: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/dialog").DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
7
|
+
/** Width and density: small 420px, default 640px, large 840px. */
|
|
8
|
+
size?: ComponentSizeAlias;
|
|
7
9
|
closeLabel?: string;
|
|
8
10
|
closeDisabled?: boolean;
|
|
9
11
|
focusBoundaryLabel?: string;
|
|
@@ -13,6 +15,8 @@ declare const DialogBody: React.ForwardRefExoticComponent<Omit<React.DetailedHTM
|
|
|
13
15
|
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
14
16
|
export declare const Dialog: {
|
|
15
17
|
Content: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/dialog").DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
18
|
+
/** Width and density: small 420px, default 640px, large 840px. */
|
|
19
|
+
size?: ComponentSizeAlias;
|
|
16
20
|
closeLabel?: string;
|
|
17
21
|
closeDisabled?: boolean;
|
|
18
22
|
focusBoundaryLabel?: string;
|
|
@@ -33,27 +37,5 @@ export declare const Dialog: {
|
|
|
33
37
|
createHandle: typeof BaseDialog.createHandle;
|
|
34
38
|
Handle: typeof BaseDialog.Handle;
|
|
35
39
|
};
|
|
36
|
-
|
|
37
|
-
focusBoundaryLabel?: string;
|
|
38
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
-
export declare const AlertDialog: {
|
|
40
|
-
Content: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/dialog").DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
41
|
-
focusBoundaryLabel?: string;
|
|
42
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
-
Header: typeof DialogHeader;
|
|
44
|
-
Footer: typeof DialogFooter;
|
|
45
|
-
Root: typeof BaseAlertDialog.Root;
|
|
46
|
-
Backdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
-
Close: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
48
|
-
Description: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
49
|
-
Popup: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
-
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
-
Title: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
52
|
-
Trigger: BaseAlertDialog.Trigger;
|
|
53
|
-
Viewport: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
-
Handle: typeof BaseAlertDialog.Handle;
|
|
55
|
-
createHandle: typeof BaseAlertDialog.createHandle;
|
|
56
|
-
};
|
|
57
|
-
export { AlertDialogContent, DialogContent, DialogHeader, DialogBody, DialogFooter, DialogCloseButton, };
|
|
58
|
-
export declare const AlertDialogBackdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>, AlertDialogClose: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>, AlertDialogDescription: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>, AlertDialogHandle: typeof BaseAlertDialog.Handle, AlertDialogPopup: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, AlertDialogPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>, AlertDialogRoot: typeof BaseAlertDialog.Root, AlertDialogTitle: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>, AlertDialogTrigger: BaseAlertDialog.Trigger, AlertDialogViewport: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>, AlertDialogHeader: typeof DialogHeader, AlertDialogFooter: typeof DialogFooter;
|
|
40
|
+
export { DialogContent, DialogHeader, DialogBody, DialogFooter, DialogCloseButton, };
|
|
59
41
|
export declare const DialogBackdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>, DialogClose: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>, DialogDescription: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>, DialogHandle: typeof BaseDialog.Handle, DialogPopup: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, DialogPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>, DialogRoot: <Payload>(props: BaseDialog.Root.Props<Payload>) => React.JSX.Element, DialogTitle: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>, DialogTrigger: BaseDialog.Trigger, DialogViewport: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/dialog.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { Icon } from './icon.js';
|
|
5
|
+
import { sizeName, skin, cx } from './parts.js';
|
|
5
6
|
import { useDialogFocusBoundary } from './dialog-focus.js';
|
|
6
7
|
import { useComponentSize } from './sizing.js';
|
|
7
8
|
import { Dialog as BaseDialog } from '@base-ui/react/dialog';
|
|
8
|
-
import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
|
|
9
|
-
const cx = (...v) => v.filter(Boolean).join(' ');
|
|
10
9
|
/** Visible icon close action; inherits Dialog focus and dismissal behavior. */
|
|
11
10
|
const DialogCloseButton = /* @__PURE__ */ React.forwardRef(function DialogCloseButton({ className, 'aria-label': label = 'Close dialog', ...props }, ref) {
|
|
12
|
-
return (_jsx(BaseDialog.Close, { ...props, ref: ref, "aria-label": label, className: skin('pui-icon-button pui-dialog-close', className), children: _jsx(
|
|
11
|
+
return (_jsx(BaseDialog.Close, { ...props, ref: ref, "aria-label": label, className: skin('pui-icon-button pui-dialog-close', className), children: _jsx(Icon, { name: 'close' }) }));
|
|
13
12
|
});
|
|
14
|
-
const DialogContent = /* @__PURE__ */ React.forwardRef(function DialogContent({ className, children, closeLabel = 'Close dialog', closeDisabled, focusBoundaryLabel = 'Continue dialog navigation', ...props }, ref) {
|
|
15
|
-
const scheme = useComponentSize();
|
|
13
|
+
const DialogContent = /* @__PURE__ */ React.forwardRef(function DialogContent({ size, className, children, closeLabel = 'Close dialog', closeDisabled, focusBoundaryLabel = 'Continue dialog navigation', ...props }, ref) {
|
|
14
|
+
const scheme = useComponentSize(size);
|
|
16
15
|
const portalRef = useDialogFocusBoundary(focusBoundaryLabel);
|
|
17
|
-
return (_jsxs(BaseDialog.Portal, { ref: portalRef, children: [_jsx(BaseDialog.Backdrop, { className: 'pui-dialog-backdrop' }), _jsxs(BaseDialog.Popup, { "data-ui-size": scheme, ...props, ref: ref, className: skin('pui-dialog-popup pui-dialog-content', className), children: [_jsx(DialogCloseButton, { "aria-label": closeLabel, disabled: closeDisabled }), children] })] }));
|
|
16
|
+
return (_jsxs(BaseDialog.Portal, { ref: portalRef, children: [_jsx(BaseDialog.Backdrop, { className: 'pui-dialog-backdrop' }), _jsxs(BaseDialog.Popup, { "data-ui-size": scheme, "data-size": sizeName(size), ...props, ref: ref, className: skin('pui-dialog-popup pui-dialog-content', className), children: [_jsx(DialogCloseButton, { "aria-label": closeLabel, disabled: closeDisabled }), children] })] }));
|
|
18
17
|
});
|
|
19
18
|
function DialogHeader({ className, ...props }) {
|
|
20
19
|
return _jsx("div", { ...props, className: cx('pui-dialog-header', className) });
|
|
@@ -33,18 +32,6 @@ export const Dialog = {
|
|
|
33
32
|
Footer: DialogFooter,
|
|
34
33
|
CloseButton: DialogCloseButton,
|
|
35
34
|
};
|
|
36
|
-
const AlertDialogContent = /* @__PURE__ */ React.forwardRef(function AlertDialogContent({ className, focusBoundaryLabel = 'Continue dialog navigation', ...props }, ref) {
|
|
37
|
-
const scheme = useComponentSize();
|
|
38
|
-
const portalRef = useDialogFocusBoundary(focusBoundaryLabel);
|
|
39
|
-
return (_jsxs(BaseAlertDialog.Portal, { ref: portalRef, children: [_jsx(BaseAlertDialog.Backdrop, { className: 'pui-dialog-backdrop' }), _jsx(BaseAlertDialog.Popup, { "data-ui-size": scheme, ...props, ref: ref, className: skin('pui-dialog-popup pui-dialog-content pui-confirm-content', className) })] }));
|
|
40
|
-
});
|
|
41
|
-
export const AlertDialog = {
|
|
42
|
-
...BaseAlertDialog,
|
|
43
|
-
Content: AlertDialogContent,
|
|
44
|
-
Header: DialogHeader,
|
|
45
|
-
Footer: DialogFooter,
|
|
46
|
-
};
|
|
47
35
|
// Flat names for React Server Components, which cannot dot into client exports.
|
|
48
|
-
export {
|
|
49
|
-
export const { Backdrop: AlertDialogBackdrop, Close: AlertDialogClose, Description: AlertDialogDescription, Handle: AlertDialogHandle, Popup: AlertDialogPopup, Portal: AlertDialogPortal, Root: AlertDialogRoot, Title: AlertDialogTitle, Trigger: AlertDialogTrigger, Viewport: AlertDialogViewport, Header: AlertDialogHeader, Footer: AlertDialogFooter, } = AlertDialog;
|
|
36
|
+
export { DialogContent, DialogHeader, DialogBody, DialogFooter, DialogCloseButton, };
|
|
50
37
|
export const { Backdrop: DialogBackdrop, Close: DialogClose, Description: DialogDescription, Handle: DialogHandle, Popup: DialogPopup, Portal: DialogPortal, Root: DialogRoot, Title: DialogTitle, Trigger: DialogTrigger, Viewport: DialogViewport, } = Dialog;
|
|
@@ -1,43 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type ComponentSizeAlias } from './sizing.js';
|
|
3
|
-
import { Dialog as BaseDialog } from '@base-ui/react/dialog';
|
|
4
2
|
import { Drawer as BaseDrawer } from '@base-ui/react/drawer';
|
|
5
|
-
|
|
6
|
-
type PanelOptions = {
|
|
7
|
-
size?: ComponentSizeAlias;
|
|
8
|
-
closeLabel?: string;
|
|
9
|
-
};
|
|
10
|
-
declare function SheetRoot({ side, modal, ...props }: React.ComponentProps<typeof BaseDialog.Root> & {
|
|
11
|
-
side?: PanelSide;
|
|
12
|
-
}): React.JSX.Element;
|
|
3
|
+
import { Footer, Header, type PanelOptions, type PanelSide } from './panel.js';
|
|
13
4
|
declare function DrawerRoot({ side, modal, ...props }: Omit<React.ComponentProps<typeof BaseDrawer.Root>, 'swipeDirection'> & {
|
|
14
5
|
side?: PanelSide;
|
|
15
6
|
}): React.JSX.Element;
|
|
16
|
-
declare const SheetContent: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/dialog").DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & PanelOptions & React.RefAttributes<HTMLDivElement>>;
|
|
17
7
|
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/drawer").DrawerPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & PanelOptions & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
declare function Header({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
19
|
-
declare function Footer({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
20
|
-
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof BaseDialog.Title>): React.JSX.Element;
|
|
21
|
-
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof BaseDialog.Description>): React.JSX.Element;
|
|
22
8
|
declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof BaseDrawer.Title>): React.JSX.Element;
|
|
23
9
|
declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof BaseDrawer.Description>): React.JSX.Element;
|
|
24
|
-
export declare const Sheet: {
|
|
25
|
-
Root: typeof SheetRoot;
|
|
26
|
-
Content: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/dialog").DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & PanelOptions & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
Header: typeof Header;
|
|
28
|
-
Body: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
Footer: typeof Footer;
|
|
30
|
-
Title: typeof SheetTitle;
|
|
31
|
-
Description: typeof SheetDescription;
|
|
32
|
-
Backdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
Close: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
34
|
-
Popup: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
-
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
-
Viewport: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
Trigger: BaseDialog.Trigger;
|
|
38
|
-
createHandle: typeof BaseDialog.createHandle;
|
|
39
|
-
Handle: typeof BaseDialog.Handle;
|
|
40
|
-
};
|
|
41
10
|
export declare const Drawer: {
|
|
42
11
|
Root: typeof DrawerRoot;
|
|
43
12
|
Content: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/drawer").DrawerPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & PanelOptions & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -61,6 +30,6 @@ export declare const Drawer: {
|
|
|
61
30
|
createHandle: typeof BaseDrawer.createHandle;
|
|
62
31
|
Handle: typeof BaseDrawer.Handle;
|
|
63
32
|
};
|
|
64
|
-
export { DrawerContent, DrawerDescription, DrawerRoot, DrawerTitle
|
|
33
|
+
export { DrawerContent, DrawerDescription, DrawerRoot, DrawerTitle };
|
|
65
34
|
export declare const DrawerBackdrop: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>, DrawerClose: BaseDrawer.Close, DrawerHandle: typeof BaseDrawer.Handle, DrawerIndent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerIndentProps, "ref"> & React.RefAttributes<HTMLDivElement>>, DrawerIndentBackground: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerIndentBackgroundProps, "ref"> & React.RefAttributes<HTMLDivElement>>, DrawerPopup: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>, DrawerPortal: BaseDrawer.Portal, DrawerProvider: typeof BaseDrawer.Provider, DrawerSwipeArea: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerSwipeAreaProps, "ref"> & React.RefAttributes<HTMLDivElement>>, DrawerTrigger: BaseDrawer.Trigger, DrawerViewport: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>, DrawerVirtualKeyboardProvider: typeof BaseDrawer.VirtualKeyboardProvider, DrawerPrimitiveContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react/drawer").DrawerContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>, DrawerHeader: typeof Header, DrawerBody: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>, DrawerFooter: typeof Footer;
|
|
66
|
-
export
|
|
35
|
+
export type { PanelSide } from './panel.js';
|
package/dist/drawer.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Icon } from './icon.js';
|
|
5
|
+
import { skin } from './parts.js';
|
|
6
|
+
import { useComponentSize, normalizeSize } from './sizing.js';
|
|
7
|
+
import { Drawer as BaseDrawer } from '@base-ui/react/drawer';
|
|
8
|
+
import { Body, Footer, Header, } from './panel.js';
|
|
9
|
+
const DrawerSide = /* @__PURE__ */ React.createContext({
|
|
10
|
+
side: 'bottom',
|
|
11
|
+
modal: true,
|
|
12
|
+
});
|
|
13
|
+
function DrawerRoot({ side = 'bottom', modal = true, ...props }) {
|
|
14
|
+
const direction = {
|
|
15
|
+
left: 'left',
|
|
16
|
+
right: 'right',
|
|
17
|
+
top: 'up',
|
|
18
|
+
bottom: 'down',
|
|
19
|
+
};
|
|
20
|
+
return (_jsx(DrawerSide.Provider, { value: { side, modal }, children: _jsx(BaseDrawer.Root, { ...props, modal: modal, swipeDirection: direction[side] }) }));
|
|
21
|
+
}
|
|
22
|
+
const DrawerContent = /* @__PURE__ */ React.forwardRef(function DrawerContent({ size, flush, closeLabel = 'Close panel', className, children, ...props }, ref) {
|
|
23
|
+
const scheme = useComponentSize(size);
|
|
24
|
+
const { side, modal } = React.useContext(DrawerSide);
|
|
25
|
+
const KeyboardProvider = side === 'bottom' ? BaseDrawer.VirtualKeyboardProvider : React.Fragment;
|
|
26
|
+
return (_jsx(KeyboardProvider, { children: _jsx(BaseDrawer.Portal, { children: _jsxs("div", { className: 'pui-panel-layer', "data-ui-size": scheme, children: [modal === true && (_jsx(BaseDrawer.Backdrop, { className: 'pui-panel-backdrop' })), _jsx(BaseDrawer.Viewport, { className: 'pui-panel-viewport', "data-side": side, "data-flush": flush || undefined, children: _jsxs(BaseDrawer.Popup, { ...props, ref: ref, className: skin('pui-panel pui-drawer', className), "data-side": side, "data-size": normalizeSize(size) ?? 'large', "data-flush": flush || undefined, children: [_jsx("div", { className: 'pui-drawer-handle', "aria-hidden": 'true' }), _jsx(BaseDrawer.Close, { className: 'pui-panel-close pui-icon-button', "aria-label": closeLabel, children: _jsx(Icon, { name: 'close' }) }), _jsx(BaseDrawer.Content, { className: 'pui-panel-content', children: children })] }) })] }) }) }));
|
|
27
|
+
});
|
|
28
|
+
function DrawerTitle({ className, ...props }) {
|
|
29
|
+
return (_jsx(BaseDrawer.Title, { ...props, className: skin('pui-panel-title', className) }));
|
|
30
|
+
}
|
|
31
|
+
function DrawerDescription({ className, ...props }) {
|
|
32
|
+
return (_jsx(BaseDrawer.Description, { ...props, className: skin('pui-panel-description', className) }));
|
|
33
|
+
}
|
|
34
|
+
export const Drawer = {
|
|
35
|
+
...BaseDrawer,
|
|
36
|
+
Root: DrawerRoot,
|
|
37
|
+
Content: DrawerContent,
|
|
38
|
+
PrimitiveContent: BaseDrawer.Content,
|
|
39
|
+
Header,
|
|
40
|
+
Body,
|
|
41
|
+
Footer,
|
|
42
|
+
Title: DrawerTitle,
|
|
43
|
+
Description: DrawerDescription,
|
|
44
|
+
};
|
|
45
|
+
// Flat names for React Server Components, which cannot dot into client exports.
|
|
46
|
+
export { DrawerContent, DrawerDescription, DrawerRoot, DrawerTitle };
|
|
47
|
+
export const { Backdrop: DrawerBackdrop, Close: DrawerClose, Handle: DrawerHandle, Indent: DrawerIndent, IndentBackground: DrawerIndentBackground, Popup: DrawerPopup, Portal: DrawerPortal, Provider: DrawerProvider, SwipeArea: DrawerSwipeArea, Trigger: DrawerTrigger, Viewport: DrawerViewport, VirtualKeyboardProvider: DrawerVirtualKeyboardProvider, PrimitiveContent: DrawerPrimitiveContent, Header: DrawerHeader, Body: DrawerBody, Footer: DrawerFooter, } = Drawer;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const EmptyState: {
|
|
3
|
+
Root: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "size"> & {
|
|
4
|
+
size?: import("./sizing.js").ComponentSize;
|
|
5
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
Icon: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "size"> & {
|
|
7
|
+
size?: import("./sizing.js").ComponentSize;
|
|
8
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Title: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
|
|
10
|
+
level?: 2 | 3 | 4 | 5 | 6;
|
|
11
|
+
} & React.RefAttributes<HTMLHeadingElement>>;
|
|
12
|
+
Description: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "size"> & {
|
|
13
|
+
size?: import("./sizing.js").ComponentSize;
|
|
14
|
+
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
15
|
+
Actions: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "size"> & {
|
|
16
|
+
size?: import("./sizing.js").ComponentSize;
|
|
17
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
};
|
|
19
|
+
export declare const EmptyStateRoot: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "size"> & {
|
|
20
|
+
size?: import("./sizing.js").ComponentSize;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>, EmptyStateIcon: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "size"> & {
|
|
22
|
+
size?: import("./sizing.js").ComponentSize;
|
|
23
|
+
} & React.RefAttributes<HTMLDivElement>>, EmptyStateTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
|
|
24
|
+
level?: 2 | 3 | 4 | 5 | 6;
|
|
25
|
+
} & React.RefAttributes<HTMLHeadingElement>>, EmptyStateDescription: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "size"> & {
|
|
26
|
+
size?: import("./sizing.js").ComponentSize;
|
|
27
|
+
} & React.RefAttributes<HTMLParagraphElement>>, EmptyStateActions: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "size"> & {
|
|
28
|
+
size?: import("./sizing.js").ComponentSize;
|
|
29
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { part, cx } from './parts.js';
|
|
4
|
+
const EmptyTitle = /* @__PURE__ */ React.forwardRef(function EmptyTitle({ level = 3, className, ...props }, ref) {
|
|
5
|
+
return React.createElement(`h${level}`, {
|
|
6
|
+
...props,
|
|
7
|
+
ref,
|
|
8
|
+
className: cx('pui-empty-title', className),
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
export const EmptyState = {
|
|
12
|
+
Root: /* @__PURE__ */ part('div', 'pui-empty'),
|
|
13
|
+
Icon: /* @__PURE__ */ part('div', 'pui-empty-icon'),
|
|
14
|
+
Title: EmptyTitle,
|
|
15
|
+
Description: /* @__PURE__ */ part('p', 'pui-empty-description'),
|
|
16
|
+
Actions: /* @__PURE__ */ part('div', 'pui-empty-actions'),
|
|
17
|
+
};
|
|
18
|
+
// Flat names for React Server Components, which cannot dot into client exports.
|
|
19
|
+
export const { Root: EmptyStateRoot, Icon: EmptyStateIcon, Title: EmptyStateTitle, Description: EmptyStateDescription, Actions: EmptyStateActions, } = EmptyState;
|
package/dist/field.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const FieldRoot: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldRootProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
3
|
+
size?: import("./sizing.js").ComponentSize;
|
|
4
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const FieldLabel: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldLabelProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "size"> & {
|
|
6
|
+
size?: import("./sizing.js").ComponentSize;
|
|
7
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
8
|
+
declare const FieldControl: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldControlProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "size"> & {
|
|
9
|
+
size?: import("./sizing.js").ComponentSize;
|
|
10
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
11
|
+
declare const FieldDescription: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref">, "size"> & {
|
|
12
|
+
size?: import("./sizing.js").ComponentSize;
|
|
13
|
+
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
14
|
+
declare const FieldError: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldErrorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
15
|
+
size?: import("./sizing.js").ComponentSize;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const FieldItem: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldItemProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
18
|
+
size?: import("./sizing.js").ComponentSize;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
export declare const Field: {
|
|
21
|
+
Root: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldRootProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
22
|
+
size?: import("./sizing.js").ComponentSize;
|
|
23
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
Label: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldLabelProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "size"> & {
|
|
25
|
+
size?: import("./sizing.js").ComponentSize;
|
|
26
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
27
|
+
Control: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldControlProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "size"> & {
|
|
28
|
+
size?: import("./sizing.js").ComponentSize;
|
|
29
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
30
|
+
Description: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref">, "size"> & {
|
|
31
|
+
size?: import("./sizing.js").ComponentSize;
|
|
32
|
+
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
33
|
+
Error: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldErrorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
34
|
+
size?: import("./sizing.js").ComponentSize;
|
|
35
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
Item: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/field").FieldItemProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
37
|
+
size?: import("./sizing.js").ComponentSize;
|
|
38
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
Validity: React.FC<import("@base-ui/react/field").FieldValidityProps>;
|
|
40
|
+
};
|
|
41
|
+
export { FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldRoot, };
|
|
42
|
+
export declare const FieldValidity: React.FC<import("@base-ui/react/field").FieldValidityProps>;
|
package/dist/field.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Field as BaseField } from '@base-ui/react/field';
|
|
3
|
+
import { part } from './parts.js';
|
|
4
|
+
const FieldRoot = /* @__PURE__ */ part(BaseField.Root, 'pui-field');
|
|
5
|
+
const FieldLabel = /* @__PURE__ */ part(BaseField.Label, 'pui-field-label');
|
|
6
|
+
const FieldControl = /* @__PURE__ */ part(BaseField.Control, 'pui-input');
|
|
7
|
+
const FieldDescription = /* @__PURE__ */ part(BaseField.Description, 'pui-field-description');
|
|
8
|
+
const FieldError = /* @__PURE__ */ part(BaseField.Error, 'pui-field-error');
|
|
9
|
+
const FieldItem = /* @__PURE__ */ part(BaseField.Item, 'pui-field-item');
|
|
10
|
+
export const Field = {
|
|
11
|
+
...BaseField,
|
|
12
|
+
Root: FieldRoot,
|
|
13
|
+
Label: FieldLabel,
|
|
14
|
+
Control: FieldControl,
|
|
15
|
+
Description: FieldDescription,
|
|
16
|
+
Error: FieldError,
|
|
17
|
+
Item: FieldItem,
|
|
18
|
+
};
|
|
19
|
+
// Flat names for React Server Components, which cannot dot into client exports.
|
|
20
|
+
export { FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldRoot, };
|
|
21
|
+
export const { Validity: FieldValidity } = Field;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const Fieldset: {
|
|
3
|
+
Root: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/fieldset").FieldsetRootProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "size"> & {
|
|
4
|
+
size?: import("./sizing.js").ComponentSize;
|
|
5
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
6
|
+
Legend: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/fieldset").FieldsetLegendProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
7
|
+
size?: import("./sizing.js").ComponentSize;
|
|
8
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
};
|
|
10
|
+
export declare const FieldsetLegend: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/fieldset").FieldsetLegendProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & {
|
|
11
|
+
size?: import("./sizing.js").ComponentSize;
|
|
12
|
+
} & React.RefAttributes<HTMLDivElement>>, FieldsetRoot: React.ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react/fieldset").FieldsetRootProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "size"> & {
|
|
13
|
+
size?: import("./sizing.js").ComponentSize;
|
|
14
|
+
} & React.RefAttributes<HTMLElement>>;
|
package/dist/fieldset.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset';
|
|
3
|
+
import { part } from './parts.js';
|
|
4
|
+
export const Fieldset = {
|
|
5
|
+
...BaseFieldset,
|
|
6
|
+
Root: /* @__PURE__ */ part(BaseFieldset.Root, 'pui-fieldset'),
|
|
7
|
+
Legend: /* @__PURE__ */ part(BaseFieldset.Legend, 'pui-fieldset-legend'),
|
|
8
|
+
};
|
|
9
|
+
// Flat names for React Server Components, which cannot dot into client exports.
|
|
10
|
+
export const { Legend: FieldsetLegend, Root: FieldsetRoot } = Fieldset;
|
package/dist/file-upload.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Field } from './
|
|
2
|
+
import { Field } from './field.js';
|
|
3
3
|
export type UploadState = 'ready' | 'uploading' | 'success' | 'error' | 'canceled';
|
|
4
4
|
export type UploadTransport = (file: File, context: {
|
|
5
5
|
signal: AbortSignal;
|
|
@@ -29,6 +29,8 @@ export type FileUploadLabels = {
|
|
|
29
29
|
failed: (file: File) => string;
|
|
30
30
|
reset: string;
|
|
31
31
|
progress: (file: File) => string;
|
|
32
|
+
/** Shown when an upload fails and getUploadError gives no message. */
|
|
33
|
+
uploadError: string;
|
|
32
34
|
};
|
|
33
35
|
export type FileUploadProps = Omit<React.ComponentPropsWithoutRef<typeof Field.Root>, 'children' | 'name' | 'onDragEnter' | 'onDragLeave' | 'onDragOver' | 'onDrop'> & Pick<React.HTMLAttributes<HTMLDivElement>, 'onDragEnter' | 'onDragLeave' | 'onDragOver' | 'onDrop'> & {
|
|
34
36
|
label: React.ReactNode;
|
package/dist/file-upload.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { Icon } from './icon.js';
|
|
5
|
+
import { Field } from './field.js';
|
|
5
6
|
import { Button } from './button.js';
|
|
6
|
-
import { Progress } from './
|
|
7
|
-
import { StatusBadge } from './
|
|
7
|
+
import { Progress } from './progress.js';
|
|
8
|
+
import { StatusBadge } from './badge.js';
|
|
8
9
|
import { skin } from './parts.js';
|
|
9
10
|
import { useResetValue, useRootRef } from './form-state.js';
|
|
10
11
|
const labelsDefault = {
|
|
@@ -28,6 +29,7 @@ const labelsDefault = {
|
|
|
28
29
|
failed: (file) => `${file.name}: upload failed.`,
|
|
29
30
|
reset: 'Files reset.',
|
|
30
31
|
progress: (file) => `${file.name} upload progress`,
|
|
32
|
+
uploadError: 'Upload failed. Try again.',
|
|
31
33
|
};
|
|
32
34
|
function signature(file) {
|
|
33
35
|
return JSON.stringify([file.name, file.size, file.type, file.lastModified]);
|
|
@@ -253,7 +255,7 @@ export const FileUpload = /* @__PURE__ */ React.forwardRef(function FileUpload({
|
|
|
253
255
|
}
|
|
254
256
|
catch (error) {
|
|
255
257
|
if (current()) {
|
|
256
|
-
let message =
|
|
258
|
+
let message = labels.uploadError;
|
|
257
259
|
try {
|
|
258
260
|
message = getUploadError?.(error) || message;
|
|
259
261
|
}
|
|
@@ -302,7 +304,7 @@ export const FileUpload = /* @__PURE__ */ React.forwardRef(function FileUpload({
|
|
|
302
304
|
event.preventBaseUIHandler();
|
|
303
305
|
select(Array.from(event.currentTarget.files ?? []), 'select');
|
|
304
306
|
}
|
|
305
|
-
} }), _jsxs("label", { htmlFor: inputId, className: 'pui-button pui-file-trigger', "data-variant": 'outline', "data-disabled": disabled || undefined, children: [_jsx(
|
|
307
|
+
} }), _jsxs("label", { htmlFor: inputId, className: 'pui-button pui-file-trigger', "data-variant": 'outline', "data-disabled": disabled || undefined, children: [_jsx(Icon, { name: 'upload' }), labels.choose] }), _jsx("p", { className: 'pui-file-drop-hint', children: labels.drop })] }), _jsx("div", { id: errorId, role: 'alert', className: 'pui-file-errors', children: rejections.length > 0 && (_jsx("ul", { children: rejections.map((rejection, index) => (_jsx("li", { children: labels.rejection(rejection) }, index))) })) }), _jsx(Field.Error, {}), files.length > 0 && (_jsx("ul", { className: 'pui-file-list', role: 'list', children: files.map((file) => {
|
|
306
308
|
const state = metadata.get(file) ?? {
|
|
307
309
|
status: 'ready',
|
|
308
310
|
progress: null,
|
package/dist/filter-bar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
|
|
4
|
+
import { cx } from './parts.js';
|
|
5
5
|
/** Layout only: filtering, routing and async results remain controlled by the caller. */
|
|
6
6
|
const Root = /* @__PURE__ */ React.forwardRef(function FilterBarRoot({ label, className, ...props }, ref) {
|
|
7
7
|
return (_jsx("form", { ...props, ref: ref, role: 'search', "aria-label": label, className: cx('pui-filter-bar', className) }));
|
package/dist/form.d.ts
ADDED
package/dist/form.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Form as BaseForm } from '@base-ui/react/form';
|
|
4
|
+
import { skin } from './parts.js';
|
|
5
|
+
export function Form({ className, ...props }) {
|
|
6
|
+
return _jsx(BaseForm, { ...props, className: skin('pui-form', className) });
|
|
7
|
+
}
|