@optiaxiom/react 0.3.4 → 0.3.5
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/dist/assets/src/alert-dialog-content/{AlertDialogContent.css.ts.vanilla-BofFY4c6.css → AlertDialogContent.css.ts.vanilla-CvVkw3cs.css} +7 -7
- package/dist/assets/src/alert-dialog-footer/AlertDialogFooter.css.ts.vanilla-B2pBflJv.css +6 -0
- package/dist/assets/src/autocomplete-content/AutocompleteContent.css.ts.vanilla-Bbsg7no2.css +10 -0
- package/dist/assets/src/avatar/Avatar.css.ts.vanilla-UAC31ujs.css +27 -0
- package/dist/assets/src/badge/Badge.css.ts.vanilla-Dby1HGSv.css +46 -0
- package/dist/assets/src/box/{Box.css.ts.vanilla-CBeLPJz0.css → Box.css.ts.vanilla-BHZ4bhCx.css} +23 -23
- package/dist/assets/src/button-base/ButtonBase.css.ts.vanilla-BHtcSNLa.css +140 -0
- package/dist/assets/src/button-loadable/ButtonLoadable.css.ts.vanilla-CnyGW7JN.css +9 -0
- package/dist/assets/src/checkbox/Checkbox.css.ts.vanilla-BP-IS8uM.css +18 -0
- package/dist/assets/src/code/Code.css.ts.vanilla-Di85g701.css +7 -0
- package/dist/assets/src/data-table/DataTable.css.ts.vanilla-Dr8prppO.css +24 -0
- package/dist/assets/src/data-table-header/DataTableHeader.css.ts.vanilla-DqnDDweC.css +12 -0
- package/dist/assets/src/dialog-content/DialogContent.css.ts.vanilla-Ds32MO_e.css +37 -0
- package/dist/assets/src/disclosure-content/DisclosureContent.css.ts.vanilla-C97DPRK_.css +25 -0
- package/dist/assets/src/disclosure-trigger/{DisclosureTrigger.css.ts.vanilla-CGgZqHoR.css → DisclosureTrigger.css.ts.vanilla-C7mcv2PW.css} +7 -7
- package/dist/assets/src/drawer/{Drawer.css.ts.vanilla-D1KjbYY2.css → Drawer.css.ts.vanilla-BiYwxVN6.css} +8 -8
- package/dist/assets/src/hover-card-content/{HoverCardContent.css.ts.vanilla-BNBQF_0T.css → HoverCardContent.css.ts.vanilla-lySj_lUQ.css} +3 -3
- package/dist/assets/src/indicator/Indicator.css.ts.vanilla-BB2KNGqT.css +35 -0
- package/dist/assets/src/input/Input.css.ts.vanilla-BmTJx0jV.css +15 -0
- package/dist/assets/src/input-base/InputBase.css.ts.vanilla-DFLR3BqU.css +87 -0
- package/dist/assets/src/kbd/Kbd.css.ts.vanilla-DGV6V8U_.css +9 -0
- package/dist/assets/src/layers/layers.css.ts.vanilla-BQxl5Oc4.css +1 -0
- package/dist/assets/src/link/{Link.css.ts.vanilla-CEocHXy8.css → Link.css.ts.vanilla-aDd_bw53.css} +12 -12
- package/dist/assets/src/listbox-base/ListboxBase.css.ts.vanilla-DGeZ_R0t.css +21 -0
- package/dist/assets/src/listbox-item-base/ListboxItemBase.css.ts.vanilla-C1JB1FI6.css +30 -0
- package/dist/assets/src/pagination/Pagination.css.ts.vanilla-DbNkwf0Z.css +6 -0
- package/dist/assets/src/pill/{Pill.css.ts.vanilla-DeCZ2_8Z.css → Pill.css.ts.vanilla-BhiphgSM.css} +4 -4
- package/dist/assets/src/radio/Radio.css.ts.vanilla-B-Wp17XI.css +13 -0
- package/dist/assets/src/search-input/SearchInput.css.ts.vanilla-oc3OrG46.css +6 -0
- package/dist/assets/src/select-content/SelectContent.css.ts.vanilla-VyK_Ftq8.css +7 -0
- package/dist/assets/src/separator/{Separator.css.ts.vanilla-GmmMa_6S.css → Separator.css.ts.vanilla-BFxuHRr5.css} +10 -10
- package/dist/assets/src/side-nav-item/SideNavItem.css.ts.vanilla-BPtTByKU.css +6 -0
- package/dist/assets/src/skeleton/Skeleton.css.ts.vanilla-B2F2J-1K.css +6 -0
- package/dist/assets/src/sprinkles/{properties.css.ts.vanilla-_GcKnhsL.css → properties.css.ts.vanilla-D0osMMfq.css} +2069 -2069
- package/dist/assets/src/switch/Switch.css.ts.vanilla-CcWtFhhC.css +26 -0
- package/dist/assets/src/table/{Table.css.ts.vanilla-DCz5_D85.css → Table.css.ts.vanilla-D6-YaAqO.css} +4 -4
- package/dist/assets/src/table-body/TableBody.css.ts.vanilla-DvElLAAk.css +6 -0
- package/dist/assets/src/table-cell/{TableCell.css.ts.vanilla-C5w86Y1I.css → TableCell.css.ts.vanilla-moxm-BZ3.css} +4 -4
- package/dist/assets/src/table-header-cell/TableHeaderCell.css.ts.vanilla-BwRY6BfC.css +6 -0
- package/dist/assets/src/table-row/TableRow.css.ts.vanilla-DkygPBaI.css +4 -0
- package/dist/assets/src/tabs/Tabs.css.ts.vanilla-eDWe_QTH.css +9 -0
- package/dist/assets/src/tabs-list/TabsList.css.ts.vanilla-7xdw9CeT.css +23 -0
- package/dist/assets/src/tabs-trigger/{TabsTrigger.css.ts.vanilla-CG_99hZP.css → TabsTrigger.css.ts.vanilla-CDh49ssN.css} +10 -10
- package/dist/assets/src/text/{Text.css.ts.vanilla-AqeTOozB.css → Text.css.ts.vanilla-CGbEhKz7.css} +8 -8
- package/dist/assets/src/textarea-autosize/TextareaAutosize.css.ts.vanilla-B8N-ZjBS.css +34 -0
- package/dist/assets/src/toast/Toast.css.ts.vanilla-CHiwYBgv.css +92 -0
- package/dist/assets/src/toast-provider/{ToastProvider.css.ts.vanilla-D0WvOUI1.css → ToastProvider.css.ts.vanilla-DEMA1i5o.css} +9 -9
- package/dist/assets/src/toggle-input/ToggleInput.css.ts.vanilla-CYG8X4be.css +22 -0
- package/dist/assets/src/toggle-input-control/ToggleInputControl.css.ts.vanilla-BuJ2mQgD.css +10 -0
- package/dist/assets/src/transition/{Transition.css.ts.vanilla-8tg-gwE2.css → Transition.css.ts.vanilla-DIc7AOWt.css} +16 -16
- package/dist/index.d.ts +131 -106
- package/dist/index.js +1 -0
- package/dist/package.json.js +1 -1
- package/dist/src/alert/Alert-css.js +1 -1
- package/dist/src/alert-dialog-content/AlertDialogContent-css.js +4 -4
- package/dist/src/alert-dialog-description/AlertDialogDescription-css.js +1 -1
- package/dist/src/alert-dialog-footer/AlertDialogFooter-css.js +3 -3
- package/dist/src/alert-dialog-title/AlertDialogTitle.js +3 -3
- package/dist/src/autocomplete/Autocomplete.js +1 -0
- package/dist/src/autocomplete-content/AutocompleteContent-css.js +3 -3
- package/dist/src/autocomplete-content/AutocompleteContent.js +3 -3
- package/dist/src/autocomplete-empty/AutocompleteEmpty.js +31 -0
- package/dist/src/autocomplete-item/AutocompletItem.js +38 -29
- package/dist/src/autocomplete-item-context/AutocompleteItemContext.js +5 -0
- package/dist/src/autocomplete-item-indicator/AutocompleteItemIndicator.js +2 -2
- package/dist/src/autocomplete-list/AutocompleteList.js +25 -13
- package/dist/src/avatar/Avatar-css.js +4 -4
- package/dist/src/avatar-group/AvatarGroup-css.js +3 -3
- package/dist/src/badge/Badge-css.js +3 -3
- package/dist/src/banner/Banner-css.js +1 -1
- package/dist/src/box/Box-css.js +3 -3
- package/dist/src/box/Box.js +1 -1
- package/dist/src/button/Button.js +20 -64
- package/dist/src/button-base/ButtonBase-css.js +9 -0
- package/dist/src/button-base/ButtonBase.js +72 -0
- package/dist/src/button-group/ButtonGroup-css.js +3 -3
- package/dist/src/button-label/ButtonLabel.js +13 -0
- package/dist/src/button-loadable/ButtonLoadable-css.js +9 -0
- package/dist/src/button-loadable/ButtonLoadable.js +13 -0
- package/dist/src/checkbox/Checkbox-css.js +8 -8
- package/dist/src/code/Code-css.js +3 -3
- package/dist/src/combobox/Combobox.js +88 -0
- package/dist/src/combobox-content/ComboboxContent.js +25 -0
- package/dist/src/combobox-context/ComboboxContext.js +5 -0
- package/dist/src/combobox-empty/ComboboxEmpty.js +30 -0
- package/dist/src/combobox-footer/ComboboxFooter-css.js +6 -0
- package/dist/src/combobox-footer/ComboboxFooter.js +13 -0
- package/dist/src/combobox-input/ComboboxInput.js +37 -0
- package/dist/src/combobox-item/ComboboxItem.js +49 -0
- package/dist/src/combobox-item-context/ComboboxItemContext.js +5 -0
- package/dist/src/combobox-item-indicator/ComboboxItemIndicator.js +20 -0
- package/dist/src/combobox-list/ComboboxList.js +33 -0
- package/dist/src/combobox-multiple-value/ComboboxMultipleValue.js +28 -0
- package/dist/src/combobox-separator/ComboboxSeparator.js +9 -0
- package/dist/src/combobox-single-value/ComboboxSingleValue.js +12 -0
- package/dist/src/combobox-trigger/ComboboxTrigger.js +49 -0
- package/dist/src/combobox-value/ComboboxValue.js +16 -0
- package/dist/src/data-table/DataTable-css.js +7 -7
- package/dist/src/data-table-header/DataTableHeader-css.js +4 -4
- package/dist/src/dialog-body/DialogBody-css.js +1 -1
- package/dist/src/dialog-content/DialogContent-css.js +5 -5
- package/dist/src/dialog-footer/DialogFooter-css.js +1 -1
- package/dist/src/disclosure-content/DisclosureContent-css.js +3 -3
- package/dist/src/disclosure-trigger/DisclosureTrigger-css.js +4 -4
- package/dist/src/drawer/Drawer-css.js +5 -5
- package/dist/src/dropdown-menu-content/DropdownMenuContent.js +3 -3
- package/dist/src/dropdown-menu-group/DropdownMenuGroup.js +13 -0
- package/dist/src/dropdown-menu-item/DropdownMenuItem.js +2 -2
- package/dist/src/dropdown-menu-label/DropdownMenuLabel.js +2 -3
- package/dist/src/dropdown-menu-separator/DropdownMenuSeparator.js +1 -1
- package/dist/src/dropdown-menu-sub-content/DropdownMenuSubContent.js +3 -3
- package/dist/src/dropdown-menu-sub-trigger/DropdownMenuSubTrigger.js +2 -2
- package/dist/src/dropdown-menu-trigger/DropdownMenuTrigger.js +1 -5
- package/dist/src/hover-card-content/HoverCardContent-css.js +3 -3
- package/dist/src/indicator/Indicator-css.js +5 -5
- package/dist/src/input/Input-css.js +3 -2
- package/dist/src/input-base/InputBase-css.js +5 -5
- package/dist/src/kbd/Kbd-css.js +3 -3
- package/dist/src/layers/layers-css.js +3 -3
- package/dist/src/link/Link-css.js +4 -4
- package/dist/src/listbox-base/ListboxBase-css.js +7 -0
- package/dist/src/{menu-content-base/MenuContentBase.js → listbox-base/ListboxBase.js} +4 -4
- package/dist/src/listbox-item-base/ListboxItemBase-css.js +7 -0
- package/dist/src/{menu-item-base/MenuItemBase.js → listbox-item-base/ListboxItemBase.js} +7 -5
- package/dist/src/pagination/Pagination-css.js +3 -3
- package/dist/src/pagination/Pagination.js +5 -4
- package/dist/src/pill/Pill-css.js +3 -3
- package/dist/src/popover-content/PopoverContent.js +2 -2
- package/dist/src/popover-trigger/PopoverTrigger.js +1 -5
- package/dist/src/radio/Radio-css.js +8 -8
- package/dist/src/search-input/SearchInput-css.js +4 -4
- package/dist/src/select-content/SelectContent-css.js +3 -3
- package/dist/src/select-content/SelectContent.js +2 -2
- package/dist/src/select-item/SelectItem.js +4 -3
- package/dist/src/separator/Separator-css.js +3 -3
- package/dist/src/side-nav-account-item/SideNavAccountItem.js +2 -2
- package/dist/src/side-nav-item/SideNavItem-css.js +5 -5
- package/dist/src/side-nav-item/SideNavItem.js +5 -3
- package/dist/src/skeleton/Skeleton-css.js +3 -3
- package/dist/src/sprinkles/properties-css.js +4 -4
- package/dist/src/switch/Switch-css.js +8 -8
- package/dist/src/table/Table-css.js +4 -4
- package/dist/src/table-body/TableBody-css.js +3 -3
- package/dist/src/table-cell/TableCell-css.js +4 -4
- package/dist/src/table-header-cell/TableHeaderCell-css.js +3 -3
- package/dist/src/table-row/TableRow-css.js +3 -3
- package/dist/src/tabs/Tabs-css.js +3 -3
- package/dist/src/tabs-list/TabsList-css.js +3 -3
- package/dist/src/tabs-trigger/TabsTrigger-css.js +4 -4
- package/dist/src/text/Text-css.js +3 -3
- package/dist/src/textarea-autosize/TextareaAutosize-css.js +5 -5
- package/dist/src/toast/Toast-css.js +5 -5
- package/dist/src/toast/Toast.js +8 -2
- package/dist/src/toast-context/ToastContext.js +5 -0
- package/dist/src/toast-provider/ToastProvider-css.js +3 -3
- package/dist/src/toast-provider/ToastProvider.js +12 -18
- package/dist/src/toggle-input/ToggleInput-css.js +4 -4
- package/dist/src/toggle-input-control/ToggleInputControl-css.js +5 -5
- package/dist/src/toggle-input-hidden-input/ToggleInputHiddenInput-css.js +3 -3
- package/dist/src/tooltip-content/TooltipContent-css.js +1 -1
- package/dist/src/transition/Transition-css.js +3 -3
- package/dist/unstable.d.ts +165 -32
- package/dist/unstable.js +12 -1
- package/package.json +1 -2
- package/dist/assets/src/alert-dialog-footer/AlertDialogFooter.css.ts.vanilla-D5AnKyTd.css +0 -6
- package/dist/assets/src/autocomplete-content/AutocompleteContent.css.ts.vanilla-DbhN4jbL.css +0 -10
- package/dist/assets/src/avatar/Avatar.css.ts.vanilla-DH4ziCzi.css +0 -27
- package/dist/assets/src/badge/Badge.css.ts.vanilla-DEIxzeC8.css +0 -46
- package/dist/assets/src/button/Button.css.ts.vanilla-BWevFsch.css +0 -146
- package/dist/assets/src/checkbox/Checkbox.css.ts.vanilla-Bpzs-TMW.css +0 -18
- package/dist/assets/src/code/Code.css.ts.vanilla-CIvs9Yp6.css +0 -7
- package/dist/assets/src/data-table/DataTable.css.ts.vanilla-t2Q-5Lpd.css +0 -24
- package/dist/assets/src/data-table-header/DataTableHeader.css.ts.vanilla-BgUfkfhX.css +0 -12
- package/dist/assets/src/dialog-content/DialogContent.css.ts.vanilla-DaJvHWQC.css +0 -29
- package/dist/assets/src/disclosure-content/DisclosureContent.css.ts.vanilla-BVqex_Uk.css +0 -25
- package/dist/assets/src/indicator/Indicator.css.ts.vanilla-B8unyh6v.css +0 -35
- package/dist/assets/src/input-base/InputBase.css.ts.vanilla-D--9gOO1.css +0 -87
- package/dist/assets/src/kbd/Kbd.css.ts.vanilla-DJDNR37v.css +0 -9
- package/dist/assets/src/layers/layers.css.ts.vanilla-DQSmpGQ1.css +0 -1
- package/dist/assets/src/menu-content-base/MenuContentBase.css.ts.vanilla-bzbYBL-O.css +0 -21
- package/dist/assets/src/menu-item-base/MenuItemBase.css.ts.vanilla-BYQPvQbE.css +0 -30
- package/dist/assets/src/pagination/Pagination.css.ts.vanilla-D-p7Hfvt.css +0 -6
- package/dist/assets/src/radio/Radio.css.ts.vanilla-DSIvoy-w.css +0 -13
- package/dist/assets/src/search-input/SearchInput.css.ts.vanilla-lEdOzY9x.css +0 -6
- package/dist/assets/src/select-content/SelectContent.css.ts.vanilla-BNmH0vGS.css +0 -7
- package/dist/assets/src/side-nav-item/SideNavItem.css.ts.vanilla-Bri2ps30.css +0 -6
- package/dist/assets/src/skeleton/Skeleton.css.ts.vanilla-CPctgLR_.css +0 -6
- package/dist/assets/src/switch/Switch.css.ts.vanilla-DGNLC011.css +0 -26
- package/dist/assets/src/table-body/TableBody.css.ts.vanilla-CIoFRLvG.css +0 -6
- package/dist/assets/src/table-header-cell/TableHeaderCell.css.ts.vanilla-CjSqZpba.css +0 -6
- package/dist/assets/src/table-row/TableRow.css.ts.vanilla-BMIhB2fq.css +0 -4
- package/dist/assets/src/tabs/Tabs.css.ts.vanilla-DuSfh6tb.css +0 -9
- package/dist/assets/src/tabs-list/TabsList.css.ts.vanilla-Csaq48St.css +0 -23
- package/dist/assets/src/textarea-autosize/TextareaAutosize.css.ts.vanilla-BdcQ9g7K.css +0 -34
- package/dist/assets/src/toast/Toast.css.ts.vanilla-CULVVH5B.css +0 -92
- package/dist/assets/src/toggle-input/ToggleInput.css.ts.vanilla-DiU1hVaB.css +0 -22
- package/dist/assets/src/toggle-input-control/ToggleInputControl.css.ts.vanilla-B2VkrVTh.css +0 -10
- package/dist/src/autocomplete-empty-item/AutocompleteEmptyItem.js +0 -30
- package/dist/src/autocomplete-list-context/AutocompleteListContext.js +0 -5
- package/dist/src/button/Button-css.js +0 -12
- package/dist/src/menu-content-base/MenuContentBase-css.js +0 -7
- package/dist/src/menu-item-base/MenuItemBase-css.js +0 -7
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
3
|
+
import { useCombobox } from 'downshift';
|
|
4
|
+
import { useEffect } from 'react';
|
|
5
|
+
import { ComboboxContextProvider } from '../combobox-context/ComboboxContext.js';
|
|
6
|
+
import { Popover } from '../popover/Popover.js';
|
|
7
|
+
|
|
8
|
+
function Combobox({
|
|
9
|
+
children,
|
|
10
|
+
defaultOpen = false,
|
|
11
|
+
defaultValue,
|
|
12
|
+
items,
|
|
13
|
+
itemToKey = (value) => value,
|
|
14
|
+
itemToString = (value) => value ? String(value) : "",
|
|
15
|
+
mode: modeProp,
|
|
16
|
+
onInputValueChange,
|
|
17
|
+
onOpenChange,
|
|
18
|
+
onValueChange,
|
|
19
|
+
open: openProp,
|
|
20
|
+
value: valueProp,
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
const mode = modeProp ?? "single";
|
|
24
|
+
const [open, setOpen] = useControllableState({
|
|
25
|
+
defaultProp: defaultOpen,
|
|
26
|
+
onChange: onOpenChange,
|
|
27
|
+
prop: openProp
|
|
28
|
+
});
|
|
29
|
+
const [value, setValue] = useControllableState({
|
|
30
|
+
defaultProp: defaultValue ?? (mode === "multiple" ? [] : void 0),
|
|
31
|
+
onChange: onValueChange,
|
|
32
|
+
prop: valueProp
|
|
33
|
+
});
|
|
34
|
+
const [inputValue, setInputValue] = useControllableState({
|
|
35
|
+
defaultProp: "",
|
|
36
|
+
onChange: onInputValueChange
|
|
37
|
+
});
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (!open) {
|
|
40
|
+
setInputValue("");
|
|
41
|
+
}
|
|
42
|
+
}, [open, setInputValue]);
|
|
43
|
+
const downshift = useCombobox({
|
|
44
|
+
...props,
|
|
45
|
+
inputValue,
|
|
46
|
+
isOpen: open,
|
|
47
|
+
items,
|
|
48
|
+
itemToKey,
|
|
49
|
+
itemToString,
|
|
50
|
+
onSelectedItemChange({ selectedItem, type }) {
|
|
51
|
+
if (type !== useCombobox.stateChangeTypes.InputBlur) {
|
|
52
|
+
if (mode === "single" || !Array.isArray(value)) {
|
|
53
|
+
setValue(selectedItem);
|
|
54
|
+
} else {
|
|
55
|
+
setValue(
|
|
56
|
+
value.includes(selectedItem) ? value.filter((v) => v !== selectedItem) : [...value, selectedItem]
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (mode === "single" || type === useCombobox.stateChangeTypes.InputKeyDownEnter) {
|
|
61
|
+
setOpen(false);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
selectedItem: mode === "multiple" ? null : value ?? null
|
|
65
|
+
});
|
|
66
|
+
downshift.getInputProps({}, { suppressRefError: true });
|
|
67
|
+
downshift.getMenuProps({}, { suppressRefError: true });
|
|
68
|
+
return /* @__PURE__ */ jsx(Popover, { onOpenChange: setOpen, open, children: /* @__PURE__ */ jsx(
|
|
69
|
+
ComboboxContextProvider,
|
|
70
|
+
{
|
|
71
|
+
downshift,
|
|
72
|
+
highlightedItem: items[downshift.highlightedIndex],
|
|
73
|
+
items,
|
|
74
|
+
itemToKey,
|
|
75
|
+
itemToString,
|
|
76
|
+
mode,
|
|
77
|
+
open,
|
|
78
|
+
setInputValue,
|
|
79
|
+
setOpen,
|
|
80
|
+
setValue,
|
|
81
|
+
value,
|
|
82
|
+
children
|
|
83
|
+
}
|
|
84
|
+
) });
|
|
85
|
+
}
|
|
86
|
+
Combobox.displayName = "@optiaxiom/react/Combobox";
|
|
87
|
+
|
|
88
|
+
export { Combobox };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import '../field-context/FieldContext.js';
|
|
4
|
+
import { useFieldContext } from '../field-context/useFieldContext.js';
|
|
5
|
+
import { PopoverContent } from '../popover-content/PopoverContent.js';
|
|
6
|
+
|
|
7
|
+
const ComboboxContent = forwardRef(
|
|
8
|
+
({ children, ...props }, ref) => {
|
|
9
|
+
const { labelId } = useFieldContext();
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
PopoverContent,
|
|
12
|
+
{
|
|
13
|
+
"aria-labelledby": labelId,
|
|
14
|
+
overflow: "hidden",
|
|
15
|
+
p: "4",
|
|
16
|
+
ref,
|
|
17
|
+
...props,
|
|
18
|
+
children
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
ComboboxContent.displayName = "@optiaxiom/react/ComboboxContent";
|
|
24
|
+
|
|
25
|
+
export { ComboboxContent };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Box } from '../box/Box.js';
|
|
4
|
+
import { useComboboxContext } from '../combobox-context/ComboboxContext.js';
|
|
5
|
+
|
|
6
|
+
const ComboboxEmpty = forwardRef(
|
|
7
|
+
({ children, ...props }, ref) => {
|
|
8
|
+
const { items } = useComboboxContext("ComboboxEmpty");
|
|
9
|
+
if (items.length > 0) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
Box,
|
|
14
|
+
{
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
color: "fg.disabled",
|
|
17
|
+
display: "flex",
|
|
18
|
+
fontSize: "md",
|
|
19
|
+
justifyContent: "center",
|
|
20
|
+
p: "md",
|
|
21
|
+
ref,
|
|
22
|
+
...props,
|
|
23
|
+
children: children || "No options"
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
ComboboxEmpty.displayName = "@optiaxiom/react/ComboboxEmpty";
|
|
29
|
+
|
|
30
|
+
export { ComboboxEmpty };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './../../assets/src/layers/layers.css.ts.vanilla-BQxl5Oc4.css';
|
|
2
|
+
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
3
|
+
|
|
4
|
+
var footer = recipeRuntime({base:[{borderColor:'border.secondary',borderT:'1',flexDirection:'row',gap:'md',justifyContent:'space-between',p:'sm'}]});
|
|
5
|
+
|
|
6
|
+
export { footer };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Flex } from '../flex/Flex.js';
|
|
4
|
+
import { footer } from './ComboboxFooter-css.js';
|
|
5
|
+
|
|
6
|
+
const ComboboxFooter = forwardRef(
|
|
7
|
+
({ children, className, ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(Flex, { asChild: true, ref, ...footer({}, className), ...props, children: /* @__PURE__ */ jsx("li", { children }) });
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
ComboboxFooter.displayName = "@optiaxiom/react/ComboboxFooter";
|
|
12
|
+
|
|
13
|
+
export { ComboboxFooter };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { useComboboxContext } from '../combobox-context/ComboboxContext.js';
|
|
4
|
+
import { Input } from '../input/Input.js';
|
|
5
|
+
import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
|
|
6
|
+
import '../sprinkles/sprinkles.js';
|
|
7
|
+
import '../sprinkles/sprinklesMerge.js';
|
|
8
|
+
|
|
9
|
+
const ComboboxInput = forwardRef(
|
|
10
|
+
(props, ref) => {
|
|
11
|
+
const { restProps, sprinkleProps } = extractSprinkles(props);
|
|
12
|
+
const { downshift, highlightedItem, setInputValue } = useComboboxContext("ComboboxInput");
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
Input,
|
|
15
|
+
{
|
|
16
|
+
m: "4",
|
|
17
|
+
...sprinkleProps,
|
|
18
|
+
...downshift.getInputProps({
|
|
19
|
+
...restProps,
|
|
20
|
+
onChange: (event) => {
|
|
21
|
+
setInputValue("value" in event.target ? event.target.value : "");
|
|
22
|
+
},
|
|
23
|
+
onKeyDown: (event) => {
|
|
24
|
+
if (event.key === " " && highlightedItem) {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
downshift.selectItem(highlightedItem);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
ref
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
ComboboxInput.displayName = "@optiaxiom/react/ComboboxInput";
|
|
36
|
+
|
|
37
|
+
export { ComboboxInput };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Checkbox } from '../checkbox/Checkbox.js';
|
|
4
|
+
import { useComboboxContext } from '../combobox-context/ComboboxContext.js';
|
|
5
|
+
import { ComboboxItemContextProvider } from '../combobox-item-context/ComboboxItemContext.js';
|
|
6
|
+
import { ListboxItemBase } from '../listbox-item-base/ListboxItemBase.js';
|
|
7
|
+
import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
|
|
8
|
+
import '../sprinkles/sprinkles.js';
|
|
9
|
+
import '../sprinkles/sprinklesMerge.js';
|
|
10
|
+
|
|
11
|
+
const ComboboxItem = forwardRef(
|
|
12
|
+
({ addonAfter, addonBefore, children, description, icon, item, ...props }, ref) => {
|
|
13
|
+
const { restProps, sprinkleProps } = extractSprinkles(props);
|
|
14
|
+
const { downshift, highlightedItem, mode, value } = useComboboxContext("ComboboxItem");
|
|
15
|
+
const itemProps = downshift.getItemProps({ item });
|
|
16
|
+
return /* @__PURE__ */ jsx(ComboboxItemContextProvider, { active: value === item, item, children: /* @__PURE__ */ jsx(
|
|
17
|
+
ListboxItemBase,
|
|
18
|
+
{
|
|
19
|
+
addonAfter,
|
|
20
|
+
addonBefore: addonBefore ?? (mode === "multiple" && /* @__PURE__ */ jsx(
|
|
21
|
+
Checkbox,
|
|
22
|
+
{
|
|
23
|
+
checked: Array.isArray(value) ? value.includes(item) : value === item,
|
|
24
|
+
disabled: itemProps["aria-disabled"],
|
|
25
|
+
tabIndex: -1
|
|
26
|
+
}
|
|
27
|
+
)),
|
|
28
|
+
description,
|
|
29
|
+
icon,
|
|
30
|
+
...sprinkleProps,
|
|
31
|
+
children: /* @__PURE__ */ jsx(
|
|
32
|
+
"li",
|
|
33
|
+
{
|
|
34
|
+
"data-disabled": itemProps["aria-disabled"] ? "" : void 0,
|
|
35
|
+
"data-highlighted": highlightedItem === item ? "" : void 0,
|
|
36
|
+
"data-selected": downshift.selectedItem === item ? "" : void 0,
|
|
37
|
+
ref,
|
|
38
|
+
...restProps,
|
|
39
|
+
...itemProps,
|
|
40
|
+
children
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
) });
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
ComboboxItem.displayName = "@optiaxiom/react/ComboboxItem";
|
|
48
|
+
|
|
49
|
+
export { ComboboxItem };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Box } from '../box/Box.js';
|
|
4
|
+
import { useComboboxItemContext } from '../combobox-item-context/ComboboxItemContext.js';
|
|
5
|
+
import { IconCheck } from '../icons/IconCheck.js';
|
|
6
|
+
import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
|
|
7
|
+
import '../sprinkles/sprinkles.js';
|
|
8
|
+
import '../sprinkles/sprinklesMerge.js';
|
|
9
|
+
|
|
10
|
+
const ComboboxItemIndicator = forwardRef(({ children, ...props }, ref) => {
|
|
11
|
+
const { restProps, sprinkleProps } = extractSprinkles(props);
|
|
12
|
+
const { active } = useComboboxItemContext("ComboboxItemIndicator");
|
|
13
|
+
if (!active) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Box, { w: "12" });
|
|
15
|
+
}
|
|
16
|
+
return /* @__PURE__ */ jsx(Box, { asChild: true, ...sprinkleProps, children: children ?? /* @__PURE__ */ jsx(IconCheck, { ref, ...restProps }) });
|
|
17
|
+
});
|
|
18
|
+
ComboboxItemIndicator.displayName = "@optiaxiom/react/ComboboxItemIndicator";
|
|
19
|
+
|
|
20
|
+
export { ComboboxItemIndicator };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Box } from '../box/Box.js';
|
|
4
|
+
import { useComboboxContext } from '../combobox-context/ComboboxContext.js';
|
|
5
|
+
import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
|
|
6
|
+
import '../sprinkles/sprinkles.js';
|
|
7
|
+
import '../sprinkles/sprinklesMerge.js';
|
|
8
|
+
|
|
9
|
+
const ComboboxList = forwardRef(
|
|
10
|
+
({ children, ...props }, ref) => {
|
|
11
|
+
const { restProps, sprinkleProps } = extractSprinkles(props);
|
|
12
|
+
const { downshift, items } = useComboboxContext("ComboboxList");
|
|
13
|
+
if (!items.length) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
Box,
|
|
18
|
+
{
|
|
19
|
+
asChild: true,
|
|
20
|
+
display: "flex",
|
|
21
|
+
flex: "1",
|
|
22
|
+
flexDirection: "column",
|
|
23
|
+
gap: "2",
|
|
24
|
+
overflow: "auto",
|
|
25
|
+
...sprinkleProps,
|
|
26
|
+
children: /* @__PURE__ */ jsx("ul", { ...downshift.getMenuProps({ ref, ...restProps }), children })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
ComboboxList.displayName = "@optiaxiom/react/ComboboxList";
|
|
32
|
+
|
|
33
|
+
export { ComboboxList };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Badge } from '../badge/Badge.js';
|
|
4
|
+
import { useComboboxContext } from '../combobox-context/ComboboxContext.js';
|
|
5
|
+
import { Flex } from '../flex/Flex.js';
|
|
6
|
+
|
|
7
|
+
const maxDisplayedItems = 2;
|
|
8
|
+
const ComboboxMultipleValue = forwardRef(({ children, placeholder, ...props }, ref) => {
|
|
9
|
+
const { itemToKey, itemToString, value } = useComboboxContext(
|
|
10
|
+
"ComboboxMultipleValue"
|
|
11
|
+
);
|
|
12
|
+
return /* @__PURE__ */ jsx(Flex, { flexDirection: "row", flexWrap: "wrap", gap: "2", ref, ...props, children: Array.isArray(value) && value.length > 0 ? children ?? /* @__PURE__ */ jsx(Fragment, { children: value.length > maxDisplayedItems ? /* @__PURE__ */ jsxs(Badge, { children: [
|
|
13
|
+
value.length,
|
|
14
|
+
" selected"
|
|
15
|
+
] }) : value.slice(0, maxDisplayedItems).map((item) => /* @__PURE__ */ jsx(
|
|
16
|
+
Badge,
|
|
17
|
+
{
|
|
18
|
+
display: "inline-block",
|
|
19
|
+
flex: "1",
|
|
20
|
+
truncate: true,
|
|
21
|
+
children: itemToString(item)
|
|
22
|
+
},
|
|
23
|
+
itemToKey(item)
|
|
24
|
+
)) }) : placeholder });
|
|
25
|
+
});
|
|
26
|
+
ComboboxMultipleValue.displayName = "@optiaxiom/react/ComboboxMultipleValue";
|
|
27
|
+
|
|
28
|
+
export { ComboboxMultipleValue };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Box } from '../box/Box.js';
|
|
4
|
+
import { Separator } from '../separator/Separator.js';
|
|
5
|
+
|
|
6
|
+
const ComboboxSeparator = forwardRef((props, ref) => /* @__PURE__ */ jsx(Box, { asChild: true, children: /* @__PURE__ */ jsx("li", { ref, children: /* @__PURE__ */ jsx(Separator, { asChild: true, bg: "border.secondary", mx: "-4", my: "2", ...props }) }) }));
|
|
7
|
+
ComboboxSeparator.displayName = "@optiaxiom/react/ComboboxSeparator";
|
|
8
|
+
|
|
9
|
+
export { ComboboxSeparator };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Box } from '../box/Box.js';
|
|
4
|
+
import { useComboboxContext } from '../combobox-context/ComboboxContext.js';
|
|
5
|
+
|
|
6
|
+
const ComboboxSingleValue = forwardRef(({ children, placeholder, ...props }, ref) => {
|
|
7
|
+
const { itemToString, value } = useComboboxContext("ComboboxSingleValue");
|
|
8
|
+
return /* @__PURE__ */ jsx(Box, { ref, ...props, children: value ? children ?? itemToString(value) : placeholder });
|
|
9
|
+
});
|
|
10
|
+
ComboboxSingleValue.displayName = "@optiaxiom/react/ComboboxSingleValue";
|
|
11
|
+
|
|
12
|
+
export { ComboboxSingleValue };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useComposedRefs } from '@radix-ui/react-compose-refs';
|
|
3
|
+
import { forwardRef, useRef, useEffect } from 'react';
|
|
4
|
+
import { useComboboxContext } from '../combobox-context/ComboboxContext.js';
|
|
5
|
+
import '../field-context/FieldContext.js';
|
|
6
|
+
import { useFieldContext } from '../field-context/useFieldContext.js';
|
|
7
|
+
import { MenuButton } from '../menu-button/MenuButton.js';
|
|
8
|
+
import { PopoverTrigger } from '../popover-trigger/PopoverTrigger.js';
|
|
9
|
+
|
|
10
|
+
const ComboboxTrigger = forwardRef(({ asChild, children, ...props }, outerRef) => {
|
|
11
|
+
const { setOpen } = useComboboxContext("ComboboxTrigger");
|
|
12
|
+
const buttonRef = useRef(null);
|
|
13
|
+
const ref = useComposedRefs(outerRef, buttonRef);
|
|
14
|
+
const { labelId } = useFieldContext();
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!labelId || !buttonRef.current) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const button = buttonRef.current;
|
|
20
|
+
const label = document.getElementById(labelId);
|
|
21
|
+
if (!label) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const onLabelClick = () => button.focus();
|
|
25
|
+
label.addEventListener("click", onLabelClick);
|
|
26
|
+
return () => label.removeEventListener("click", onLabelClick);
|
|
27
|
+
}, [labelId]);
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
PopoverTrigger,
|
|
30
|
+
{
|
|
31
|
+
"aria-labelledby": labelId,
|
|
32
|
+
asChild: true,
|
|
33
|
+
onKeyDown: (event) => {
|
|
34
|
+
switch (event.key) {
|
|
35
|
+
case "ArrowDown":
|
|
36
|
+
case "ArrowUp":
|
|
37
|
+
setOpen(true);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
ref,
|
|
41
|
+
role: "combobox",
|
|
42
|
+
...props,
|
|
43
|
+
children: asChild ? children : /* @__PURE__ */ jsx(MenuButton, { children })
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
ComboboxTrigger.displayName = "@optiaxiom/react/ComboboxTrigger";
|
|
48
|
+
|
|
49
|
+
export { ComboboxTrigger };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { useComboboxContext } from '../combobox-context/ComboboxContext.js';
|
|
4
|
+
import { ComboboxMultipleValue } from '../combobox-multiple-value/ComboboxMultipleValue.js';
|
|
5
|
+
import { ComboboxSingleValue } from '../combobox-single-value/ComboboxSingleValue.js';
|
|
6
|
+
|
|
7
|
+
const ComboboxValue = forwardRef(
|
|
8
|
+
({ placeholder, ...props }, ref) => {
|
|
9
|
+
const { mode } = useComboboxContext("ComboboxValue");
|
|
10
|
+
const Comp = mode === "single" ? ComboboxSingleValue : ComboboxMultipleValue;
|
|
11
|
+
return /* @__PURE__ */ jsx(Comp, { placeholder, ref, ...props });
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
ComboboxValue.displayName = "@optiaxiom/react/ComboboxValue";
|
|
15
|
+
|
|
16
|
+
export { ComboboxValue };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import './../../assets/src/layers/layers.css.ts.vanilla-
|
|
2
|
-
import './../../assets/src/data-table/DataTable.css.ts.vanilla-
|
|
1
|
+
import './../../assets/src/layers/layers.css.ts.vanilla-BQxl5Oc4.css';
|
|
2
|
+
import './../../assets/src/data-table/DataTable.css.ts.vanilla-Dr8prppO.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var cellOffsetVar = 'var(--
|
|
6
|
-
var columnWidthVar = 'var(--
|
|
7
|
-
var tableCell = recipeRuntime({base:[{bg:'bg.default'},'
|
|
8
|
-
var tableHead = recipeRuntime({base:[{bg:'bg.default'},'
|
|
9
|
-
var tableHeader = recipeRuntime({base:[{bg:'bg.default'},'
|
|
5
|
+
var cellOffsetVar = 'var(--_2g0l91)';
|
|
6
|
+
var columnWidthVar = 'var(--kj3zj)';
|
|
7
|
+
var tableCell = recipeRuntime({base:[{bg:'bg.default'},'_1bsqyrz'],variants:{pinned:{false:{},left:'wi2aep',right:{}}}});
|
|
8
|
+
var tableHead = recipeRuntime({base:[{bg:'bg.default'},'_1d5hff2'],variants:{pinned:{false:{},left:'_1iiszgc',right:{}}}});
|
|
9
|
+
var tableHeader = recipeRuntime({base:[{bg:'bg.default'},'qejy89']});
|
|
10
10
|
|
|
11
11
|
export { cellOffsetVar, columnWidthVar, tableCell, tableHead, tableHeader };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import './../../assets/src/layers/layers.css.ts.vanilla-
|
|
2
|
-
import './../../assets/src/data-table-header/DataTableHeader.css.ts.vanilla-
|
|
1
|
+
import './../../assets/src/layers/layers.css.ts.vanilla-BQxl5Oc4.css';
|
|
2
|
+
import './../../assets/src/data-table-header/DataTableHeader.css.ts.vanilla-DqnDDweC.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var header = recipeRuntime({base:[{gap:'4'},'
|
|
6
|
-
var icon = recipeRuntime({base:[{border:'0',color:'fg.tertiary'}],variants:{sorted:{false:'
|
|
5
|
+
var header = recipeRuntime({base:[{gap:'4'},'_1abfd49'],variants:{sortable:{false:'_3qomjo',true:'ust8zc'},variant:{number:{flexDirection:'row-reverse',justifyContent:'end'},text:{flexDirection:'row'}}}});
|
|
6
|
+
var icon = recipeRuntime({base:[{border:'0',color:'fg.tertiary'}],variants:{sorted:{false:'vrtq97',true:{}}}});
|
|
7
7
|
|
|
8
8
|
export { header, icon };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './../../assets/src/layers/layers.css.ts.vanilla-
|
|
1
|
+
import './../../assets/src/layers/layers.css.ts.vanilla-BQxl5Oc4.css';
|
|
2
2
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
3
3
|
|
|
4
4
|
var body = recipeRuntime({base:[{flex:'1',fontSize:'md',overflow:'auto',pb:'md',pt:'lg',px:'lg'}]});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import './../../assets/src/layers/layers.css.ts.vanilla-
|
|
2
|
-
import './../../assets/src/dialog-content/DialogContent.css.ts.vanilla-
|
|
1
|
+
import './../../assets/src/layers/layers.css.ts.vanilla-BQxl5Oc4.css';
|
|
2
|
+
import './../../assets/src/dialog-content/DialogContent.css.ts.vanilla-Ds32MO_e.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var close = recipeRuntime({base:[{rounded:'full'},'
|
|
6
|
-
var content = recipeRuntime({base:[{bg:'bg.default',display:'flex',flexDirection:'column',
|
|
7
|
-
var overlay = recipeRuntime({base:[{bg:'bg.overlay',z:'popover'},'
|
|
5
|
+
var close = recipeRuntime({base:[{rounded:'full'},'_1xh8sak']});
|
|
6
|
+
var content = recipeRuntime({base:[{bg:'bg.default',display:'flex',flexDirection:'column',shadow:'md',z:'popover'},'_250gjt'],variants:{size:{sm:'_1jyz92u',md:'tasm7b',lg:'k4x4d5',fullscreen:'_1nsv810'}}});
|
|
7
|
+
var overlay = recipeRuntime({base:[{bg:'bg.overlay',z:'popover'},'iu7siz']});
|
|
8
8
|
|
|
9
9
|
export { close, content, overlay };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './../../assets/src/layers/layers.css.ts.vanilla-
|
|
1
|
+
import './../../assets/src/layers/layers.css.ts.vanilla-BQxl5Oc4.css';
|
|
2
2
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
3
3
|
|
|
4
4
|
var footer = recipeRuntime({base:[{borderColor:'border.secondary',borderT:'1',flexDirection:'row',gap:'md',justifyContent:'end',px:'lg',py:'20'}]});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import './../../assets/src/layers/layers.css.ts.vanilla-
|
|
2
|
-
import './../../assets/src/disclosure-content/DisclosureContent.css.ts.vanilla-
|
|
1
|
+
import './../../assets/src/layers/layers.css.ts.vanilla-BQxl5Oc4.css';
|
|
2
|
+
import './../../assets/src/disclosure-content/DisclosureContent.css.ts.vanilla-C97DPRK_.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var content = recipeRuntime({base:[{overflow:'hidden'},'
|
|
5
|
+
var content = recipeRuntime({base:[{overflow:'hidden'},'_19zn17z']});
|
|
6
6
|
|
|
7
7
|
export { content };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import './../../assets/src/layers/layers.css.ts.vanilla-
|
|
2
|
-
import './../../assets/src/disclosure-trigger/DisclosureTrigger.css.ts.vanilla-
|
|
1
|
+
import './../../assets/src/layers/layers.css.ts.vanilla-BQxl5Oc4.css';
|
|
2
|
+
import './../../assets/src/disclosure-trigger/DisclosureTrigger.css.ts.vanilla-C7mcv2PW.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var icon = recipeRuntime({base:[{transition:'transform'}],variants:{chevronPosition:{end:'
|
|
6
|
-
var trigger = recipeRuntime({base:[{flexDirection:'row',fontSize:'md',fontWeight:'500',gap:'4',p:'xs',px:'4',rounded:'md',textAlign:'start',w:'full'},'
|
|
5
|
+
var icon = recipeRuntime({base:[{transition:'transform'}],variants:{chevronPosition:{end:'_17c9hpp',start:'_1utelo6'}}});
|
|
6
|
+
var trigger = recipeRuntime({base:[{flexDirection:'row',fontSize:'md',fontWeight:'500',gap:'4',p:'xs',px:'4',rounded:'md',textAlign:'start',w:'full'},'ww4t3p']});
|
|
7
7
|
|
|
8
8
|
export { icon, trigger };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import './../../assets/src/layers/layers.css.ts.vanilla-
|
|
2
|
-
import './../../assets/src/drawer/Drawer.css.ts.vanilla-
|
|
1
|
+
import './../../assets/src/layers/layers.css.ts.vanilla-BQxl5Oc4.css';
|
|
2
|
+
import './../../assets/src/drawer/Drawer.css.ts.vanilla-BiYwxVN6.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var close = recipeRuntime({base:[{rounded:'full'},'
|
|
6
|
-
var content = recipeRuntime({base:[{bg:'bg.default',display:'flex',flexDirection:'column',shadow:'md',z:'popover'},'
|
|
7
|
-
var overlay = recipeRuntime({base:[{bg:'bg.overlay',z:'popover'},'
|
|
5
|
+
var close = recipeRuntime({base:[{rounded:'full'},'_9c5oqm']});
|
|
6
|
+
var content = recipeRuntime({base:[{bg:'bg.default',display:'flex',flexDirection:'column',shadow:'md',z:'popover'},'_112u0q1'],variants:{position:{bottom:[{borderT:'1'},'_123qmq'],left:[{borderR:'1',h:'full',maxW:['full','lg'],w:['full','3/4']},'cqviki'],right:[{borderL:'1',h:'full',maxW:['full','lg'],w:['full','3/4']},'t2l94h']}}});
|
|
7
|
+
var overlay = recipeRuntime({base:[{bg:'bg.overlay',z:'popover'},'l6qi7s']});
|
|
8
8
|
|
|
9
9
|
export { close, content, overlay };
|
|
@@ -2,12 +2,12 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { useDropdownMenuContext } from '../dropdown-menu-context/DropdownMenuContext.js';
|
|
5
|
-
import {
|
|
5
|
+
import { ListboxBase } from '../listbox-base/ListboxBase.js';
|
|
6
6
|
|
|
7
|
-
const DropdownMenuContent = forwardRef(({ align = "start", children, sideOffset =
|
|
7
|
+
const DropdownMenuContent = forwardRef(({ align = "start", children, sideOffset = 4, ...props }, ref) => {
|
|
8
8
|
const { open } = useDropdownMenuContext("DropdownMenuContent");
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
10
|
-
|
|
10
|
+
ListboxBase,
|
|
11
11
|
{
|
|
12
12
|
enableExitAnimation: true,
|
|
13
13
|
open,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Box } from '../box/Box.js';
|
|
5
|
+
|
|
6
|
+
const DropdownMenuGroup = forwardRef(
|
|
7
|
+
({ children, ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(Box, { asChild: true, ref, ...props, children: /* @__PURE__ */ jsx(RadixMenu.Group, { children }) });
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
DropdownMenuGroup.displayName = "@optiaxiom/react/DropdownMenuGroup";
|
|
12
|
+
|
|
13
|
+
export { DropdownMenuGroup };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { ListboxItemBase } from '../listbox-item-base/ListboxItemBase.js';
|
|
5
5
|
|
|
6
6
|
const DropdownMenuItem = forwardRef(({ children, onSelect, ...props }, ref) => {
|
|
7
|
-
return /* @__PURE__ */ jsx(
|
|
7
|
+
return /* @__PURE__ */ jsx(ListboxItemBase, { ref, ...props, children: /* @__PURE__ */ jsx(RadixMenu.Item, { onSelect, children }) });
|
|
8
8
|
});
|
|
9
9
|
DropdownMenuItem.displayName = "@optiaxiom/react/DropdownMenuItem";
|
|
10
10
|
|
|
@@ -3,7 +3,7 @@ import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Separator } from '../separator/Separator.js';
|
|
5
5
|
|
|
6
|
-
const DropdownMenuSeparator = forwardRef((props, ref) => /* @__PURE__ */ jsx(Separator, { asChild: true, bg: "border.secondary", mx: "
|
|
6
|
+
const DropdownMenuSeparator = forwardRef((props, ref) => /* @__PURE__ */ jsx(Separator, { asChild: true, bg: "border.secondary", flex: "none", mx: "8", my: "4", ...props, children: /* @__PURE__ */ jsx(RadixMenu.Separator, { ref }) }));
|
|
7
7
|
DropdownMenuSeparator.displayName = "@optiaxiom/react/DropdownMenuSeparator";
|
|
8
8
|
|
|
9
9
|
export { DropdownMenuSeparator };
|