@forte-ui/react 1.0.0-alpha.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 +240 -0
- package/dist/Accordion-9JunkjgY.js +111 -0
- package/dist/Alert-Cn_WUF3L.js +183 -0
- package/dist/AspectRatio-gSjpTVk-.js +39 -0
- package/dist/Avatar-BuitDluH.js +87 -0
- package/dist/Badge-sArNWMre.js +33 -0
- package/dist/Breadcrumb-Cq7tFtMX.js +170 -0
- package/dist/Button-AiyKnx5I.js +42 -0
- package/dist/ButtonGroup-C-CrwPXP.js +54 -0
- package/dist/Calendar-D7Q-QJ_e.js +503 -0
- package/dist/Checkbox-DfNbmOed.js +56 -0
- package/dist/Collapsible-D8UKiGip.js +86 -0
- package/dist/ColorPicker-B-eCI31W.js +612 -0
- package/dist/Combobox-D-BN-Tvp.js +302 -0
- package/dist/ContextMenu-D81uDaMG.js +44 -0
- package/dist/DatePicker-CfkMsaI-.js +192 -0
- package/dist/Dialog-_n8FpFs5.js +432 -0
- package/dist/Drawer-DKQF3OO7.js +158 -0
- package/dist/Field-FLFEO70D.js +58 -0
- package/dist/Fieldset-CYhh71Qt.js +28 -0
- package/dist/Form-DVPmW9XV.js +17 -0
- package/dist/Input-BgGWhO2q.js +18 -0
- package/dist/InputGroup-DsZyDXNn.js +89 -0
- package/dist/Menu-CKu9xE2h.js +261 -0
- package/dist/Menubar-Dax027Db.js +19 -0
- package/dist/NavList-DGvcIoJm.js +176 -0
- package/dist/NavigationMenu-BayQkUUb.js +209 -0
- package/dist/NumberField-P55SA8T7.js +191 -0
- package/dist/OTPField-CjHvBNSN.js +55 -0
- package/dist/Popover-BXhn2Wwt.js +142 -0
- package/dist/PreviewCard-Dnitrky0.js +99 -0
- package/dist/Progress-BlomDp-X.js +81 -0
- package/dist/ProgressCircle-j6XBl0fk.js +112 -0
- package/dist/Radio-BIcX4INJ.js +37 -0
- package/dist/Resizable-7nJJM97e.js +609 -0
- package/dist/ScrollArea-CBMGJ6hh.js +83 -0
- package/dist/Select-BP-zvdXm.js +237 -0
- package/dist/Separator-DewJBzaJ.js +21 -0
- package/dist/Skeleton-zr6ObCCq.js +79 -0
- package/dist/Slider-Bh8_cti1.js +104 -0
- package/dist/Spinner-BF0uD4hR.js +53 -0
- package/dist/Switch-OBewMMvM.js +39 -0
- package/dist/Tabs-LgkSbPSF.js +132 -0
- package/dist/Textarea-CqZJL41e.js +51 -0
- package/dist/Toast-BWayxAcd.js +304 -0
- package/dist/Toggle-BrhMnkF5.js +45 -0
- package/dist/Toolbar-OmOVCk3i.js +88 -0
- package/dist/Tooltip-CI4chsRw.js +101 -0
- package/dist/clsx-By2n9mTe.js +16 -0
- package/dist/cn.d.ts +8 -0
- package/dist/cn.js +11 -0
- package/dist/components/accordion/Accordion.d.ts +117 -0
- package/dist/components/accordion/Accordion.js +3 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/alert/Alert.d.ts +167 -0
- package/dist/components/alert/Alert.js +3 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.js +2 -0
- package/dist/components/aspect-ratio/AspectRatio.d.ts +128 -0
- package/dist/components/aspect-ratio/AspectRatio.js +3 -0
- package/dist/components/aspect-ratio/index.d.ts +2 -0
- package/dist/components/aspect-ratio/index.js +2 -0
- package/dist/components/avatar/Avatar.d.ts +176 -0
- package/dist/components/avatar/Avatar.js +3 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/badge/Badge.d.ts +117 -0
- package/dist/components/badge/Badge.js +3 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +244 -0
- package/dist/components/breadcrumb/Breadcrumb.js +3 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/index.js +2 -0
- package/dist/components/button/Button.d.ts +73 -0
- package/dist/components/button/Button.js +3 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/button-group/ButtonGroup.d.ts +113 -0
- package/dist/components/button-group/ButtonGroup.js +3 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.js +2 -0
- package/dist/components/calendar/Calendar.d.ts +201 -0
- package/dist/components/calendar/Calendar.js +3 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/calendar/index.js +2 -0
- package/dist/components/checkbox/Checkbox.d.ts +130 -0
- package/dist/components/checkbox/Checkbox.js +3 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.js +2 -0
- package/dist/components/collapsible/Collapsible.d.ts +91 -0
- package/dist/components/collapsible/Collapsible.js +3 -0
- package/dist/components/collapsible/index.d.ts +2 -0
- package/dist/components/collapsible/index.js +2 -0
- package/dist/components/color-picker/ColorPicker.d.ts +553 -0
- package/dist/components/color-picker/ColorPicker.js +4 -0
- package/dist/components/color-picker/color.d.ts +102 -0
- package/dist/components/color-picker/color.js +249 -0
- package/dist/components/color-picker/index.d.ts +2 -0
- package/dist/components/color-picker/index.js +3 -0
- package/dist/components/combobox/Combobox.d.ts +553 -0
- package/dist/components/combobox/Combobox.js +3 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/combobox/index.js +2 -0
- package/dist/components/context-menu/ContextMenu.d.ts +103 -0
- package/dist/components/context-menu/ContextMenu.js +3 -0
- package/dist/components/context-menu/index.d.ts +3 -0
- package/dist/components/context-menu/index.js +2 -0
- package/dist/components/date-picker/DatePicker.d.ts +268 -0
- package/dist/components/date-picker/DatePicker.js +3 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +2 -0
- package/dist/components/dialog/Dialog.d.ts +567 -0
- package/dist/components/dialog/Dialog.js +3 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/drawer/Drawer.d.ts +351 -0
- package/dist/components/drawer/Drawer.js +3 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.js +2 -0
- package/dist/components/field/Field.d.ts +170 -0
- package/dist/components/field/Field.js +3 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.js +2 -0
- package/dist/components/fieldset/Fieldset.d.ts +60 -0
- package/dist/components/fieldset/Fieldset.js +3 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/components/fieldset/index.js +2 -0
- package/dist/components/form/Form.d.ts +76 -0
- package/dist/components/form/Form.js +3 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.js +2 -0
- package/dist/components/input/Input.d.ts +67 -0
- package/dist/components/input/Input.js +3 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.js +2 -0
- package/dist/components/input-group/InputGroup.d.ts +214 -0
- package/dist/components/input-group/InputGroup.js +3 -0
- package/dist/components/input-group/index.d.ts +2 -0
- package/dist/components/input-group/index.js +2 -0
- package/dist/components/menu/Menu.d.ts +587 -0
- package/dist/components/menu/Menu.js +3 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/index.js +2 -0
- package/dist/components/menubar/Menubar.d.ts +104 -0
- package/dist/components/menubar/Menubar.js +3 -0
- package/dist/components/menubar/index.d.ts +2 -0
- package/dist/components/menubar/index.js +2 -0
- package/dist/components/nav-list/NavList.d.ts +290 -0
- package/dist/components/nav-list/NavList.js +3 -0
- package/dist/components/nav-list/index.d.ts +2 -0
- package/dist/components/nav-list/index.js +2 -0
- package/dist/components/navigation-menu/NavigationMenu.d.ts +483 -0
- package/dist/components/navigation-menu/NavigationMenu.js +3 -0
- package/dist/components/navigation-menu/index.d.ts +2 -0
- package/dist/components/navigation-menu/index.js +2 -0
- package/dist/components/number-field/NumberField.d.ts +303 -0
- package/dist/components/number-field/NumberField.js +3 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/index.js +2 -0
- package/dist/components/otp-field/OTPField.d.ts +206 -0
- package/dist/components/otp-field/OTPField.js +3 -0
- package/dist/components/otp-field/index.d.ts +2 -0
- package/dist/components/otp-field/index.js +2 -0
- package/dist/components/popover/Popover.d.ts +394 -0
- package/dist/components/popover/Popover.js +3 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.js +2 -0
- package/dist/components/preview-card/PreviewCard.d.ts +307 -0
- package/dist/components/preview-card/PreviewCard.js +3 -0
- package/dist/components/preview-card/index.d.ts +2 -0
- package/dist/components/preview-card/index.js +2 -0
- package/dist/components/progress/Progress.d.ts +156 -0
- package/dist/components/progress/Progress.js +3 -0
- package/dist/components/progress/ProgressCircle.d.ts +166 -0
- package/dist/components/progress/ProgressCircle.js +3 -0
- package/dist/components/progress/index.d.ts +4 -0
- package/dist/components/progress/index.js +3 -0
- package/dist/components/radio/Radio.d.ts +144 -0
- package/dist/components/radio/Radio.js +3 -0
- package/dist/components/radio/index.d.ts +2 -0
- package/dist/components/radio/index.js +2 -0
- package/dist/components/resizable/Resizable.d.ts +211 -0
- package/dist/components/resizable/Resizable.js +3 -0
- package/dist/components/resizable/index.d.ts +2 -0
- package/dist/components/resizable/index.js +2 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +113 -0
- package/dist/components/scroll-area/ScrollArea.js +3 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.js +2 -0
- package/dist/components/select/Select.d.ts +345 -0
- package/dist/components/select/Select.js +3 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.js +2 -0
- package/dist/components/separator/Separator.d.ts +75 -0
- package/dist/components/separator/Separator.js +3 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/index.js +2 -0
- package/dist/components/skeleton/Skeleton.d.ts +169 -0
- package/dist/components/skeleton/Skeleton.js +3 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +2 -0
- package/dist/components/slider/Slider.d.ts +208 -0
- package/dist/components/slider/Slider.js +3 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/index.js +2 -0
- package/dist/components/spinner/Spinner.d.ts +92 -0
- package/dist/components/spinner/Spinner.js +3 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/switch/Switch.d.ts +80 -0
- package/dist/components/switch/Switch.js +3 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +2 -0
- package/dist/components/tabs/Tabs.d.ts +125 -0
- package/dist/components/tabs/Tabs.js +3 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/textarea/Textarea.d.ts +119 -0
- package/dist/components/textarea/Textarea.js +3 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.js +2 -0
- package/dist/components/toast/Toast.d.ts +517 -0
- package/dist/components/toast/Toast.js +3 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/index.js +2 -0
- package/dist/components/toggle/Toggle.d.ts +171 -0
- package/dist/components/toggle/Toggle.js +3 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/index.js +2 -0
- package/dist/components/toolbar/Toolbar.d.ts +318 -0
- package/dist/components/toolbar/Toolbar.js +3 -0
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/index.js +2 -0
- package/dist/components/tooltip/Tooltip.d.ts +361 -0
- package/dist/components/tooltip/Tooltip.js +3 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +2 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.js +86 -0
- package/dist/styles/Accordion.css +1 -0
- package/dist/styles/Alert.css +1 -0
- package/dist/styles/AspectRatio.css +1 -0
- package/dist/styles/Avatar.css +1 -0
- package/dist/styles/Badge.css +1 -0
- package/dist/styles/Breadcrumb.css +1 -0
- package/dist/styles/Button.css +1 -0
- package/dist/styles/ButtonGroup.css +1 -0
- package/dist/styles/Calendar.css +1 -0
- package/dist/styles/Checkbox.css +1 -0
- package/dist/styles/Collapsible.css +1 -0
- package/dist/styles/ColorPicker.css +1 -0
- package/dist/styles/Combobox.css +1 -0
- package/dist/styles/ContextMenu.css +1 -0
- package/dist/styles/DatePicker.css +1 -0
- package/dist/styles/Dialog.css +1 -0
- package/dist/styles/Drawer.css +1 -0
- package/dist/styles/Field.css +1 -0
- package/dist/styles/Fieldset.css +1 -0
- package/dist/styles/Form.css +1 -0
- package/dist/styles/Input.css +1 -0
- package/dist/styles/InputGroup.css +1 -0
- package/dist/styles/Menu.css +1 -0
- package/dist/styles/Menubar.css +1 -0
- package/dist/styles/NavList.css +1 -0
- package/dist/styles/NavigationMenu.css +1 -0
- package/dist/styles/NumberField.css +1 -0
- package/dist/styles/OTPField.css +1 -0
- package/dist/styles/Popover.css +1 -0
- package/dist/styles/PreviewCard.css +1 -0
- package/dist/styles/Progress.css +1 -0
- package/dist/styles/ProgressCircle.css +1 -0
- package/dist/styles/Radio.css +1 -0
- package/dist/styles/Resizable.css +1 -0
- package/dist/styles/ScrollArea.css +1 -0
- package/dist/styles/Select.css +1 -0
- package/dist/styles/Separator.css +1 -0
- package/dist/styles/Skeleton.css +1 -0
- package/dist/styles/Slider.css +1 -0
- package/dist/styles/Spinner.css +1 -0
- package/dist/styles/Switch.css +1 -0
- package/dist/styles/Tabs.css +1 -0
- package/dist/styles/Textarea.css +1 -0
- package/dist/styles/Toast.css +1 -0
- package/dist/styles/Toggle.css +1 -0
- package/dist/styles/Toolbar.css +1 -0
- package/dist/styles/Tooltip.css +1 -0
- package/dist/styles/a11y.css +119 -0
- package/dist/styles/layers.css +39 -0
- package/dist/styles/motion.css +194 -0
- package/dist/styles/patterns.css +236 -0
- package/dist/styles/properties.css +62 -0
- package/dist/styles/reset.css +11 -0
- package/dist/styles/tailwind.css +281 -0
- package/dist/styles/theme.css +57 -0
- package/dist/styles/tokens.color.css +223 -0
- package/dist/styles/tokens.css +460 -0
- package/dist/tailwind-merge.d.ts +52 -0
- package/dist/tailwind-merge.js +52 -0
- package/docs-data/props.json +8047 -0
- package/docs-data/theming.json +9600 -0
- package/docs-data/tokens.json +4070 -0
- package/package.json +78 -0
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./clsx-By2n9mTe.js";
|
|
3
|
+
import { t } from "./Button-AiyKnx5I.js";
|
|
4
|
+
import { t as n } from "./Field-FLFEO70D.js";
|
|
5
|
+
import { t as r } from "./Form-DVPmW9XV.js";
|
|
6
|
+
import { t as i } from "./Input-BgGWhO2q.js";
|
|
7
|
+
import * as a from "react";
|
|
8
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
import { Dialog as l } from "@base-ui/react/dialog";
|
|
10
|
+
import { AlertDialog as u } from "@base-ui/react/alert-dialog";
|
|
11
|
+
import './styles/Dialog.css';var d = {
|
|
12
|
+
backdrop: "_backdrop_1f1hn_66",
|
|
13
|
+
viewport: "_viewport_1f1hn_114",
|
|
14
|
+
popup: "_popup_1f1hn_154",
|
|
15
|
+
surface: "_surface_1f1hn_383",
|
|
16
|
+
title: "_title_1f1hn_451",
|
|
17
|
+
description: "_description_1f1hn_460",
|
|
18
|
+
footer: "_footer_1f1hn_475",
|
|
19
|
+
trigger: "_trigger_1f1hn_514",
|
|
20
|
+
close: "_close_1f1hn_515"
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/dialog/Dialog.tsx
|
|
24
|
+
function f(e) {
|
|
25
|
+
return /* @__PURE__ */ s(l.Root, { ...e });
|
|
26
|
+
}
|
|
27
|
+
function p(e) {
|
|
28
|
+
return /* @__PURE__ */ s(u.Root, { ...e });
|
|
29
|
+
}
|
|
30
|
+
var m = a.forwardRef(function({ className: t, render: n, ...r }, i) {
|
|
31
|
+
return /* @__PURE__ */ s(l.Trigger, {
|
|
32
|
+
ref: i,
|
|
33
|
+
render: n,
|
|
34
|
+
className: e(n === void 0 && d.trigger, "forte-focus-ring", t),
|
|
35
|
+
"data-forte": "dialog-trigger",
|
|
36
|
+
...r
|
|
37
|
+
});
|
|
38
|
+
}), h = a.forwardRef(function({ className: t, render: n, ...r }, i) {
|
|
39
|
+
return /* @__PURE__ */ s(u.Trigger, {
|
|
40
|
+
ref: i,
|
|
41
|
+
render: n,
|
|
42
|
+
className: e(n === void 0 && d.trigger, "forte-focus-ring", t),
|
|
43
|
+
"data-forte": "dialog-trigger",
|
|
44
|
+
...r
|
|
45
|
+
});
|
|
46
|
+
}), g = a.forwardRef(function({ size: t = "md", keepMounted: n = !1, container: r, backdrop: i = !0, forceBackdrop: a = !1, backdropClassName: o, viewportClassName: u, className: f, children: p, ...m }, h) {
|
|
47
|
+
return /* @__PURE__ */ c(l.Portal, {
|
|
48
|
+
keepMounted: n,
|
|
49
|
+
container: r,
|
|
50
|
+
children: [i ? /* @__PURE__ */ s(l.Backdrop, {
|
|
51
|
+
forceRender: a,
|
|
52
|
+
className: e(d.backdrop, "forte-scrim", o),
|
|
53
|
+
"data-forte": "dialog-backdrop"
|
|
54
|
+
}) : null, /* @__PURE__ */ s(l.Viewport, {
|
|
55
|
+
"data-size": t,
|
|
56
|
+
className: e(d.viewport, u),
|
|
57
|
+
"data-forte": "dialog-viewport",
|
|
58
|
+
children: /* @__PURE__ */ s(l.Popup, {
|
|
59
|
+
ref: h,
|
|
60
|
+
className: e(d.popup, "forte-focus-ring", "forte-hc-surface", f),
|
|
61
|
+
"data-forte": "dialog-popup",
|
|
62
|
+
"data-size": t,
|
|
63
|
+
...m,
|
|
64
|
+
children: p
|
|
65
|
+
})
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
}), _ = a.forwardRef(function({ className: t, ...n }, r) {
|
|
69
|
+
return /* @__PURE__ */ s("div", {
|
|
70
|
+
ref: r,
|
|
71
|
+
className: e(d.surface, "forte-hc-surface", t),
|
|
72
|
+
"data-forte": "dialog-surface",
|
|
73
|
+
...n
|
|
74
|
+
});
|
|
75
|
+
}), v = a.forwardRef(function({ className: t, ...n }, r) {
|
|
76
|
+
return /* @__PURE__ */ s(l.Title, {
|
|
77
|
+
ref: r,
|
|
78
|
+
className: e(d.title, t),
|
|
79
|
+
"data-forte": "dialog-title",
|
|
80
|
+
...n
|
|
81
|
+
});
|
|
82
|
+
}), y = a.forwardRef(function({ className: t, ...n }, r) {
|
|
83
|
+
return /* @__PURE__ */ s(l.Description, {
|
|
84
|
+
ref: r,
|
|
85
|
+
className: e(d.description, t),
|
|
86
|
+
"data-forte": "dialog-description",
|
|
87
|
+
...n
|
|
88
|
+
});
|
|
89
|
+
}), b = a.forwardRef(function({ iconOnly: t = !1, className: n, render: r, ...i }, a) {
|
|
90
|
+
return /* @__PURE__ */ s(l.Close, {
|
|
91
|
+
ref: a,
|
|
92
|
+
render: r,
|
|
93
|
+
className: e(r === void 0 && d.close, "forte-focus-ring", n),
|
|
94
|
+
"data-forte": "dialog-close",
|
|
95
|
+
"data-icon-only": t || void 0,
|
|
96
|
+
...i
|
|
97
|
+
});
|
|
98
|
+
}), x = a.forwardRef(function({ align: t = "end", className: n, ...r }, i) {
|
|
99
|
+
return /* @__PURE__ */ s("div", {
|
|
100
|
+
ref: i,
|
|
101
|
+
className: e(d.footer, n),
|
|
102
|
+
"data-forte": "dialog-footer",
|
|
103
|
+
"data-align": t,
|
|
104
|
+
...r
|
|
105
|
+
});
|
|
106
|
+
}), S = {
|
|
107
|
+
ok: "OK",
|
|
108
|
+
confirm: "Confirm",
|
|
109
|
+
cancel: "Cancel",
|
|
110
|
+
confirmInput: (e) => /* @__PURE__ */ c(o, { children: [
|
|
111
|
+
"Type ",
|
|
112
|
+
/* @__PURE__ */ s("strong", { children: e }),
|
|
113
|
+
" to confirm"
|
|
114
|
+
] })
|
|
115
|
+
}, C = a.createContext(S), w = Object.freeze([]), T = 0;
|
|
116
|
+
function E() {
|
|
117
|
+
let e = w, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
118
|
+
function r() {
|
|
119
|
+
for (let e of t) e();
|
|
120
|
+
}
|
|
121
|
+
function i(t) {
|
|
122
|
+
return e.find((e) => e.id === t);
|
|
123
|
+
}
|
|
124
|
+
function a() {
|
|
125
|
+
for (let t = e.length - 1; t >= 0; --t) {
|
|
126
|
+
let n = e[t];
|
|
127
|
+
if (n != null && n.open) return n;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function o(e, t) {
|
|
131
|
+
n.has(e.id) || (n.add(e.id), e.resolve(t));
|
|
132
|
+
}
|
|
133
|
+
function s(t, n) {
|
|
134
|
+
let a = i(t);
|
|
135
|
+
a == null || a.open === n || (e = e.map((e) => e.id === t ? {
|
|
136
|
+
...e,
|
|
137
|
+
open: n
|
|
138
|
+
} : e), r());
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
subscribe(e) {
|
|
142
|
+
return t.add(e), () => {
|
|
143
|
+
t.delete(e);
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
getSnapshot() {
|
|
147
|
+
return e;
|
|
148
|
+
},
|
|
149
|
+
open({ alert: t, Content: n, payload: c, dismissValue: l }) {
|
|
150
|
+
return new Promise((u) => {
|
|
151
|
+
T += 1;
|
|
152
|
+
let d = `forte-dialog-${T}`, f = {
|
|
153
|
+
id: d,
|
|
154
|
+
open: !0,
|
|
155
|
+
parentId: a()?.id ?? null,
|
|
156
|
+
alert: t,
|
|
157
|
+
Content: n,
|
|
158
|
+
payload: c,
|
|
159
|
+
resolve: u,
|
|
160
|
+
dismissValue: l,
|
|
161
|
+
close: (e) => {
|
|
162
|
+
let t = i(d);
|
|
163
|
+
t != null && o(t, e), s(d, !1);
|
|
164
|
+
},
|
|
165
|
+
dismiss: () => {
|
|
166
|
+
f.close(l);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
e = [...e, f], r();
|
|
170
|
+
});
|
|
171
|
+
},
|
|
172
|
+
remove(t) {
|
|
173
|
+
let a = i(t);
|
|
174
|
+
a != null && (o(a, a.dismissValue), e = e.filter((e) => e.id !== t).map((e) => e.parentId === t ? {
|
|
175
|
+
...e,
|
|
176
|
+
parentId: a.parentId
|
|
177
|
+
} : e), n.delete(t), r());
|
|
178
|
+
},
|
|
179
|
+
closeTop() {
|
|
180
|
+
let e = a();
|
|
181
|
+
e != null && (o(e, e.dismissValue), s(e.id, !1));
|
|
182
|
+
},
|
|
183
|
+
closeAll() {
|
|
184
|
+
let t = e.filter((e) => e.open);
|
|
185
|
+
if (t.length !== 0) {
|
|
186
|
+
for (let e of t) o(e, e.dismissValue);
|
|
187
|
+
e = e.map((e) => e.open ? {
|
|
188
|
+
...e,
|
|
189
|
+
open: !1
|
|
190
|
+
} : e), r();
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
clear() {
|
|
194
|
+
if (e.length === 0) return;
|
|
195
|
+
let t = e;
|
|
196
|
+
e = w, r();
|
|
197
|
+
for (let e of t) o(e, e.dismissValue);
|
|
198
|
+
n.clear();
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function D(e) {
|
|
203
|
+
return typeof e == "object" && !!e && !Array.isArray(e) && !a.isValidElement(e);
|
|
204
|
+
}
|
|
205
|
+
function O(e) {
|
|
206
|
+
return D(e) ? e : { title: e };
|
|
207
|
+
}
|
|
208
|
+
var k = /* @__PURE__ */ new WeakMap();
|
|
209
|
+
function A(e) {
|
|
210
|
+
return {
|
|
211
|
+
alert(t) {
|
|
212
|
+
return e.open({
|
|
213
|
+
alert: !0,
|
|
214
|
+
Content: N,
|
|
215
|
+
payload: O(t),
|
|
216
|
+
dismissValue: void 0
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
confirm(t) {
|
|
220
|
+
return e.open({
|
|
221
|
+
alert: !0,
|
|
222
|
+
Content: P,
|
|
223
|
+
payload: O(t),
|
|
224
|
+
dismissValue: !1
|
|
225
|
+
});
|
|
226
|
+
},
|
|
227
|
+
confirmWithInput(t) {
|
|
228
|
+
return e.open({
|
|
229
|
+
alert: !0,
|
|
230
|
+
Content: F,
|
|
231
|
+
payload: t,
|
|
232
|
+
dismissValue: !1
|
|
233
|
+
});
|
|
234
|
+
},
|
|
235
|
+
show(t, n, r) {
|
|
236
|
+
return e.open({
|
|
237
|
+
alert: r?.alert ?? !1,
|
|
238
|
+
Content: t,
|
|
239
|
+
payload: n,
|
|
240
|
+
dismissValue: r?.dismissValue
|
|
241
|
+
});
|
|
242
|
+
},
|
|
243
|
+
close() {
|
|
244
|
+
e.closeTop();
|
|
245
|
+
},
|
|
246
|
+
closeAll() {
|
|
247
|
+
e.closeAll();
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
function j() {
|
|
252
|
+
let e = E(), t = A(e);
|
|
253
|
+
return k.set(t, e), t;
|
|
254
|
+
}
|
|
255
|
+
function M({ title: e, description: t }) {
|
|
256
|
+
return /* @__PURE__ */ c(o, { children: [e == null ? null : /* @__PURE__ */ s(v, { children: e }), t == null ? null : /* @__PURE__ */ s(y, { children: t })] });
|
|
257
|
+
}
|
|
258
|
+
function N({ payload: e, close: n }) {
|
|
259
|
+
let r = a.useContext(C), { title: i, description: o, size: l = "sm", tone: u = "primary", okLabel: d = r.ok, className: f } = e;
|
|
260
|
+
return /* @__PURE__ */ c(g, {
|
|
261
|
+
size: l,
|
|
262
|
+
className: f,
|
|
263
|
+
children: [/* @__PURE__ */ s(M, {
|
|
264
|
+
title: i,
|
|
265
|
+
description: o
|
|
266
|
+
}), /* @__PURE__ */ s(x, { children: /* @__PURE__ */ s(t, {
|
|
267
|
+
tone: u,
|
|
268
|
+
onClick: () => {
|
|
269
|
+
n();
|
|
270
|
+
},
|
|
271
|
+
children: d
|
|
272
|
+
}) })]
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
function P({ payload: e, close: n }) {
|
|
276
|
+
let r = a.useContext(C), { title: i, description: o, size: l = "sm", tone: u = "primary", confirmLabel: d = r.confirm, cancelLabel: f = r.cancel, align: p = u === "danger" ? "between" : "end", className: m } = e;
|
|
277
|
+
return /* @__PURE__ */ c(g, {
|
|
278
|
+
size: l,
|
|
279
|
+
className: m,
|
|
280
|
+
children: [/* @__PURE__ */ s(M, {
|
|
281
|
+
title: i,
|
|
282
|
+
description: o
|
|
283
|
+
}), /* @__PURE__ */ c(x, {
|
|
284
|
+
align: p,
|
|
285
|
+
children: [/* @__PURE__ */ s(t, {
|
|
286
|
+
variant: "soft",
|
|
287
|
+
tone: "neutral",
|
|
288
|
+
onClick: () => {
|
|
289
|
+
n(!1);
|
|
290
|
+
},
|
|
291
|
+
children: f
|
|
292
|
+
}), /* @__PURE__ */ s(t, {
|
|
293
|
+
tone: u,
|
|
294
|
+
onClick: () => {
|
|
295
|
+
n(!0);
|
|
296
|
+
},
|
|
297
|
+
children: d
|
|
298
|
+
})]
|
|
299
|
+
})]
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
function F({ payload: e, close: o }) {
|
|
303
|
+
let l = a.useContext(C), { title: u, description: d, size: f = "sm", tone: p = "danger", confirmValue: m, inputLabel: h = l.confirmInput(m), placeholder: _ = m, confirmLabel: v = l.confirm, cancelLabel: y = l.cancel, align: b = "between", caseSensitive: S = !0, className: w } = e, [T, E] = a.useState(""), D = T.trim(), O = S ? D === m : D.toLowerCase() === m.toLowerCase();
|
|
304
|
+
return /* @__PURE__ */ c(g, {
|
|
305
|
+
size: f,
|
|
306
|
+
className: w,
|
|
307
|
+
children: [/* @__PURE__ */ s(M, {
|
|
308
|
+
title: u,
|
|
309
|
+
description: d
|
|
310
|
+
}), /* @__PURE__ */ c(r, {
|
|
311
|
+
onFormSubmit: () => {
|
|
312
|
+
o(!0);
|
|
313
|
+
},
|
|
314
|
+
children: [/* @__PURE__ */ c(n.Root, {
|
|
315
|
+
name: "forte-dialog-confirm",
|
|
316
|
+
children: [/* @__PURE__ */ s(n.Label, { children: h }), /* @__PURE__ */ s(i, {
|
|
317
|
+
value: T,
|
|
318
|
+
onValueChange: (e) => E(e),
|
|
319
|
+
placeholder: _,
|
|
320
|
+
autoComplete: "off",
|
|
321
|
+
autoCorrect: "off",
|
|
322
|
+
spellCheck: !1
|
|
323
|
+
})]
|
|
324
|
+
}), /* @__PURE__ */ c(x, {
|
|
325
|
+
align: b,
|
|
326
|
+
children: [/* @__PURE__ */ s(t, {
|
|
327
|
+
variant: "soft",
|
|
328
|
+
tone: "neutral",
|
|
329
|
+
onClick: () => {
|
|
330
|
+
o(!1);
|
|
331
|
+
},
|
|
332
|
+
children: y
|
|
333
|
+
}), /* @__PURE__ */ s(t, {
|
|
334
|
+
type: "submit",
|
|
335
|
+
tone: p,
|
|
336
|
+
disabled: !O,
|
|
337
|
+
children: v
|
|
338
|
+
})]
|
|
339
|
+
})]
|
|
340
|
+
})]
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
function I({ entries: e, parentId: t, store: n }) {
|
|
344
|
+
let r = e.filter((e) => e.parentId === t);
|
|
345
|
+
return r.length === 0 ? null : /* @__PURE__ */ s(o, { children: r.map((t) => /* @__PURE__ */ s(R, {
|
|
346
|
+
entry: t,
|
|
347
|
+
entries: e,
|
|
348
|
+
store: n
|
|
349
|
+
}, t.id)) });
|
|
350
|
+
}
|
|
351
|
+
var L = typeof window > "u" ? a.useEffect : a.useLayoutEffect;
|
|
352
|
+
function R({ entry: e, entries: t, store: n }) {
|
|
353
|
+
let [r, i] = a.useState(!1);
|
|
354
|
+
L(() => {
|
|
355
|
+
i(!0);
|
|
356
|
+
}, []);
|
|
357
|
+
let { Content: l } = e, u = {
|
|
358
|
+
open: e.open && r,
|
|
359
|
+
onOpenChange: (t) => {
|
|
360
|
+
t || e.dismiss();
|
|
361
|
+
},
|
|
362
|
+
onOpenChangeComplete: (t) => {
|
|
363
|
+
t || n.remove(e.id);
|
|
364
|
+
},
|
|
365
|
+
children: /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(l, {
|
|
366
|
+
payload: e.payload,
|
|
367
|
+
close: e.close,
|
|
368
|
+
dismiss: e.dismiss
|
|
369
|
+
}), /* @__PURE__ */ s(I, {
|
|
370
|
+
entries: t,
|
|
371
|
+
parentId: e.id,
|
|
372
|
+
store: n
|
|
373
|
+
})] })
|
|
374
|
+
};
|
|
375
|
+
return e.alert ? /* @__PURE__ */ s(p, { ...u }) : /* @__PURE__ */ s(f, { ...u });
|
|
376
|
+
}
|
|
377
|
+
var z = a.createContext(null);
|
|
378
|
+
function B({ children: e, manager: t, labels: n }) {
|
|
379
|
+
let [r] = a.useState(E), i = r;
|
|
380
|
+
if (t != null) {
|
|
381
|
+
let e = k.get(t);
|
|
382
|
+
if (e == null) throw Error("Dialog.Provider's `manager` prop needs an object from Dialog.createManager().");
|
|
383
|
+
i = e;
|
|
384
|
+
}
|
|
385
|
+
let o = a.useSyncExternalStore(i.subscribe, i.getSnapshot, i.getSnapshot), l = a.useMemo(() => A(i), [i]), u = a.useMemo(() => n == null ? S : {
|
|
386
|
+
...S,
|
|
387
|
+
...n
|
|
388
|
+
}, [n]);
|
|
389
|
+
return a.useEffect(() => () => {
|
|
390
|
+
i.clear();
|
|
391
|
+
}, [i]), /* @__PURE__ */ s(z.Provider, {
|
|
392
|
+
value: l,
|
|
393
|
+
children: /* @__PURE__ */ c(C.Provider, {
|
|
394
|
+
value: u,
|
|
395
|
+
children: [e, /* @__PURE__ */ s(I, {
|
|
396
|
+
entries: o,
|
|
397
|
+
parentId: null,
|
|
398
|
+
store: i
|
|
399
|
+
})]
|
|
400
|
+
})
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
function V() {
|
|
404
|
+
let e = a.useContext(z);
|
|
405
|
+
if (e == null) throw Error("useDialog() must be called under a <Dialog.Provider>. Mount one above this component.");
|
|
406
|
+
return e;
|
|
407
|
+
}
|
|
408
|
+
var H = {
|
|
409
|
+
Root: f,
|
|
410
|
+
Trigger: m,
|
|
411
|
+
Popup: g,
|
|
412
|
+
Surface: _,
|
|
413
|
+
Title: v,
|
|
414
|
+
Description: y,
|
|
415
|
+
Close: b,
|
|
416
|
+
Footer: x,
|
|
417
|
+
Provider: B,
|
|
418
|
+
createHandle: l.createHandle,
|
|
419
|
+
createManager: j
|
|
420
|
+
}, U = {
|
|
421
|
+
Root: p,
|
|
422
|
+
Trigger: h,
|
|
423
|
+
Popup: g,
|
|
424
|
+
Surface: _,
|
|
425
|
+
Title: v,
|
|
426
|
+
Description: y,
|
|
427
|
+
Close: b,
|
|
428
|
+
Footer: x,
|
|
429
|
+
createHandle: u.createHandle
|
|
430
|
+
};
|
|
431
|
+
//#endregion
|
|
432
|
+
export { b as a, g as c, _ as d, v as f, V as h, H as i, B as l, j as m, p as n, y as o, m as p, h as r, x as s, U as t, f as u };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./clsx-By2n9mTe.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import { Drawer as i } from "@base-ui/react/drawer";
|
|
6
|
+
import './styles/Drawer.css';var a = {
|
|
7
|
+
backdrop: "_backdrop_1tu23_13",
|
|
8
|
+
viewport: "_viewport_1tu23_13",
|
|
9
|
+
popup: "_popup_1tu23_221",
|
|
10
|
+
handle: "_handle_1tu23_562",
|
|
11
|
+
content: "_content_1tu23_628",
|
|
12
|
+
title: "_title_1tu23_674",
|
|
13
|
+
description: "_description_1tu23_683",
|
|
14
|
+
footer: "_footer_1tu23_698",
|
|
15
|
+
swipeArea: "_swipeArea_1tu23_733",
|
|
16
|
+
trigger: "_trigger_1tu23_780",
|
|
17
|
+
close: "_close_1tu23_781"
|
|
18
|
+
}, o = {
|
|
19
|
+
top: "up",
|
|
20
|
+
right: "right",
|
|
21
|
+
bottom: "down",
|
|
22
|
+
left: "left"
|
|
23
|
+
}, s = t.createContext({
|
|
24
|
+
side: "right",
|
|
25
|
+
swipe: !0,
|
|
26
|
+
scrimFloor: !1
|
|
27
|
+
});
|
|
28
|
+
function c({ side: e = "right", swipe: r = !0, snapPoints: a, modal: c, ...l }) {
|
|
29
|
+
let u = c !== !1 && a !== void 0 && a.length > 0, d = t.useMemo(() => ({
|
|
30
|
+
side: e,
|
|
31
|
+
swipe: r,
|
|
32
|
+
scrimFloor: u
|
|
33
|
+
}), [
|
|
34
|
+
e,
|
|
35
|
+
r,
|
|
36
|
+
u
|
|
37
|
+
]);
|
|
38
|
+
return /* @__PURE__ */ n(s.Provider, {
|
|
39
|
+
value: d,
|
|
40
|
+
children: /* @__PURE__ */ n(i.Root, {
|
|
41
|
+
swipeDirection: o[e],
|
|
42
|
+
snapPoints: a,
|
|
43
|
+
modal: c,
|
|
44
|
+
...l
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
var l = t.forwardRef(function({ className: t, render: r, ...o }, s) {
|
|
49
|
+
return /* @__PURE__ */ n(i.Trigger, {
|
|
50
|
+
ref: s,
|
|
51
|
+
render: r,
|
|
52
|
+
className: e(r === void 0 && a.trigger, "forte-focus-ring", t),
|
|
53
|
+
"data-forte": "drawer-trigger",
|
|
54
|
+
...o
|
|
55
|
+
});
|
|
56
|
+
}), u = t.forwardRef(function({ size: o = "md", variant: c = "edge", keepMounted: l = !1, container: u, backdrop: d = !0, forceBackdrop: f = !1, backdropClassName: p, viewportClassName: m, className: h, children: g, ..._ }, v) {
|
|
57
|
+
let { side: y, swipe: b, scrimFloor: x } = t.useContext(s);
|
|
58
|
+
return /* @__PURE__ */ r(i.Portal, {
|
|
59
|
+
keepMounted: l,
|
|
60
|
+
container: u,
|
|
61
|
+
children: [d ? /* @__PURE__ */ n(i.Backdrop, {
|
|
62
|
+
forceRender: f,
|
|
63
|
+
"data-scrim-floor": x ? "" : void 0,
|
|
64
|
+
className: e(a.backdrop, "forte-scrim", p),
|
|
65
|
+
"data-forte": "drawer-backdrop"
|
|
66
|
+
}) : null, /* @__PURE__ */ n(i.Viewport, {
|
|
67
|
+
"data-side": y,
|
|
68
|
+
"data-variant": c,
|
|
69
|
+
className: e(a.viewport, m),
|
|
70
|
+
"data-forte": "drawer-viewport",
|
|
71
|
+
children: /* @__PURE__ */ n(i.Popup, {
|
|
72
|
+
ref: v,
|
|
73
|
+
className: e(a.popup, "forte-focus-ring", "forte-hc-surface", h),
|
|
74
|
+
"data-forte": "drawer-popup",
|
|
75
|
+
"data-side": y,
|
|
76
|
+
"data-variant": c,
|
|
77
|
+
"data-size": o,
|
|
78
|
+
"data-base-ui-swipe-ignore": b ? void 0 : "",
|
|
79
|
+
..._,
|
|
80
|
+
children: g
|
|
81
|
+
})
|
|
82
|
+
})]
|
|
83
|
+
});
|
|
84
|
+
}), d = t.forwardRef(function({ className: t, ...r }, i) {
|
|
85
|
+
return /* @__PURE__ */ n("div", {
|
|
86
|
+
ref: i,
|
|
87
|
+
"aria-hidden": "true",
|
|
88
|
+
className: e(a.handle, t),
|
|
89
|
+
"data-forte": "drawer-handle",
|
|
90
|
+
...r
|
|
91
|
+
});
|
|
92
|
+
}), f = t.forwardRef(function({ className: t, ...r }, o) {
|
|
93
|
+
return /* @__PURE__ */ n(i.Content, {
|
|
94
|
+
ref: o,
|
|
95
|
+
className: e(a.content, t),
|
|
96
|
+
"data-forte": "drawer-content",
|
|
97
|
+
...r
|
|
98
|
+
});
|
|
99
|
+
}), p = t.forwardRef(function({ className: t, ...r }, o) {
|
|
100
|
+
return /* @__PURE__ */ n(i.Title, {
|
|
101
|
+
ref: o,
|
|
102
|
+
className: e(a.title, t),
|
|
103
|
+
"data-forte": "drawer-title",
|
|
104
|
+
...r
|
|
105
|
+
});
|
|
106
|
+
}), m = t.forwardRef(function({ className: t, ...r }, o) {
|
|
107
|
+
return /* @__PURE__ */ n(i.Description, {
|
|
108
|
+
ref: o,
|
|
109
|
+
className: e(a.description, t),
|
|
110
|
+
"data-forte": "drawer-description",
|
|
111
|
+
...r
|
|
112
|
+
});
|
|
113
|
+
}), h = t.forwardRef(function({ iconOnly: t = !1, className: r, render: o, ...s }, c) {
|
|
114
|
+
return /* @__PURE__ */ n(i.Close, {
|
|
115
|
+
ref: c,
|
|
116
|
+
render: o,
|
|
117
|
+
className: e(o === void 0 && a.close, "forte-focus-ring", r),
|
|
118
|
+
"data-forte": "drawer-close",
|
|
119
|
+
"data-icon-only": t || void 0,
|
|
120
|
+
...s
|
|
121
|
+
});
|
|
122
|
+
}), g = t.forwardRef(function({ align: t = "end", className: r, ...i }, o) {
|
|
123
|
+
return /* @__PURE__ */ n("div", {
|
|
124
|
+
ref: o,
|
|
125
|
+
className: e(a.footer, r),
|
|
126
|
+
"data-forte": "drawer-footer",
|
|
127
|
+
"data-align": t,
|
|
128
|
+
...i
|
|
129
|
+
});
|
|
130
|
+
}), _ = t.forwardRef(function({ className: r, ...o }, c) {
|
|
131
|
+
let { side: l } = t.useContext(s);
|
|
132
|
+
return /* @__PURE__ */ n(i.SwipeArea, {
|
|
133
|
+
ref: c,
|
|
134
|
+
"data-side": l,
|
|
135
|
+
className: e(a.swipeArea, r),
|
|
136
|
+
"data-forte": "drawer-swipe-area",
|
|
137
|
+
...o
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
function v(e) {
|
|
141
|
+
return /* @__PURE__ */ n(i.VirtualKeyboardProvider, { ...e });
|
|
142
|
+
}
|
|
143
|
+
var y = {
|
|
144
|
+
Root: c,
|
|
145
|
+
Trigger: l,
|
|
146
|
+
Popup: u,
|
|
147
|
+
Handle: d,
|
|
148
|
+
Content: f,
|
|
149
|
+
Title: p,
|
|
150
|
+
Description: m,
|
|
151
|
+
Close: h,
|
|
152
|
+
Footer: g,
|
|
153
|
+
SwipeArea: _,
|
|
154
|
+
VirtualKeyboardProvider: v,
|
|
155
|
+
createHandle: i.createHandle
|
|
156
|
+
};
|
|
157
|
+
//#endregion
|
|
158
|
+
export { g as a, c, l as d, v as f, m as i, _ as l, h as n, d as o, f as r, u as s, y as t, p as u };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./clsx-By2n9mTe.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Field as r } from "@base-ui/react/field";
|
|
6
|
+
import './styles/Field.css';var i = {
|
|
7
|
+
root: "_root_ylsyb_6",
|
|
8
|
+
label: "_label_ylsyb_61",
|
|
9
|
+
description: "_description_ylsyb_113",
|
|
10
|
+
error: "_error_ylsyb_113",
|
|
11
|
+
item: "_item_ylsyb_188"
|
|
12
|
+
}, a = t.forwardRef(function({ className: t, ...a }, o) {
|
|
13
|
+
return /* @__PURE__ */ n(r.Root, {
|
|
14
|
+
ref: o,
|
|
15
|
+
className: e(i.root, t),
|
|
16
|
+
"data-forte": "field",
|
|
17
|
+
...a
|
|
18
|
+
});
|
|
19
|
+
}), o = t.forwardRef(function({ nativeLabel: t = !0, render: a, className: o, ...s }, c) {
|
|
20
|
+
return /* @__PURE__ */ n(r.Label, {
|
|
21
|
+
ref: c,
|
|
22
|
+
nativeLabel: t,
|
|
23
|
+
render: a ?? (t ? void 0 : /* @__PURE__ */ n("div", {})),
|
|
24
|
+
className: e(i.label, o),
|
|
25
|
+
"data-forte": "field-label",
|
|
26
|
+
...s
|
|
27
|
+
});
|
|
28
|
+
}), s = t.forwardRef(function({ className: t, ...a }, o) {
|
|
29
|
+
return /* @__PURE__ */ n(r.Description, {
|
|
30
|
+
ref: o,
|
|
31
|
+
className: e(i.description, t),
|
|
32
|
+
"data-forte": "field-description",
|
|
33
|
+
...a
|
|
34
|
+
});
|
|
35
|
+
}), c = t.forwardRef(function({ className: t, ...a }, o) {
|
|
36
|
+
return /* @__PURE__ */ n(r.Error, {
|
|
37
|
+
ref: o,
|
|
38
|
+
className: e(i.error, t),
|
|
39
|
+
"data-forte": "field-error",
|
|
40
|
+
...a
|
|
41
|
+
});
|
|
42
|
+
}), l = t.forwardRef(function({ className: t, ...a }, o) {
|
|
43
|
+
return /* @__PURE__ */ n(r.Item, {
|
|
44
|
+
ref: o,
|
|
45
|
+
className: e(i.item, t),
|
|
46
|
+
"data-forte": "field-item",
|
|
47
|
+
...a
|
|
48
|
+
});
|
|
49
|
+
}), u = {
|
|
50
|
+
Root: a,
|
|
51
|
+
Label: o,
|
|
52
|
+
Description: s,
|
|
53
|
+
Error: c,
|
|
54
|
+
Item: l,
|
|
55
|
+
Validity: r.Validity
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { o as a, l as i, s as n, a as o, c as r, u as t };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./clsx-By2n9mTe.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Fieldset as r } from "@base-ui/react/fieldset";
|
|
6
|
+
import './styles/Fieldset.css';var i = {
|
|
7
|
+
root: "_root_go61i_5",
|
|
8
|
+
legend: "_legend_go61i_44"
|
|
9
|
+
}, a = t.forwardRef(function({ className: t, ...a }, o) {
|
|
10
|
+
return /* @__PURE__ */ n(r.Root, {
|
|
11
|
+
ref: o,
|
|
12
|
+
className: e(i.root, t),
|
|
13
|
+
"data-forte": "fieldset",
|
|
14
|
+
...a
|
|
15
|
+
});
|
|
16
|
+
}), o = t.forwardRef(function({ className: t, ...a }, o) {
|
|
17
|
+
return /* @__PURE__ */ n(r.Legend, {
|
|
18
|
+
ref: o,
|
|
19
|
+
className: e(i.legend, t),
|
|
20
|
+
"data-forte": "fieldset-legend",
|
|
21
|
+
...a
|
|
22
|
+
});
|
|
23
|
+
}), s = {
|
|
24
|
+
Root: a,
|
|
25
|
+
Legend: o
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { o as n, a as r, s as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./clsx-By2n9mTe.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
import { Form as n } from "@base-ui/react/form";
|
|
6
|
+
import './styles/Form.css';var r = { root: "_root_l1dto_9" };
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/components/form/Form.tsx
|
|
9
|
+
function i({ className: i, ...a }) {
|
|
10
|
+
return /* @__PURE__ */ t(n, {
|
|
11
|
+
className: e(r.root, i),
|
|
12
|
+
"data-forte": "form",
|
|
13
|
+
...a
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { i as t };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./clsx-By2n9mTe.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Input as r } from "@base-ui/react/input";
|
|
6
|
+
import './styles/Input.css';var i = { root: "_root_qgpr4_22" }, a = t.forwardRef(function({ size: t = "md", variant: a = "outline", fullWidth: o = !1, className: s, ...c }, l) {
|
|
7
|
+
return /* @__PURE__ */ n(r, {
|
|
8
|
+
ref: l,
|
|
9
|
+
className: e(i.root, "forte-focus-ring", s),
|
|
10
|
+
"data-forte": "input",
|
|
11
|
+
"data-size": t,
|
|
12
|
+
"data-variant": a,
|
|
13
|
+
"data-full-width": o || void 0,
|
|
14
|
+
...c
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { a as t };
|