@soroush.tech/design-system 2.1.0-alpha.1 → 2.1.0
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 +1 -1
- package/dist/Menu/ContextMenu.d.cts +6 -6
- package/dist/Menu/ContextMenu.d.mts +6 -6
- package/dist/Menu/ContextMenu.mjs +1 -1
- 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.d.cts +2 -2
- package/dist/Menu/MenuList.d.mts +2 -2
- package/dist/{Menu-C_4jYHWE.mjs → Menu-Cv887y7O.mjs} +1 -1
- package/dist/{Menu-C6eIdA1J.cjs → Menu-DOOK_gM9.cjs} +1 -1
- package/dist/Menu.cjs +1 -1
- package/dist/Menu.d.cts +4 -4
- package/dist/Menu.d.mts +4 -4
- package/dist/Menu.mjs +1 -1
- package/dist/{MenuItem-Bg4iRvVe.cjs → MenuItem-BWm8DC-S.cjs} +1 -1
- package/dist/{MenuItem-kRGVRI6G.mjs → MenuItem-hJeCsQZX.mjs} +1 -1
- 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/{MenuListContext-AnAxu0he.d.cts → MenuListContext-BN1VV12-.d.mts} +2 -2
- package/dist/{MenuListContext-DURKFg_T.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-CPxH920f.d.mts → TableContext-BNwokJ3f.d.cts} +1 -1
- package/dist/{TableContext-VuMFtVNr.d.cts → TableContext-jOlk5jxs.d.mts} +1 -1
- package/dist/Tabs/Tab.cjs +1 -1
- package/dist/Tabs/Tab.d.cts +2 -2
- package/dist/Tabs/Tab.d.mts +2 -2
- package/dist/Tabs/Tab.mjs +1 -1
- 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-DmiA1J--.cjs → Tabs-BTa2myRe.cjs} +3 -3
- package/dist/{Tabs-C_qe9d4p.mjs → Tabs-CE8iDr0D.mjs} +3 -3
- 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-DeP8oJpC.d.cts → TabsContext-D5E7s9i5.d.mts} +1 -1
- package/dist/{TabsContext-VJcdZQOf.d.mts → 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-CwbuEQzf.mjs → Tooltip-Cx4ez9vY.mjs} +86 -13
- package/dist/{Tooltip-CrPRvmj3.cjs → Tooltip-rkGm1HnP.cjs} +89 -10
- package/dist/Tooltip.cjs +2 -1
- package/dist/Tooltip.d.cts +20 -2
- package/dist/Tooltip.d.mts +20 -2
- package/dist/Tooltip.mjs +1 -1
- 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.d.cts +1 -1
- package/dist/catalog.d.mts +1 -1
- package/dist/engine.d.cts +1 -1
- package/dist/engine.d.mts +1 -1
- package/dist/{index-Sq75GwA2.d.cts → index-3-LXZL7g.d.mts} +3 -3
- package/dist/{index-DOH6uskj.d.mts → index-B-1sp9oV.d.mts} +6 -0
- package/dist/{index-hTgl9zwe.d.mts → index-BDVi1DNs.d.mts} +2 -2
- package/dist/{index-3Xe5X6Ny.d.mts → index-BJIqJbF4.d.mts} +2 -2
- package/dist/{index-CCEfrBNN.d.mts → index-BMeqk34D.d.mts} +1 -1
- package/dist/{index-C9nnnfhd.d.cts → index-BYg-l1_n.d.cts} +2 -2
- package/dist/{index-BLypGp0N.d.mts → index-BbWQZ2Wj.d.mts} +4 -4
- package/dist/{index-v1I6VA9w.d.cts → index-BhWBXIkH.d.cts} +2 -2
- package/dist/{index-DACdQ7-d.d.cts → index-BwFPSXSw.d.mts} +1 -1
- package/dist/{index-BFUn2EWp.d.mts → index-Bwry7fNj.d.mts} +2 -2
- package/dist/{index-BKM4d_F4.d.cts → index-C3D70-3U.d.mts} +2 -2
- package/dist/{index-gHMydoIS.d.cts → index-C6uLwNRF.d.cts} +4 -4
- package/dist/{index-C-ebcNOc.d.mts → index-C9jnQ-mQ.d.mts} +1 -1
- package/dist/{index-D7h8qFS1.d.cts → index-CGlDeiGk.d.cts} +2 -2
- package/dist/{index-C6a3kDn2.d.cts → index-CK-uaK5U.d.cts} +6 -0
- package/dist/{index-DAJ5DVHh.d.cts → index-CLTH0nFB.d.cts} +2 -2
- package/dist/{index-CP55_Zs2.d.mts → index-COGZ6LV4.d.mts} +1 -1
- package/dist/{index-CgyyM3ty.d.cts → index-CPmemva9.d.mts} +5 -5
- package/dist/{index-Dg0FPoms.d.mts → index-CRbfhyQ6.d.mts} +2 -2
- package/dist/{index-BVDN2XbT.d.mts → index-CZofj6vc.d.cts} +3 -3
- package/dist/{index-i8BxMDEC.d.mts → index-C_K0hsEr.d.mts} +1 -1
- package/dist/index-C_n4ZPpQ.d.mts +1 -0
- package/dist/{index-D2tfsNPw.d.cts → index-Cc7Yhn7-.d.cts} +1 -1
- package/dist/{index-gxBafJdz.d.cts → index-Cf2D7Y1b.d.cts} +1 -1
- package/dist/{index-DsBOpK8T.d.mts → index-ClTo3BEJ.d.mts} +2 -2
- package/dist/{index-CBHCGizS.d.mts → index-CoHM1HQY.d.cts} +1 -1
- package/dist/{index-COgZvhXQ.d.mts → index-Cp96BUYc.d.cts} +2 -2
- package/dist/{index-CtwlReZi.d.cts → index-CvV0TCBK.d.cts} +1 -1
- package/dist/{index-CHWMSBhQ.d.cts → index-CwWM6Xfz.d.cts} +1 -1
- package/dist/{index-Dvx5TRET.d.cts → index-CykbbqeN.d.cts} +2 -2
- package/dist/{index-ZyigJMkV.d.mts → index-DA3M2w5w.d.cts} +5 -5
- package/dist/{index-Biqpy7c9.d.cts → index-DOimZ1Wo.d.mts} +3 -3
- package/dist/{index-B5_-Bxoo.d.cts → index-DOnYRzqY.d.cts} +2 -2
- package/dist/{index-DQo4XtH4.d.mts → index-DPCh-ols.d.mts} +2 -2
- package/dist/{index-DTJN6JL2.d.cts → index-DXUVsHux.d.mts} +1 -1
- package/dist/{index-Bhb0bFxe.d.mts → index-Dh_9qMhj.d.mts} +2 -2
- package/dist/{index-B2XL_zZY.d.mts → index-DiQHPHUv.d.cts} +3 -3
- package/dist/{index-DMysZsti.d.cts → index-F81TdZtB.d.mts} +2 -2
- package/dist/{index-B-p51b0z.d.cts → index-YxsjfTkO.d.cts} +2 -2
- package/dist/{index-DbKYSbLs.d.mts → index-d5jm3kxO.d.cts} +2 -2
- package/dist/index-fwRQcB91.d.cts +1 -0
- package/dist/{index-DlNBgVwb.d.mts → index-qgFJF8n2.d.cts} +1 -1
- package/dist/{index-2jMSUeji.d.cts → index-vls8Jhdl.d.cts} +1 -1
- package/dist/{index-D0skdQEK.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-CUsagS5T.d.mts → useTablePagination-DOLl6Ba7.d.cts} +1 -1
- package/dist/{useTablePagination-jpEfHKUh.d.cts → useTablePagination-bZTeweJ_.d.mts} +1 -1
- package/dist/{useTransition-BJ375Sto.d.cts → useTransition-Dk84FQFT.d.mts} +1 -1
- package/dist/{useTransition-DDGpvgci.d.mts → useTransition-DnOAXNav.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/index-BL5Kj3Ka.d.mts +0 -1
- package/dist/index-CJMvoc8h.d.cts +0 -1
|
@@ -10,6 +10,33 @@ const require_getTooltipOrigins = require("./getTooltipOrigins-8b5zQafY.cjs");
|
|
|
10
10
|
let react = require("react");
|
|
11
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
12
|
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
|
13
|
+
// src/Tooltip/TooltipGroupContext.ts
|
|
14
|
+
const TooltipGroupContext = (0, react.createContext)(null);
|
|
15
|
+
/** The state of a group whose window is `skipDelayDuration` milliseconds long. */
|
|
16
|
+
const createTooltipGroupState = (skipDelayDuration) => {
|
|
17
|
+
let active = null;
|
|
18
|
+
let closedAt = Number.NEGATIVE_INFINITY;
|
|
19
|
+
return {
|
|
20
|
+
shouldSkipDelay: () => active !== null || Date.now() - closedAt < skipDelayDuration,
|
|
21
|
+
open: (close) => {
|
|
22
|
+
active = close;
|
|
23
|
+
},
|
|
24
|
+
closeActive: (event) => active?.(event),
|
|
25
|
+
release: (close) => {
|
|
26
|
+
if (active !== close) return;
|
|
27
|
+
active = null;
|
|
28
|
+
closedAt = Date.now();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
const themeGroups = /* @__PURE__ */ new WeakMap();
|
|
33
|
+
const getThemeTooltipGroup = (theme, skipDelayDuration) => {
|
|
34
|
+
const byDuration = themeGroups.get(theme) ?? /* @__PURE__ */ new Map();
|
|
35
|
+
themeGroups.set(theme, byDuration);
|
|
36
|
+
const group = byDuration.get(skipDelayDuration) ?? createTooltipGroupState(skipDelayDuration);
|
|
37
|
+
byDuration.set(skipDelayDuration, group);
|
|
38
|
+
return group;
|
|
39
|
+
};
|
|
13
40
|
// src/Tooltip/hooks/useTooltip.ts
|
|
14
41
|
const isKeyboardFocus = (event) => {
|
|
15
42
|
try {
|
|
@@ -24,18 +51,21 @@ const isKeyboardFocus = (event) => {
|
|
|
24
51
|
* delayed; moving from the child onto the tooltip does not close it, so its text can be read and
|
|
25
52
|
* selected (WCAG 1.4.13); Escape closes it at once.
|
|
26
53
|
*/
|
|
27
|
-
function useTooltip({ isOpen: isOpenProp, defaultOpen, isAtPoint = false, onOpen, onClose, enterDelay, leaveDelay, enterTouchDelay, leaveTouchDelay, shouldOpenOnHover, shouldOpenOnFocus, shouldOpenOnTouch }) {
|
|
54
|
+
function useTooltip({ isOpen: isOpenProp, defaultOpen, isAtPoint = false, onOpen, onClose, enterDelay, leaveDelay, enterTouchDelay, leaveTouchDelay, shouldOpenOnHover, shouldOpenOnFocus, shouldOpenOnTouch, skipDelayDuration = 0 }) {
|
|
28
55
|
const [isOpen, setIsOpen] = require_useControlled.useControlled({
|
|
29
56
|
controlled: isOpenProp,
|
|
30
57
|
default: defaultOpen
|
|
31
58
|
});
|
|
32
59
|
const timer = (0, react.useRef)(void 0);
|
|
60
|
+
const theme = require_theme.useTheme();
|
|
61
|
+
const group = (0, react.useContext)(TooltipGroupContext) ?? (skipDelayDuration > 0 ? getThemeTooltipGroup(theme, skipDelayDuration) : null);
|
|
33
62
|
const latest = (0, react.useRef)({
|
|
34
63
|
isOpen,
|
|
35
64
|
isOpenProp,
|
|
36
65
|
isAtPoint,
|
|
37
66
|
onOpen,
|
|
38
|
-
onClose
|
|
67
|
+
onClose,
|
|
68
|
+
group
|
|
39
69
|
});
|
|
40
70
|
(0, react.useEffect)(() => {
|
|
41
71
|
latest.current = {
|
|
@@ -43,20 +73,47 @@ function useTooltip({ isOpen: isOpenProp, defaultOpen, isAtPoint = false, onOpen
|
|
|
43
73
|
isOpenProp,
|
|
44
74
|
isAtPoint,
|
|
45
75
|
onOpen,
|
|
46
|
-
onClose
|
|
76
|
+
onClose,
|
|
77
|
+
group
|
|
47
78
|
};
|
|
48
79
|
});
|
|
49
80
|
const clear = (0, react.useCallback)(() => window.clearTimeout(timer.current), []);
|
|
81
|
+
const closeNow = (0, react.useCallback)((event) => {
|
|
82
|
+
clear();
|
|
83
|
+
const current = latest.current;
|
|
84
|
+
setIsOpen(false);
|
|
85
|
+
current.onClose?.(event);
|
|
86
|
+
}, [clear, setIsOpen]);
|
|
87
|
+
const isInGroup = group !== null && isOpenProp === void 0;
|
|
88
|
+
(0, react.useEffect)(() => {
|
|
89
|
+
if (!isInGroup || !isOpen) return void 0;
|
|
90
|
+
group.open(closeNow);
|
|
91
|
+
return () => group.release(closeNow);
|
|
92
|
+
}, [
|
|
93
|
+
group,
|
|
94
|
+
isInGroup,
|
|
95
|
+
isOpen,
|
|
96
|
+
closeNow
|
|
97
|
+
]);
|
|
98
|
+
const getEnterDelay = () => isInGroup && group.shouldSkipDelay() ? 0 : enterDelay;
|
|
50
99
|
const ask = (0, react.useCallback)((next, event, delay) => {
|
|
51
100
|
clear();
|
|
52
101
|
timer.current = window.setTimeout(() => {
|
|
53
102
|
const current = latest.current;
|
|
54
103
|
if (current.isOpen === next) return;
|
|
55
104
|
if (next && current.isAtPoint) return;
|
|
56
|
-
if (current.isOpenProp === void 0)
|
|
105
|
+
if (current.isOpenProp === void 0) {
|
|
106
|
+
if (next) current.group?.closeActive(event);
|
|
107
|
+
else current.group?.release(closeNow);
|
|
108
|
+
setIsOpen(next);
|
|
109
|
+
}
|
|
57
110
|
(next ? current.onOpen : current.onClose)?.(event);
|
|
58
111
|
}, delay);
|
|
59
|
-
}, [
|
|
112
|
+
}, [
|
|
113
|
+
clear,
|
|
114
|
+
setIsOpen,
|
|
115
|
+
closeNow
|
|
116
|
+
]);
|
|
60
117
|
(0, react.useEffect)(() => clear, [clear]);
|
|
61
118
|
(0, react.useEffect)(() => {
|
|
62
119
|
if (!isOpen) return void 0;
|
|
@@ -70,13 +127,13 @@ function useTooltip({ isOpen: isOpenProp, defaultOpen, isAtPoint = false, onOpen
|
|
|
70
127
|
isOpen,
|
|
71
128
|
childHandlers: {
|
|
72
129
|
onMouseEnter: (event) => {
|
|
73
|
-
if (shouldOpenOnHover) ask(true, event,
|
|
130
|
+
if (shouldOpenOnHover) ask(true, event, getEnterDelay());
|
|
74
131
|
},
|
|
75
132
|
onMouseLeave: (event) => {
|
|
76
133
|
if (shouldOpenOnHover) ask(false, event, leaveDelay);
|
|
77
134
|
},
|
|
78
135
|
onFocus: (event) => {
|
|
79
|
-
if (shouldOpenOnFocus && isKeyboardFocus(event)) ask(true, event,
|
|
136
|
+
if (shouldOpenOnFocus && isKeyboardFocus(event)) ask(true, event, getEnterDelay());
|
|
80
137
|
},
|
|
81
138
|
onBlur: (event) => {
|
|
82
139
|
if (shouldOpenOnFocus) ask(false, event, leaveDelay);
|
|
@@ -204,12 +261,12 @@ const mergeForwarded = (own, forwarded) => Object.fromEntries(Object.entries(for
|
|
|
204
261
|
current(...args);
|
|
205
262
|
value(...args);
|
|
206
263
|
}];
|
|
207
|
-
if (name === "aria-describedby" && current) return [name, `${
|
|
264
|
+
if (name === "aria-describedby" && typeof current === "string" && current) return [name, `${current} ${String(value)}`];
|
|
208
265
|
return [name, value];
|
|
209
266
|
}));
|
|
210
267
|
const getChildName = (title, own) => {
|
|
211
268
|
const isHidden = own["aria-hidden"] === true || own["aria-hidden"] === "true";
|
|
212
|
-
const isNamed = own["aria-label"]
|
|
269
|
+
const isNamed = Boolean(own["aria-label"] || own["aria-labelledby"]);
|
|
213
270
|
return typeof title === "string" && !isHidden && !isNamed ? { "aria-label": title } : {};
|
|
214
271
|
};
|
|
215
272
|
/**
|
|
@@ -245,7 +302,8 @@ function Tooltip({ children, anchorPosition, title, placement: placementProp, ha
|
|
|
245
302
|
leaveTouchDelay: leaveTouchDelayProp ?? dp.leaveTouchDelay ?? 1500,
|
|
246
303
|
shouldOpenOnHover: shouldOpenOnHoverProp ?? dp.shouldOpenOnHover ?? true,
|
|
247
304
|
shouldOpenOnFocus: shouldOpenOnFocusProp ?? dp.shouldOpenOnFocus ?? true,
|
|
248
|
-
shouldOpenOnTouch: shouldOpenOnTouchProp ?? dp.shouldOpenOnTouch ?? true
|
|
305
|
+
shouldOpenOnTouch: shouldOpenOnTouchProp ?? dp.shouldOpenOnTouch ?? true,
|
|
306
|
+
skipDelayDuration: dp.skipDelayDuration
|
|
249
307
|
});
|
|
250
308
|
const hasTitle = title !== void 0 && title !== null && title !== "";
|
|
251
309
|
const isShown = isOpen && hasTitle;
|
|
@@ -330,9 +388,30 @@ function Tooltip({ children, anchorPosition, title, placement: placementProp, ha
|
|
|
330
388
|
}) })
|
|
331
389
|
] });
|
|
332
390
|
}
|
|
391
|
+
// src/Tooltip/TooltipGroup.tsx
|
|
392
|
+
/**
|
|
393
|
+
* Lets the tooltips inside it open at once, with no enter delay, when the pointer or the focus
|
|
394
|
+
* moves to the next one just after another closed - a toolbar or a rail read from one icon to the
|
|
395
|
+
* next. It renders nothing of its own. Tooltips outside a group are unchanged, a touch keeps its
|
|
396
|
+
* own delay, and a tooltip whose `isOpen` the app controls is left alone: the group neither opens
|
|
397
|
+
* nor closes it, and it does not start the window.
|
|
398
|
+
*/
|
|
399
|
+
function TooltipGroup({ children, skipDelayDuration = 300 }) {
|
|
400
|
+
const state = (0, react.useMemo)(() => createTooltipGroupState(skipDelayDuration), [skipDelayDuration]);
|
|
401
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipGroupContext.Provider, {
|
|
402
|
+
value: state,
|
|
403
|
+
children
|
|
404
|
+
});
|
|
405
|
+
}
|
|
333
406
|
Object.defineProperty(exports, "Tooltip", {
|
|
334
407
|
enumerable: true,
|
|
335
408
|
get: function() {
|
|
336
409
|
return Tooltip;
|
|
337
410
|
}
|
|
338
411
|
});
|
|
412
|
+
Object.defineProperty(exports, "TooltipGroup", {
|
|
413
|
+
enumerable: true,
|
|
414
|
+
get: function() {
|
|
415
|
+
return TooltipGroup;
|
|
416
|
+
}
|
|
417
|
+
});
|
package/dist/Tooltip.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_Tooltip = require("./Tooltip-
|
|
2
|
+
const require_Tooltip = require("./Tooltip-rkGm1HnP.cjs");
|
|
3
3
|
exports.Tooltip = require_Tooltip.Tooltip;
|
|
4
|
+
exports.TooltipGroup = require_Tooltip.TooltipGroup;
|
package/dist/Tooltip.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 { n as PopoverPosition } from "./computePopoverPosition-JgOwCM7k.cjs";
|
|
3
3
|
import { ElementType, HTMLAttributes, ReactElement, ReactNode, Ref, SyntheticEvent } from "react";
|
|
4
4
|
/** A side of its child a tooltip sits on - and, after the dash, which end of that side it lines up with. */
|
|
@@ -106,4 +106,22 @@ interface TooltipProps extends TooltipForwardedProps {
|
|
|
106
106
|
* on the tooltip itself, closes on Escape, and never takes or traps the focus.
|
|
107
107
|
*/
|
|
108
108
|
declare function Tooltip({ children, anchorPosition, title, placement: placementProp, hasArrow: hasArrowProp, enterDelay: enterDelayProp, leaveDelay: leaveDelayProp, enterTouchDelay: enterTouchDelayProp, leaveTouchDelay: leaveTouchDelayProp, shouldDescribeChild: shouldDescribeChildProp, isDescriptionPersistent: isDescriptionPersistentProp, isOpen: isOpenProp, defaultOpen, onOpen, onClose, isInteractive: isInteractiveProp, shouldWrapDisabledChild: shouldWrapDisabledChildProp, shouldOpenOnHover: shouldOpenOnHoverProp, shouldOpenOnFocus: shouldOpenOnFocusProp, shouldOpenOnTouch: shouldOpenOnTouchProp, slots, slotProps, layer: layerProp, borderRadius: borderRadiusProp, bg: bgProp, textColor: textColorProp, className, 'data-testid': dataTestid, ref: forwardedRef, ...forwarded }: Readonly<TooltipProps>): import("react").JSX.Element;
|
|
109
|
-
|
|
109
|
+
interface TooltipGroupProps {
|
|
110
|
+
children?: ReactNode;
|
|
111
|
+
/**
|
|
112
|
+
* How long after a tooltip of the group closes the next one opens with no enter delay, in
|
|
113
|
+
* milliseconds - and for as long as one is open. After it, the tooltip's own `enterDelay`
|
|
114
|
+
* applies again. A tooltip that opens closes the one still showing, at once. It wins over
|
|
115
|
+
* `skipDelayDuration` in `theme.components.Tooltip.defaultProps`.
|
|
116
|
+
*/
|
|
117
|
+
skipDelayDuration?: number;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Lets the tooltips inside it open at once, with no enter delay, when the pointer or the focus
|
|
121
|
+
* moves to the next one just after another closed - a toolbar or a rail read from one icon to the
|
|
122
|
+
* next. It renders nothing of its own. Tooltips outside a group are unchanged, a touch keeps its
|
|
123
|
+
* own delay, and a tooltip whose `isOpen` the app controls is left alone: the group neither opens
|
|
124
|
+
* nor closes it, and it does not start the window.
|
|
125
|
+
*/
|
|
126
|
+
declare function TooltipGroup({ children, skipDelayDuration }: Readonly<TooltipGroupProps>): import("react").JSX.Element;
|
|
127
|
+
export { Tooltip, TooltipForwardedProps, TooltipGroup, TooltipGroupProps, type TooltipPlacement, TooltipProps, TooltipSlotProps, TooltipSlots };
|
package/dist/Tooltip.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 { n as PopoverPosition } from "./computePopoverPosition-JgOwCM7k.mjs";
|
|
3
3
|
import { ElementType, HTMLAttributes, ReactElement, ReactNode, Ref, SyntheticEvent } from "react";
|
|
4
4
|
/** A side of its child a tooltip sits on - and, after the dash, which end of that side it lines up with. */
|
|
@@ -106,4 +106,22 @@ interface TooltipProps extends TooltipForwardedProps {
|
|
|
106
106
|
* on the tooltip itself, closes on Escape, and never takes or traps the focus.
|
|
107
107
|
*/
|
|
108
108
|
declare function Tooltip({ children, anchorPosition, title, placement: placementProp, hasArrow: hasArrowProp, enterDelay: enterDelayProp, leaveDelay: leaveDelayProp, enterTouchDelay: enterTouchDelayProp, leaveTouchDelay: leaveTouchDelayProp, shouldDescribeChild: shouldDescribeChildProp, isDescriptionPersistent: isDescriptionPersistentProp, isOpen: isOpenProp, defaultOpen, onOpen, onClose, isInteractive: isInteractiveProp, shouldWrapDisabledChild: shouldWrapDisabledChildProp, shouldOpenOnHover: shouldOpenOnHoverProp, shouldOpenOnFocus: shouldOpenOnFocusProp, shouldOpenOnTouch: shouldOpenOnTouchProp, slots, slotProps, layer: layerProp, borderRadius: borderRadiusProp, bg: bgProp, textColor: textColorProp, className, 'data-testid': dataTestid, ref: forwardedRef, ...forwarded }: Readonly<TooltipProps>): import("react").JSX.Element;
|
|
109
|
-
|
|
109
|
+
interface TooltipGroupProps {
|
|
110
|
+
children?: ReactNode;
|
|
111
|
+
/**
|
|
112
|
+
* How long after a tooltip of the group closes the next one opens with no enter delay, in
|
|
113
|
+
* milliseconds - and for as long as one is open. After it, the tooltip's own `enterDelay`
|
|
114
|
+
* applies again. A tooltip that opens closes the one still showing, at once. It wins over
|
|
115
|
+
* `skipDelayDuration` in `theme.components.Tooltip.defaultProps`.
|
|
116
|
+
*/
|
|
117
|
+
skipDelayDuration?: number;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Lets the tooltips inside it open at once, with no enter delay, when the pointer or the focus
|
|
121
|
+
* moves to the next one just after another closed - a toolbar or a rail read from one icon to the
|
|
122
|
+
* next. It renders nothing of its own. Tooltips outside a group are unchanged, a touch keeps its
|
|
123
|
+
* own delay, and a tooltip whose `isOpen` the app controls is left alone: the group neither opens
|
|
124
|
+
* nor closes it, and it does not start the window.
|
|
125
|
+
*/
|
|
126
|
+
declare function TooltipGroup({ children, skipDelayDuration }: Readonly<TooltipGroupProps>): import("react").JSX.Element;
|
|
127
|
+
export { Tooltip, TooltipForwardedProps, TooltipGroup, TooltipGroupProps, type TooltipPlacement, TooltipProps, TooltipSlotProps, TooltipSlots };
|
package/dist/Tooltip.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
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.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/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> {
|
|
@@ -553,6 +553,12 @@ interface TooltipOwnerState {
|
|
|
553
553
|
isDescriptionPersistent?: boolean;
|
|
554
554
|
isInteractive?: boolean;
|
|
555
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;
|
|
556
562
|
shouldOpenOnHover?: boolean;
|
|
557
563
|
shouldOpenOnFocus?: boolean;
|
|
558
564
|
shouldOpenOnTouch?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ft as ThemeIconSizes } from "./index-
|
|
2
|
-
import { n as TextColorToken } from "./index-
|
|
1
|
+
import { ft as ThemeIconSizes } from "./index-B-1sp9oV.mjs";
|
|
2
|
+
import { n as TextColorToken } from "./index-F81TdZtB.mjs";
|
|
3
3
|
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { SVGProps } from "react";
|
|
5
5
|
declare const SvgAccountTree: (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,5 +1,5 @@
|
|
|
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-
|
|
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";
|
|
3
3
|
import { HTMLAttributes } from "react";
|
|
4
4
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
type PaginationColor = PaginationItemColor;
|
|
@@ -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,5 +1,5 @@
|
|
|
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-
|
|
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";
|
|
3
3
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { HTMLAttributes } from "react";
|
|
5
5
|
type PaginationColor = PaginationItemColor;
|
|
@@ -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 {
|
|
@@ -553,6 +553,12 @@ interface TooltipOwnerState {
|
|
|
553
553
|
isDescriptionPersistent?: boolean;
|
|
554
554
|
isInteractive?: boolean;
|
|
555
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;
|
|
556
562
|
shouldOpenOnHover?: boolean;
|
|
557
563
|
shouldOpenOnFocus?: boolean;
|
|
558
564
|
shouldOpenOnTouch?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ft as ThemeIconSizes } from "./index-
|
|
2
|
-
import { n as TextColorToken } from "./index-
|
|
1
|
+
import { ft as ThemeIconSizes } from "./index-CK-uaK5U.cjs";
|
|
2
|
+
import { n as TextColorToken } from "./index-Cp96BUYc.cjs";
|
|
3
3
|
import { SVGProps } from "react";
|
|
4
4
|
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
declare const SvgAccountTree: (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,8 +1,8 @@
|
|
|
1
|
-
import { cn as PaperElevation, nt as Theme } from "./index-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { t as MenuItemValue } from "./MenuListContext-
|
|
4
|
-
import { r as MenuListSlotProps } from "./index-
|
|
5
|
-
import { n as MenuItemData } from "./index-
|
|
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";
|
|
6
6
|
import { KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref, SyntheticEvent } from "react";
|
|
7
7
|
/** Which edge of its trigger a menu lines up with: the start edge, or the end edge. */
|
|
8
8
|
type MenuAlign = 'start' | 'end';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as MenuItemValue } from "./MenuListContext-
|
|
2
|
-
import { i as MenuItemRole } from "./index-
|
|
1
|
+
import { t as MenuItemValue } from "./MenuListContext-BN1VV12-.mjs";
|
|
2
|
+
import { i as MenuItemRole } from "./index-C3D70-3U.mjs";
|
|
3
3
|
import { KeyboardEvent, MouseEvent, ReactNode } from "react";
|
|
4
4
|
/** A menu row as data - what a `MenuItem` takes, with its label as `label`. */
|
|
5
5
|
interface MenuItemRowData {
|
|
@@ -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 { SpaceProps } from "@soroush.tech/styled-system";
|
|
1
|
+
import { nt as Theme } from "./index-CK-uaK5U.cjs";
|
|
2
|
+
import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-Cf2D7Y1b.cjs";
|
|
4
3
|
import { ElementType, HTMLAttributes } from "react";
|
|
4
|
+
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
type ButtonGroupOrientation = 'horizontal' | 'vertical';
|
|
6
6
|
type ButtonGroupRadius = keyof Theme['radii'];
|
|
7
7
|
interface ButtonGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>, SpaceProps<Theme> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ct as ThemeComponents, lt as ThemeDefaults, nt as Theme, pt as ThemeLayout } from "./index-
|
|
1
|
+
import { ct as ThemeComponents, lt as ThemeDefaults, nt as Theme, pt as ThemeLayout } from "./index-B-1sp9oV.mjs";
|
|
2
2
|
import { ComponentType, ReactNode } from "react";
|
|
3
3
|
interface ThemeProviderProps {
|
|
4
4
|
children: ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index-B-1sp9oV.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as PaletteColor, nt as Theme } from "./index-
|
|
1
|
+
import { U as PaletteColor, nt as Theme } from "./index-CK-uaK5U.cjs";
|
|
2
2
|
import { ButtonHTMLAttributes, ElementType } from "react";
|
|
3
3
|
import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
4
4
|
/**
|
|
@@ -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-CK-uaK5U.cjs";
|
|
2
2
|
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
3
3
|
import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
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 { t as TableCellPadding } from "./TableContext-
|
|
1
|
+
import { nt as Theme } from "./index-B-1sp9oV.mjs";
|
|
2
|
+
import { t as TableCellPadding } from "./TableContext-jOlk5jxs.mjs";
|
|
3
3
|
import { BorderProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { ElementType, ThHTMLAttributes } from "react";
|
|
5
5
|
/** The table section a cell lives in - drives `TableCell`'s th/td element resolution. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ButtonProps } from "./index-
|
|
1
|
+
import { i as ButtonProps } from "./index-Cf2D7Y1b.cjs";
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { jt as TypographyVariant, nt as Theme } from "./index-
|
|
2
|
-
import { BorderProps, FlexboxProps, LayoutProps, PositionProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
1
|
+
import { jt as TypographyVariant, nt as Theme } from "./index-CK-uaK5U.cjs";
|
|
3
2
|
import { CSSProperties, ElementType, HTMLAttributes } from "react";
|
|
3
|
+
import { BorderProps, FlexboxProps, LayoutProps, PositionProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
4
4
|
type TypographyAlign = 'left' | 'right' | 'center' | 'justify' | 'inherit';
|
|
5
5
|
/** Valid values for the color prop - derived from theme.text keys. */
|
|
6
6
|
type TextColorToken = keyof Theme['text'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ct as ThemeComponents, lt as ThemeDefaults, nt as Theme, pt as ThemeLayout } from "./index-
|
|
1
|
+
import { ct as ThemeComponents, lt as ThemeDefaults, nt as Theme, pt as ThemeLayout } from "./index-CK-uaK5U.cjs";
|
|
2
2
|
import { ComponentType, ReactNode } from "react";
|
|
3
3
|
interface ThemeProviderProps {
|
|
4
4
|
children: ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as PaletteColor, nt as Theme } from "./index-
|
|
1
|
+
import { U as PaletteColor, nt as Theme } from "./index-CK-uaK5U.cjs";
|
|
2
2
|
import { ButtonHTMLAttributes, ElementType, ReactNode } from "react";
|
|
3
3
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
4
4
|
type PaginationItemType = 'page' | 'first' | 'previous' | 'next' | 'last' | 'start-ellipsis' | 'end-ellipsis';
|