@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,51 @@
|
|
|
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/Textarea.css';var i = { root: "_root_wgu77_30" }, a = typeof document < "u" ? t.useLayoutEffect : t.useEffect;
|
|
7
|
+
function o(e) {
|
|
8
|
+
let n = t.useRef(null), r = t.useRef(() => {});
|
|
9
|
+
return a(() => {
|
|
10
|
+
let t = n.current;
|
|
11
|
+
if (!t || !e || CSS.supports?.("field-sizing", "content")) return;
|
|
12
|
+
let i = () => {
|
|
13
|
+
let e = t.offsetHeight - t.clientHeight;
|
|
14
|
+
t.style.blockSize = "auto", t.style.blockSize = `${t.scrollHeight + e}px`;
|
|
15
|
+
};
|
|
16
|
+
r.current = i, i(), t.addEventListener("input", i);
|
|
17
|
+
let a = t.clientWidth, o = new ResizeObserver(() => {
|
|
18
|
+
t.clientWidth !== a && (a = t.clientWidth, i());
|
|
19
|
+
});
|
|
20
|
+
return o.observe(t), () => {
|
|
21
|
+
r.current = () => {}, t.removeEventListener("input", i), o.disconnect(), t.style.blockSize = "";
|
|
22
|
+
};
|
|
23
|
+
}, [e]), a(() => {
|
|
24
|
+
r.current();
|
|
25
|
+
}), n;
|
|
26
|
+
}
|
|
27
|
+
var s = t.forwardRef(function({ size: a = "md", variant: s = "outline", rows: c = 3, maxRows: l, autoResize: u = !1, resize: d = "vertical", fullWidth: f = !1, render: p, className: m, style: h, ...g }, _) {
|
|
28
|
+
let v = o(u), y = {
|
|
29
|
+
ref: t.useCallback((e) => {
|
|
30
|
+
v.current = e, typeof _ == "function" ? _(e) : _ && (_.current = e);
|
|
31
|
+
}, [_, v]),
|
|
32
|
+
render: p ?? /* @__PURE__ */ n("textarea", {}),
|
|
33
|
+
className: e(i.root, "forte-focus-ring", m),
|
|
34
|
+
"data-forte": "textarea",
|
|
35
|
+
"data-size": a,
|
|
36
|
+
"data-variant": s,
|
|
37
|
+
"data-resize": u ? "none" : d,
|
|
38
|
+
"data-auto-resize": u || void 0,
|
|
39
|
+
"data-full-width": f || void 0,
|
|
40
|
+
rows: c,
|
|
41
|
+
style: {
|
|
42
|
+
"--forte-textarea-rows": String(c),
|
|
43
|
+
...l == null ? null : { "--forte-textarea-max-rows": String(l) },
|
|
44
|
+
...h
|
|
45
|
+
},
|
|
46
|
+
...g
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ n(r.Control, { ...y });
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
export { o as n, s as t };
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./clsx-By2n9mTe.js";
|
|
3
|
+
import { t } from "./Spinner-BF0uD4hR.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { Toast as o } from "@base-ui/react/toast";
|
|
7
|
+
import './styles/Toast.css';var s = {
|
|
8
|
+
viewport: "_viewport_1j9wt_84",
|
|
9
|
+
root: "_root_1j9wt_49",
|
|
10
|
+
content: "_content_1j9wt_428",
|
|
11
|
+
body: "_body_1j9wt_450",
|
|
12
|
+
title: "_title_1j9wt_458",
|
|
13
|
+
description: "_description_1j9wt_466",
|
|
14
|
+
icon: "_icon_1j9wt_481",
|
|
15
|
+
glyph: "_glyph_1j9wt_490",
|
|
16
|
+
action: "_action_1j9wt_501",
|
|
17
|
+
close: "_close_1j9wt_552"
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/components/toast/Toast.tsx
|
|
21
|
+
function c(e) {
|
|
22
|
+
return typeof e == "object" && !!e && !Array.isArray(e) && !n.isValidElement(e);
|
|
23
|
+
}
|
|
24
|
+
function l(e, t) {
|
|
25
|
+
let n = c(e) ? e : { title: e };
|
|
26
|
+
return t ? {
|
|
27
|
+
...n,
|
|
28
|
+
...t
|
|
29
|
+
} : n;
|
|
30
|
+
}
|
|
31
|
+
function u(e) {
|
|
32
|
+
let { action: t, icon: n, dismissible: r, data: i, ...a } = e, o = n !== void 0 || r !== void 0 ? {
|
|
33
|
+
...i,
|
|
34
|
+
...n === void 0 ? null : { icon: n },
|
|
35
|
+
...r === void 0 ? null : { dismissible: r }
|
|
36
|
+
} : i;
|
|
37
|
+
return {
|
|
38
|
+
...a,
|
|
39
|
+
...t ? { actionProps: d(t) } : null,
|
|
40
|
+
...o ? { data: o } : null
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function d(e) {
|
|
44
|
+
let { label: t, ...n } = e;
|
|
45
|
+
return {
|
|
46
|
+
...n,
|
|
47
|
+
children: t
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function f(e) {
|
|
51
|
+
function t(t, n, r) {
|
|
52
|
+
e.update(t, u(l(n, r)));
|
|
53
|
+
}
|
|
54
|
+
function n(n) {
|
|
55
|
+
return {
|
|
56
|
+
id: n,
|
|
57
|
+
close: () => e.close(n),
|
|
58
|
+
update: (e, r) => t(n, e, r)
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function r(t, r) {
|
|
62
|
+
return n(e.add(u(l(t, r))));
|
|
63
|
+
}
|
|
64
|
+
function i(e) {
|
|
65
|
+
return (t, n) => r(t, {
|
|
66
|
+
...n,
|
|
67
|
+
type: e
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
show: r,
|
|
72
|
+
success: i("success"),
|
|
73
|
+
error: i("error"),
|
|
74
|
+
warning: i("warning"),
|
|
75
|
+
info: i("info"),
|
|
76
|
+
loading: i("loading"),
|
|
77
|
+
update: t,
|
|
78
|
+
close: e.close,
|
|
79
|
+
promise(t, n) {
|
|
80
|
+
return e.promise(t, {
|
|
81
|
+
loading: u(l(n.loading)),
|
|
82
|
+
success: (e) => u(l(p(n.success, e))),
|
|
83
|
+
error: (e) => u(l(p(n.error, e)))
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function p(e, t) {
|
|
89
|
+
return typeof e == "function" ? e(t) : e;
|
|
90
|
+
}
|
|
91
|
+
function m() {
|
|
92
|
+
let e = o.useToastManager(), t = n.useMemo(() => f({
|
|
93
|
+
add: e.add,
|
|
94
|
+
close: e.close,
|
|
95
|
+
update: e.update,
|
|
96
|
+
promise: e.promise
|
|
97
|
+
}), [
|
|
98
|
+
e.add,
|
|
99
|
+
e.close,
|
|
100
|
+
e.update,
|
|
101
|
+
e.promise
|
|
102
|
+
]);
|
|
103
|
+
return n.useMemo(() => ({
|
|
104
|
+
...t,
|
|
105
|
+
toasts: e.toasts
|
|
106
|
+
}), [t, e.toasts]);
|
|
107
|
+
}
|
|
108
|
+
function h() {
|
|
109
|
+
let e = o.createToastManager();
|
|
110
|
+
return {
|
|
111
|
+
...f(e),
|
|
112
|
+
base: e
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
var g = n.createContext(void 0), _ = n.createContext(null);
|
|
116
|
+
function v(e) {
|
|
117
|
+
let t = n.useContext(_);
|
|
118
|
+
if (t == null) throw Error(`forte-ui: <Toast.${e}> must be rendered inside <Toast.Item>.`);
|
|
119
|
+
return t;
|
|
120
|
+
}
|
|
121
|
+
function y(e) {
|
|
122
|
+
return [
|
|
123
|
+
e.startsWith("top") ? "up" : "down",
|
|
124
|
+
"left",
|
|
125
|
+
"right"
|
|
126
|
+
];
|
|
127
|
+
}
|
|
128
|
+
function b(e) {
|
|
129
|
+
let { children: t, ...n } = e;
|
|
130
|
+
return /* @__PURE__ */ i("svg", {
|
|
131
|
+
viewBox: "0 0 16 16",
|
|
132
|
+
fill: "none",
|
|
133
|
+
stroke: "currentColor",
|
|
134
|
+
strokeWidth: "1.6",
|
|
135
|
+
strokeLinecap: "round",
|
|
136
|
+
strokeLinejoin: "round",
|
|
137
|
+
"aria-hidden": "true",
|
|
138
|
+
focusable: "false",
|
|
139
|
+
...n,
|
|
140
|
+
children: t
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
var x = {
|
|
144
|
+
success: /* @__PURE__ */ a(b, {
|
|
145
|
+
className: s.glyph,
|
|
146
|
+
children: [/* @__PURE__ */ i("circle", {
|
|
147
|
+
cx: "8",
|
|
148
|
+
cy: "8",
|
|
149
|
+
r: "6.4"
|
|
150
|
+
}), /* @__PURE__ */ i("path", { d: "m5.2 8.2 2 2 3.6-4.4" })]
|
|
151
|
+
}),
|
|
152
|
+
error: /* @__PURE__ */ a(b, {
|
|
153
|
+
className: s.glyph,
|
|
154
|
+
children: [/* @__PURE__ */ i("circle", {
|
|
155
|
+
cx: "8",
|
|
156
|
+
cy: "8",
|
|
157
|
+
r: "6.4"
|
|
158
|
+
}), /* @__PURE__ */ i("path", { d: "m5.8 5.8 4.4 4.4M10.2 5.8l-4.4 4.4" })]
|
|
159
|
+
}),
|
|
160
|
+
warning: /* @__PURE__ */ a(b, {
|
|
161
|
+
className: s.glyph,
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ i("path", { d: "M8 2.2 1.6 13.4h12.8L8 2.2Z" }),
|
|
164
|
+
/* @__PURE__ */ i("path", { d: "M8 6.4v3.1" }),
|
|
165
|
+
/* @__PURE__ */ i("path", { d: "M8 11.4h.01" })
|
|
166
|
+
]
|
|
167
|
+
}),
|
|
168
|
+
info: /* @__PURE__ */ a(b, {
|
|
169
|
+
className: s.glyph,
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ i("circle", {
|
|
172
|
+
cx: "8",
|
|
173
|
+
cy: "8",
|
|
174
|
+
r: "6.4"
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ i("path", { d: "M8 7.4v3.6" }),
|
|
177
|
+
/* @__PURE__ */ i("path", { d: "M8 5h.01" })
|
|
178
|
+
]
|
|
179
|
+
})
|
|
180
|
+
};
|
|
181
|
+
function S(e) {
|
|
182
|
+
return /* @__PURE__ */ i(T, { toast: e });
|
|
183
|
+
}
|
|
184
|
+
var C = n.forwardRef(function({ position: t = "bottom-end", container: r, swipeDirection: a, renderToast: c = S, className: l, ...u }, d) {
|
|
185
|
+
let { toasts: f } = o.useToastManager(), p = n.useMemo(() => a ?? y(t), [a, t]);
|
|
186
|
+
return /* @__PURE__ */ i(g.Provider, {
|
|
187
|
+
value: p,
|
|
188
|
+
children: /* @__PURE__ */ i(o.Portal, {
|
|
189
|
+
container: r,
|
|
190
|
+
children: /* @__PURE__ */ i(o.Viewport, {
|
|
191
|
+
ref: d,
|
|
192
|
+
className: e(s.viewport, l),
|
|
193
|
+
"data-forte": "toast-viewport",
|
|
194
|
+
"data-position": t,
|
|
195
|
+
"data-contained": r != null || void 0,
|
|
196
|
+
...u,
|
|
197
|
+
children: f.map((e) => /* @__PURE__ */ i(n.Fragment, { children: c(e) }, e.id))
|
|
198
|
+
})
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
function w({ children: e, timeout: t, limit: n, toastManager: r, viewport: s = !0, ...c }) {
|
|
203
|
+
return /* @__PURE__ */ a(o.Provider, {
|
|
204
|
+
timeout: t,
|
|
205
|
+
limit: n,
|
|
206
|
+
toastManager: r,
|
|
207
|
+
children: [e, s ? /* @__PURE__ */ i(C, { ...c }) : null]
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
var T = n.forwardRef(function({ toast: t, swipeDirection: c, className: l, children: u, ...d }, f) {
|
|
211
|
+
let p = n.useContext(g), m = t.data?.icon, h = t.data?.dismissible ?? !0;
|
|
212
|
+
return /* @__PURE__ */ i(_.Provider, {
|
|
213
|
+
value: t,
|
|
214
|
+
children: /* @__PURE__ */ i(o.Root, {
|
|
215
|
+
ref: f,
|
|
216
|
+
toast: t,
|
|
217
|
+
swipeDirection: c ?? p,
|
|
218
|
+
className: e(s.root, "forte-focus-ring", "forte-hc-surface", l),
|
|
219
|
+
"data-forte": "toast",
|
|
220
|
+
...d,
|
|
221
|
+
children: /* @__PURE__ */ i(o.Content, {
|
|
222
|
+
className: s.content,
|
|
223
|
+
"data-forte": "toast-content",
|
|
224
|
+
children: u ?? /* @__PURE__ */ a(r, { children: [
|
|
225
|
+
m === !1 ? null : /* @__PURE__ */ i(E, {}),
|
|
226
|
+
/* @__PURE__ */ a("div", {
|
|
227
|
+
className: s.body,
|
|
228
|
+
"data-forte": "toast-body",
|
|
229
|
+
children: [/* @__PURE__ */ i(D, {}), /* @__PURE__ */ i(O, {})]
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ i(k, {}),
|
|
232
|
+
h ? /* @__PURE__ */ i(A, {}) : null
|
|
233
|
+
] })
|
|
234
|
+
})
|
|
235
|
+
})
|
|
236
|
+
});
|
|
237
|
+
}), E = n.forwardRef(function({ className: n, children: r, ...a }, o) {
|
|
238
|
+
let c = v("Icon"), l = c.data?.icon, u = r ?? (l !== void 0 && l !== !1 ? l : c.type === "loading" ? /* @__PURE__ */ i(t, {
|
|
239
|
+
size: "sm",
|
|
240
|
+
tone: "current",
|
|
241
|
+
decorative: !0
|
|
242
|
+
}) : c.type ? x[c.type] : null);
|
|
243
|
+
return u == null ? null : /* @__PURE__ */ i("span", {
|
|
244
|
+
ref: o,
|
|
245
|
+
className: e(s.icon, n),
|
|
246
|
+
"data-forte": "toast-icon",
|
|
247
|
+
...a,
|
|
248
|
+
children: u
|
|
249
|
+
});
|
|
250
|
+
}), D = n.forwardRef(function({ className: t, ...n }, r) {
|
|
251
|
+
return /* @__PURE__ */ i(o.Title, {
|
|
252
|
+
ref: r,
|
|
253
|
+
className: e(s.title, t),
|
|
254
|
+
"data-forte": "toast-title",
|
|
255
|
+
...n
|
|
256
|
+
});
|
|
257
|
+
}), O = n.forwardRef(function({ className: t, ...n }, r) {
|
|
258
|
+
return /* @__PURE__ */ i(o.Description, {
|
|
259
|
+
ref: r,
|
|
260
|
+
className: e(s.description, t),
|
|
261
|
+
"data-forte": "toast-description",
|
|
262
|
+
...n
|
|
263
|
+
});
|
|
264
|
+
}), k = n.forwardRef(function({ className: t, render: n, ...r }, a) {
|
|
265
|
+
return /* @__PURE__ */ i(o.Action, {
|
|
266
|
+
ref: a,
|
|
267
|
+
render: n,
|
|
268
|
+
className: e(n === void 0 && s.action, "forte-focus-ring", t),
|
|
269
|
+
"data-forte": "toast-action",
|
|
270
|
+
...r
|
|
271
|
+
});
|
|
272
|
+
}), A = n.forwardRef(function({ className: t, render: n, children: r, ...a }, c) {
|
|
273
|
+
return /* @__PURE__ */ i(o.Close, {
|
|
274
|
+
ref: c,
|
|
275
|
+
render: n,
|
|
276
|
+
className: e(n === void 0 && s.close, "forte-focus-ring", t),
|
|
277
|
+
"data-forte": "toast-close",
|
|
278
|
+
"aria-label": "Close",
|
|
279
|
+
...a,
|
|
280
|
+
children: r ?? /* @__PURE__ */ i("svg", {
|
|
281
|
+
className: s.glyph,
|
|
282
|
+
viewBox: "0 0 16 16",
|
|
283
|
+
fill: "none",
|
|
284
|
+
stroke: "currentColor",
|
|
285
|
+
strokeWidth: "1.6",
|
|
286
|
+
strokeLinecap: "round",
|
|
287
|
+
"aria-hidden": "true",
|
|
288
|
+
focusable: "false",
|
|
289
|
+
children: /* @__PURE__ */ i("path", { d: "m4.5 4.5 7 7M11.5 4.5l-7 7" })
|
|
290
|
+
})
|
|
291
|
+
});
|
|
292
|
+
}), j = {
|
|
293
|
+
Provider: w,
|
|
294
|
+
Viewport: C,
|
|
295
|
+
Item: T,
|
|
296
|
+
Icon: E,
|
|
297
|
+
Title: D,
|
|
298
|
+
Description: O,
|
|
299
|
+
Action: k,
|
|
300
|
+
Close: A,
|
|
301
|
+
createManager: h
|
|
302
|
+
};
|
|
303
|
+
//#endregion
|
|
304
|
+
export { E as a, D as c, m as d, O as i, C as l, k as n, T as o, A as r, w as s, j as t, h as u };
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { Toggle as r } from "@base-ui/react/toggle";
|
|
6
|
+
import { ToggleGroup as i } from "@base-ui/react/toggle-group";
|
|
7
|
+
import './styles/Toggle.css';var a = {
|
|
8
|
+
root: "_root_p9w1c_24",
|
|
9
|
+
group: "_group_p9w1c_279"
|
|
10
|
+
}, o = t.createContext(null);
|
|
11
|
+
function s({ variant: i, tone: s, size: c, iconOnly: l = !1, className: u, ...d }) {
|
|
12
|
+
let f = t.useContext(o);
|
|
13
|
+
return /* @__PURE__ */ n(r, {
|
|
14
|
+
className: e(a.root, "forte-focus-ring", u),
|
|
15
|
+
"data-forte": "toggle",
|
|
16
|
+
"data-variant": i ?? f?.variant ?? "soft",
|
|
17
|
+
"data-tone": s ?? f?.tone ?? "primary",
|
|
18
|
+
"data-size": c ?? f?.size ?? "md",
|
|
19
|
+
"data-icon-only": l || void 0,
|
|
20
|
+
...d
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function c({ variant: r, tone: s, size: c, segmented: l = !1, fullWidth: u = !1, className: d, ...f }) {
|
|
24
|
+
let p = t.useMemo(() => ({
|
|
25
|
+
variant: r,
|
|
26
|
+
tone: s,
|
|
27
|
+
size: c
|
|
28
|
+
}), [
|
|
29
|
+
r,
|
|
30
|
+
s,
|
|
31
|
+
c
|
|
32
|
+
]);
|
|
33
|
+
return /* @__PURE__ */ n(o.Provider, {
|
|
34
|
+
value: p,
|
|
35
|
+
children: /* @__PURE__ */ n(i, {
|
|
36
|
+
className: e(a.group, d),
|
|
37
|
+
"data-forte": "toggle-group",
|
|
38
|
+
"data-segmented": l || void 0,
|
|
39
|
+
"data-full-width": u || void 0,
|
|
40
|
+
...f
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { c as n, s as t };
|
|
@@ -0,0 +1,88 @@
|
|
|
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 "./Input-BgGWhO2q.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
import { Toolbar as a } from "@base-ui/react/toolbar";
|
|
8
|
+
import './styles/Toolbar.css';var o = {
|
|
9
|
+
root: "_root_1v39b_28",
|
|
10
|
+
group: "_group_1v39b_140",
|
|
11
|
+
separator: "_separator_1v39b_179",
|
|
12
|
+
link: "_link_1v39b_245"
|
|
13
|
+
}, s = r.createContext(void 0), c = r.forwardRef(function({ variant: t = "panel", size: n = "md", orientation: r = "horizontal", wrap: c = !1, className: l, ...u }, d) {
|
|
14
|
+
return /* @__PURE__ */ i(s.Provider, {
|
|
15
|
+
value: n,
|
|
16
|
+
children: /* @__PURE__ */ i(a.Root, {
|
|
17
|
+
ref: d,
|
|
18
|
+
orientation: r,
|
|
19
|
+
className: e(o.root, l),
|
|
20
|
+
"data-forte": "toolbar",
|
|
21
|
+
"data-variant": t,
|
|
22
|
+
"data-size": n,
|
|
23
|
+
"data-wrap": c || void 0,
|
|
24
|
+
...u
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
}), l = r.forwardRef(function({ className: t, ...n }, r) {
|
|
28
|
+
return /* @__PURE__ */ i(a.Group, {
|
|
29
|
+
ref: r,
|
|
30
|
+
className: e(o.group, t),
|
|
31
|
+
"data-forte": "toolbar-group",
|
|
32
|
+
...n
|
|
33
|
+
});
|
|
34
|
+
}), u = r.forwardRef(function({ variant: e = "ghost", tone: n = "neutral", size: o, iconOnly: c = !1, loading: l = !1, loadingLabel: u, focusableWhenDisabled: d = !0, render: f, className: p, ...m }, h) {
|
|
35
|
+
let g = r.useContext(s);
|
|
36
|
+
return /* @__PURE__ */ i(a.Button, {
|
|
37
|
+
ref: h,
|
|
38
|
+
className: p,
|
|
39
|
+
focusableWhenDisabled: d,
|
|
40
|
+
render: f ?? /* @__PURE__ */ i(t, {
|
|
41
|
+
variant: e,
|
|
42
|
+
tone: n,
|
|
43
|
+
size: o ?? g ?? "md",
|
|
44
|
+
iconOnly: c,
|
|
45
|
+
loading: l,
|
|
46
|
+
loadingLabel: u,
|
|
47
|
+
focusableWhenDisabled: d
|
|
48
|
+
}),
|
|
49
|
+
...m
|
|
50
|
+
});
|
|
51
|
+
}), d = r.forwardRef(function({ size: t, className: n, ...c }, l) {
|
|
52
|
+
let u = r.useContext(s);
|
|
53
|
+
return /* @__PURE__ */ i(a.Link, {
|
|
54
|
+
ref: l,
|
|
55
|
+
className: e(o.link, "forte-focus-ring", "forte-link", n),
|
|
56
|
+
"data-forte": "toolbar-link",
|
|
57
|
+
"data-size": t ?? u ?? "md",
|
|
58
|
+
...c
|
|
59
|
+
});
|
|
60
|
+
}), f = r.forwardRef(function({ size: e, variant: t = "outline", fullWidth: o = !1, render: c, className: l, ...u }, d) {
|
|
61
|
+
let f = r.useContext(s);
|
|
62
|
+
return /* @__PURE__ */ i(a.Input, {
|
|
63
|
+
ref: d,
|
|
64
|
+
className: l,
|
|
65
|
+
render: c ?? /* @__PURE__ */ i(n, {
|
|
66
|
+
size: e ?? f ?? "md",
|
|
67
|
+
variant: t,
|
|
68
|
+
fullWidth: o
|
|
69
|
+
}),
|
|
70
|
+
...u
|
|
71
|
+
});
|
|
72
|
+
}), p = r.forwardRef(function({ className: t, ...n }, r) {
|
|
73
|
+
return /* @__PURE__ */ i(a.Separator, {
|
|
74
|
+
ref: r,
|
|
75
|
+
className: e(o.separator, t),
|
|
76
|
+
"data-forte": "toolbar-separator",
|
|
77
|
+
...n
|
|
78
|
+
});
|
|
79
|
+
}), m = {
|
|
80
|
+
Root: c,
|
|
81
|
+
Group: l,
|
|
82
|
+
Button: u,
|
|
83
|
+
Link: d,
|
|
84
|
+
Input: f,
|
|
85
|
+
Separator: p
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { d as a, f as i, u as n, c as o, l as r, p as s, m as t };
|
|
@@ -0,0 +1,101 @@
|
|
|
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 { Tooltip as i } from "@base-ui/react/tooltip";
|
|
6
|
+
import './styles/Tooltip.css';var a = {
|
|
7
|
+
positioner: "_positioner_1k2q4_55",
|
|
8
|
+
popup: "_popup_1k2q4_65",
|
|
9
|
+
arrow: "_arrow_1k2q4_94",
|
|
10
|
+
shortcut: "_shortcut_1k2q4_101",
|
|
11
|
+
arrowSvg: "_arrowSvg_1k2q4_335",
|
|
12
|
+
arrowFill: "_arrowFill_1k2q4_342",
|
|
13
|
+
arrowBorder: "_arrowBorder_1k2q4_348"
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/tooltip/Tooltip.tsx
|
|
17
|
+
function o(e) {
|
|
18
|
+
return /* @__PURE__ */ n(i.Provider, { ...e });
|
|
19
|
+
}
|
|
20
|
+
function s(e) {
|
|
21
|
+
return /* @__PURE__ */ n(i.Root, { ...e });
|
|
22
|
+
}
|
|
23
|
+
function c({ className: t, ...r }) {
|
|
24
|
+
return /* @__PURE__ */ n(i.Trigger, {
|
|
25
|
+
className: e(a.trigger, "forte-focus-ring", t),
|
|
26
|
+
"data-forte": "tooltip-trigger",
|
|
27
|
+
...r
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
var l = t.forwardRef(function({ side: t = "top", align: r = "center", sideOffset: o = 8, alignOffset: s, arrowPadding: c, anchor: l, collisionBoundary: u, collisionPadding: d, collisionAvoidance: f, sticky: p, positionMethod: m, disableAnchorTracking: h, keepMounted: g, container: _, positionerClassName: v, className: y, children: b, ...x }, S) {
|
|
31
|
+
return /* @__PURE__ */ n(i.Portal, {
|
|
32
|
+
keepMounted: g,
|
|
33
|
+
container: _,
|
|
34
|
+
children: /* @__PURE__ */ n(i.Positioner, {
|
|
35
|
+
className: e(a.positioner, v),
|
|
36
|
+
"data-forte": "tooltip-positioner",
|
|
37
|
+
side: t,
|
|
38
|
+
align: r,
|
|
39
|
+
sideOffset: o,
|
|
40
|
+
alignOffset: s,
|
|
41
|
+
arrowPadding: c,
|
|
42
|
+
anchor: l,
|
|
43
|
+
collisionBoundary: u,
|
|
44
|
+
collisionPadding: d,
|
|
45
|
+
collisionAvoidance: f,
|
|
46
|
+
sticky: p,
|
|
47
|
+
positionMethod: m,
|
|
48
|
+
disableAnchorTracking: h,
|
|
49
|
+
children: /* @__PURE__ */ n(i.Popup, {
|
|
50
|
+
ref: S,
|
|
51
|
+
className: e(a.popup, "forte-hc-surface", y),
|
|
52
|
+
"data-forte": "tooltip-popup",
|
|
53
|
+
...x,
|
|
54
|
+
children: b
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
}), u = t.forwardRef(function({ className: t, children: r, ...o }, s) {
|
|
59
|
+
return /* @__PURE__ */ n(i.Arrow, {
|
|
60
|
+
ref: s,
|
|
61
|
+
className: e(a.arrow, t),
|
|
62
|
+
"data-forte": "tooltip-arrow",
|
|
63
|
+
...o,
|
|
64
|
+
children: r ?? /* @__PURE__ */ n(d, {})
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
function d() {
|
|
68
|
+
return /* @__PURE__ */ r("svg", {
|
|
69
|
+
className: a.arrowSvg,
|
|
70
|
+
"data-forte": "tooltip-arrow-svg",
|
|
71
|
+
viewBox: "0 0 20 10",
|
|
72
|
+
preserveAspectRatio: "none",
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
focusable: "false",
|
|
75
|
+
children: [/* @__PURE__ */ n("path", {
|
|
76
|
+
className: a.arrowBorder,
|
|
77
|
+
d: "M0 10 L10 0 L20 10 Z"
|
|
78
|
+
}), /* @__PURE__ */ n("path", {
|
|
79
|
+
className: a.arrowFill,
|
|
80
|
+
d: "M2.12 10 L10 2.12 L17.88 10 Z"
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
var f = {
|
|
85
|
+
Provider: o,
|
|
86
|
+
Root: s,
|
|
87
|
+
Trigger: c,
|
|
88
|
+
Popup: l,
|
|
89
|
+
Arrow: u,
|
|
90
|
+
Shortcut: t.forwardRef(function({ className: t, ...r }, i) {
|
|
91
|
+
return /* @__PURE__ */ n("span", {
|
|
92
|
+
ref: i,
|
|
93
|
+
className: e(a.shortcut, t),
|
|
94
|
+
"data-forte": "tooltip-shortcut",
|
|
95
|
+
...r
|
|
96
|
+
});
|
|
97
|
+
}),
|
|
98
|
+
createHandle: i.createHandle
|
|
99
|
+
};
|
|
100
|
+
//#endregion
|
|
101
|
+
export { f as t };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
2
|
+
function e(t) {
|
|
3
|
+
var n, r, i = "";
|
|
4
|
+
if (typeof t == "string" || typeof t == "number") i += t;
|
|
5
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
6
|
+
var a = t.length;
|
|
7
|
+
for (n = 0; n < a; n++) t[n] && (r = e(t[n])) && (i && (i += " "), i += r);
|
|
8
|
+
} else for (r in t) t[r] && (i && (i += " "), i += r);
|
|
9
|
+
return i;
|
|
10
|
+
}
|
|
11
|
+
function t() {
|
|
12
|
+
for (var t, n, r = 0, i = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (n = e(t)) && (i && (i += " "), i += n);
|
|
13
|
+
return i;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t };
|
package/dist/cn.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import { ConfigExtension } from 'tailwind-merge';
|
|
3
|
+
/**
|
|
4
|
+
* Build a `cn` that knows the bridge's scales plus your own additions.
|
|
5
|
+
* Accepts the same `{ extend, override }` shape as tailwind-merge itself.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createCn(extension?: ConfigExtension<string, string>): (...inputs: ClassValue[]) => string;
|
|
8
|
+
export declare const cn: (...inputs: ClassValue[]) => string;
|
package/dist/cn.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { tailwindMergeConfig as e } from "./tailwind-merge.js";
|
|
2
|
+
import { t } from "./clsx-By2n9mTe.js";
|
|
3
|
+
import { extendTailwindMerge as n, mergeConfigs as r } from "tailwind-merge";
|
|
4
|
+
//#region src/cn.ts
|
|
5
|
+
function i(i) {
|
|
6
|
+
let a = i ? n(e, (e) => r(e, i)) : n(e);
|
|
7
|
+
return (...e) => a(t(e));
|
|
8
|
+
}
|
|
9
|
+
var a = i();
|
|
10
|
+
//#endregion
|
|
11
|
+
export { a as cn, i as createCn };
|