@soroush.tech/design-system 2.1.0-alpha.0 → 2.1.0-alpha.2
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/Accordion/Accordion.d.cts +2 -2
- package/dist/Accordion/Accordion.d.mts +2 -2
- package/dist/Accordion/AccordionGroup.d.cts +1 -1
- package/dist/Accordion/AccordionGroup.d.mts +1 -1
- package/dist/Alert/Alert.d.cts +1 -1
- package/dist/Alert/Alert.d.mts +1 -1
- package/dist/AppBar.d.cts +1 -1
- package/dist/AppBar.d.mts +1 -1
- package/dist/Autocomplete.d.cts +1 -1
- package/dist/Autocomplete.d.mts +1 -1
- package/dist/Avatar.d.cts +1 -1
- package/dist/Avatar.d.mts +1 -1
- package/dist/Backdrop.d.cts +1 -1
- package/dist/Backdrop.d.mts +1 -1
- package/dist/Badge.d.cts +1 -1
- package/dist/Badge.d.mts +1 -1
- package/dist/Breadcrumbs.d.cts +3 -3
- package/dist/Breadcrumbs.d.mts +3 -3
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/Card.d.cts +4 -4
- package/dist/Card.d.mts +4 -4
- package/dist/Checkbox.d.cts +1 -1
- package/dist/Checkbox.d.mts +1 -1
- package/dist/Chip.d.cts +1 -1
- package/dist/Chip.d.mts +1 -1
- package/dist/CircularProgress.d.cts +2 -2
- package/dist/CircularProgress.d.mts +2 -2
- package/dist/Collapse.d.cts +1 -1
- package/dist/Collapse.d.mts +1 -1
- package/dist/Drawer.d.cts +3 -3
- package/dist/Drawer.d.mts +3 -3
- package/dist/Fab.d.cts +1 -1
- package/dist/Fab.d.mts +1 -1
- package/dist/FabMenu/FabMenu.d.cts +1 -1
- package/dist/FabMenu/FabMenu.d.mts +1 -1
- package/dist/FabMenu/FabMenuItem.d.cts +1 -1
- package/dist/FabMenu/FabMenuItem.d.mts +1 -1
- package/dist/Fade.d.cts +1 -1
- package/dist/Fade.d.mts +1 -1
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Form.d.cts +1 -1
- package/dist/Form.d.mts +1 -1
- package/dist/FormControl.d.cts +1 -1
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormLabel.d.cts +1 -1
- package/dist/FormLabel.d.mts +1 -1
- package/dist/Grid.d.cts +1 -1
- package/dist/Grid.d.mts +1 -1
- package/dist/Grow.d.cts +1 -1
- package/dist/Grow.d.mts +1 -1
- package/dist/Icon.d.cts +1 -1
- package/dist/Icon.d.mts +1 -1
- package/dist/Image.d.cts +1 -1
- package/dist/Image.d.mts +1 -1
- package/dist/LinearProgress.d.cts +2 -2
- package/dist/LinearProgress.d.mts +2 -2
- package/dist/Link.d.cts +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/Menu/ContextMenu.cjs +23 -14
- package/dist/Menu/ContextMenu.d.cts +18 -8
- package/dist/Menu/ContextMenu.d.mts +18 -8
- package/dist/Menu/ContextMenu.mjs +24 -15
- package/dist/Menu/Menu.cjs +1 -1
- package/dist/Menu/Menu.d.cts +1 -1
- package/dist/Menu/Menu.d.mts +1 -1
- package/dist/Menu/Menu.mjs +1 -1
- package/dist/Menu/MenuItems.cjs +1 -1
- package/dist/Menu/MenuItems.d.cts +1 -1
- package/dist/Menu/MenuItems.d.mts +1 -1
- package/dist/Menu/MenuItems.mjs +1 -1
- package/dist/Menu/MenuList.cjs +1 -1
- package/dist/Menu/MenuList.d.cts +3 -36
- package/dist/Menu/MenuList.d.mts +3 -36
- package/dist/Menu/MenuList.mjs +1 -1
- package/dist/{Menu-CX9V2DAu.mjs → Menu-Cv887y7O.mjs} +8 -5
- package/dist/{Menu-BfJF32J2.cjs → Menu-DOOK_gM9.cjs} +8 -5
- package/dist/Menu.cjs +2 -2
- package/dist/Menu.d.cts +5 -5
- package/dist/Menu.d.mts +5 -5
- package/dist/Menu.mjs +2 -2
- package/dist/{MenuItem-CvCMGXuL.cjs → MenuItem-BWm8DC-S.cjs} +28 -25
- package/dist/{MenuItem-DdPzSWZY.mjs → MenuItem-hJeCsQZX.mjs} +28 -25
- package/dist/MenuItem.cjs +1 -1
- package/dist/MenuItem.d.cts +1 -1
- package/dist/MenuItem.d.mts +1 -1
- package/dist/MenuItem.mjs +1 -1
- package/dist/{MenuList-DsJmxNPu.cjs → MenuList-CSaaR3jt.cjs} +2 -1
- package/dist/{MenuList-CGZgfBno.mjs → MenuList-D7Pvpn_K.mjs} +2 -1
- package/dist/{MenuListContext-DJ_qJ1Uo.d.cts → MenuListContext-BN1VV12-.d.mts} +2 -2
- package/dist/{MenuListContext-DiZAVDCb.d.mts → MenuListContext-BkQzp2DA.d.cts} +2 -2
- package/dist/Modal.d.cts +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/NativeSelect.d.cts +2 -2
- package/dist/NativeSelect.d.mts +2 -2
- package/dist/NavTree/NavLink.d.cts +1 -1
- package/dist/NavTree/NavLink.d.mts +1 -1
- package/dist/NavTree/NavTree.d.cts +1 -1
- package/dist/NavTree/NavTree.d.mts +1 -1
- package/dist/NumberInput.d.cts +1 -1
- package/dist/NumberInput.d.mts +1 -1
- package/dist/Pagination/PaginationItem.d.cts +1 -1
- package/dist/Pagination/PaginationItem.d.mts +1 -1
- package/dist/Pagination.d.cts +2 -2
- package/dist/Pagination.d.mts +2 -2
- package/dist/Paper.d.cts +2 -2
- package/dist/Paper.d.mts +2 -2
- package/dist/Popover.d.cts +3 -3
- package/dist/Popover.d.mts +3 -3
- package/dist/Pressable.d.cts +1 -1
- package/dist/Pressable.d.mts +1 -1
- package/dist/Quote.d.cts +2 -2
- package/dist/Quote.d.mts +2 -2
- package/dist/Radio.d.cts +1 -1
- package/dist/Radio.d.mts +1 -1
- package/dist/RangeInput.d.cts +1 -1
- package/dist/RangeInput.d.mts +1 -1
- package/dist/Rating.d.cts +1 -1
- package/dist/Rating.d.mts +1 -1
- package/dist/ScrollArea.d.cts +1 -1
- package/dist/ScrollArea.d.mts +1 -1
- package/dist/Select.d.cts +2 -2
- package/dist/Select.d.mts +2 -2
- package/dist/Sidebar/Sidebar.d.cts +1 -1
- package/dist/Sidebar/Sidebar.d.mts +1 -1
- package/dist/Sidebar/SidebarItem.d.cts +3 -3
- package/dist/Sidebar/SidebarItem.d.mts +3 -3
- package/dist/Skeleton.d.cts +1 -1
- package/dist/Skeleton.d.mts +1 -1
- package/dist/Slide.d.cts +1 -1
- package/dist/Slide.d.mts +1 -1
- package/dist/Snackbar.d.cts +2 -2
- package/dist/Snackbar.d.mts +2 -2
- package/dist/Switch.d.cts +1 -1
- package/dist/Switch.d.mts +1 -1
- package/dist/Table/Table.d.cts +2 -2
- package/dist/Table/Table.d.mts +2 -2
- package/dist/Table/TableBody.d.cts +1 -1
- package/dist/Table/TableBody.d.mts +1 -1
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableContainer.d.cts +1 -1
- package/dist/Table/TableContainer.d.mts +1 -1
- package/dist/Table/TableControl.d.cts +1 -1
- package/dist/Table/TableControl.d.mts +1 -1
- package/dist/Table/TableFooter.d.cts +1 -1
- package/dist/Table/TableFooter.d.mts +1 -1
- package/dist/Table/TableHead.d.cts +1 -1
- package/dist/Table/TableHead.d.mts +1 -1
- package/dist/Table/TablePagination.d.cts +2 -2
- package/dist/Table/TablePagination.d.mts +2 -2
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TableRow.d.cts +1 -1
- package/dist/Table/TableRow.d.mts +1 -1
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/hooks.d.cts +1 -1
- package/dist/Table/hooks.d.mts +1 -1
- package/dist/Table.d.cts +5 -5
- package/dist/Table.d.mts +5 -5
- package/dist/{TableContext-4sJdk84N.d.cts → TableContext-BNwokJ3f.d.cts} +1 -1
- package/dist/{TableContext-BCW5av9c.d.mts → TableContext-jOlk5jxs.d.mts} +1 -1
- package/dist/Tabs/Tab.cjs +18 -14
- package/dist/Tabs/Tab.d.cts +2 -2
- package/dist/Tabs/Tab.d.mts +2 -2
- package/dist/Tabs/Tab.mjs +18 -14
- package/dist/Tabs/TabContext.d.cts +1 -1
- package/dist/Tabs/TabContext.d.mts +1 -1
- package/dist/Tabs/TabList.cjs +1 -1
- package/dist/Tabs/TabList.d.cts +1 -1
- package/dist/Tabs/TabList.d.mts +1 -1
- package/dist/Tabs/TabList.mjs +1 -1
- package/dist/Tabs/TabPanel.d.cts +2 -2
- package/dist/Tabs/TabPanel.d.mts +2 -2
- package/dist/Tabs/TabScrollButton.d.cts +1 -1
- package/dist/Tabs/TabScrollButton.d.mts +1 -1
- package/dist/Tabs/Tabs.cjs +1 -1
- package/dist/Tabs/Tabs.d.cts +2 -2
- package/dist/Tabs/Tabs.d.mts +2 -2
- package/dist/Tabs/Tabs.mjs +1 -1
- package/dist/{Tabs-CPH0H6yp.cjs → Tabs-BTa2myRe.cjs} +28 -21
- package/dist/{Tabs-CG-hRs9L.mjs → Tabs-CE8iDr0D.mjs} +28 -21
- package/dist/Tabs.cjs +1 -1
- package/dist/Tabs.d.cts +3 -3
- package/dist/Tabs.d.mts +3 -3
- package/dist/Tabs.mjs +1 -1
- package/dist/{TabsContext-CsiW5MOp.d.mts → TabsContext-D5E7s9i5.d.mts} +1 -1
- package/dist/{TabsContext-DrmDtBqA.d.cts → TabsContext-i57cha5W.d.cts} +1 -1
- package/dist/TextInput.d.cts +1 -1
- package/dist/TextInput.d.mts +1 -1
- package/dist/ToggleButton/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton/ToggleButton.d.mts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
- package/dist/Tooltip-Cx4ez9vY.mjs +405 -0
- package/dist/Tooltip-rkGm1HnP.cjs +417 -0
- package/dist/Tooltip.cjs +3 -311
- package/dist/Tooltip.d.cts +36 -5
- package/dist/Tooltip.d.mts +36 -5
- package/dist/Tooltip.mjs +1 -310
- package/dist/TransferList.d.cts +1 -1
- package/dist/TransferList.d.mts +1 -1
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/Zoom.d.cts +1 -1
- package/dist/Zoom.d.mts +1 -1
- package/dist/catalog.cjs +4 -0
- package/dist/catalog.d.cts +1 -1
- package/dist/catalog.d.mts +1 -1
- package/dist/catalog.mjs +4 -0
- package/dist/engine.d.cts +1 -1
- package/dist/engine.d.mts +1 -1
- package/dist/{index-D24iFgwR.d.cts → index-3-LXZL7g.d.mts} +3 -3
- package/dist/{index-BWiDilH8.d.mts → index-B-1sp9oV.d.mts} +7 -0
- package/dist/{index-C3TrdOpQ.d.cts → index-BDVi1DNs.d.mts} +3 -3
- package/dist/{index-5TAVgzbU.d.mts → index-BJIqJbF4.d.mts} +2 -2
- package/dist/{index-Bx-4KmJU.d.mts → index-BMeqk34D.d.mts} +1 -1
- package/dist/{index-DQYhGgbl.d.cts → index-BYg-l1_n.d.cts} +2 -2
- package/dist/{index-Biqn5xUs.d.mts → index-BbWQZ2Wj.d.mts} +4 -4
- package/dist/{index-DKNvADeE.d.mts → index-BhWBXIkH.d.cts} +3 -3
- package/dist/{index-DWon54cO.d.cts → index-BwFPSXSw.d.mts} +1 -1
- package/dist/{index-Bo8Og0oC.d.cts → index-Bwry7fNj.d.mts} +3 -3
- package/dist/{index-CeFExef3.d.cts → index-C3D70-3U.d.mts} +2 -2
- package/dist/{index-HLDMvfb2.d.cts → index-C6uLwNRF.d.cts} +4 -4
- package/dist/{index-BgmEVOSj.d.mts → index-C9jnQ-mQ.d.mts} +1 -1
- package/dist/{index-D--R4_5H.d.mts → index-CGlDeiGk.d.cts} +2 -2
- package/dist/{index-DvVQLBZc.d.cts → index-CK-uaK5U.d.cts} +7 -0
- package/dist/{index-DjmWIzXF.d.mts → index-CLTH0nFB.d.cts} +3 -3
- package/dist/{index-Dt-ZNTnC.d.cts → index-COGZ6LV4.d.mts} +1 -1
- package/dist/{index-DhzjNAzv.d.mts → index-CPmemva9.d.mts} +10 -5
- package/dist/{index-CW0DW6Aq.d.mts → index-CRbfhyQ6.d.mts} +2 -2
- package/dist/{index-m1RGSQlP.d.mts → index-CZofj6vc.d.cts} +3 -3
- package/dist/{index-Buu5MtRG.d.mts → index-C_K0hsEr.d.mts} +1 -1
- package/dist/index-C_n4ZPpQ.d.mts +1 -0
- package/dist/{index-fRyMPKtY.d.cts → index-Cc7Yhn7-.d.cts} +1 -1
- package/dist/{index-DgLjcrkG.d.cts → index-Cf2D7Y1b.d.cts} +1 -1
- package/dist/{index-YKXzINGk.d.mts → index-ClTo3BEJ.d.mts} +2 -2
- package/dist/{index-DR76LcSz.d.mts → index-CoHM1HQY.d.cts} +1 -1
- package/dist/{index-DtVrZFJI.d.mts → index-Cp96BUYc.d.cts} +2 -2
- package/dist/{index-CAICXdTA.d.cts → index-CvV0TCBK.d.cts} +1 -1
- package/dist/{index-DhTzn0mf.d.cts → index-CwWM6Xfz.d.cts} +1 -1
- package/dist/{index-BlHFb150.d.cts → index-CykbbqeN.d.cts} +2 -2
- package/dist/{index-Ba39mhDf.d.cts → index-DA3M2w5w.d.cts} +10 -5
- package/dist/index-DOimZ1Wo.d.mts +44 -0
- package/dist/{index-HAVWK7RM.d.cts → index-DOnYRzqY.d.cts} +2 -2
- package/dist/{index-BYAtunSZ.d.cts → index-DPCh-ols.d.mts} +2 -2
- package/dist/{index-CBOtkDdX.d.cts → index-DXUVsHux.d.mts} +1 -1
- package/dist/{index-DrfJt7W6.d.cts → index-Dh_9qMhj.d.mts} +2 -2
- package/dist/index-DiQHPHUv.d.cts +44 -0
- package/dist/{index-CyOSmefH.d.cts → index-F81TdZtB.d.mts} +2 -2
- package/dist/{index-DM7HHa4V.d.mts → index-YxsjfTkO.d.cts} +2 -2
- package/dist/{index-Bp9ECTzr.d.mts → index-d5jm3kxO.d.cts} +2 -2
- package/dist/index-fwRQcB91.d.cts +1 -0
- package/dist/{index-D_azfqsX.d.mts → index-qgFJF8n2.d.cts} +1 -1
- package/dist/{index-DtK3SaKA.d.mts → index-vls8Jhdl.d.cts} +1 -1
- package/dist/{index-Dudkopvi.d.mts → index-xhbtDtsc.d.mts} +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/style.d.cts +2 -2
- package/dist/style.d.mts +2 -2
- package/dist/theme.d.cts +2 -2
- package/dist/theme.d.mts +2 -2
- package/dist/{useTablePagination-BOzuKUnF.d.mts → useTablePagination-DOLl6Ba7.d.cts} +1 -1
- package/dist/{useTablePagination-CraL2Mux.d.cts → useTablePagination-bZTeweJ_.d.mts} +1 -1
- package/dist/{useTransition-B-hzi7Sm.d.mts → useTransition-Dk84FQFT.d.mts} +1 -1
- package/dist/{useTransition-CF_Zy_tM.d.cts → useTransition-DnOAXNav.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/index-6zQ2VUlM.d.cts +0 -1
- package/dist/index-B1qv6yGM.d.mts +0 -1
package/dist/Tooltip.mjs
CHANGED
|
@@ -1,310 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { n as useDefaultProps } from "./theme-DyyZQFzQ.mjs";
|
|
3
|
-
import { t as themeDefault } from "./themeDefault-BeZJzqJj.mjs";
|
|
4
|
-
import { t as getSurfaceRadius } from "./getSurfaceRadius-B1QE_VLa.mjs";
|
|
5
|
-
import { t as useControlled } from "./useControlled-B4uQ9Bj6.mjs";
|
|
6
|
-
import { Portal } from "./Portal.mjs";
|
|
7
|
-
import { t as useAnchoredPlacement } from "./useAnchoredPlacement-txSaWzfk.mjs";
|
|
8
|
-
import { t as useMergedRefs } from "./useMergedRefs-CdfwtmUd.mjs";
|
|
9
|
-
import { n as resolveTooltipPlacement, t as getTooltipOrigins } from "./getTooltipOrigins-D0bLLXwY.mjs";
|
|
10
|
-
import { cloneElement, useCallback, useEffect, useId, useRef, useState } from "react";
|
|
11
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
// src/Tooltip/hooks/useTooltip.ts
|
|
13
|
-
const isKeyboardFocus = (event) => {
|
|
14
|
-
try {
|
|
15
|
-
return event.target.matches(":focus-visible");
|
|
16
|
-
} catch {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* The state of a tooltip: whether it is open (its own, or its owner's), the timers that open and
|
|
22
|
-
* close it, and the handlers its child and the tooltip itself take. Opening and closing are
|
|
23
|
-
* delayed; moving from the child onto the tooltip does not close it, so its text can be read and
|
|
24
|
-
* selected (WCAG 1.4.13); Escape closes it at once.
|
|
25
|
-
*/
|
|
26
|
-
function useTooltip({ isOpen: isOpenProp, defaultOpen, isAtPoint = false, onOpen, onClose, enterDelay, leaveDelay, enterTouchDelay, leaveTouchDelay, shouldOpenOnHover, shouldOpenOnFocus, shouldOpenOnTouch }) {
|
|
27
|
-
const [isOpen, setIsOpen] = useControlled({
|
|
28
|
-
controlled: isOpenProp,
|
|
29
|
-
default: defaultOpen
|
|
30
|
-
});
|
|
31
|
-
const timer = useRef(void 0);
|
|
32
|
-
const latest = useRef({
|
|
33
|
-
isOpen,
|
|
34
|
-
isOpenProp,
|
|
35
|
-
isAtPoint,
|
|
36
|
-
onOpen,
|
|
37
|
-
onClose
|
|
38
|
-
});
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
latest.current = {
|
|
41
|
-
isOpen,
|
|
42
|
-
isOpenProp,
|
|
43
|
-
isAtPoint,
|
|
44
|
-
onOpen,
|
|
45
|
-
onClose
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
const clear = useCallback(() => window.clearTimeout(timer.current), []);
|
|
49
|
-
const ask = useCallback((next, event, delay) => {
|
|
50
|
-
clear();
|
|
51
|
-
timer.current = window.setTimeout(() => {
|
|
52
|
-
const current = latest.current;
|
|
53
|
-
if (current.isOpen === next) return;
|
|
54
|
-
if (next && current.isAtPoint) return;
|
|
55
|
-
if (current.isOpenProp === void 0) setIsOpen(next);
|
|
56
|
-
(next ? current.onOpen : current.onClose)?.(event);
|
|
57
|
-
}, delay);
|
|
58
|
-
}, [clear, setIsOpen]);
|
|
59
|
-
useEffect(() => clear, [clear]);
|
|
60
|
-
useEffect(() => {
|
|
61
|
-
if (!isOpen) return void 0;
|
|
62
|
-
const handleKeyDown = (event) => {
|
|
63
|
-
if (event.key === "Escape") ask(false, event, 0);
|
|
64
|
-
};
|
|
65
|
-
document.addEventListener("keydown", handleKeyDown);
|
|
66
|
-
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
67
|
-
}, [isOpen, ask]);
|
|
68
|
-
return {
|
|
69
|
-
isOpen,
|
|
70
|
-
childHandlers: {
|
|
71
|
-
onMouseEnter: (event) => {
|
|
72
|
-
if (shouldOpenOnHover) ask(true, event, enterDelay);
|
|
73
|
-
},
|
|
74
|
-
onMouseLeave: (event) => {
|
|
75
|
-
if (shouldOpenOnHover) ask(false, event, leaveDelay);
|
|
76
|
-
},
|
|
77
|
-
onFocus: (event) => {
|
|
78
|
-
if (shouldOpenOnFocus && isKeyboardFocus(event)) ask(true, event, enterDelay);
|
|
79
|
-
},
|
|
80
|
-
onBlur: (event) => {
|
|
81
|
-
if (shouldOpenOnFocus) ask(false, event, leaveDelay);
|
|
82
|
-
},
|
|
83
|
-
onTouchStart: (event) => {
|
|
84
|
-
if (shouldOpenOnTouch) ask(true, event, enterTouchDelay);
|
|
85
|
-
},
|
|
86
|
-
onTouchEnd: (event) => {
|
|
87
|
-
if (shouldOpenOnTouch) ask(false, event, leaveTouchDelay);
|
|
88
|
-
},
|
|
89
|
-
onTouchCancel: (event) => {
|
|
90
|
-
if (shouldOpenOnTouch) ask(false, event, leaveTouchDelay);
|
|
91
|
-
},
|
|
92
|
-
onPointerDown: (event) => {
|
|
93
|
-
if (event.pointerType !== "touch") ask(false, event, 0);
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
surfaceHandlers: {
|
|
97
|
-
onMouseEnter: () => {
|
|
98
|
-
if (shouldOpenOnHover) clear();
|
|
99
|
-
},
|
|
100
|
-
onMouseLeave: (event) => {
|
|
101
|
-
if (shouldOpenOnHover) ask(false, event, leaveDelay);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
// src/Tooltip/Tooltip.tsx
|
|
107
|
-
const MARGIN = 8;
|
|
108
|
-
const GAP = 8;
|
|
109
|
-
const ARROW = 8;
|
|
110
|
-
const TooltipSurface = styled("div", {
|
|
111
|
-
name: "Tooltip",
|
|
112
|
-
label: "Tooltip",
|
|
113
|
-
shouldForwardProp: createShouldForwardProp([
|
|
114
|
-
"layer",
|
|
115
|
-
"isInteractive",
|
|
116
|
-
"borderRadius",
|
|
117
|
-
"bg",
|
|
118
|
-
"textColor"
|
|
119
|
-
])
|
|
120
|
-
})(({ theme, layer, isInteractive, borderRadius, bg, textColor }) => ({
|
|
121
|
-
position: "fixed",
|
|
122
|
-
...!isInteractive && { pointerEvents: "none" },
|
|
123
|
-
top: 0,
|
|
124
|
-
left: 0,
|
|
125
|
-
visibility: "hidden",
|
|
126
|
-
zIndex: theme.zOrder[layer],
|
|
127
|
-
boxSizing: "border-box",
|
|
128
|
-
maxWidth: "20rem",
|
|
129
|
-
padding: `${theme.space[.5]} ${theme.space[1]}`,
|
|
130
|
-
borderRadius: getSurfaceRadius(theme, borderRadius),
|
|
131
|
-
boxShadow: theme.shadows[4],
|
|
132
|
-
backgroundColor: (0, src_exports.get)(theme, `background.${bg ?? "modal"}`),
|
|
133
|
-
color: (0, src_exports.get)(theme, `text.${textColor ?? themeDefault(theme, "textColor", "initial")}`),
|
|
134
|
-
fontFamily: (0, src_exports.get)(theme, "fonts.body"),
|
|
135
|
-
fontSize: theme.fontSizes[0],
|
|
136
|
-
lineHeight: (0, src_exports.get)(theme, "lineHeights.base"),
|
|
137
|
-
overflowWrap: "break-word"
|
|
138
|
-
}));
|
|
139
|
-
const TooltipDescription = styled("span", { label: "TooltipDescription" })({
|
|
140
|
-
position: "absolute",
|
|
141
|
-
width: 1,
|
|
142
|
-
height: 1,
|
|
143
|
-
margin: -1,
|
|
144
|
-
padding: 0,
|
|
145
|
-
border: 0,
|
|
146
|
-
overflow: "hidden",
|
|
147
|
-
clip: "rect(0 0 0 0)",
|
|
148
|
-
whiteSpace: "nowrap"
|
|
149
|
-
});
|
|
150
|
-
const TooltipTarget = styled("span", { label: "TooltipTarget" })({ display: "inline-grid" });
|
|
151
|
-
const TooltipArrow = styled("span", {
|
|
152
|
-
name: "Tooltip",
|
|
153
|
-
slot: "arrow",
|
|
154
|
-
label: "TooltipArrow"
|
|
155
|
-
})({
|
|
156
|
-
position: "absolute",
|
|
157
|
-
width: ARROW,
|
|
158
|
-
height: ARROW,
|
|
159
|
-
backgroundColor: "inherit",
|
|
160
|
-
transform: "rotate(45deg)",
|
|
161
|
-
pointerEvents: "none"
|
|
162
|
-
});
|
|
163
|
-
const getArrow = ({ anchorRect, surfaceSize, top, left }) => {
|
|
164
|
-
const { width, height } = surfaceSize;
|
|
165
|
-
if (top + height <= anchorRect.top + 1 || top >= anchorRect.bottom - 1) {
|
|
166
|
-
const side = top + height <= anchorRect.top + 1 ? "top" : "bottom";
|
|
167
|
-
const middle = anchorRect.left + anchorRect.width / 2 - left;
|
|
168
|
-
return {
|
|
169
|
-
side,
|
|
170
|
-
offset: Math.min(Math.max(middle, ARROW), width - ARROW)
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
const side = left + width <= anchorRect.left + 1 ? "left" : "right";
|
|
174
|
-
const middle = anchorRect.top + anchorRect.height / 2 - top;
|
|
175
|
-
return {
|
|
176
|
-
side,
|
|
177
|
-
offset: Math.min(Math.max(middle, ARROW), height - ARROW)
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
const isSameArrow = (a, b) => a !== null && a.side === b.side && a.offset === b.offset;
|
|
181
|
-
const getArrowStyle = ({ side, offset }) => {
|
|
182
|
-
const half = ARROW / 2;
|
|
183
|
-
if (side === "top") return {
|
|
184
|
-
bottom: -4,
|
|
185
|
-
left: offset - half
|
|
186
|
-
};
|
|
187
|
-
if (side === "bottom") return {
|
|
188
|
-
top: -4,
|
|
189
|
-
left: offset - half
|
|
190
|
-
};
|
|
191
|
-
if (side === "left") return {
|
|
192
|
-
right: -4,
|
|
193
|
-
top: offset - half
|
|
194
|
-
};
|
|
195
|
-
return {
|
|
196
|
-
left: -4,
|
|
197
|
-
top: offset - half
|
|
198
|
-
};
|
|
199
|
-
};
|
|
200
|
-
/**
|
|
201
|
-
* @description A short description of one child, shown on hover, keyboard focus and a long touch -
|
|
202
|
-
* a `role="tooltip"` in a `Portal`, placed beside its child and flipped for want of room. The
|
|
203
|
-
* child is named by it (`aria-label`) or described by it (`aria-describedby`, with
|
|
204
|
-
* `shouldDescribeChild`). It opens and closes after their delays, stays open while the pointer is
|
|
205
|
-
* on the tooltip itself, closes on Escape, and never takes or traps the focus.
|
|
206
|
-
*/
|
|
207
|
-
function Tooltip({ children, anchorPosition, title, placement: placementProp, hasArrow: hasArrowProp, enterDelay: enterDelayProp, leaveDelay: leaveDelayProp, enterTouchDelay: enterTouchDelayProp, leaveTouchDelay: leaveTouchDelayProp, shouldDescribeChild: shouldDescribeChildProp, isDescriptionPersistent: isDescriptionPersistentProp, isOpen: isOpenProp, defaultOpen = false, onOpen, onClose, isInteractive: isInteractiveProp, shouldOpenOnHover: shouldOpenOnHoverProp, shouldOpenOnFocus: shouldOpenOnFocusProp, shouldOpenOnTouch: shouldOpenOnTouchProp, slots, slotProps, layer: layerProp, borderRadius: borderRadiusProp, bg: bgProp, textColor: textColorProp, className, "data-testid": dataTestid }) {
|
|
208
|
-
const dp = useDefaultProps("Tooltip");
|
|
209
|
-
const placement = placementProp ?? dp.placement ?? "top";
|
|
210
|
-
const hasArrow = hasArrowProp ?? dp.hasArrow ?? false;
|
|
211
|
-
const shouldDescribeChild = shouldDescribeChildProp ?? dp.shouldDescribeChild ?? false;
|
|
212
|
-
const isDescriptionPersistent = isDescriptionPersistentProp ?? dp.isDescriptionPersistent ?? false;
|
|
213
|
-
const isInteractive = isInteractiveProp ?? dp.isInteractive ?? true;
|
|
214
|
-
const layer = layerProp ?? dp.layer ?? "tooltip";
|
|
215
|
-
const borderRadius = borderRadiusProp ?? dp.borderRadius;
|
|
216
|
-
const bg = bgProp ?? dp.bg;
|
|
217
|
-
const textColor = textColorProp ?? dp.textColor;
|
|
218
|
-
const id = useId();
|
|
219
|
-
const isAtPoint = anchorPosition !== void 0;
|
|
220
|
-
const { isOpen, childHandlers, surfaceHandlers } = useTooltip({
|
|
221
|
-
isOpen: isOpenProp,
|
|
222
|
-
defaultOpen,
|
|
223
|
-
isAtPoint,
|
|
224
|
-
onOpen,
|
|
225
|
-
onClose,
|
|
226
|
-
enterDelay: enterDelayProp ?? dp.enterDelay ?? 100,
|
|
227
|
-
leaveDelay: leaveDelayProp ?? dp.leaveDelay ?? 0,
|
|
228
|
-
enterTouchDelay: enterTouchDelayProp ?? dp.enterTouchDelay ?? 700,
|
|
229
|
-
leaveTouchDelay: leaveTouchDelayProp ?? dp.leaveTouchDelay ?? 1500,
|
|
230
|
-
shouldOpenOnHover: shouldOpenOnHoverProp ?? dp.shouldOpenOnHover ?? true,
|
|
231
|
-
shouldOpenOnFocus: shouldOpenOnFocusProp ?? dp.shouldOpenOnFocus ?? true,
|
|
232
|
-
shouldOpenOnTouch: shouldOpenOnTouchProp ?? dp.shouldOpenOnTouch ?? true
|
|
233
|
-
});
|
|
234
|
-
const hasTitle = title !== void 0 && title !== null && title !== "";
|
|
235
|
-
const isShown = isOpen && hasTitle;
|
|
236
|
-
const anchorRef = useRef(null);
|
|
237
|
-
const noAnchorRef = useRef(null);
|
|
238
|
-
const surfaceRef = useRef(null);
|
|
239
|
-
const own = children?.props ?? {};
|
|
240
|
-
const isChildDisabled = own.disabled === true;
|
|
241
|
-
const ref = useMergedRefs(isChildDisabled ? void 0 : anchorRef, own.ref);
|
|
242
|
-
const [arrow, setArrow] = useState(null);
|
|
243
|
-
const getOrigins = useCallback((context) => getTooltipOrigins(resolveTooltipPlacement(placement, context), context.isRtl), [placement]);
|
|
244
|
-
const onPlaced = useCallback((placed) => {
|
|
245
|
-
if (!hasArrow) return;
|
|
246
|
-
const next = getArrow(placed);
|
|
247
|
-
setArrow((current) => isSameArrow(current, next) ? current : next);
|
|
248
|
-
}, [hasArrow]);
|
|
249
|
-
useAnchoredPlacement({
|
|
250
|
-
isOpen: isShown,
|
|
251
|
-
anchorRef: anchorPosition ? noAnchorRef : anchorRef,
|
|
252
|
-
anchorPosition,
|
|
253
|
-
surfaceRef,
|
|
254
|
-
getOrigins,
|
|
255
|
-
margin: MARGIN,
|
|
256
|
-
gap: GAP,
|
|
257
|
-
onPlaced
|
|
258
|
-
});
|
|
259
|
-
const handlers = Object.fromEntries(Object.entries(childHandlers).map(([name, handler]) => [name, (event) => {
|
|
260
|
-
own[name]?.(event);
|
|
261
|
-
handler(event);
|
|
262
|
-
}]));
|
|
263
|
-
const ownDescription = own["aria-describedby"];
|
|
264
|
-
const names = typeof title === "string" && own["aria-label"] === void 0 && own["aria-labelledby"] === void 0 ? { "aria-label": title } : {};
|
|
265
|
-
const descriptionId = `${id}-description`;
|
|
266
|
-
const hasPersistentDescription = children !== void 0 && shouldDescribeChild && isDescriptionPersistent && hasTitle;
|
|
267
|
-
const describedBy = (shown) => hasPersistentDescription ? [ownDescription, descriptionId].filter(Boolean).join(" ") : [ownDescription, shown ? id : void 0].filter(Boolean).join(" ") || void 0;
|
|
268
|
-
const ariaProps = shouldDescribeChild ? { "aria-describedby": describedBy(isShown) } : names;
|
|
269
|
-
const child = children ? cloneElement(children, {
|
|
270
|
-
...isChildDisabled || isAtPoint ? {} : handlers,
|
|
271
|
-
...ariaProps,
|
|
272
|
-
ref
|
|
273
|
-
}) : null;
|
|
274
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
275
|
-
isChildDisabled && !isAtPoint ? /* @__PURE__ */ jsx(TooltipTarget, {
|
|
276
|
-
ref: anchorRef,
|
|
277
|
-
...handlers,
|
|
278
|
-
children: child
|
|
279
|
-
}) : child,
|
|
280
|
-
hasPersistentDescription && /* @__PURE__ */ jsx(TooltipDescription, {
|
|
281
|
-
id: descriptionId,
|
|
282
|
-
children: title
|
|
283
|
-
}),
|
|
284
|
-
isShown && /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsxs(TooltipSurface, {
|
|
285
|
-
...slotProps?.root,
|
|
286
|
-
as: slots?.root,
|
|
287
|
-
ref: surfaceRef,
|
|
288
|
-
id,
|
|
289
|
-
role: "tooltip",
|
|
290
|
-
layer,
|
|
291
|
-
isInteractive,
|
|
292
|
-
borderRadius,
|
|
293
|
-
bg,
|
|
294
|
-
textColor,
|
|
295
|
-
className: [slotProps?.root?.className, className].filter(Boolean).join(" ") || void 0,
|
|
296
|
-
"data-testid": dataTestid ?? slotProps?.root?.["data-testid"],
|
|
297
|
-
...isAtPoint || !isInteractive ? {} : surfaceHandlers,
|
|
298
|
-
children: [title, hasArrow && arrow ? /* @__PURE__ */ jsx(TooltipArrow, {
|
|
299
|
-
...slotProps?.arrow,
|
|
300
|
-
as: slots?.arrow,
|
|
301
|
-
style: {
|
|
302
|
-
...slotProps?.arrow?.style,
|
|
303
|
-
...getArrowStyle(arrow)
|
|
304
|
-
},
|
|
305
|
-
"aria-hidden": "true"
|
|
306
|
-
}) : null]
|
|
307
|
-
}) })
|
|
308
|
-
] });
|
|
309
|
-
}
|
|
310
|
-
export { Tooltip };
|
|
1
|
+
export { n as Tooltip, t as TooltipGroup } from "./Tooltip-Cx4ez9vY.mjs";
|
package/dist/TransferList.d.cts
CHANGED
package/dist/TransferList.d.mts
CHANGED
package/dist/Typography.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { jt as TypographyVariant } from "./index-
|
|
2
|
-
import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-
|
|
1
|
+
import { jt as TypographyVariant } from "./index-CK-uaK5U.cjs";
|
|
2
|
+
import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-Cp96BUYc.cjs";
|
|
3
3
|
export { BackgroundToken, TextColorToken, Typography, TypographyAlign, TypographyProps, type TypographyVariant };
|
package/dist/Typography.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { jt as TypographyVariant } from "./index-
|
|
2
|
-
import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-
|
|
1
|
+
import { jt as TypographyVariant } from "./index-B-1sp9oV.mjs";
|
|
2
|
+
import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-F81TdZtB.mjs";
|
|
3
3
|
export { BackgroundToken, TextColorToken, Typography, TypographyAlign, TypographyProps, type TypographyVariant };
|
package/dist/View.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _n as ViewBorderWidthToken, gn as ViewBorderRadiusToken, hn as ViewBorderColorToken, mn as ViewBackgroundToken, pn as View, vn as ViewColorToken, yn as ViewProps } from "./index-
|
|
1
|
+
import { _n as ViewBorderWidthToken, gn as ViewBorderRadiusToken, hn as ViewBorderColorToken, mn as ViewBackgroundToken, pn as View, vn as ViewColorToken, yn as ViewProps } from "./index-CK-uaK5U.cjs";
|
|
2
2
|
export { View, ViewBackgroundToken, ViewBorderColorToken, ViewBorderRadiusToken, ViewBorderWidthToken, ViewColorToken, ViewProps };
|
package/dist/View.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _n as ViewBorderWidthToken, gn as ViewBorderRadiusToken, hn as ViewBorderColorToken, mn as ViewBackgroundToken, pn as View, vn as ViewColorToken, yn as ViewProps } from "./index-
|
|
1
|
+
import { _n as ViewBorderWidthToken, gn as ViewBorderRadiusToken, hn as ViewBorderColorToken, mn as ViewBackgroundToken, pn as View, vn as ViewColorToken, yn as ViewProps } from "./index-B-1sp9oV.mjs";
|
|
2
2
|
export { View, ViewBackgroundToken, ViewBorderColorToken, ViewBorderRadiusToken, ViewBorderWidthToken, ViewColorToken, ViewProps };
|
package/dist/Zoom.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as TransitionProps } from "./useTransition-
|
|
1
|
+
import { n as TransitionProps } from "./useTransition-DnOAXNav.cjs";
|
|
2
2
|
type ZoomProps = TransitionProps;
|
|
3
3
|
/**
|
|
4
4
|
* @description Zooms one child in from nothing and out to nothing. The child holds a `ref` and
|
package/dist/Zoom.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as TransitionProps } from "./useTransition-
|
|
1
|
+
import { n as TransitionProps } from "./useTransition-Dk84FQFT.mjs";
|
|
2
2
|
type ZoomProps = TransitionProps;
|
|
3
3
|
/**
|
|
4
4
|
* @description Zooms one child in from nothing and out to nothing. The child holds a `ref` and
|
package/dist/catalog.cjs
CHANGED
|
@@ -622,6 +622,10 @@ const tooltipCatalog = defineCatalogEntry()({
|
|
|
622
622
|
values: [true, false],
|
|
623
623
|
default: true
|
|
624
624
|
},
|
|
625
|
+
shouldWrapDisabledChild: {
|
|
626
|
+
values: [true, false],
|
|
627
|
+
default: true
|
|
628
|
+
},
|
|
625
629
|
isDescriptionPersistent: {
|
|
626
630
|
values: [true, false],
|
|
627
631
|
default: false
|
package/dist/catalog.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
1
|
+
import { nt as Theme } from "./index-CK-uaK5U.cjs";
|
|
2
2
|
/** A value that survives `JSON.stringify` - all a catalog holds. */
|
|
3
3
|
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
4
4
|
[key: string]: JsonValue;
|
package/dist/catalog.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
1
|
+
import { nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
2
|
/** A value that survives `JSON.stringify` - all a catalog holds. */
|
|
3
3
|
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
4
4
|
[key: string]: JsonValue;
|
package/dist/catalog.mjs
CHANGED
|
@@ -621,6 +621,10 @@ const tooltipCatalog = defineCatalogEntry()({
|
|
|
621
621
|
values: [true, false],
|
|
622
622
|
default: true
|
|
623
623
|
},
|
|
624
|
+
shouldWrapDisabledChild: {
|
|
625
|
+
values: [true, false],
|
|
626
|
+
default: true
|
|
627
|
+
},
|
|
624
628
|
isDescriptionPersistent: {
|
|
625
629
|
values: [true, false],
|
|
626
630
|
default: false
|
package/dist/engine.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
1
|
+
import { nt as Theme } from "./index-CK-uaK5U.cjs";
|
|
2
2
|
import { ComponentType, RefAttributes } from "react";
|
|
3
3
|
import { CacheProvider, Interpolation } from "@emotion/react";
|
|
4
4
|
/** `Global`, retyped against this package's own `Theme` (see `styled.ts`'s `StyledTags`). */
|
package/dist/engine.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
1
|
+
import { nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
2
|
import { CacheProvider, Interpolation } from "@emotion/react";
|
|
3
3
|
import { ComponentType, RefAttributes } from "react";
|
|
4
4
|
/** `Global`, retyped against this package's own `Theme` (see `styled.ts`'s `StyledTags`). */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
2
|
-
import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-
|
|
3
|
-
import { ElementType, HTMLAttributes } from "react";
|
|
1
|
+
import { nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
|
+
import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-BMeqk34D.mjs";
|
|
4
3
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
4
|
+
import { ElementType, HTMLAttributes } from "react";
|
|
5
5
|
type ButtonGroupOrientation = 'horizontal' | 'vertical';
|
|
6
6
|
type ButtonGroupRadius = keyof Theme['radii'];
|
|
7
7
|
interface ButtonGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>, SpaceProps<Theme> {
|
|
@@ -552,6 +552,13 @@ interface TooltipOwnerState {
|
|
|
552
552
|
shouldDescribeChild?: boolean;
|
|
553
553
|
isDescriptionPersistent?: boolean;
|
|
554
554
|
isInteractive?: boolean;
|
|
555
|
+
shouldWrapDisabledChild?: boolean;
|
|
556
|
+
/**
|
|
557
|
+
* Theme only. With a value above 0, every tooltip under the theme shares one delay window, as in a
|
|
558
|
+
* `TooltipGroup` of that duration: no enter delay while another is open or within this many
|
|
559
|
+
* milliseconds of the last close. A `TooltipGroup` around a tooltip wins.
|
|
560
|
+
*/
|
|
561
|
+
skipDelayDuration?: number;
|
|
555
562
|
shouldOpenOnHover?: boolean;
|
|
556
563
|
shouldOpenOnFocus?: boolean;
|
|
557
564
|
shouldOpenOnTouch?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ft as ThemeIconSizes } from "./index-
|
|
2
|
-
import { n as TextColorToken } from "./index-
|
|
3
|
-
import { SVGProps } from "react";
|
|
1
|
+
import { ft as ThemeIconSizes } from "./index-B-1sp9oV.mjs";
|
|
2
|
+
import { n as TextColorToken } from "./index-F81TdZtB.mjs";
|
|
4
3
|
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
4
|
+
import { SVGProps } from "react";
|
|
5
5
|
declare const SvgAccountTree: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
6
6
|
declare const SvgAdd: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
7
7
|
declare const SvgAddCircle: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
2
|
-
import { n as IconProps, r as IconName } from "./index-
|
|
1
|
+
import { nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
|
+
import { n as IconProps, r as IconName } from "./index-BDVi1DNs.mjs";
|
|
3
3
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { ButtonHTMLAttributes } from "react";
|
|
5
5
|
type TableSortLabelDirection = 'asc' | 'desc';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as PaletteColor, _ as ButtonVariants, nt as Theme } from "./index-
|
|
1
|
+
import { U as PaletteColor, _ as ButtonVariants, nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
2
|
import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
3
3
|
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
4
4
|
/** Augmentable via the `ButtonVariants` interface - style new values through `theme.components.Button.variants`. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
2
|
-
import { n as IconProps, r as IconName } from "./index-
|
|
1
|
+
import { nt as Theme } from "./index-CK-uaK5U.cjs";
|
|
2
|
+
import { n as IconProps, r as IconName } from "./index-CLTH0nFB.cjs";
|
|
3
3
|
import { ButtonHTMLAttributes } from "react";
|
|
4
4
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
type TableSortLabelDirection = 'asc' | 'desc';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { nt as Theme, tt as TabsVariants } from "./index-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { t as TabValue } from "./TabsContext-
|
|
4
|
-
import { n as TabScrollButtonProps } from "./index-
|
|
1
|
+
import { nt as Theme, tt as TabsVariants } from "./index-B-1sp9oV.mjs";
|
|
2
|
+
import "./index-C_K0hsEr.mjs";
|
|
3
|
+
import { t as TabValue } from "./TabsContext-D5E7s9i5.mjs";
|
|
4
|
+
import { n as TabScrollButtonProps } from "./index-DXUVsHux.mjs";
|
|
5
5
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
6
6
|
import { ComponentType, ReactNode, Ref } from "react";
|
|
7
7
|
type TabsVariant = keyof TabsVariants;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
2
|
-
import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-
|
|
3
|
-
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
1
|
+
import { nt as Theme } from "./index-CK-uaK5U.cjs";
|
|
2
|
+
import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-CwWM6Xfz.cjs";
|
|
4
3
|
import { HTMLAttributes } from "react";
|
|
4
|
+
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
type PaginationColor = PaginationItemColor;
|
|
6
6
|
type PaginationVariant = PaginationItemVariant;
|
|
7
7
|
type PaginationShape = PaginationItemShape;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ButtonProps } from "./index-
|
|
1
|
+
import { i as ButtonProps } from "./index-BMeqk34D.mjs";
|
|
2
2
|
import { ReactNode, Ref } from "react";
|
|
3
3
|
type FabVariant = 'circular' | 'extended';
|
|
4
4
|
type FabButtonProps = Omit<ButtonProps, 'variant' | 'shape' | 'endIcon' | 'loading' | 'loadingIndicator' | 'loadingPosition' | 'fullWidth' | 'href' | 'target' | 'rel' | 'gap'>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
2
|
-
import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-
|
|
3
|
-
import { HTMLAttributes } from "react";
|
|
1
|
+
import { nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
|
+
import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-C9jnQ-mQ.mjs";
|
|
4
3
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
4
|
+
import { HTMLAttributes } from "react";
|
|
5
5
|
type PaginationColor = PaginationItemColor;
|
|
6
6
|
type PaginationVariant = PaginationItemVariant;
|
|
7
7
|
type PaginationShape = PaginationItemShape;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
2
|
-
import { t as MenuItemValue } from "./MenuListContext-
|
|
1
|
+
import { nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
|
+
import { t as MenuItemValue } from "./MenuListContext-BN1VV12-.mjs";
|
|
3
3
|
import { ElementType, KeyboardEvent, MouseEvent, ReactNode } from "react";
|
|
4
4
|
type MenuItemColor = keyof Theme['palette'];
|
|
5
5
|
type MenuItemSize = keyof Theme['sizes'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { nt as Theme, tt as TabsVariants } from "./index-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { t as TabValue } from "./TabsContext-
|
|
4
|
-
import { n as TabScrollButtonProps } from "./index-
|
|
1
|
+
import { nt as Theme, tt as TabsVariants } from "./index-CK-uaK5U.cjs";
|
|
2
|
+
import "./index-CvV0TCBK.cjs";
|
|
3
|
+
import { t as TabValue } from "./TabsContext-i57cha5W.cjs";
|
|
4
|
+
import { n as TabScrollButtonProps } from "./index-qgFJF8n2.cjs";
|
|
5
5
|
import { ComponentType, ReactNode, Ref } from "react";
|
|
6
6
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
7
7
|
type TabsVariant = keyof TabsVariants;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as PaletteColor, nt as Theme } from "./index-
|
|
1
|
+
import { U as PaletteColor, nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
2
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
3
3
|
import { ButtonHTMLAttributes, ElementType, ReactNode } from "react";
|
|
4
4
|
type PaginationItemType = 'page' | 'first' | 'previous' | 'next' | 'last' | 'start-ellipsis' | 'end-ellipsis';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
2
|
-
import { r as TransitionTimeout, t as TransitionCallbacks } from "./useTransition-
|
|
1
|
+
import { nt as Theme } from "./index-CK-uaK5U.cjs";
|
|
2
|
+
import { r as TransitionTimeout, t as TransitionCallbacks } from "./useTransition-DnOAXNav.cjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
type CollapseOrientation = 'vertical' | 'horizontal';
|
|
5
5
|
interface CollapseProps extends TransitionCallbacks {
|
|
@@ -552,6 +552,13 @@ interface TooltipOwnerState {
|
|
|
552
552
|
shouldDescribeChild?: boolean;
|
|
553
553
|
isDescriptionPersistent?: boolean;
|
|
554
554
|
isInteractive?: boolean;
|
|
555
|
+
shouldWrapDisabledChild?: boolean;
|
|
556
|
+
/**
|
|
557
|
+
* Theme only. With a value above 0, every tooltip under the theme shares one delay window, as in a
|
|
558
|
+
* `TooltipGroup` of that duration: no enter delay while another is open or within this many
|
|
559
|
+
* milliseconds of the last close. A `TooltipGroup` around a tooltip wins.
|
|
560
|
+
*/
|
|
561
|
+
skipDelayDuration?: number;
|
|
555
562
|
shouldOpenOnHover?: boolean;
|
|
556
563
|
shouldOpenOnFocus?: boolean;
|
|
557
564
|
shouldOpenOnTouch?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ft as ThemeIconSizes } from "./index-
|
|
2
|
-
import { n as TextColorToken } from "./index-
|
|
3
|
-
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
1
|
+
import { ft as ThemeIconSizes } from "./index-CK-uaK5U.cjs";
|
|
2
|
+
import { n as TextColorToken } from "./index-Cp96BUYc.cjs";
|
|
4
3
|
import { SVGProps } from "react";
|
|
4
|
+
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
declare const SvgAccountTree: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
6
6
|
declare const SvgAdd: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
7
7
|
declare const SvgAddCircle: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
1
|
+
import { nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
2
|
import { KeyboardEvent, MouseEvent, ReactNode, Ref, RefCallback, SyntheticEvent } from "react";
|
|
3
3
|
type ModalCloseReason = 'escapeKey' | 'backdropClick';
|
|
4
4
|
type EventHandlers = Record<string, ((event: SyntheticEvent) => void) | undefined>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { cn as PaperElevation, nt as Theme } from "./index-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { t as MenuItemValue } from "./MenuListContext-
|
|
4
|
-
import {
|
|
1
|
+
import { cn as PaperElevation, nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
|
+
import "./index-C_n4ZPpQ.mjs";
|
|
3
|
+
import { t as MenuItemValue } from "./MenuListContext-BN1VV12-.mjs";
|
|
4
|
+
import { r as MenuListSlotProps } from "./index-DOimZ1Wo.mjs";
|
|
5
|
+
import { n as MenuItemData } from "./index-CRbfhyQ6.mjs";
|
|
5
6
|
import { KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref, SyntheticEvent } from "react";
|
|
6
7
|
/** Which edge of its trigger a menu lines up with: the start edge, or the end edge. */
|
|
7
8
|
type MenuAlign = 'start' | 'end';
|
|
@@ -56,6 +57,10 @@ interface MenuProps {
|
|
|
56
57
|
dense?: boolean;
|
|
57
58
|
/** Names the list. Default: the trigger names it (`aria-labelledby`). */
|
|
58
59
|
'aria-label'?: string;
|
|
60
|
+
/** Props for a part: `list` is the `role="menu"` list - and every submenu's - for the app's `data-*`, class and `aria-*`. The menu's own `role`, `id` and name win. */
|
|
61
|
+
slotProps?: {
|
|
62
|
+
list?: MenuListSlotProps;
|
|
63
|
+
};
|
|
59
64
|
className?: string;
|
|
60
65
|
'data-testid'?: string;
|
|
61
66
|
}
|
|
@@ -66,5 +71,5 @@ interface MenuProps {
|
|
|
66
71
|
* can't clip it, but stays inside the menu's own box in the DOM. Escape or a chosen row
|
|
67
72
|
* closes it and returns focus to the trigger; focus leaving it closes it where it went.
|
|
68
73
|
*/
|
|
69
|
-
declare function Menu({ trigger, children, items, isOpen: isOpenProp, defaultOpen, onOpen, onClose, onStep, onSelect, align: alignProp, marginThreshold: marginThresholdProp, elevation: elevationProp, layer: layerProp, borderRadius: borderRadiusProp, emptyLabel, color: colorProp, textColor: textColorProp, size: sizeProp, dense: denseProp, 'aria-label': ariaLabel, className, 'data-testid': dataTestid }: Readonly<MenuProps>): import("react").JSX.Element;
|
|
74
|
+
declare function Menu({ trigger, children, items, isOpen: isOpenProp, defaultOpen, onOpen, onClose, onStep, onSelect, align: alignProp, marginThreshold: marginThresholdProp, elevation: elevationProp, layer: layerProp, borderRadius: borderRadiusProp, emptyLabel, color: colorProp, textColor: textColorProp, size: sizeProp, dense: denseProp, 'aria-label': ariaLabel, className, slotProps, 'data-testid': dataTestid }: Readonly<MenuProps>): import("react").JSX.Element;
|
|
70
75
|
export { MenuAlign as a, MenuStep as i, MenuCloseReason as n, MenuProps as r, Menu as t };
|