@soroush.tech/design-system 2.1.0-alpha.0 → 2.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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-BfJF32J2.cjs → Menu-C6eIdA1J.cjs} +8 -5
- package/dist/{Menu-CX9V2DAu.mjs → Menu-C_4jYHWE.mjs} +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-Bg4iRvVe.cjs} +28 -25
- package/dist/{MenuItem-DdPzSWZY.mjs → MenuItem-kRGVRI6G.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-AnAxu0he.d.cts} +2 -2
- package/dist/{MenuListContext-DiZAVDCb.d.mts → MenuListContext-DURKFg_T.d.mts} +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-CPxH920f.d.mts} +1 -1
- package/dist/{TableContext-BCW5av9c.d.mts → TableContext-VuMFtVNr.d.cts} +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-CG-hRs9L.mjs → Tabs-C_qe9d4p.mjs} +28 -21
- package/dist/{Tabs-CPH0H6yp.cjs → Tabs-DmiA1J--.cjs} +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-DeP8oJpC.d.cts} +1 -1
- package/dist/{TabsContext-DrmDtBqA.d.cts → TabsContext-VJcdZQOf.d.mts} +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-CrPRvmj3.cjs +338 -0
- package/dist/Tooltip-CwbuEQzf.mjs +332 -0
- package/dist/Tooltip.cjs +2 -311
- package/dist/Tooltip.d.cts +18 -5
- package/dist/Tooltip.d.mts +18 -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-Dt-ZNTnC.d.cts → index-2jMSUeji.d.cts} +1 -1
- package/dist/{index-5TAVgzbU.d.mts → index-3Xe5X6Ny.d.mts} +2 -2
- package/dist/{index-BYAtunSZ.d.cts → index-B-p51b0z.d.cts} +2 -2
- package/dist/index-B2XL_zZY.d.mts +44 -0
- package/dist/{index-YKXzINGk.d.mts → index-B5_-Bxoo.d.cts} +3 -3
- package/dist/{index-DKNvADeE.d.mts → index-BFUn2EWp.d.mts} +2 -2
- package/dist/{index-CeFExef3.d.cts → index-BKM4d_F4.d.cts} +2 -2
- package/dist/index-BL5Kj3Ka.d.mts +1 -0
- package/dist/{index-Biqn5xUs.d.mts → index-BLypGp0N.d.mts} +4 -4
- package/dist/{index-D24iFgwR.d.cts → index-BVDN2XbT.d.mts} +3 -3
- package/dist/{index-D--R4_5H.d.mts → index-Bhb0bFxe.d.mts} +2 -2
- package/dist/index-Biqpy7c9.d.cts +44 -0
- package/dist/{index-BgmEVOSj.d.mts → index-C-ebcNOc.d.mts} +1 -1
- package/dist/{index-DvVQLBZc.d.cts → index-C6a3kDn2.d.cts} +1 -0
- package/dist/{index-DQYhGgbl.d.cts → index-C9nnnfhd.d.cts} +2 -2
- package/dist/{index-DWon54cO.d.cts → index-CBHCGizS.d.mts} +1 -1
- package/dist/{index-Bx-4KmJU.d.mts → index-CCEfrBNN.d.mts} +1 -1
- package/dist/{index-DhTzn0mf.d.cts → index-CHWMSBhQ.d.cts} +1 -1
- package/dist/index-CJMvoc8h.d.cts +1 -0
- package/dist/{index-DtVrZFJI.d.mts → index-COgZvhXQ.d.mts} +1 -1
- package/dist/{index-DtK3SaKA.d.mts → index-CP55_Zs2.d.mts} +1 -1
- package/dist/{index-DhzjNAzv.d.mts → index-CgyyM3ty.d.cts} +10 -5
- package/dist/{index-Buu5MtRG.d.mts → index-CtwlReZi.d.cts} +1 -1
- package/dist/{index-Dudkopvi.d.mts → index-D0skdQEK.d.mts} +1 -1
- package/dist/{index-fRyMPKtY.d.cts → index-D2tfsNPw.d.cts} +1 -1
- package/dist/{index-DrfJt7W6.d.cts → index-D7h8qFS1.d.cts} +2 -2
- package/dist/{index-DR76LcSz.d.mts → index-DACdQ7-d.d.cts} +1 -1
- package/dist/{index-C3TrdOpQ.d.cts → index-DAJ5DVHh.d.cts} +2 -2
- package/dist/{index-CyOSmefH.d.cts → index-DMysZsti.d.cts} +1 -1
- package/dist/{index-BWiDilH8.d.mts → index-DOH6uskj.d.mts} +1 -0
- package/dist/{index-DM7HHa4V.d.mts → index-DQo4XtH4.d.mts} +2 -2
- package/dist/{index-CBOtkDdX.d.cts → index-DTJN6JL2.d.cts} +1 -1
- package/dist/{index-Bp9ECTzr.d.mts → index-DbKYSbLs.d.mts} +2 -2
- package/dist/{index-CW0DW6Aq.d.mts → index-Dg0FPoms.d.mts} +2 -2
- package/dist/{index-D_azfqsX.d.mts → index-DlNBgVwb.d.mts} +1 -1
- package/dist/{index-HAVWK7RM.d.cts → index-DsBOpK8T.d.mts} +3 -3
- package/dist/{index-BlHFb150.d.cts → index-Dvx5TRET.d.cts} +2 -2
- package/dist/{index-m1RGSQlP.d.mts → index-Sq75GwA2.d.cts} +3 -3
- package/dist/{index-Ba39mhDf.d.cts → index-ZyigJMkV.d.mts} +10 -5
- package/dist/{index-HLDMvfb2.d.cts → index-gHMydoIS.d.cts} +4 -4
- package/dist/{index-DgLjcrkG.d.cts → index-gxBafJdz.d.cts} +1 -1
- package/dist/{index-DjmWIzXF.d.mts → index-hTgl9zwe.d.mts} +2 -2
- package/dist/{index-CAICXdTA.d.cts → index-i8BxMDEC.d.mts} +1 -1
- package/dist/{index-Bo8Og0oC.d.cts → index-v1I6VA9w.d.cts} +2 -2
- 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-CUsagS5T.d.mts} +1 -1
- package/dist/{useTablePagination-CraL2Mux.d.cts → useTablePagination-jpEfHKUh.d.cts} +1 -1
- package/dist/{useTransition-B-hzi7Sm.d.mts → useTransition-BJ375Sto.d.cts} +1 -1
- package/dist/{useTransition-CF_Zy_tM.d.cts → useTransition-DDGpvgci.d.mts} +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.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
1
|
+
import { nt as Theme } from "./index-DOH6uskj.mjs";
|
|
2
2
|
import { n as PopoverPosition } from "./computePopoverPosition-JgOwCM7k.mjs";
|
|
3
|
-
import { ElementType, HTMLAttributes, ReactElement, ReactNode, SyntheticEvent } from "react";
|
|
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. */
|
|
5
5
|
type FixedTooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
6
6
|
/** A fixed placement, or `auto` - the side with the most room, chosen as it is placed. */
|
|
@@ -16,7 +16,14 @@ interface TooltipSlotProps {
|
|
|
16
16
|
root?: SlotProps;
|
|
17
17
|
arrow?: SlotProps;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* What a parent that clones its child (a `Menu` with a `Tooltip` for a trigger) hands the tooltip
|
|
21
|
+
* instead: it is not the tooltip's, so it goes on to the child. The tooltip's own props are left out.
|
|
22
|
+
*/
|
|
23
|
+
type TooltipForwardedProps = Omit<HTMLAttributes<HTMLElement>, 'title' | 'children' | 'className' | 'color'> & {
|
|
24
|
+
ref?: Ref<HTMLElement>;
|
|
25
|
+
};
|
|
26
|
+
interface TooltipProps extends TooltipForwardedProps {
|
|
20
27
|
/**
|
|
21
28
|
* The one element the tooltip is about - it holds a `ref` and takes the handlers. Without it, the
|
|
22
29
|
* tooltip is at `anchorPosition`, and open when `isOpen` says so.
|
|
@@ -62,6 +69,12 @@ interface TooltipProps {
|
|
|
62
69
|
onOpen?: (event: Event | SyntheticEvent) => void;
|
|
63
70
|
/** Fired when it asks to close. */
|
|
64
71
|
onClose?: (event: Event | SyntheticEvent) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Whether a disabled child (`disabled`) is wrapped in an element of its own, which takes the pointer
|
|
74
|
+
* handlers and the placement, since a disabled control sends no pointer events. Left out for a child
|
|
75
|
+
* that is only marked disabled and still takes them - a menu row. Default: `true`.
|
|
76
|
+
*/
|
|
77
|
+
shouldWrapDisabledChild?: boolean;
|
|
65
78
|
/**
|
|
66
79
|
* Whether the pointer can be moved onto the tooltip, which then stays open (WCAG 1.4.13). With
|
|
67
80
|
* `false` it takes no pointer events - a click goes to what is under it - and closes as the
|
|
@@ -92,5 +105,5 @@ interface TooltipProps {
|
|
|
92
105
|
* `shouldDescribeChild`). It opens and closes after their delays, stays open while the pointer is
|
|
93
106
|
* on the tooltip itself, closes on Escape, and never takes or traps the focus.
|
|
94
107
|
*/
|
|
95
|
-
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, shouldOpenOnHover: shouldOpenOnHoverProp, shouldOpenOnFocus: shouldOpenOnFocusProp, shouldOpenOnTouch: shouldOpenOnTouchProp, slots, slotProps, layer: layerProp, borderRadius: borderRadiusProp, bg: bgProp, textColor: textColorProp, className, 'data-testid': dataTestid }: Readonly<TooltipProps>): import("react").JSX.Element;
|
|
96
|
-
export { Tooltip, type TooltipPlacement, TooltipProps, TooltipSlotProps, TooltipSlots };
|
|
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
|
+
export { Tooltip, TooltipForwardedProps, type TooltipPlacement, TooltipProps, TooltipSlotProps, TooltipSlots };
|
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 { t as Tooltip } from "./Tooltip-CwbuEQzf.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-C6a3kDn2.cjs";
|
|
2
|
+
import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-DMysZsti.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-DOH6uskj.mjs";
|
|
2
|
+
import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-COgZvhXQ.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-C6a3kDn2.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-DOH6uskj.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-BJ375Sto.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-DDGpvgci.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-C6a3kDn2.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-DOH6uskj.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-C6a3kDn2.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-DOH6uskj.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,4 +1,4 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
1
|
+
import { nt as Theme } from "./index-C6a3kDn2.cjs";
|
|
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,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-DOH6uskj.mjs";
|
|
2
|
+
import { n as IconProps, r as IconName } from "./index-hTgl9zwe.mjs";
|
|
3
3
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { ButtonHTMLAttributes } from "react";
|
|
5
5
|
type TableSortLabelDirection = 'asc' | 'desc';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as PaginationItemSize } from "./index-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { a as PaginationItemSize } from "./index-CHWMSBhQ.cjs";
|
|
2
|
+
import "./index-v1I6VA9w.cjs";
|
|
3
3
|
import { HTMLAttributes } from "react";
|
|
4
4
|
type TablePaginationActionType = 'first' | 'previous' | 'next' | 'last';
|
|
5
5
|
interface TablePaginationActionsProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { nt as Theme } from "./index-DOH6uskj.mjs";
|
|
2
|
+
import { t as MenuItemValue } from "./MenuListContext-DURKFg_T.mjs";
|
|
3
|
+
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
4
|
+
import { AriaAttributes, KeyboardEvent, ReactNode } from "react";
|
|
5
|
+
interface MenuListProps extends SpaceProps<Theme>, LayoutProps<Theme> {
|
|
6
|
+
/** `MenuItem` rows and `MenuDivider`s. */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/** Fired with a row's `value` when a row that has one is chosen. */
|
|
9
|
+
onSelect?: (value: MenuItemValue) => void;
|
|
10
|
+
/** Carry the arrow keys past the last row to the first, and back. Default: `true`. */
|
|
11
|
+
shouldWrap?: boolean;
|
|
12
|
+
/** Focus the selected row, or the first enabled one, on mount. Default: `false`. */
|
|
13
|
+
shouldAutoFocus?: boolean;
|
|
14
|
+
/** Accent color for every row - resolves to `theme.palette[color]`. A row's own value wins. */
|
|
15
|
+
color?: keyof Theme['palette'];
|
|
16
|
+
/** Base text color for every row - resolves against `theme.text`. A row's own value wins. */
|
|
17
|
+
textColor?: keyof Theme['text'];
|
|
18
|
+
/** Density token for every row - resolves against `theme.sizes`. A row's own value wins. */
|
|
19
|
+
size?: keyof Theme['sizes'];
|
|
20
|
+
/** Compact vertical padding for every row. */
|
|
21
|
+
dense?: boolean;
|
|
22
|
+
onKeyDown?: (event: KeyboardEvent<HTMLElement>) => void;
|
|
23
|
+
id?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
'aria-label'?: string;
|
|
26
|
+
'aria-labelledby'?: string;
|
|
27
|
+
'data-testid'?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* What an app may put on the `role="menu"` list a `Menu` or a `ContextMenu` renders, through
|
|
31
|
+
* `slotProps.list`: its marks (`data-*`), class, `aria-*` and an `onKeyDown`, which runs before the
|
|
32
|
+
* list's own. The list's `role`, `id` and name are the menu's, and win.
|
|
33
|
+
*/
|
|
34
|
+
type MenuListSlotProps = Pick<MenuListProps, 'className' | 'data-testid' | 'onKeyDown'> & Omit<AriaAttributes, 'aria-label' | 'aria-labelledby'> & {
|
|
35
|
+
[name: `data-${string}`]: string | number | boolean | undefined;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @description A `role="menu"` list that owns the keyboard: the arrow keys, Home and End
|
|
39
|
+
* move focus between its own rows, skipping disabled ones; typing jumps to a row by its
|
|
40
|
+
* label. Rows are found in the DOM by their nearest `role="menu"`, so a nested submenu's
|
|
41
|
+
* rows are never this list's. Renders in place - `Menu` floats one next to a trigger.
|
|
42
|
+
*/
|
|
43
|
+
declare function MenuList({ children, onSelect, shouldWrap: shouldWrapProp, shouldAutoFocus, color, textColor, size, dense, onKeyDown, ...rest }: Readonly<MenuListProps>): import("react").JSX.Element;
|
|
44
|
+
export { MenuListProps as n, MenuListSlotProps as r, MenuList as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { nt as Theme } from "./index-
|
|
2
|
-
import { t as TableCellPadding } from "./TableContext-
|
|
3
|
-
import { BorderProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
1
|
+
import { nt as Theme } from "./index-C6a3kDn2.cjs";
|
|
2
|
+
import { t as TableCellPadding } from "./TableContext-VuMFtVNr.cjs";
|
|
4
3
|
import { ElementType, ThHTMLAttributes } from "react";
|
|
4
|
+
import { BorderProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
5
5
|
/** The table section a cell lives in - drives `TableCell`'s th/td element resolution. */
|
|
6
6
|
type TableSection = 'head' | 'body' | 'footer';
|
|
7
7
|
declare const TableSectionContext: import("react").Context<TableSection | undefined>;
|
|
@@ -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-DOH6uskj.mjs";
|
|
2
|
+
import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-C-ebcNOc.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-C6a3kDn2.cjs";
|
|
2
|
+
import { t as MenuItemValue } from "./MenuListContext-AnAxu0he.cjs";
|
|
3
3
|
import { ElementType, KeyboardEvent, MouseEvent, ReactNode } from "react";
|
|
4
4
|
type MenuItemColor = keyof Theme['palette'];
|
|
5
5
|
type MenuItemSize = keyof Theme['sizes'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index-DOH6uskj.mjs";
|
|
@@ -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-DOH6uskj.mjs";
|
|
2
|
+
import "./index-i8BxMDEC.mjs";
|
|
3
|
+
import { t as TabValue } from "./TabsContext-VJcdZQOf.mjs";
|
|
4
|
+
import { n as TabScrollButtonProps } from "./index-DlNBgVwb.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 { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-
|
|
3
|
-
import { ElementType, HTMLAttributes } from "react";
|
|
1
|
+
import { nt as Theme } from "./index-DOH6uskj.mjs";
|
|
2
|
+
import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-CCEfrBNN.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> {
|
|
@@ -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-DOH6uskj.mjs";
|
|
2
|
+
import { r as TransitionTimeout, t as TransitionCallbacks } from "./useTransition-DDGpvgci.mjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
type CollapseOrientation = 'vertical' | 'horizontal';
|
|
5
5
|
interface CollapseProps extends TransitionCallbacks {
|