@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,302 @@
|
|
|
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 { Combobox as i } from "@base-ui/react/combobox";
|
|
6
|
+
import './styles/Combobox.css';var a = {
|
|
7
|
+
label: "_label_1hrrd_48",
|
|
8
|
+
inputGroup: "_inputGroup_1hrrd_20",
|
|
9
|
+
trigger: "_trigger_1hrrd_19",
|
|
10
|
+
clear: "_clear_1hrrd_20",
|
|
11
|
+
chip: "_chip_1hrrd_133",
|
|
12
|
+
input: "_input_1hrrd_13",
|
|
13
|
+
icon: "_icon_1hrrd_505",
|
|
14
|
+
caret: "_caret_1hrrd_525",
|
|
15
|
+
chips: "_chips_1hrrd_270",
|
|
16
|
+
chipRemove: "_chipRemove_1hrrd_133",
|
|
17
|
+
backdrop: "_backdrop_1hrrd_717",
|
|
18
|
+
positioner: "_positioner_1hrrd_728",
|
|
19
|
+
popup: "_popup_1hrrd_16",
|
|
20
|
+
list: "_list_1hrrd_938",
|
|
21
|
+
empty: "_empty_1hrrd_964",
|
|
22
|
+
status: "_status_1hrrd_965",
|
|
23
|
+
item: "_item_1hrrd_987",
|
|
24
|
+
itemIndicator: "_itemIndicator_1hrrd_1039",
|
|
25
|
+
itemText: "_itemText_1hrrd_1057",
|
|
26
|
+
group: "_group_1hrrd_1067",
|
|
27
|
+
groupLabel: "_groupLabel_1hrrd_1071",
|
|
28
|
+
separator: "_separator_1hrrd_1128",
|
|
29
|
+
row: "_row_1hrrd_1150"
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/combobox/Combobox.tsx
|
|
33
|
+
function o(e) {
|
|
34
|
+
return /* @__PURE__ */ r("svg", {
|
|
35
|
+
width: "16",
|
|
36
|
+
height: "16",
|
|
37
|
+
viewBox: "0 0 16 16",
|
|
38
|
+
fill: "currentColor",
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
focusable: "false",
|
|
41
|
+
...e,
|
|
42
|
+
style: {
|
|
43
|
+
display: "block",
|
|
44
|
+
...e.style
|
|
45
|
+
},
|
|
46
|
+
children: [/* @__PURE__ */ n("path", {
|
|
47
|
+
className: a.caret,
|
|
48
|
+
"data-direction": "up",
|
|
49
|
+
d: "M11 6H5l3-3.5z"
|
|
50
|
+
}), /* @__PURE__ */ n("path", {
|
|
51
|
+
className: a.caret,
|
|
52
|
+
"data-direction": "down",
|
|
53
|
+
d: "M11 10H5l3 3.5z"
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function s(e) {
|
|
58
|
+
return /* @__PURE__ */ n("svg", {
|
|
59
|
+
width: "16",
|
|
60
|
+
height: "16",
|
|
61
|
+
viewBox: "0 0 16 16",
|
|
62
|
+
fill: "none",
|
|
63
|
+
stroke: "currentColor",
|
|
64
|
+
strokeWidth: "1.5",
|
|
65
|
+
strokeLinecap: "round",
|
|
66
|
+
strokeLinejoin: "round",
|
|
67
|
+
"aria-hidden": "true",
|
|
68
|
+
focusable: "false",
|
|
69
|
+
...e,
|
|
70
|
+
style: {
|
|
71
|
+
display: "block",
|
|
72
|
+
...e.style
|
|
73
|
+
},
|
|
74
|
+
children: /* @__PURE__ */ n("path", { d: "m2.5 8.5 4 4 7-9" })
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function c(e) {
|
|
78
|
+
return /* @__PURE__ */ n("svg", {
|
|
79
|
+
width: "16",
|
|
80
|
+
height: "16",
|
|
81
|
+
viewBox: "0 0 16 16",
|
|
82
|
+
fill: "none",
|
|
83
|
+
stroke: "currentColor",
|
|
84
|
+
strokeWidth: "1.5",
|
|
85
|
+
strokeLinecap: "round",
|
|
86
|
+
strokeLinejoin: "round",
|
|
87
|
+
"aria-hidden": "true",
|
|
88
|
+
focusable: "false",
|
|
89
|
+
...e,
|
|
90
|
+
style: {
|
|
91
|
+
display: "block",
|
|
92
|
+
...e.style
|
|
93
|
+
},
|
|
94
|
+
children: /* @__PURE__ */ n("path", { d: "m4.5 4.5 7 7m-7 0 7-7" })
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function l({ onOpenChange: e, ...r }) {
|
|
98
|
+
let a = r.multiple, o = t.useCallback((t, n) => {
|
|
99
|
+
if (a && !t && n.reason === "item-press") {
|
|
100
|
+
n.cancel();
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
e?.(t, n);
|
|
104
|
+
}, [a, e]);
|
|
105
|
+
return /* @__PURE__ */ n(i.Root, {
|
|
106
|
+
...r,
|
|
107
|
+
onOpenChange: o
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
var u = t.forwardRef(function({ className: t, ...r }, o) {
|
|
111
|
+
return /* @__PURE__ */ n(i.Label, {
|
|
112
|
+
ref: o,
|
|
113
|
+
className: e(a.label, t),
|
|
114
|
+
"data-forte": "combobox-label",
|
|
115
|
+
...r
|
|
116
|
+
});
|
|
117
|
+
}), d = t.forwardRef(function({ variant: t = "outline", size: r = "md", fullWidth: o = !1, className: s, ...c }, l) {
|
|
118
|
+
return /* @__PURE__ */ n(i.InputGroup, {
|
|
119
|
+
ref: l,
|
|
120
|
+
className: e(a.inputGroup, "forte-focus-ring-within", s),
|
|
121
|
+
"data-forte": "combobox-input-group",
|
|
122
|
+
"data-variant": t,
|
|
123
|
+
"data-size": r,
|
|
124
|
+
"data-full-width": o || void 0,
|
|
125
|
+
...c
|
|
126
|
+
});
|
|
127
|
+
}), f = t.forwardRef(function({ className: t, ...r }, o) {
|
|
128
|
+
return /* @__PURE__ */ n(i.Input, {
|
|
129
|
+
ref: o,
|
|
130
|
+
className: e(a.input, t),
|
|
131
|
+
"data-forte": "combobox-input",
|
|
132
|
+
...r
|
|
133
|
+
});
|
|
134
|
+
}), p = t.forwardRef(function({ variant: t = "outline", size: r = "md", fullWidth: s = !1, children: c, className: l, ...u }, d) {
|
|
135
|
+
return /* @__PURE__ */ n(i.Trigger, {
|
|
136
|
+
ref: d,
|
|
137
|
+
className: e(a.trigger, "forte-focus-ring", "forte-target", l),
|
|
138
|
+
"data-forte": "combobox-trigger",
|
|
139
|
+
"data-variant": t,
|
|
140
|
+
"data-size": r,
|
|
141
|
+
"data-full-width": s || void 0,
|
|
142
|
+
...u,
|
|
143
|
+
children: c ?? /* @__PURE__ */ n(o, {})
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
function m(e) {
|
|
147
|
+
return /* @__PURE__ */ n(i.Value, { ...e });
|
|
148
|
+
}
|
|
149
|
+
var h = t.forwardRef(function({ className: t, children: r, ...s }, c) {
|
|
150
|
+
return /* @__PURE__ */ n(i.Icon, {
|
|
151
|
+
ref: c,
|
|
152
|
+
className: e(a.icon, t),
|
|
153
|
+
"data-forte": "combobox-icon",
|
|
154
|
+
...s,
|
|
155
|
+
children: r ?? /* @__PURE__ */ n(o, {})
|
|
156
|
+
});
|
|
157
|
+
}), g = t.forwardRef(function({ children: t, className: r, ...o }, s) {
|
|
158
|
+
return /* @__PURE__ */ n(i.Clear, {
|
|
159
|
+
ref: s,
|
|
160
|
+
className: e(a.clear, "forte-focus-ring", "forte-target", r),
|
|
161
|
+
"data-forte": "combobox-clear",
|
|
162
|
+
...o,
|
|
163
|
+
children: t ?? /* @__PURE__ */ n(c, {})
|
|
164
|
+
});
|
|
165
|
+
}), _ = t.forwardRef(function({ className: t, ...r }, o) {
|
|
166
|
+
return /* @__PURE__ */ n(i.Chips, {
|
|
167
|
+
ref: o,
|
|
168
|
+
className: e(a.chips, t),
|
|
169
|
+
"data-forte": "combobox-chips",
|
|
170
|
+
...r
|
|
171
|
+
});
|
|
172
|
+
}), v = t.forwardRef(function({ className: t, ...r }, o) {
|
|
173
|
+
return /* @__PURE__ */ n(i.Chip, {
|
|
174
|
+
ref: o,
|
|
175
|
+
className: e(a.chip, t),
|
|
176
|
+
"data-forte": "combobox-chip",
|
|
177
|
+
...r
|
|
178
|
+
});
|
|
179
|
+
}), y = t.forwardRef(function({ children: t, className: r, ...o }, s) {
|
|
180
|
+
return /* @__PURE__ */ n(i.ChipRemove, {
|
|
181
|
+
ref: s,
|
|
182
|
+
className: e(a.chipRemove, "forte-focus-ring", "forte-target", r),
|
|
183
|
+
"data-forte": "combobox-chip-remove",
|
|
184
|
+
...o,
|
|
185
|
+
children: t ?? /* @__PURE__ */ n(c, {})
|
|
186
|
+
});
|
|
187
|
+
}), b = t.forwardRef(function({ children: t, side: o, align: s = "start", sideOffset: c = 8, alignOffset: l, collisionPadding: u, container: d, backdrop: f = !1, className: p, positionerClassName: m, ...h }, g) {
|
|
188
|
+
return /* @__PURE__ */ r(i.Portal, {
|
|
189
|
+
container: d,
|
|
190
|
+
children: [f ? /* @__PURE__ */ n(i.Backdrop, {
|
|
191
|
+
className: e(a.backdrop, "forte-scrim"),
|
|
192
|
+
"data-forte": "combobox-backdrop"
|
|
193
|
+
}) : null, /* @__PURE__ */ n(i.Positioner, {
|
|
194
|
+
className: e(a.positioner, m),
|
|
195
|
+
"data-forte": "combobox-positioner",
|
|
196
|
+
side: o,
|
|
197
|
+
align: s,
|
|
198
|
+
sideOffset: c,
|
|
199
|
+
alignOffset: l,
|
|
200
|
+
collisionPadding: u,
|
|
201
|
+
children: /* @__PURE__ */ n(i.Popup, {
|
|
202
|
+
ref: g,
|
|
203
|
+
className: e(a.popup, "forte-hc-surface", p),
|
|
204
|
+
"data-forte": "combobox-popup",
|
|
205
|
+
...h,
|
|
206
|
+
children: t
|
|
207
|
+
})
|
|
208
|
+
})]
|
|
209
|
+
});
|
|
210
|
+
}), x = t.forwardRef(function({ className: t, ...r }, o) {
|
|
211
|
+
return /* @__PURE__ */ n(i.List, {
|
|
212
|
+
ref: o,
|
|
213
|
+
className: e(a.list, t),
|
|
214
|
+
"data-forte": "combobox-list",
|
|
215
|
+
...r
|
|
216
|
+
});
|
|
217
|
+
}), S = t.forwardRef(function({ className: t, ...r }, o) {
|
|
218
|
+
return /* @__PURE__ */ n(i.Empty, {
|
|
219
|
+
ref: o,
|
|
220
|
+
className: e(a.empty, t),
|
|
221
|
+
"data-forte": "combobox-empty",
|
|
222
|
+
...r
|
|
223
|
+
});
|
|
224
|
+
}), C = t.forwardRef(function({ className: t, ...r }, o) {
|
|
225
|
+
return /* @__PURE__ */ n(i.Status, {
|
|
226
|
+
ref: o,
|
|
227
|
+
className: e(a.status, t),
|
|
228
|
+
"data-forte": "combobox-status",
|
|
229
|
+
...r
|
|
230
|
+
});
|
|
231
|
+
}), w = t.forwardRef(function({ children: t, indicator: o, className: c, ...l }, u) {
|
|
232
|
+
return /* @__PURE__ */ r(i.Item, {
|
|
233
|
+
ref: u,
|
|
234
|
+
className: e(a.item, "forte-focus-ring", c),
|
|
235
|
+
"data-forte": "combobox-item",
|
|
236
|
+
"data-focus-inset": "",
|
|
237
|
+
...l,
|
|
238
|
+
children: [/* @__PURE__ */ n(i.ItemIndicator, {
|
|
239
|
+
className: a.itemIndicator,
|
|
240
|
+
"data-forte": "combobox-item-indicator",
|
|
241
|
+
children: o ?? /* @__PURE__ */ n(s, {})
|
|
242
|
+
}), /* @__PURE__ */ n("span", {
|
|
243
|
+
className: a.itemText,
|
|
244
|
+
"data-forte": "combobox-item-text",
|
|
245
|
+
children: t
|
|
246
|
+
})]
|
|
247
|
+
});
|
|
248
|
+
}), T = t.forwardRef(function({ className: t, ...r }, o) {
|
|
249
|
+
return /* @__PURE__ */ n(i.Group, {
|
|
250
|
+
ref: o,
|
|
251
|
+
className: e(a.group, t),
|
|
252
|
+
"data-forte": "combobox-group",
|
|
253
|
+
...r
|
|
254
|
+
});
|
|
255
|
+
}), E = t.forwardRef(function({ className: t, ...r }, o) {
|
|
256
|
+
return /* @__PURE__ */ n(i.GroupLabel, {
|
|
257
|
+
ref: o,
|
|
258
|
+
className: e(a.groupLabel, t),
|
|
259
|
+
"data-forte": "combobox-group-label",
|
|
260
|
+
...r
|
|
261
|
+
});
|
|
262
|
+
}), D = t.forwardRef(function({ className: t, ...r }, o) {
|
|
263
|
+
return /* @__PURE__ */ n(i.Separator, {
|
|
264
|
+
ref: o,
|
|
265
|
+
className: e(a.separator, t),
|
|
266
|
+
"data-forte": "combobox-separator",
|
|
267
|
+
...r
|
|
268
|
+
});
|
|
269
|
+
}), O = t.forwardRef(function({ className: t, ...r }, o) {
|
|
270
|
+
return /* @__PURE__ */ n(i.Row, {
|
|
271
|
+
ref: o,
|
|
272
|
+
className: e(a.row, t),
|
|
273
|
+
"data-forte": "combobox-row",
|
|
274
|
+
...r
|
|
275
|
+
});
|
|
276
|
+
}), k = i.Collection, A = i.useFilter, j = i.useFilteredItems, M = {
|
|
277
|
+
Root: l,
|
|
278
|
+
Label: u,
|
|
279
|
+
InputGroup: d,
|
|
280
|
+
Input: f,
|
|
281
|
+
Trigger: p,
|
|
282
|
+
Value: m,
|
|
283
|
+
Icon: h,
|
|
284
|
+
Clear: g,
|
|
285
|
+
Chips: _,
|
|
286
|
+
Chip: v,
|
|
287
|
+
ChipRemove: y,
|
|
288
|
+
Popup: b,
|
|
289
|
+
List: x,
|
|
290
|
+
Empty: S,
|
|
291
|
+
Status: C,
|
|
292
|
+
Item: w,
|
|
293
|
+
Group: T,
|
|
294
|
+
GroupLabel: E,
|
|
295
|
+
Separator: D,
|
|
296
|
+
Row: O,
|
|
297
|
+
Collection: k,
|
|
298
|
+
useFilter: A,
|
|
299
|
+
useFilteredItems: j
|
|
300
|
+
};
|
|
301
|
+
//#endregion
|
|
302
|
+
export { A as C, m as S, l as _, g as a, C as b, T as c, f as d, d as f, b as g, x as h, _ as i, E as l, u as m, v as n, k as o, w as p, y as r, S as s, M as t, h as u, O as v, j as w, p as x, D as y };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./clsx-By2n9mTe.js";
|
|
3
|
+
import { a as t, c as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, u as p } from "./Menu-CKu9xE2h.js";
|
|
4
|
+
import * as m from "react";
|
|
5
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
6
|
+
import { ContextMenu as g } from "@base-ui/react/context-menu";
|
|
7
|
+
import './styles/ContextMenu.css';var _ = { trigger: "_trigger_1pr6j_41" };
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/components/context-menu/ContextMenu.tsx
|
|
10
|
+
function v({ children: e, ...t }) {
|
|
11
|
+
return /* @__PURE__ */ h(f.Provider, {
|
|
12
|
+
value: "context-menu",
|
|
13
|
+
children: /* @__PURE__ */ h(g.Root, {
|
|
14
|
+
...t,
|
|
15
|
+
children: e
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
var y = m.forwardRef(function({ children: t, className: n, ...r }, i) {
|
|
20
|
+
return /* @__PURE__ */ h(g.Trigger, {
|
|
21
|
+
ref: i,
|
|
22
|
+
className: e(_.trigger, n),
|
|
23
|
+
"data-forte": "context-menu-trigger",
|
|
24
|
+
...r,
|
|
25
|
+
children: t
|
|
26
|
+
});
|
|
27
|
+
}), b = {
|
|
28
|
+
Root: v,
|
|
29
|
+
Trigger: y,
|
|
30
|
+
Popup: n,
|
|
31
|
+
Item: t,
|
|
32
|
+
LinkItem: l,
|
|
33
|
+
CheckboxItem: c,
|
|
34
|
+
RadioGroup: o,
|
|
35
|
+
RadioItem: p,
|
|
36
|
+
Group: d,
|
|
37
|
+
GroupLabel: a,
|
|
38
|
+
Separator: r,
|
|
39
|
+
SubmenuRoot: s,
|
|
40
|
+
SubmenuTrigger: i,
|
|
41
|
+
Shortcut: u
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { v as n, y as r, b as t };
|
|
@@ -0,0 +1,192 @@
|
|
|
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 "./Calendar-D7Q-QJ_e.js";
|
|
5
|
+
import { t as r } from "./Popover-BXhn2Wwt.js";
|
|
6
|
+
import * as i from "react";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
|
+
import { Field as s } from "@base-ui/react/field";
|
|
9
|
+
import './styles/DatePicker.css';var c = {
|
|
10
|
+
trigger: "_trigger_1sx1q_22",
|
|
11
|
+
value: "_value_1sx1q_160",
|
|
12
|
+
icon: "_icon_1sx1q_178",
|
|
13
|
+
popup: "_popup_1sx1q_198",
|
|
14
|
+
panel: "_panel_1sx1q_15",
|
|
15
|
+
footer: "_footer_1sx1q_212"
|
|
16
|
+
}, l = typeof process < "u" && process.env.NODE_ENV !== "production", u = i.createContext(null);
|
|
17
|
+
function d(e) {
|
|
18
|
+
let t = i.useContext(u);
|
|
19
|
+
if (!t) throw Error(`[forte-ui] <DatePicker.${e}> must be rendered inside <DatePicker.Root>.`);
|
|
20
|
+
return t;
|
|
21
|
+
}
|
|
22
|
+
function f(e, t, n) {
|
|
23
|
+
if (!e) return null;
|
|
24
|
+
if (t === "single") return n.format(e);
|
|
25
|
+
if (t === "multiple") {
|
|
26
|
+
let t = e;
|
|
27
|
+
return t.length === 0 ? null : t.length <= 2 ? t.map((e) => n.format(e)).join(", ") : `${n.format(t[0])} +${t.length - 1}`;
|
|
28
|
+
}
|
|
29
|
+
let r = e;
|
|
30
|
+
return r.from ? r.to ? `${n.format(r.from)} – ${n.format(r.to)}` : n.format(r.from) : null;
|
|
31
|
+
}
|
|
32
|
+
function p(e, t) {
|
|
33
|
+
return e === "single" ? t !== null : e === "range" && !!t?.to;
|
|
34
|
+
}
|
|
35
|
+
function m(e) {
|
|
36
|
+
return e ? Array.isArray(e) ? e.length === 0 : e instanceof Date ? !1 : !e.from : !0;
|
|
37
|
+
}
|
|
38
|
+
function h(e) {
|
|
39
|
+
return /* @__PURE__ */ o("svg", {
|
|
40
|
+
width: "16",
|
|
41
|
+
height: "16",
|
|
42
|
+
viewBox: "0 0 16 16",
|
|
43
|
+
fill: "none",
|
|
44
|
+
stroke: "currentColor",
|
|
45
|
+
strokeWidth: "1.5",
|
|
46
|
+
strokeLinecap: "round",
|
|
47
|
+
strokeLinejoin: "round",
|
|
48
|
+
"aria-hidden": "true",
|
|
49
|
+
focusable: "false",
|
|
50
|
+
...e,
|
|
51
|
+
children: [/* @__PURE__ */ a("rect", {
|
|
52
|
+
x: "2.25",
|
|
53
|
+
y: "3.25",
|
|
54
|
+
width: "11.5",
|
|
55
|
+
height: "10.5",
|
|
56
|
+
rx: "2"
|
|
57
|
+
}), /* @__PURE__ */ a("path", { d: "M2.25 6.75h11.5M5.5 2v2.5M10.5 2v2.5" })]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function g(e) {
|
|
61
|
+
let { mode: t = "single", selected: n, defaultSelected: o = null, onSelect: s, required: c = !1, defaultOpen: l = !1, open: d, onOpenChange: m, closeOnSelect: h, locale: g = "en-US", formatValue: _, modal: v = !1, children: y } = e, b = i.useRef("selected" in e).current, [x, S] = i.useState(o), C = b ? n ?? null : x, w = d !== void 0, [T, E] = i.useState(l), D = w ? d : T, O = i.useCallback((e) => {
|
|
62
|
+
w || E(e), m?.(e);
|
|
63
|
+
}, [w, m]), k = i.useMemo(() => new Intl.DateTimeFormat(g, { dateStyle: "medium" }), [g]), A = i.useMemo(() => ({
|
|
64
|
+
mode: t,
|
|
65
|
+
required: c,
|
|
66
|
+
selection: C,
|
|
67
|
+
locale: g,
|
|
68
|
+
select: (e, n) => {
|
|
69
|
+
b || S(e), s?.(e, n), (h ?? p(t, e)) && O(!1);
|
|
70
|
+
},
|
|
71
|
+
clear: () => {
|
|
72
|
+
b || S(t === "multiple" ? [] : null), s?.(null, /* @__PURE__ */ new Date());
|
|
73
|
+
},
|
|
74
|
+
format: (e) => _ ? _(e, g) : f(e, t, k)
|
|
75
|
+
}), [
|
|
76
|
+
h,
|
|
77
|
+
_,
|
|
78
|
+
k,
|
|
79
|
+
b,
|
|
80
|
+
g,
|
|
81
|
+
t,
|
|
82
|
+
s,
|
|
83
|
+
c,
|
|
84
|
+
C,
|
|
85
|
+
O
|
|
86
|
+
]);
|
|
87
|
+
return /* @__PURE__ */ a(u.Provider, {
|
|
88
|
+
value: A,
|
|
89
|
+
children: /* @__PURE__ */ a(r.Root, {
|
|
90
|
+
open: D,
|
|
91
|
+
onOpenChange: (e) => O(e),
|
|
92
|
+
modal: v,
|
|
93
|
+
children: y
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
var _ = i.forwardRef(function({ variant: t = "outline", size: n = "md", fullWidth: o = !1, className: u, ...f }, p) {
|
|
98
|
+
let { selection: h } = d("Trigger"), g = i.useRef(null), _ = i.useCallback((e) => {
|
|
99
|
+
g.current = e, typeof p == "function" ? p(e) : p && (p.current = e);
|
|
100
|
+
}, [p]), v = i.useRef(!1);
|
|
101
|
+
return i.useEffect(() => {
|
|
102
|
+
if (!l) return;
|
|
103
|
+
let e = setTimeout(() => {
|
|
104
|
+
let e = g.current;
|
|
105
|
+
!e || v.current || !e.getAttribute("aria-label") && !e.getAttribute("aria-labelledby") && (v.current = !0, console.warn("[forte-ui] <DatePicker.Trigger> has no accessible name. Render a <Field.Label nativeLabel={false}> in the same <Field.Root>, or pass aria-label to the trigger."));
|
|
106
|
+
}, 0);
|
|
107
|
+
return () => clearTimeout(e);
|
|
108
|
+
}), /* @__PURE__ */ a(r.Trigger, {
|
|
109
|
+
ref: _,
|
|
110
|
+
className: e(c.trigger, "forte-focus-ring", u),
|
|
111
|
+
"data-forte": "date-picker-trigger",
|
|
112
|
+
"data-variant": t,
|
|
113
|
+
"data-size": n,
|
|
114
|
+
"data-full-width": o || void 0,
|
|
115
|
+
"data-empty": m(h) || void 0,
|
|
116
|
+
render: /* @__PURE__ */ a(s.Control, { render: /* @__PURE__ */ a("button", { type: "button" }) }),
|
|
117
|
+
...f
|
|
118
|
+
});
|
|
119
|
+
}), v = i.forwardRef(function({ placeholder: t, className: n, ...r }, i) {
|
|
120
|
+
let { selection: o, format: s } = d("Value"), l = s(o);
|
|
121
|
+
return /* @__PURE__ */ a("span", {
|
|
122
|
+
ref: i,
|
|
123
|
+
className: e(c.value, n),
|
|
124
|
+
"data-forte": "date-picker-value",
|
|
125
|
+
"data-placeholder": l === null || void 0,
|
|
126
|
+
...r,
|
|
127
|
+
children: l ?? t
|
|
128
|
+
});
|
|
129
|
+
}), y = i.forwardRef(function({ children: t, className: n, ...r }, i) {
|
|
130
|
+
return /* @__PURE__ */ a("span", {
|
|
131
|
+
ref: i,
|
|
132
|
+
"aria-hidden": "true",
|
|
133
|
+
className: e(c.icon, n),
|
|
134
|
+
"data-forte": "date-picker-icon",
|
|
135
|
+
...r,
|
|
136
|
+
children: t ?? /* @__PURE__ */ a(h, {})
|
|
137
|
+
});
|
|
138
|
+
}), b = i.forwardRef(function({ className: t, children: n, ...i }, o) {
|
|
139
|
+
return /* @__PURE__ */ a(r.Popup, {
|
|
140
|
+
ref: o,
|
|
141
|
+
className: c.popup,
|
|
142
|
+
...i,
|
|
143
|
+
children: /* @__PURE__ */ a("div", {
|
|
144
|
+
className: e(c.panel, t),
|
|
145
|
+
"data-forte": "date-picker-panel",
|
|
146
|
+
children: n
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
}), x = i.forwardRef(function({ autoFocus: e = !0, className: t, ...r }, i) {
|
|
150
|
+
let { mode: o, required: s, selection: c, locale: l, select: u } = d("Calendar");
|
|
151
|
+
return /* @__PURE__ */ a(n, {
|
|
152
|
+
ref: i,
|
|
153
|
+
mode: o,
|
|
154
|
+
required: s,
|
|
155
|
+
selected: c,
|
|
156
|
+
onSelect: u,
|
|
157
|
+
locale: l,
|
|
158
|
+
autoFocus: e,
|
|
159
|
+
className: t,
|
|
160
|
+
...r
|
|
161
|
+
});
|
|
162
|
+
}), S = i.forwardRef(function({ className: t, ...n }, r) {
|
|
163
|
+
return /* @__PURE__ */ a("div", {
|
|
164
|
+
ref: r,
|
|
165
|
+
className: e(c.footer, t),
|
|
166
|
+
"data-forte": "date-picker-footer",
|
|
167
|
+
...n
|
|
168
|
+
});
|
|
169
|
+
}), C = i.forwardRef(function({ children: e = "Clear", disabled: n, ...r }, i) {
|
|
170
|
+
let { selection: o, required: s, clear: c } = d("Clear");
|
|
171
|
+
return /* @__PURE__ */ a(t, {
|
|
172
|
+
ref: i,
|
|
173
|
+
variant: "ghost",
|
|
174
|
+
tone: "neutral",
|
|
175
|
+
size: "sm",
|
|
176
|
+
disabled: n ?? (s || m(o)),
|
|
177
|
+
onClick: c,
|
|
178
|
+
...r,
|
|
179
|
+
children: e
|
|
180
|
+
});
|
|
181
|
+
}), w = {
|
|
182
|
+
Root: g,
|
|
183
|
+
Trigger: _,
|
|
184
|
+
Value: v,
|
|
185
|
+
Icon: y,
|
|
186
|
+
Popup: b,
|
|
187
|
+
Calendar: x,
|
|
188
|
+
Footer: S,
|
|
189
|
+
Clear: C
|
|
190
|
+
};
|
|
191
|
+
//#endregion
|
|
192
|
+
export { y as a, _ as c, S as i, v as l, x as n, b as o, C as r, g as s, w as t };
|