@mirohq/design-system-dropdown-menu 3.3.0-dropdown.4 → 3.3.0-dropdown.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +137 -45
- package/dist/main.js.map +1 -1
- package/dist/module.js +138 -46
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +141 -123
- package/package.json +8 -8
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["../src/partials/item-description.tsx","../src/partials/slots.styled.ts","../src/styles/item.ts","../src/partials/checkbox-item.styled.tsx","../src/use-aria-disabled.ts","../src/partials/checkbox-item.tsx","../src/styles/content.ts","../src/partials/content.styled.tsx","../src/partials/content.tsx","../src/partials/item.styled.tsx","../src/partials/item.tsx","../src/partials/link-item.tsx","../src/partials/radio-group.styled.tsx","../src/partials/radio-group.tsx","../src/partials/radio-item.styled.tsx","../src/partials/radio-item.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/partials/switch-item.styled.ts","../src/partials/switch-item.tsx","../src/partials/trigger.styled.tsx","../src/partials/trigger.tsx","../src/partials/sub-trigger.styled.tsx","../src/partials/sub-trigger.tsx","../src/partials/sub-content.styled.tsx","../src/partials/sub-content.tsx","../src/partials/sub.styled.tsx","../src/partials/sub.tsx","../src/partials/portal.tsx","../src/partials/icon-slot.styled.ts","../src/partials/icon-slot.tsx","../src/dropdown-menu.tsx"],"sourcesContent":["import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const ItemDescription = styled(Primitive.div, {\n display: '-webkit-box',\n width: '100%',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 2,\n overflow: 'hidden',\n gridArea: 'item-description',\n fontSize: '$150',\n color: '$text-neutrals-subtle',\n})\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const LeftSlot = styled(Primitive.div, {\n display: 'flex',\n placeContent: 'center',\n marginRight: '$100',\n gridArea: 'left-slot',\n})\n\nexport const IllustrationSlot = styled(LeftSlot, {\n width: '$13',\n})\n\nexport const RightSlot = styled(Primitive.div, {\n display: 'flex',\n alignItems: 'center',\n marginLeft: 'auto',\n paddingLeft: '$200',\n gridArea: 'right-slot',\n})\n\nexport const HotkeySlot = RightSlot\n","import { focus } from '@mirohq/design-system-styles'\n\nimport { ItemDescription } from '../partials/item-description'\nimport { IllustrationSlot } from '../partials/slots.styled'\n\nexport const itemDefaults = {\n all: 'unset',\n boxSizing: 'border-box',\n fontSize: 14,\n lineHeight: '20px',\n color: '$text-neutrals',\n borderRadius: '$50',\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto',\n gridTemplateRows: '1fr auto',\n gridTemplateAreas: `\n 'left-slot item-text right-slot'\n 'left-slot item-description right-slot'\n `,\n alignItems: 'center',\n minHeight: '$11',\n padding: '$100 $150',\n position: 'relative',\n userSelect: 'none',\n cursor: 'pointer',\n\n ...focus.defaults,\n\n '&:disabled, &[aria-disabled=\"true\"], &[data-disabled]': {\n pointerEvents: 'none',\n [`&, & ${ItemDescription}`]: {\n color: '$text-neutrals-disabled',\n },\n [`& ${IllustrationSlot}`]: {\n filter: 'grayscale(1)',\n },\n },\n\n '&:hover': {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n '&:not([aria-disabled=\"true\"])': {\n boxShadow: 'none',\n },\n },\n\n '&:active': {\n background: '$background-primary-subtle-active',\n boxShadow: 'none',\n color: '$text-primary-active',\n },\n\n '&[tabindex=\"0\"]': {\n zIndex: '1',\n },\n}\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nimport { itemDefaults } from '../styles/item'\n\nexport const StyledIndicator = styled(Primitive.span, {})\n\nexport const StyledCheckboxItem = styled(RadixDropdownMenu.CheckboxItem, {\n ...itemDefaults,\n [`&[data-state=\"checked\"] ${StyledIndicator}`]: {\n color: '$icon-primary',\n },\n [`&[data-state=\"checked\"]:hover ${StyledIndicator}`]: {\n color: '$icon-primary-hover',\n },\n [`\n &[aria-disabled=\"true\"] ${StyledIndicator},\n &[data-disabled] ${StyledIndicator}\n `]: {\n color: '$icon-neutrals-disabled',\n },\n})\n\nexport type StyledCheckboxItemProps = StrictComponentProps<\n typeof StyledCheckboxItem\n>\n","import { useMemo } from 'react'\nimport type { KeyboardEventHandler } from 'react'\nimport type { Booleanish } from '@mirohq/design-system-types'\nimport { booleanify } from '@mirohq/design-system-utils'\n\ninterface AriaDisabledProps extends Object {\n 'aria-disabled'?: Booleanish\n onKeyDown?: KeyboardEventHandler\n onSelect?: (event: Event) => void\n}\n\nexport const useAriaDisabled = (\n { 'aria-disabled': ariaDisabled, onKeyDown, onSelect }: AriaDisabledProps,\n preventDefault: boolean | undefined = false\n): AriaDisabledProps =>\n useMemo(\n () => ({\n 'aria-disabled': booleanify(ariaDisabled) ? ariaDisabled : undefined,\n onKeyDown: e => {\n if (\n booleanify(ariaDisabled) &&\n e.code !== 'ArrowUp' &&\n e.code !== 'ArrowDown'\n ) {\n e.preventDefault()\n e.stopPropagation()\n return\n }\n\n onKeyDown?.(e)\n },\n onSelect: e => {\n if (preventDefault) {\n e.preventDefault()\n }\n\n if (booleanify(ariaDisabled)) {\n return\n }\n\n onSelect?.(e)\n },\n }),\n [ariaDisabled, onKeyDown, onSelect, preventDefault]\n )\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { IconCheckMark, IconProhibit } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledCheckboxItem, StyledIndicator } from './checkbox-item.styled'\nimport type { StyledCheckboxItemProps } from './checkbox-item.styled'\nimport { RightSlot } from './slots.styled'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\nexport interface CheckboxItemProps\n extends Omit<StyledCheckboxItemProps, 'onChange'> {\n /**\n * The checked state of the item.\n */\n checked: boolean\n\n /**\n * Event handler called when the checked state changes.\n */\n onChange: (checked: boolean) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n */\n disabled?: boolean\n\n /**\n * Event handler called when the user selects an item (via mouse of keyboard).\n */\n onSelect?: (event: Event) => void\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item.\n * Use this when the content is complex, or you have non-textual content inside.\n */\n textValue?: string\n}\n\nexport const CheckboxItem = React.forwardRef<\n ElementRef<typeof StyledCheckboxItem>,\n CheckboxItemProps\n>(({ children, checked, onChange, disabled, ...restProps }, forwardRef) => {\n const ariaDisabledProps = useAriaDisabled(restProps, true)\n const { 'aria-disabled': ariaDisabled } = ariaDisabledProps\n\n return (\n <StyledCheckboxItem\n {...restProps}\n {...ariaDisabledProps}\n ref={forwardRef}\n checked={checked}\n disabled={disabled}\n onCheckedChange={onChange}\n >\n {children}\n <RightSlot>\n <StyledIndicator>\n {(disabled === true || booleanify(ariaDisabled)) && !checked && (\n <IconProhibit size='small' />\n )}\n {checked && <IconCheckMark size='small' />}\n </StyledIndicator>\n </RightSlot>\n </StyledCheckboxItem>\n )\n})\n","import { theme } from '@mirohq/design-system-stitches'\nimport { animations } from '@mirohq/design-system-styles'\n\nimport { RightSlot } from '../partials/slots.styled'\n\nconst GUTTER_TOKEN = 150\nexport const CONTENT_GUTTER = parseInt(theme.space[GUTTER_TOKEN])\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\nconst ITEM_WITHOUT_RIGHT_SLOT = `[role=\"menuitem\"]:not(:has(${RightSlot}))`\n\nexport const contentDefaults = {\n maxWidth: '$125',\n backgroundColor: '$white',\n borderRadius: '$50',\n padding: `$${GUTTER_TOKEN}`,\n boxShadow: '$50',\n [`&:has(${RightSlot}) > ${ITEM_WITHOUT_RIGHT_SLOT}`]: {\n paddingRight: '44px',\n },\n [`&:has([role=\"switch\"]) > ${ITEM_WITHOUT_RIGHT_SLOT}`]: {\n paddingRight: '56px',\n },\n '@media (prefers-reduced-motion: no-preference)': {\n animationDuration: '150ms',\n animationTimingFunction: 'cubic-bezier(0.25, 0.5, 0.5, 0.9)',\n willChange: 'transform, opacity',\n '&[data-state=\"open\"]': { animationName: animations.fadeInScaled },\n '&[data-state=\"closed\"]': { animationName: animations.fadeOutScaled },\n '&[data-side=\"top\"]': {\n '&[data-align=\"start\"]': { transformOrigin: 'bottom left' },\n '&[data-align=\"center\"]': { transformOrigin: 'bottom center' },\n '&[data-align=\"end\"]': { transformOrigin: 'bottom right' },\n },\n '&[data-side=\"right\"]': {\n '&[data-align=\"start\"]': { transformOrigin: 'top left' },\n '&[data-align=\"center\"]': { transformOrigin: 'center left' },\n '&[data-align=\"end\"]': { transformOrigin: 'bottom left' },\n },\n '&[data-side=\"bottom\"]': {\n '&[data-align=\"start\"]': { transformOrigin: 'top left' },\n '&[data-align=\"center\"]': { transformOrigin: 'top center' },\n '&[data-align=\"end\"]': { transformOrigin: 'top right' },\n },\n '&[data-side=\"left\"]': {\n '&[data-align=\"start\"]': { transformOrigin: 'top right' },\n '&[data-align=\"center\"]': { transformOrigin: 'center right' },\n '&[data-align=\"end\"]': { transformOrigin: 'bottom right' },\n },\n },\n position: 'relative',\n zIndex: '$dropdownMenu',\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nimport { contentDefaults } from '../styles/content'\n\nexport const StyledContent = styled(RadixDropdownMenu.Content, contentDefaults)\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { CONTENT_OFFSET } from '../styles/content'\nimport type {\n PointerDownOutsideEvent,\n FocusOutsideEvent,\n Side,\n Align,\n StickyBehavior,\n} from '../types'\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Whether keyboard navigation should loop around\n */\n loop?: boolean\n\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault. This prop is ignored within\n * submenus.\n */\n onCloseAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when the escape key is down. It can be prevented by\n * calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the\n * component. It can be prevented by calling event.preventDefault.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void\n\n /**\n * Event handler called when focus moves outside the bounds of the component.\n * It can be prevented by calling event.preventDefault.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void\n\n /**\n * Event handler called when an interaction (pointer or focus event) happens\n * outside the bounds of the component. It can be prevented by calling\n * event.preventDefault.\n */\n onInteractOutside?: (\n event: PointerDownOutsideEvent | FocusOutsideEvent\n ) => void\n\n /**\n * The preferred side of the trigger to render against when open. Will be\n * reversed when collisions occur and avoidCollisions is enabled. This prop is\n * ignored within submenus.\n */\n side?: Side\n\n /**\n * The distance in pixels from the trigger\n */\n sideOffset?: number\n\n /**\n * The preferred alignment against the trigger. May change when collisions\n * occur. This prop is ignored within submenus.\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options\n */\n alignOffset?: number\n\n /**\n * When true, overrides the side and align preferences to prevent collisions\n * with window edges.\n */\n avoidCollisions?: boolean\n\n /**\n * The distance in pixels from window edges where collision detection should\n * occur.\n */\n collisionPadding?: number\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in\n * the boundary as long as the trigger is at least partially in the boundary\n * whilst \"always\" will keep the content in the boundary regardless.\n */\n sticky?: StickyBehavior\n\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries. It inherits from\n * DropdownMenu.Portal.\n */\n forceMount?: true\n\n /**\n * The element used as the collision boundary. By default this is the\n * viewport, though you can provide additional element(s) to be included in\n * this check.\n */\n collisionBoundary?: Element | null\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n */\n hideWhenDetached?: boolean\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n loop = false,\n side = 'bottom',\n sideOffset = CONTENT_OFFSET,\n align = 'center',\n alignOffset = 0,\n collisionPadding = 0,\n avoidCollisions = true,\n sticky = 'partial',\n hideWhenDetached = false,\n ...restProps\n },\n forwardRef\n ) => (\n <StyledContent\n {...restProps}\n ref={forwardRef}\n loop={loop}\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\n />\n )\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nimport { itemDefaults } from '../styles/item'\n\nexport const StyledItem = styled(RadixDropdownMenu.Item, itemDefaults)\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * When true, prevents the user from interacting with the item\n */\n disabled?: boolean\n\n /**\n * Event handler called when the user selects an item (via mouse of keyboard). Calling event.preventDefault in this handler will prevent the dropdown menu from closing when selecting that item\n */\n onSelect?: (event: Event) => void\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside\n */\n textValue?: string\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n ({ disabled = false, ...restProps }, forwardRef) => {\n const ariaDisabledProps = useAriaDisabled(restProps)\n\n return (\n <StyledItem\n {...restProps}\n {...ariaDisabledProps}\n disabled={disabled}\n ref={forwardRef}\n />\n )\n }\n)\n","import React from 'react'\nimport type { ElementRef, AnchorHTMLAttributes } from 'react'\n\nimport { Item } from './item'\nimport type { ItemProps } from './item'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\ntype ItemPropsWithAnchor = ItemProps & AnchorHTMLAttributes<typeof Item>\nexport interface LinkItemProps extends ItemPropsWithAnchor {}\n\nexport const LinkItem = React.forwardRef<\n ElementRef<typeof Item>,\n LinkItemProps\n>(({ children, href, ...restProps }, forwardRef) => {\n const ariaDisabledProps = useAriaDisabled(restProps)\n return (\n <Item asChild ref={forwardRef} {...restProps} {...ariaDisabledProps}>\n <a href={href}>{children}</a>\n </Item>\n )\n})\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nexport const StyledRadioGroup = styled(RadixDropdownMenu.RadioGroup)\n\nexport type StyledRadioGroupProps = StrictComponentProps<\n typeof StyledRadioGroup\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledRadioGroup } from './radio-group.styled'\nimport type { StyledRadioGroupProps } from './radio-group.styled'\n\nexport interface RadioGroupProps\n extends Omit<StyledRadioGroupProps, 'onChange'> {\n /**\n * The value of the selected item in the group\n */\n value: string\n\n /**\n * Event handler called when the selected radio changes\n */\n onChange: (value: string) => void\n}\n\nexport const RadioGroup = React.forwardRef<\n ElementRef<typeof StyledRadioGroup>,\n RadioGroupProps\n>((props, forwardRef) => {\n const { onChange, ...restProps } = props\n\n return (\n <StyledRadioGroup\n {...restProps}\n ref={forwardRef}\n onValueChange={onChange}\n />\n )\n})\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { IconProhibit } from '@mirohq/design-system-icons'\n\nimport { itemDefaults } from '../styles/item'\n\nexport const StyledRadioContainer = styled(Primitive.span, {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '$4',\n height: '$4',\n boxSizing: 'border-box',\n border: '1px solid $border-neutrals',\n borderRadius: '$half',\n})\n\nexport const StyledPill = styled(Primitive.span, {\n display: 'none',\n width: '$2',\n height: '$2',\n borderRadius: '$half',\n})\n\nexport const StyledProhibited = styled(IconProhibit, {\n display: 'none',\n width: '$3',\n})\n\nexport const StyledRadioItem = styled(RadixDropdownMenu.RadioItem, {\n ...itemDefaults,\n [`&[data-state=\"checked\"] ${StyledRadioContainer}`]: {\n color: '$icon-primary',\n borderColor: '$border-primary',\n\n [`& ${StyledPill}`]: {\n display: 'block',\n backgroundColor: '$background-primary-prominent-selected',\n },\n },\n\n [`&:hover ${StyledRadioContainer}`]: {\n borderColor: '$border-primary-hover',\n\n [`& ${StyledPill}`]: {\n backgroundColor: '$background-primary-prominent-hover',\n },\n },\n\n [`\n &[aria-disabled=\"true\"] ${StyledRadioContainer},\n &[data-disabled] ${StyledRadioContainer}\n `]: {\n color: '$icon-neutrals-disabled',\n borderColor: '$border-neutrals-disabled',\n\n [`& ${StyledPill}`]: {\n backgroundColor: '$icon-neutrals-disabled',\n },\n },\n '&[data-state=\"unchecked\"]': {\n [`\n &[aria-disabled=\"true\"] ${StyledProhibited},\n &[data-disabled] ${StyledProhibited}\n `]: {\n display: 'flex',\n },\n },\n})\n\nexport type StyledRadioItemProps = StrictComponentProps<typeof StyledRadioItem>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport {\n StyledPill,\n StyledProhibited,\n StyledRadioContainer,\n StyledRadioItem,\n} from './radio-item.styled'\nimport type { StyledRadioItemProps } from './radio-item.styled'\nimport { RightSlot } from './slots.styled'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\nexport interface RadioItemProps extends StyledRadioItemProps {\n /**\n * The unique value of the item.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n */\n disabled?: boolean\n\n /**\n * Event handler called when the user selects an item (via mouse of keyboard).\n */\n onSelect?: (event: Event) => void\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item.\n * Use this when the content is complex, or you have non-textual content inside.\n */\n textValue?: string\n}\n\nexport const RadioItem = React.forwardRef<\n ElementRef<typeof StyledRadioItem>,\n RadioItemProps\n>(({ disabled = false, children, ...restProps }, forwardRef) => {\n const ariaDisabledProps = useAriaDisabled(restProps, true)\n return (\n <StyledRadioItem\n {...restProps}\n {...ariaDisabledProps}\n disabled={disabled}\n ref={forwardRef}\n >\n {children}\n <RightSlot>\n <StyledRadioContainer>\n <StyledPill />\n <StyledProhibited />\n </StyledRadioContainer>\n </RightSlot>\n </StyledRadioItem>\n )\n})\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nexport const StyledSeparator = styled(RadixDropdownMenu.Separator, {\n borderTop: '1px solid $border-neutrals-subtle',\n marginY: '$100',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSeparator } from './separator.styled'\nimport type { StyledSeparatorProps } from './separator.styled'\n\nexport interface SeparatorProps extends StyledSeparatorProps {}\n\nexport const Separator = React.forwardRef<\n ElementRef<typeof StyledSeparator>,\n SeparatorProps\n>((props, forwardRef) => <StyledSeparator {...props} ref={forwardRef} />)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\nimport { styles } from '@mirohq/design-system-base-switch'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nimport { itemDefaults } from '../styles/item'\n\nexport const StyledSwitch = styled(Primitive.span, {\n ...styles.default,\n width: '$7',\n height: '$4',\n})\n\nexport const StyledSwitchItem = styled(RadixDropdownMenu.CheckboxItem, {\n ...itemDefaults,\n\n [`&[data-state=\"checked\"] ${StyledSwitch}`]: styles.checked,\n [`&[data-state=\"checked\"]:hover ${StyledSwitch}`]: styles.checkedHovered,\n\n [`&:hover ${StyledSwitch}`]: styles.hovered,\n [`\n &[aria-disabled=\"true\"] ${StyledSwitch},\n &[data-disabled] ${StyledSwitch}\n `]: styles.disabled,\n})\n\nexport type StyledSwitchItemProps = StrictComponentProps<\n typeof StyledSwitchItem\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Thumb } from '@mirohq/design-system-base-switch'\n\nimport { RightSlot } from './slots.styled'\nimport type { StyledSwitchItemProps } from './switch-item.styled'\nimport { StyledSwitch, StyledSwitchItem } from './switch-item.styled'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\nexport interface SwitchItemProps\n extends Omit<StyledSwitchItemProps, 'onChange'> {\n /**\n * The checked state of the item.\n */\n checked: boolean\n\n /**\n * Event handler called when the checked state changes.\n */\n onChange: (checked: boolean) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n */\n disabled?: boolean\n\n /**\n * Event handler called when the user selects an item (via mouse of keyboard).\n */\n onSelect?: (event: Event) => void\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item.\n * Use this when the content is complex, or you have non-textual content inside.\n */\n textValue?: string\n}\n\nexport const SwitchItem = React.forwardRef<\n ElementRef<typeof StyledSwitchItem>,\n SwitchItemProps\n>(\n (\n { disabled = false, checked, onChange, children, ...restProps },\n forwardRef\n ) => {\n const ariaDisabledProps = useAriaDisabled(restProps, true)\n\n return (\n <StyledSwitchItem\n {...restProps}\n {...ariaDisabledProps}\n disabled={disabled}\n checked={checked}\n onCheckedChange={onChange}\n ref={forwardRef}\n >\n {children}\n <RightSlot>\n <StyledSwitch>\n <Thumb />\n </StyledSwitch>\n </RightSlot>\n </StyledSwitchItem>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\nimport { focus } from '@mirohq/design-system-styles'\n\nconst defaultStyles = {\n boxSizing: 'border-box',\n cursor: 'pointer',\n ...focus.defaults,\n}\n\nexport const StyledTrigger = styled(RadixDropdownMenu.Trigger, {\n variants: {\n unstyled: {\n true: {\n all: 'unset',\n ...defaultStyles,\n },\n false: defaultStyles,\n },\n },\n})\n\nexport type StyledTriggerProps = StrictComponentProps<typeof StyledTrigger>\n","import React from 'react'\nimport type { ElementRef, DOMAttributes } from 'react'\n\nimport { StyledTrigger } from './trigger.styled'\nimport type { StyledTriggerProps } from './trigger.styled'\n\nexport interface TriggerProps extends StyledTriggerProps {\n /**\n * temporary the same as onClick, later will be added touch events support\n */\n onPress?: DOMAttributes<HTMLElement>['onClick']\n}\n\nexport const Trigger = React.forwardRef<\n ElementRef<typeof StyledTrigger>,\n TriggerProps\n>(({ asChild = false, onPress, onClick, ...restProps }, forwardRef) => (\n <StyledTrigger\n {...restProps}\n onClick={onPress ?? onClick}\n ref={forwardRef}\n unstyled={!asChild}\n asChild={asChild}\n />\n))\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nimport { itemDefaults } from '../styles/item'\n\nexport const StyledIconContainer = styled(Primitive.span, {\n color: '$icon-neutrals-with-text',\n})\n\nexport const StyledSubTrigger = styled(RadixDropdownMenu.SubTrigger, {\n ...itemDefaults,\n '&[data-state=\"open\"]': itemDefaults['&:hover'],\n\n [`&[data-state=\"open\"] ${StyledIconContainer}, &:hover ${StyledIconContainer}`]:\n {\n color: '$icon-primary-hover',\n },\n})\n\nexport type StyledSubTriggerProps = StrictComponentProps<\n typeof StyledSubTrigger\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { IconChevronRight } from '@mirohq/design-system-icons'\n\nimport { StyledIconContainer, StyledSubTrigger } from './sub-trigger.styled'\nimport type { StyledSubTriggerProps } from './sub-trigger.styled'\nimport { RightSlot } from './slots.styled'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\nexport interface SubTriggerProps extends StyledSubTriggerProps {\n /**\n * Prevents the user from interacting with the switch\n */\n disabled?: boolean\n\n /**\n * Optional text used for type ahead purposes. By default the type ahead\n * behavior will use the .textContent of the item. Use this when the content\n * is complex, or you have.\n */\n textValue?: string\n}\n\nexport const SubTrigger = React.forwardRef<\n ElementRef<typeof StyledSubTrigger>,\n StyledSubTriggerProps\n>(({ children, disabled = false, ...restProps }, forwardRef) => {\n const { onSelect, ...ariaDisabledProps } = useAriaDisabled({\n onKeyDown: restProps.onKeyDown,\n 'aria-disabled': restProps['aria-disabled'],\n })\n\n return (\n <StyledSubTrigger\n {...restProps}\n {...ariaDisabledProps}\n disabled={disabled}\n ref={forwardRef}\n >\n {children}\n <RightSlot>\n <StyledIconContainer\n data-testid={\n process.env.NODE_ENV === 'test' ? 'submenu-arrow-icon' : undefined\n }\n >\n <IconChevronRight size='small' weight='thin' />\n </StyledIconContainer>\n </RightSlot>\n </StyledSubTrigger>\n )\n})\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nimport { contentDefaults } from '../styles/content'\n\nexport const StyledSubContent = styled(\n RadixDropdownMenu.SubContent,\n contentDefaults\n)\n\nexport type StyledSubContentProps = StrictComponentProps<\n typeof StyledSubContent\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSubContent } from './sub-content.styled'\nimport { CONTENT_GUTTER, CONTENT_OFFSET } from '../styles/content'\nimport type { StyledSubContentProps } from './sub-content.styled'\nimport type { PointerDownOutsideEvent, FocusOutsideEvent } from '../types'\n\nexport interface SubContentProps extends StyledSubContentProps {\n /**\n * Whether keyboard navigation should loop around\n * @default false\n */\n loop?: boolean\n\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault. This prop is ignored within\n * submenus.\n */\n onCloseAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when the escape key is down. It can be prevented by\n * calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the\n * component. It can be prevented by calling event.preventDefault.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void\n\n /**\n * Event handler called when focus moves outside the bounds of the component.\n * It can be prevented by calling event.preventDefault.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void\n\n /**\n * Event handler called when an interaction (pointer or focus event) happens\n * outside the bounds of the component. It can be prevented by calling\n * event.preventDefault.\n */\n onInteractOutside?: (\n event: PointerDownOutsideEvent | FocusOutsideEvent\n ) => void\n\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries.\n */\n forceMount?: true\n\n /**\n * The distance in pixels from the trigger.\n */\n sideOffset?: number\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options.\n */\n alignOffset?: number\n\n /**\n * When true, overrides the side andalign preferences to prevent collisions\n * with window edges.\n * @default true\n */\n avoidCollisions?: boolean\n\n /**\n *The distance in pixels from the boundary edges where collision detection\n *should occur. Accepts a number (same for all sides).\n */\n collisionPadding?: number\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in\n * the boundary as long as the trigger is at least partially in the boundary\n * whilst \"always\" will keep the content in the boundary regardless.\n * @default partial\n */\n sticky?: 'partial' | 'always'\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n * @default false\n */\n hideWhenDetached?: boolean\n}\n\n// without CONTENT_GUTTER submenu would overlap the menu\nconst SIDE_OFFSET = CONTENT_GUTTER + CONTENT_OFFSET\n\nexport const SubContent = React.forwardRef<\n ElementRef<typeof StyledSubContent>,\n SubContentProps\n>(\n (\n {\n sideOffset = SIDE_OFFSET,\n alignOffset = -CONTENT_GUTTER,\n collisionPadding = 0,\n loop = false,\n hideWhenDetached = false,\n sticky = 'partial',\n ...restProps\n },\n forwardRef\n ) => (\n <StyledSubContent\n {...restProps}\n ref={forwardRef}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n collisionPadding={collisionPadding}\n loop={loop}\n hideWhenDetached={hideWhenDetached}\n sticky={sticky}\n />\n )\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nexport const StyledSub = styled(RadixDropdownMenu.Sub, {})\n\nexport type StyledSubProps = StrictComponentProps<typeof StyledSub>\n","import React, { useState } from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSub } from './sub.styled'\nimport type { StyledSubProps } from './sub.styled'\n\nexport interface SubProps extends StyledSubProps {\n /**\n * The open state of the submenu when it is initially rendered. Use when you\n * do not need to control its open state.\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the submenu. Must be used in conjunction with\n * onOpenChange.\n */\n open?: boolean\n\n /**\n * Event handler called when the submenu opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the submenu closes.\n */\n onClose?: () => void\n}\n\nexport const Sub = React.forwardRef<ElementRef<typeof StyledSub>, SubProps>(\n ({ defaultOpen, onOpen, onClose, open, ...restProps }, forwardRef) => {\n const [openState, setOpenState] = useState(defaultOpen)\n return (\n <StyledSub\n {...restProps}\n open={open ?? openState}\n onOpenChange={newOpen => {\n if (open == null) {\n setOpenState(newOpen)\n }\n\n newOpen ? onOpen?.() : onClose?.()\n }}\n ref={forwardRef}\n />\n )\n }\n)\n","import React from 'react'\nimport type { DropdownMenuPortalProps } from '@radix-ui/react-dropdown-menu'\nimport { Portal as RadixPortal } from '@radix-ui/react-dropdown-menu'\n\nexport interface PortalProps extends DropdownMenuPortalProps {\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries. If used on this part, it will be\n * inherited by DropdownMenu.Content and DropdownMenu.SubContent respectively.\n */\n forceMount?: true\n\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\n\nimport { LeftSlot } from './slots.styled'\n\nexport const StyledIconSlot = styled(LeftSlot, {\n square: '$5',\n\n variants: {\n customIcon: {\n true: {\n square: '$icon-200',\n },\n },\n },\n})\n\nexport type StyledIconSlotProps = StrictComponentProps<typeof StyledIconSlot>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport type { IconProps } from '@mirohq/design-system-icons'\nimport { isIconComponent } from '@mirohq/design-system-icons'\n\nimport type { StyledIconSlotProps } from './icon-slot.styled'\nimport { StyledIconSlot } from './icon-slot.styled'\n\nexport type IconSlotProps = Omit<StyledIconSlotProps, 'custom'>\n\nexport const IconSlot = React.forwardRef<\n ElementRef<typeof StyledIconSlot>,\n IconSlotProps\n>(({ children, ...restProps }, forwardRef) => {\n const child = React.Children.only(children) as React.ReactElement\n\n const isIcon = isIconComponent(child)\n\n const formattedChild = isIcon\n ? React.cloneElement<IconProps>(child, {\n ...child.props,\n size: 'small',\n weight: 'thin',\n })\n : child\n\n return (\n <StyledIconSlot ref={forwardRef} {...restProps} customIcon={!isIcon}>\n {formattedChild}\n </StyledIconSlot>\n )\n})\n","import React, { useState } from 'react'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nimport { CheckboxItem } from './partials/checkbox-item'\nimport { Content } from './partials/content'\nimport { Item } from './partials/item'\nimport { LinkItem } from './partials/link-item'\nimport { RadioGroup } from './partials/radio-group'\nimport { RadioItem } from './partials/radio-item'\nimport { Separator } from './partials/separator'\nimport { SwitchItem } from './partials/switch-item'\nimport { Trigger } from './partials/trigger'\nimport { SubTrigger } from './partials/sub-trigger'\nimport { SubContent } from './partials/sub-content'\nimport { Sub } from './partials/sub'\nimport { Portal } from './partials/portal'\nimport { IllustrationSlot, HotkeySlot } from './partials/slots.styled'\nimport { ItemDescription } from './partials/item-description'\nimport { IconSlot } from './partials/icon-slot'\n\nexport interface DropdownMenuProps {\n /**\n * The open state of the dropdown menu when it is initially rendered. Use when\n * you do not need to control its open state.\n */\n defaultOpen?: boolean\n\n /**\n * The reading direction of submenus when applicable. If omitted, assumes LTR\n * (left-to-right) reading mode.\n */\n direction?: 'ltr' | 'rtl'\n\n /**\n * The current dropdown open state.\n */\n open?: boolean\n\n /**\n * Event handler called when the dropdown opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the dropdown closes.\n */\n onClose?: () => void\n\n /**\n * Defines whether the interaction with outside elements will be disabled and\n * only menu content will be visible to screen readers. This prop is ignored\n * within submenus.\n */\n interactOutside?: boolean\n\n /**\n * The content\n */\n children: React.ReactNode\n}\n\nexport const DropdownMenu: React.FC<DropdownMenuProps> & Partials = ({\n defaultOpen = false,\n direction = 'ltr',\n interactOutside = false,\n open,\n onOpen,\n onClose,\n ...restProps\n}) => {\n const [openState, setOpenState] = useState(defaultOpen)\n\n return (\n <RadixDropdownMenu.Root\n {...restProps}\n dir={direction}\n modal={interactOutside}\n open={open ?? openState}\n onOpenChange={newOpen => {\n if (open == null) {\n setOpenState(newOpen)\n }\n\n newOpen ? onOpen?.() : onClose?.()\n }}\n />\n )\n}\n\n// Partials\n// -----------------------------------------------------------------------------\n\ninterface Partials {\n CheckboxItem: typeof CheckboxItem\n Content: typeof Content\n HotkeySlot: typeof HotkeySlot\n IconSlot: typeof IconSlot\n IllustrationSlot: typeof IllustrationSlot\n Item: typeof Item\n ItemDescription: typeof ItemDescription\n LinkItem: typeof LinkItem\n Portal: typeof Portal\n RadioGroup: typeof RadioGroup\n RadioItem: typeof RadioItem\n Separator: typeof Separator\n Sub: typeof Sub\n SubContent: typeof SubContent\n SubTrigger: typeof SubTrigger\n SwitchItem: typeof SwitchItem\n Trigger: typeof Trigger\n}\n\nDropdownMenu.CheckboxItem = CheckboxItem\nDropdownMenu.Content = Content\nDropdownMenu.HotkeySlot = HotkeySlot\nDropdownMenu.IconSlot = IconSlot\nDropdownMenu.IllustrationSlot = IllustrationSlot\nDropdownMenu.Item = Item\nDropdownMenu.ItemDescription = ItemDescription\nDropdownMenu.LinkItem = LinkItem\nDropdownMenu.Portal = Portal\nDropdownMenu.RadioGroup = RadioGroup\nDropdownMenu.RadioItem = RadioItem\nDropdownMenu.Separator = Separator\nDropdownMenu.Sub = Sub\nDropdownMenu.SubContent = SubContent\nDropdownMenu.SubTrigger = SubTrigger\nDropdownMenu.SwitchItem = SwitchItem\nDropdownMenu.Trigger = Trigger\n"],"names":["styled","Primitive","focus","RadixDropdownMenu","useMemo","booleanify","React","IconProhibit","IconCheckMark","theme","animations","styles","Thumb","IconChevronRight","useState","RadixPortal","isIconComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGa,MAAA,eAAA,GAAkBA,2BAAO,CAAAC,+BAAA,CAAU,GAAK,EAAA;AAAA,EACnD,OAAS,EAAA,aAAA;AAAA,EACT,KAAO,EAAA,MAAA;AAAA,EACP,eAAiB,EAAA,UAAA;AAAA,EACjB,eAAiB,EAAA,CAAA;AAAA,EACjB,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,kBAAA;AAAA,EACV,QAAU,EAAA,MAAA;AAAA,EACV,KAAO,EAAA,uBAAA;AACT,CAAC,CAAA;;ACTY,MAAA,QAAA,GAAWD,2BAAO,CAAAC,+BAAA,CAAU,GAAK,EAAA;AAAA,EAC5C,OAAS,EAAA,MAAA;AAAA,EACT,YAAc,EAAA,QAAA;AAAA,EACd,WAAa,EAAA,MAAA;AAAA,EACb,QAAU,EAAA,WAAA;AACZ,CAAC,CAAA,CAAA;AAEY,MAAA,gBAAA,GAAmBD,4BAAO,QAAU,EAAA;AAAA,EAC/C,KAAO,EAAA,KAAA;AACT,CAAC,CAAA,CAAA;AAEY,MAAA,SAAA,GAAYA,2BAAO,C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a,GAAA,UAAA,CAAA;AAC1B,YAAA,CAAa,QAAW,GAAA,QAAA,CAAA;AACxB,YAAA,CAAa,gBAAmB,GAAA,gBAAA,CAAA;AAChC,YAAA,CAAa,IAAO,GAAA,IAAA,CAAA;AACpB,YAAA,CAAa,eAAkB,GAAA,eAAA,CAAA;AAC/B,YAAA,CAAa,QAAW,GAAA,QAAA,CAAA;AACxB,YAAA,CAAa,MAAS,GAAA,MAAA,CAAA;AACtB,YAAA,CAAa,UAAa,GAAA,UAAA,CAAA;AAC1B,YAAA,CAAa,SAAY,GAAA,SAAA,CAAA;AACzB,YAAA,CAAa,SAAY,GAAA,SAAA,CAAA;AACzB,YAAA,CAAa,GAAM,GAAA,GAAA,CAAA;AACnB,YAAA,CAAa,UAAa,GAAA,UAAA,CAAA;AAC1B,YAAA,CAAa,UAAa,GAAA,UAAA,CAAA;AAC1B,YAAA,CAAa,UAAa,GAAA,UAAA,CAAA;AAC1B,YAAA,CAAa,OAAU,GAAA,OAAA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/partials/item-description.tsx","../src/partials/slots.styled.ts","../src/styles/item.ts","../src/partials/checkbox-item.styled.tsx","../src/use-slots.tsx","../src/partials/slots.tsx","../src/use-aria-disabled.ts","../src/partials/checkbox-item.tsx","../src/styles/content.ts","../src/partials/content.styled.tsx","../src/partials/content.tsx","../src/partials/item.styled.tsx","../src/partials/item.tsx","../src/partials/link-item.tsx","../src/partials/radio-group.styled.tsx","../src/partials/radio-group.tsx","../src/partials/radio-item.styled.tsx","../src/partials/radio-item.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/partials/switch-item.styled.ts","../src/partials/switch-item.tsx","../src/partials/trigger.styled.tsx","../src/partials/trigger.tsx","../src/partials/sub-trigger.styled.tsx","../src/partials/sub-trigger.tsx","../src/partials/sub-content.styled.tsx","../src/partials/sub-content.tsx","../src/partials/sub.styled.tsx","../src/partials/sub.tsx","../src/partials/portal.tsx","../src/partials/icon-slot.styled.ts","../src/partials/icon-slot.tsx","../src/dropdown-menu.tsx"],"sourcesContent":["import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const ItemDescription = styled(Primitive.div, {\n display: '-webkit-box',\n width: '100%',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 2,\n overflow: 'hidden',\n gridArea: 'item-description',\n fontSize: '$150',\n color: '$text-neutrals-subtle',\n})\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const LeftSlot = styled(Primitive.div, {\n display: 'flex',\n placeContent: 'center',\n marginRight: '$100',\n gridArea: 'left-slot',\n})\n\nexport const IllustrationSlot = styled(LeftSlot, {\n width: '$13',\n})\n\nexport const StyledRightSlot = styled(Primitive.div, {\n display: 'flex',\n alignItems: 'center',\n marginLeft: 'auto',\n paddingLeft: '$200',\n gridArea: 'right-slot',\n minWidth: 'max-content',\n textAlign: 'right',\n '&:empty': {\n paddingLeft: '$none',\n },\n})\n","import { focus } from '@mirohq/design-system-styles'\n\nimport { ItemDescription } from '../partials/item-description'\nimport { IllustrationSlot } from '../partials/slots.styled'\n\nexport const itemDefaults = {\n all: 'unset',\n boxSizing: 'border-box',\n fontSize: 14,\n lineHeight: '20px',\n color: '$text-neutrals',\n borderRadius: '$50',\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto',\n gridTemplateRows: '1fr auto',\n gridTemplateAreas: `'left-slot item-text right-slot'\n 'left-slot item-description right-slot'`,\n alignItems: 'start',\n minHeight: '$10',\n padding: '$100 $100',\n position: 'relative',\n userSelect: 'none',\n cursor: 'pointer',\n\n '&[data-no-left-slot]': {\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'auto',\n gridTemplateAreas: `'item-text right-slot'\n 'item-description right-slot'`,\n },\n\n '&:not(:last-child)': {\n marginBottom: '$50',\n },\n '&:not(:first-child)': {\n marginTop: '$50',\n },\n\n ...focus.defaults,\n\n '&:disabled, &[aria-disabled=\"true\"], &[data-disabled]': {\n pointerEvents: 'none',\n [`&, & ${ItemDescription}`]: {\n color: '$text-neutrals-disabled',\n },\n [`& ${IllustrationSlot}`]: {\n filter: 'grayscale(1)',\n },\n },\n\n '&:hover': {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n '&:not([aria-disabled=\"true\"])': {\n boxShadow: 'none',\n },\n },\n\n '&:active': {\n background: '$background-primary-subtle-active',\n boxShadow: 'none',\n color: '$text-primary-active',\n },\n\n '&[tabindex=\"0\"]': {\n zIndex: '1',\n },\n}\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nimport { itemDefaults } from '../styles/item'\n\nexport const StyledIndicator = styled(Primitive.span, {\n padding: '4px 6px',\n})\n\nexport const StyledCheckboxItem = styled(RadixDropdownMenu.CheckboxItem, {\n ...itemDefaults,\n [`&[data-state=\"checked\"] ${StyledIndicator}`]: {\n color: '$icon-primary',\n },\n [`&[data-state=\"checked\"]:hover ${StyledIndicator}`]: {\n color: '$icon-primary-hover',\n },\n [`\n &[aria-disabled=\"true\"] ${StyledIndicator},\n &[data-disabled] ${StyledIndicator}\n `]: {\n color: '$icon-neutrals-disabled',\n },\n})\n\nexport type StyledCheckboxItemProps = StrictComponentProps<\n typeof StyledCheckboxItem\n>\n","import React, { createContext, useContext, useState } from 'react'\nimport type { PropsWithChildren } from 'react'\n\nexport type Slots = 'right' | 'left'\n\ninterface SlotsContext {\n counter: { [key in Slots]: number }\n increaseCounter: (side: Slots) => void\n decreaseCounter: (side: Slots) => void\n}\n\nconst Context = createContext<SlotsContext>({\n counter: {\n right: 0,\n left: 0,\n },\n increaseCounter: () => {},\n decreaseCounter: () => {},\n})\n\nexport const SlotsProvider = ({\n children,\n}: PropsWithChildren<{}>): JSX.Element => {\n const [counter, setCounter] = useState({\n right: 0,\n left: 0,\n })\n\n return (\n <Context.Provider\n value={{\n counter,\n increaseCounter: side => {\n setCounter(counter => ({\n ...counter,\n [side]: counter[side] + 1,\n }))\n },\n decreaseCounter: side =>\n setCounter(counter => ({\n ...counter,\n [side]: counter[side] - 1,\n })),\n }}\n >\n {children}\n </Context.Provider>\n )\n}\n\nexport const useSlots = (): SlotsContext => useContext(Context)\n","import React, { useEffect } from 'react'\nimport type { ComponentPropsWithRef } from 'react'\n\nimport { useSlots } from '../use-slots'\nimport { StyledRightSlot } from './slots.styled'\n\nexport const RightSlot = (\n props: ComponentPropsWithRef<typeof StyledRightSlot>\n): JSX.Element => {\n const { increaseCounter, decreaseCounter } = useSlots()\n\n useEffect(() => {\n increaseCounter('right')\n return () => decreaseCounter('right')\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n return <StyledRightSlot {...props} />\n}\n\nexport const HotkeySlot = RightSlot\n","import { useMemo } from 'react'\nimport type { KeyboardEventHandler } from 'react'\nimport type { Booleanish } from '@mirohq/design-system-types'\nimport { booleanify } from '@mirohq/design-system-utils'\n\ninterface AriaDisabledProps extends Object {\n 'aria-disabled'?: Booleanish\n onKeyDown?: KeyboardEventHandler\n onSelect?: (event: Event) => void\n}\n\nexport const useAriaDisabled = (\n { 'aria-disabled': ariaDisabled, onKeyDown, onSelect }: AriaDisabledProps,\n preventDefault: boolean | undefined = false\n): AriaDisabledProps =>\n useMemo(\n () => ({\n 'aria-disabled': booleanify(ariaDisabled) ? ariaDisabled : undefined,\n onKeyDown: e => {\n if (\n booleanify(ariaDisabled) &&\n e.code !== 'ArrowUp' &&\n e.code !== 'ArrowDown'\n ) {\n e.preventDefault()\n e.stopPropagation()\n return\n }\n\n onKeyDown?.(e)\n },\n onSelect: e => {\n if (preventDefault) {\n e.preventDefault()\n }\n\n if (booleanify(ariaDisabled)) {\n return\n }\n\n onSelect?.(e)\n },\n }),\n [ariaDisabled, onKeyDown, onSelect, preventDefault]\n )\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { IconCheckMark, IconProhibit } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledCheckboxItem, StyledIndicator } from './checkbox-item.styled'\nimport type { StyledCheckboxItemProps } from './checkbox-item.styled'\nimport { RightSlot } from './slots'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\nexport interface CheckboxItemProps\n extends Omit<StyledCheckboxItemProps, 'onChange'> {\n /**\n * The checked state of the item.\n */\n checked: boolean\n\n /**\n * Event handler called when the checked state changes.\n */\n onChange: (checked: boolean) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n */\n disabled?: boolean\n\n /**\n * Event handler called when the user selects an item (via mouse of keyboard).\n */\n onSelect?: (event: Event) => void\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item.\n * Use this when the content is complex, or you have non-textual content inside.\n */\n textValue?: string\n}\n\nexport const CheckboxItem = React.forwardRef<\n ElementRef<typeof StyledCheckboxItem>,\n CheckboxItemProps\n>(({ children, checked, onChange, disabled, ...restProps }, forwardRef) => {\n const ariaDisabledProps = useAriaDisabled(restProps, true)\n const { 'aria-disabled': ariaDisabled } = ariaDisabledProps\n\n return (\n <StyledCheckboxItem\n {...restProps}\n {...ariaDisabledProps}\n ref={forwardRef}\n checked={checked}\n disabled={disabled}\n onCheckedChange={onChange}\n >\n {children}\n <RightSlot>\n <StyledIndicator>\n {(disabled === true || booleanify(ariaDisabled)) && !checked && (\n <IconProhibit size='small' />\n )}\n {checked && (\n <IconCheckMark css={{ width: '12px', display: 'block' }} />\n )}\n </StyledIndicator>\n </RightSlot>\n </StyledCheckboxItem>\n )\n})\n","import { theme } from '@mirohq/design-system-stitches'\nimport { animations } from '@mirohq/design-system-styles'\n\nexport const CONTENT_GUTTER = parseInt(theme.space[150])\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\n\nexport const contentDefaults = {\n maxWidth: '$125',\n backgroundColor: '$white',\n borderRadius: '$50',\n boxShadow: '$50',\n '@media (prefers-reduced-motion: no-preference)': {\n animationDuration: '150ms',\n animationTimingFunction: 'cubic-bezier(0.25, 0.5, 0.5, 0.9)',\n willChange: 'transform, opacity',\n '&[data-state=\"open\"]': { animationName: animations.fadeInScaled },\n '&[data-state=\"closed\"]': { animationName: animations.fadeOutScaled },\n '&[data-side=\"top\"]': {\n '&[data-align=\"start\"]': { transformOrigin: 'bottom left' },\n '&[data-align=\"center\"]': { transformOrigin: 'bottom center' },\n '&[data-align=\"end\"]': { transformOrigin: 'bottom right' },\n },\n '&[data-side=\"right\"]': {\n '&[data-align=\"start\"]': { transformOrigin: 'top left' },\n '&[data-align=\"center\"]': { transformOrigin: 'center left' },\n '&[data-align=\"end\"]': { transformOrigin: 'bottom left' },\n },\n '&[data-side=\"bottom\"]': {\n '&[data-align=\"start\"]': { transformOrigin: 'top left' },\n '&[data-align=\"center\"]': { transformOrigin: 'top center' },\n '&[data-align=\"end\"]': { transformOrigin: 'top right' },\n },\n '&[data-side=\"left\"]': {\n '&[data-align=\"start\"]': { transformOrigin: 'top right' },\n '&[data-align=\"center\"]': { transformOrigin: 'center right' },\n '&[data-align=\"end\"]': { transformOrigin: 'bottom right' },\n },\n },\n position: 'relative',\n zIndex: '$dropdownMenu',\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nimport { contentDefaults } from '../styles/content'\n\nexport const StyledContent = styled(RadixDropdownMenu.Content, {\n ...contentDefaults,\n\n variants: {\n containerSpacing: {\n small: {\n '&, [role=\"menu\"]': {\n padding: '$50 $150',\n },\n },\n medium: {\n '&, [role=\"menu\"]': {\n padding: '$150',\n },\n },\n large: {\n '&, [role=\"menu\"]': {\n padding: '$150 $300',\n },\n },\n },\n },\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { SlotsProvider } from '../use-slots'\nimport { CONTENT_OFFSET } from '../styles/content'\nimport type {\n PointerDownOutsideEvent,\n FocusOutsideEvent,\n Side,\n Align,\n StickyBehavior,\n} from '../types'\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Whether keyboard navigation should loop around\n */\n loop?: boolean\n\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault. This prop is ignored within\n * submenus.\n */\n onCloseAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when the escape key is down. It can be prevented by\n * calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the\n * component. It can be prevented by calling event.preventDefault.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void\n\n /**\n * Event handler called when focus moves outside the bounds of the component.\n * It can be prevented by calling event.preventDefault.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void\n\n /**\n * Event handler called when an interaction (pointer or focus event) happens\n * outside the bounds of the component. It can be prevented by calling\n * event.preventDefault.\n */\n onInteractOutside?: (\n event: PointerDownOutsideEvent | FocusOutsideEvent\n ) => void\n\n /**\n * The preferred side of the trigger to render against when open. Will be\n * reversed when collisions occur and avoidCollisions is enabled. This prop is\n * ignored within submenus.\n */\n side?: Side\n\n /**\n * The distance in pixels from the trigger\n */\n sideOffset?: number\n\n /**\n * The preferred alignment against the trigger. May change when collisions\n * occur. This prop is ignored within submenus.\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options\n */\n alignOffset?: number\n\n /**\n * When true, overrides the side and align preferences to prevent collisions\n * with window edges.\n */\n avoidCollisions?: boolean\n\n /**\n * The distance in pixels from window edges where collision detection should\n * occur.\n */\n collisionPadding?: number\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in\n * the boundary as long as the trigger is at least partially in the boundary\n * whilst \"always\" will keep the content in the boundary regardless.\n */\n sticky?: StickyBehavior\n\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries. It inherits from\n * DropdownMenu.Portal.\n */\n forceMount?: true\n\n /**\n * The element used as the collision boundary. By default this is the\n * viewport, though you can provide additional element(s) to be included in\n * this check.\n */\n collisionBoundary?: Element | null\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n */\n hideWhenDetached?: boolean\n\n /**\n * The spacing around container\n */\n containerSpacing?: StyledContentProps['containerSpacing']\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n loop = false,\n side = 'bottom',\n sideOffset = CONTENT_OFFSET,\n align = 'center',\n alignOffset = 0,\n collisionPadding = 0,\n avoidCollisions = true,\n sticky = 'partial',\n hideWhenDetached = false,\n containerSpacing = 'medium',\n ...restProps\n },\n forwardRef\n ) => (\n <SlotsProvider>\n <StyledContent\n {...restProps}\n ref={forwardRef}\n loop={loop}\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\n containerSpacing={containerSpacing}\n />\n </SlotsProvider>\n )\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nimport { itemDefaults } from '../styles/item'\n\nexport const StyledItem = styled(RadixDropdownMenu.Item, {\n ...itemDefaults,\n variants: {\n // This is a hack for the :has() selector\n // Remove it after Firefox implements it\n hasRightSlot: {\n true: {\n paddingRight: '$600',\n },\n },\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useSlots } from '../use-slots'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * When true, prevents the user from interacting with the item\n */\n disabled?: boolean\n\n /**\n * Event handler called when the user selects an item (via mouse of keyboard). Calling event.preventDefault in this handler will prevent the dropdown menu from closing when selecting that item\n */\n onSelect?: (event: Event) => void\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside\n */\n textValue?: string\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n ({ disabled = false, ...restProps }, forwardRef) => {\n const { counter } = useSlots()\n const ariaDisabledProps = useAriaDisabled(restProps)\n\n return (\n <StyledItem\n {...restProps}\n {...ariaDisabledProps}\n disabled={disabled}\n ref={forwardRef}\n hasRightSlot={counter.right > 0}\n />\n )\n }\n)\n","import React from 'react'\nimport type { ElementRef, AnchorHTMLAttributes } from 'react'\n\nimport { Item } from './item'\nimport type { ItemProps } from './item'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\ntype ItemPropsWithAnchor = ItemProps & AnchorHTMLAttributes<typeof Item>\nexport interface LinkItemProps extends ItemPropsWithAnchor {}\n\nexport const LinkItem = React.forwardRef<\n ElementRef<typeof Item>,\n LinkItemProps\n>(({ children, href, ...restProps }, forwardRef) => {\n const ariaDisabledProps = useAriaDisabled(restProps)\n return (\n <Item asChild ref={forwardRef} {...restProps} {...ariaDisabledProps}>\n <a href={href}>{children}</a>\n </Item>\n )\n})\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nexport const StyledRadioGroup = styled(RadixDropdownMenu.RadioGroup, {\n marginY: '$50',\n})\n\nexport type StyledRadioGroupProps = StrictComponentProps<\n typeof StyledRadioGroup\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledRadioGroup } from './radio-group.styled'\nimport type { StyledRadioGroupProps } from './radio-group.styled'\n\nexport interface RadioGroupProps\n extends Omit<StyledRadioGroupProps, 'onChange'> {\n /**\n * The value of the selected item in the group\n */\n value: string\n\n /**\n * Event handler called when the selected radio changes\n */\n onChange: (value: string) => void\n}\n\nexport const RadioGroup = React.forwardRef<\n ElementRef<typeof StyledRadioGroup>,\n RadioGroupProps\n>((props, forwardRef) => {\n const { onChange, ...restProps } = props\n\n return (\n <StyledRadioGroup\n {...restProps}\n ref={forwardRef}\n onValueChange={onChange}\n />\n )\n})\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { IconProhibit } from '@mirohq/design-system-icons'\n\nimport { itemDefaults } from '../styles/item'\n\nexport const StyledRadioContainer = styled(Primitive.span, {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '$4',\n height: '$4',\n boxSizing: 'border-box',\n border: '1px solid $border-neutrals',\n borderRadius: '$half',\n marginTop: '2px',\n})\n\nexport const StyledPill = styled(Primitive.span, {\n display: 'none',\n width: '$2',\n height: '$2',\n borderRadius: '$half',\n})\n\nexport const StyledProhibited = styled(IconProhibit, {\n display: 'none',\n width: '$3',\n})\n\nexport const StyledRadioItem = styled(RadixDropdownMenu.RadioItem, {\n ...itemDefaults,\n [`&[data-state=\"checked\"] ${StyledRadioContainer}`]: {\n color: '$icon-primary',\n borderColor: '$border-primary',\n\n [`& ${StyledPill}`]: {\n display: 'block',\n backgroundColor: '$background-primary-prominent-selected',\n },\n },\n\n [`&:hover ${StyledRadioContainer}`]: {\n borderColor: '$border-primary-hover',\n\n [`& ${StyledPill}`]: {\n backgroundColor: '$background-primary-prominent-hover',\n },\n },\n\n [`\n &[aria-disabled=\"true\"] ${StyledRadioContainer},\n &[data-disabled] ${StyledRadioContainer}\n `]: {\n color: '$icon-neutrals-disabled',\n borderColor: '$border-neutrals-disabled',\n\n [`& ${StyledPill}`]: {\n backgroundColor: '$icon-neutrals-disabled',\n },\n },\n '&[data-state=\"unchecked\"]': {\n [`\n &[aria-disabled=\"true\"] ${StyledProhibited},\n &[data-disabled] ${StyledProhibited}\n `]: {\n display: 'flex',\n },\n },\n})\n\nexport type StyledRadioItemProps = StrictComponentProps<typeof StyledRadioItem>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport {\n StyledPill,\n StyledProhibited,\n StyledRadioContainer,\n StyledRadioItem,\n} from './radio-item.styled'\nimport type { StyledRadioItemProps } from './radio-item.styled'\nimport { RightSlot } from './slots'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\nexport interface RadioItemProps extends StyledRadioItemProps {\n /**\n * The unique value of the item.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n */\n disabled?: boolean\n\n /**\n * Event handler called when the user selects an item (via mouse of keyboard).\n */\n onSelect?: (event: Event) => void\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item.\n * Use this when the content is complex, or you have non-textual content inside.\n */\n textValue?: string\n}\n\nexport const RadioItem = React.forwardRef<\n ElementRef<typeof StyledRadioItem>,\n RadioItemProps\n>(({ disabled = false, children, ...restProps }, forwardRef) => {\n const ariaDisabledProps = useAriaDisabled(restProps, true)\n return (\n <StyledRadioItem\n {...restProps}\n {...ariaDisabledProps}\n disabled={disabled}\n ref={forwardRef}\n >\n {children}\n <RightSlot>\n <StyledRadioContainer>\n <StyledPill />\n <StyledProhibited />\n </StyledRadioContainer>\n </RightSlot>\n </StyledRadioItem>\n )\n})\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nexport const StyledSeparator = styled(RadixDropdownMenu.Separator, {\n borderTop: '1px solid $border-neutrals-subtle',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSeparator } from './separator.styled'\nimport type { StyledSeparatorProps } from './separator.styled'\n\nexport interface SeparatorProps extends StyledSeparatorProps {}\n\nexport const Separator = React.forwardRef<\n ElementRef<typeof StyledSeparator>,\n SeparatorProps\n>((props, forwardRef) => <StyledSeparator {...props} ref={forwardRef} />)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\nimport { styles } from '@mirohq/design-system-base-switch'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nimport { itemDefaults } from '../styles/item'\n\nexport const StyledSwitch = styled(Primitive.span, {\n ...styles.default,\n width: '$7',\n height: '$4',\n marginTop: '2px',\n})\n\nexport const StyledSwitchItem = styled(RadixDropdownMenu.CheckboxItem, {\n ...itemDefaults,\n\n [`&[data-state=\"checked\"] ${StyledSwitch}`]: styles.checked,\n [`&[data-state=\"checked\"]:hover ${StyledSwitch}`]: styles.checkedHovered,\n\n [`&:hover ${StyledSwitch}`]: styles.hovered,\n [`\n &[aria-disabled=\"true\"] ${StyledSwitch},\n &[data-disabled] ${StyledSwitch}\n `]: styles.disabled,\n})\n\nexport type StyledSwitchItemProps = StrictComponentProps<\n typeof StyledSwitchItem\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Thumb } from '@mirohq/design-system-base-switch'\n\nimport { RightSlot } from './slots'\nimport type { StyledSwitchItemProps } from './switch-item.styled'\nimport { StyledSwitch, StyledSwitchItem } from './switch-item.styled'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\nexport interface SwitchItemProps\n extends Omit<StyledSwitchItemProps, 'onChange'> {\n /**\n * The checked state of the item.\n */\n checked: boolean\n\n /**\n * Event handler called when the checked state changes.\n */\n onChange: (checked: boolean) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n */\n disabled?: boolean\n\n /**\n * Event handler called when the user selects an item (via mouse of keyboard).\n */\n onSelect?: (event: Event) => void\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item.\n * Use this when the content is complex, or you have non-textual content inside.\n */\n textValue?: string\n}\n\nexport const SwitchItem = React.forwardRef<\n ElementRef<typeof StyledSwitchItem>,\n SwitchItemProps\n>(\n (\n { disabled = false, checked, onChange, children, ...restProps },\n forwardRef\n ) => {\n const ariaDisabledProps = useAriaDisabled(restProps, true)\n\n return (\n <StyledSwitchItem\n {...restProps}\n {...ariaDisabledProps}\n disabled={disabled}\n checked={checked}\n onCheckedChange={onChange}\n ref={forwardRef}\n >\n {children}\n <RightSlot>\n <StyledSwitch>\n <Thumb />\n </StyledSwitch>\n </RightSlot>\n </StyledSwitchItem>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\nimport { focus } from '@mirohq/design-system-styles'\n\nexport const StyledTrigger = styled(RadixDropdownMenu.Trigger, {\n variants: {\n unstyled: {\n true: {\n all: 'unset',\n boxSizing: 'border-box',\n cursor: 'pointer',\n ...focus.defaults,\n },\n false: {\n cursor: 'pointer',\n },\n },\n },\n})\n\nexport type StyledTriggerProps = StrictComponentProps<typeof StyledTrigger>\n","import React from 'react'\nimport type { ElementRef, DOMAttributes } from 'react'\n\nimport { StyledTrigger } from './trigger.styled'\nimport type { StyledTriggerProps } from './trigger.styled'\n\nexport interface TriggerProps extends StyledTriggerProps {\n /**\n * temporary the same as onClick, later will be added touch events support\n */\n onPress?: DOMAttributes<HTMLElement>['onClick']\n}\n\nexport const Trigger = React.forwardRef<\n ElementRef<typeof StyledTrigger>,\n TriggerProps\n>(({ asChild = false, onPress, onClick, ...restProps }, forwardRef) => (\n <StyledTrigger\n {...restProps}\n onClick={onPress ?? onClick}\n ref={forwardRef}\n unstyled={!asChild}\n asChild={asChild}\n />\n))\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nimport { itemDefaults } from '../styles/item'\n\nexport const StyledIconContainer = styled(Primitive.span, {\n color: '$icon-neutrals-with-text',\n marginRight: '-4px',\n})\n\nexport const StyledSubTrigger = styled(RadixDropdownMenu.SubTrigger, {\n ...itemDefaults,\n '&[data-state=\"open\"]': itemDefaults['&:hover'],\n\n [`&[data-state=\"open\"] ${StyledIconContainer}, &:hover ${StyledIconContainer}`]:\n {\n color: '$icon-primary-hover',\n },\n})\n\nexport type StyledSubTriggerProps = StrictComponentProps<\n typeof StyledSubTrigger\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { IconChevronRight } from '@mirohq/design-system-icons'\n\nimport { StyledIconContainer, StyledSubTrigger } from './sub-trigger.styled'\nimport type { StyledSubTriggerProps } from './sub-trigger.styled'\nimport { RightSlot } from './slots'\nimport { useAriaDisabled } from '../use-aria-disabled'\n\nexport interface SubTriggerProps extends StyledSubTriggerProps {\n /**\n * Prevents the user from interacting with the switch\n */\n disabled?: boolean\n\n /**\n * Optional text used for type ahead purposes. By default the type ahead\n * behavior will use the .textContent of the item. Use this when the content\n * is complex, or you have.\n */\n textValue?: string\n}\n\nexport const SubTrigger = React.forwardRef<\n ElementRef<typeof StyledSubTrigger>,\n StyledSubTriggerProps\n>(({ children, disabled = false, ...restProps }, forwardRef) => {\n const { onSelect, ...ariaDisabledProps } = useAriaDisabled({\n onKeyDown: restProps.onKeyDown,\n 'aria-disabled': restProps['aria-disabled'],\n })\n\n return (\n <StyledSubTrigger\n {...restProps}\n {...ariaDisabledProps}\n disabled={disabled}\n ref={forwardRef}\n >\n {children}\n <RightSlot>\n <StyledIconContainer\n data-testid={\n process.env.NODE_ENV === 'test' ? 'submenu-arrow-icon' : undefined\n }\n >\n <IconChevronRight size='small' weight='thin' />\n </StyledIconContainer>\n </RightSlot>\n </StyledSubTrigger>\n )\n})\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nimport { contentDefaults } from '../styles/content'\n\nexport const StyledSubContent = styled(\n RadixDropdownMenu.SubContent,\n contentDefaults\n)\n\nexport type StyledSubContentProps = StrictComponentProps<\n typeof StyledSubContent\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSubContent } from './sub-content.styled'\nimport { CONTENT_GUTTER, CONTENT_OFFSET } from '../styles/content'\nimport { SlotsProvider } from '../use-slots'\nimport type { StyledSubContentProps } from './sub-content.styled'\nimport type { PointerDownOutsideEvent, FocusOutsideEvent } from '../types'\n\nexport interface SubContentProps extends StyledSubContentProps {\n /**\n * Whether keyboard navigation should loop around\n * @default false\n */\n loop?: boolean\n\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault. This prop is ignored within\n * submenus.\n */\n onCloseAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when the escape key is down. It can be prevented by\n * calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the\n * component. It can be prevented by calling event.preventDefault.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void\n\n /**\n * Event handler called when focus moves outside the bounds of the component.\n * It can be prevented by calling event.preventDefault.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void\n\n /**\n * Event handler called when an interaction (pointer or focus event) happens\n * outside the bounds of the component. It can be prevented by calling\n * event.preventDefault.\n */\n onInteractOutside?: (\n event: PointerDownOutsideEvent | FocusOutsideEvent\n ) => void\n\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries.\n */\n forceMount?: true\n\n /**\n * The distance in pixels from the trigger.\n */\n sideOffset?: number\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options.\n */\n alignOffset?: number\n\n /**\n * When true, overrides the side andalign preferences to prevent collisions\n * with window edges.\n * @default true\n */\n avoidCollisions?: boolean\n\n /**\n *The distance in pixels from the boundary edges where collision detection\n *should occur. Accepts a number (same for all sides).\n */\n collisionPadding?: number\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in\n * the boundary as long as the trigger is at least partially in the boundary\n * whilst \"always\" will keep the content in the boundary regardless.\n * @default partial\n */\n sticky?: 'partial' | 'always'\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n * @default false\n */\n hideWhenDetached?: boolean\n}\n\n// without CONTENT_GUTTER submenu would overlap the menu\nconst SIDE_OFFSET = CONTENT_GUTTER + CONTENT_OFFSET\n\nexport const SubContent = React.forwardRef<\n ElementRef<typeof StyledSubContent>,\n SubContentProps\n>(\n (\n {\n sideOffset = SIDE_OFFSET,\n alignOffset = -CONTENT_GUTTER,\n collisionPadding = 0,\n loop = false,\n hideWhenDetached = false,\n sticky = 'partial',\n ...restProps\n },\n forwardRef\n ) => (\n <SlotsProvider>\n <StyledSubContent\n {...restProps}\n ref={forwardRef}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n collisionPadding={collisionPadding}\n loop={loop}\n hideWhenDetached={hideWhenDetached}\n sticky={sticky}\n />\n </SlotsProvider>\n )\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nexport const StyledSub = styled(RadixDropdownMenu.Sub, {})\n\nexport type StyledSubProps = StrictComponentProps<typeof StyledSub>\n","import React, { useState } from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSub } from './sub.styled'\nimport type { StyledSubProps } from './sub.styled'\n\nexport interface SubProps extends StyledSubProps {\n /**\n * The open state of the submenu when it is initially rendered. Use when you\n * do not need to control its open state.\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the submenu. Must be used in conjunction with\n * onOpenChange.\n */\n open?: boolean\n\n /**\n * Event handler called when the submenu opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the submenu closes.\n */\n onClose?: () => void\n}\n\nexport const Sub = React.forwardRef<ElementRef<typeof StyledSub>, SubProps>(\n ({ defaultOpen, onOpen, onClose, open, ...restProps }, forwardRef) => {\n const [openState, setOpenState] = useState(defaultOpen)\n return (\n <StyledSub\n {...restProps}\n open={open ?? openState}\n onOpenChange={newOpen => {\n if (open == null) {\n setOpenState(newOpen)\n }\n\n newOpen ? onOpen?.() : onClose?.()\n }}\n ref={forwardRef}\n />\n )\n }\n)\n","import React from 'react'\nimport type { DropdownMenuPortalProps } from '@radix-ui/react-dropdown-menu'\nimport { Portal as RadixPortal } from '@radix-ui/react-dropdown-menu'\n\nexport interface PortalProps extends DropdownMenuPortalProps {\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries. If used on this part, it will be\n * inherited by DropdownMenu.Content and DropdownMenu.SubContent respectively.\n */\n forceMount?: true\n\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\n\nimport { LeftSlot } from './slots.styled'\n\nexport const StyledIconSlot = styled(LeftSlot, {\n paddingTop: '2px',\n\n variants: {\n customIcon: {\n true: {\n square: '$icon-200',\n },\n },\n },\n})\n\nexport type StyledIconSlotProps = StrictComponentProps<typeof StyledIconSlot>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport type { IconProps } from '@mirohq/design-system-icons'\nimport { isIconComponent } from '@mirohq/design-system-base-icon'\n\nimport type { StyledIconSlotProps } from './icon-slot.styled'\nimport { StyledIconSlot } from './icon-slot.styled'\n\nexport type IconSlotProps = Omit<StyledIconSlotProps, 'custom'>\n\nexport const IconSlot = React.forwardRef<\n ElementRef<typeof StyledIconSlot>,\n IconSlotProps\n>(({ children, ...restProps }, forwardRef) => {\n const child = React.Children.only(children) as React.ReactElement\n\n const isIcon = isIconComponent(child)\n\n const formattedChild = isIcon\n ? React.cloneElement<IconProps>(child, {\n ...child.props,\n size: 'small',\n weight: 'thin',\n })\n : child\n\n return (\n <StyledIconSlot ref={forwardRef} {...restProps} customIcon={!isIcon}>\n {formattedChild}\n </StyledIconSlot>\n )\n})\n","import React, { useState } from 'react'\nimport * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu'\n\nimport { CheckboxItem } from './partials/checkbox-item'\nimport { Content } from './partials/content'\nimport { Item } from './partials/item'\nimport { LinkItem } from './partials/link-item'\nimport { RadioGroup } from './partials/radio-group'\nimport { RadioItem } from './partials/radio-item'\nimport { Separator } from './partials/separator'\nimport { SwitchItem } from './partials/switch-item'\nimport { Trigger } from './partials/trigger'\nimport { SubTrigger } from './partials/sub-trigger'\nimport { SubContent } from './partials/sub-content'\nimport { Sub } from './partials/sub'\nimport { Portal } from './partials/portal'\nimport { IllustrationSlot } from './partials/slots.styled'\nimport { HotkeySlot } from './partials/slots'\nimport { ItemDescription } from './partials/item-description'\nimport { IconSlot } from './partials/icon-slot'\n\nexport interface DropdownMenuProps {\n /**\n * The open state of the dropdown menu when it is initially rendered. Use when\n * you do not need to control its open state.\n */\n defaultOpen?: boolean\n\n /**\n * The reading direction of submenus when applicable. If omitted, assumes LTR\n * (left-to-right) reading mode.\n */\n direction?: 'ltr' | 'rtl'\n\n /**\n * The current dropdown open state.\n */\n open?: boolean\n\n /**\n * Event handler called when the dropdown opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the dropdown closes.\n */\n onClose?: () => void\n\n /**\n * Defines whether the interaction with outside elements will be disabled and\n * only menu content will be visible to screen readers. This prop is ignored\n * within submenus.\n */\n interactOutside?: boolean\n\n /**\n * The content\n */\n children: React.ReactNode\n}\n\nexport const DropdownMenu: React.FC<DropdownMenuProps> & Partials = ({\n defaultOpen = false,\n direction = 'ltr',\n interactOutside = false,\n open,\n onOpen,\n onClose,\n ...restProps\n}) => {\n const [openState, setOpenState] = useState(defaultOpen)\n\n return (\n <RadixDropdownMenu.Root\n {...restProps}\n dir={direction}\n modal={interactOutside}\n open={open ?? openState}\n onOpenChange={newOpen => {\n if (open == null) {\n setOpenState(newOpen)\n }\n\n newOpen ? onOpen?.() : onClose?.()\n }}\n />\n )\n}\n\n// Partials\n// -----------------------------------------------------------------------------\n\ninterface Partials {\n CheckboxItem: typeof CheckboxItem\n Content: typeof Content\n HotkeySlot: typeof HotkeySlot\n IconSlot: typeof IconSlot\n IllustrationSlot: typeof IllustrationSlot\n Item: typeof Item\n ItemDescription: typeof ItemDescription\n LinkItem: typeof LinkItem\n Portal: typeof Portal\n RadioGroup: typeof RadioGroup\n RadioItem: typeof RadioItem\n Separator: typeof Separator\n Sub: typeof Sub\n SubContent: typeof SubContent\n SubTrigger: typeof SubTrigger\n SwitchItem: typeof SwitchItem\n Trigger: typeof Trigger\n}\n\nDropdownMenu.CheckboxItem = CheckboxItem\nDropdownMenu.Content = Content\nDropdownMenu.HotkeySlot = HotkeySlot\nDropdownMenu.IconSlot = IconSlot\nDropdownMenu.IllustrationSlot = IllustrationSlot\nDropdownMenu.Item = Item\nDropdownMenu.ItemDescription = ItemDescription\nDropdownMenu.LinkItem = LinkItem\nDropdownMenu.Portal = Portal\nDropdownMenu.RadioGroup = RadioGroup\nDropdownMenu.RadioItem = RadioItem\nDropdownMenu.Separator = Separator\nDropdownMenu.Sub = Sub\nDropdownMenu.SubContent = SubContent\nDropdownMenu.SubTrigger = SubTrigger\nDropdownMenu.SwitchItem = SwitchItem\nDropdownMenu.Trigger = Trigger\n"],"names":["styled","Primitive","focus","RadixDropdownMenu","createContext","useState","React","counter","useContext","useEffect","useMemo","booleanify","IconProhibit","IconCheckMark","theme","animations","styles","Thumb","IconChevronRight","RadixPortal","isIconComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGa,MAAA,eAAA,GAAkBA,2BAAO,CAAAC,+BAAA,CAAU,GAAK,EAAA;AAAA,EACnD,OAAS,EAAA,aAAA;AAAA,EACT,KA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/module.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { createContext, useState, useContext, useEffect, useMemo } from 'react';
|
|
2
2
|
import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
3
3
|
import { Portal as Portal$1 } from '@radix-ui/react-dropdown-menu';
|
|
4
|
-
import { IconProhibit, IconCheckMark, IconChevronRight
|
|
4
|
+
import { IconProhibit, IconCheckMark, IconChevronRight } from '@mirohq/design-system-icons';
|
|
5
5
|
import { booleanify } from '@mirohq/design-system-utils';
|
|
6
6
|
import { Primitive } from '@mirohq/design-system-primitive';
|
|
7
7
|
import { styled, theme } from '@mirohq/design-system-stitches';
|
|
8
8
|
import { focus, animations } from '@mirohq/design-system-styles';
|
|
9
9
|
import { styles, Thumb } from '@mirohq/design-system-base-switch';
|
|
10
|
+
import { isIconComponent } from '@mirohq/design-system-base-icon';
|
|
10
11
|
|
|
11
12
|
const ItemDescription = styled(Primitive.div, {
|
|
12
13
|
display: "-webkit-box",
|
|
@@ -28,14 +29,18 @@ const LeftSlot = styled(Primitive.div, {
|
|
|
28
29
|
const IllustrationSlot = styled(LeftSlot, {
|
|
29
30
|
width: "$13"
|
|
30
31
|
});
|
|
31
|
-
const
|
|
32
|
+
const StyledRightSlot = styled(Primitive.div, {
|
|
32
33
|
display: "flex",
|
|
33
34
|
alignItems: "center",
|
|
34
35
|
marginLeft: "auto",
|
|
35
36
|
paddingLeft: "$200",
|
|
36
|
-
gridArea: "right-slot"
|
|
37
|
+
gridArea: "right-slot",
|
|
38
|
+
minWidth: "max-content",
|
|
39
|
+
textAlign: "right",
|
|
40
|
+
"&:empty": {
|
|
41
|
+
paddingLeft: "$none"
|
|
42
|
+
}
|
|
37
43
|
});
|
|
38
|
-
const HotkeySlot = RightSlot;
|
|
39
44
|
|
|
40
45
|
const itemDefaults = {
|
|
41
46
|
all: "unset",
|
|
@@ -47,16 +52,26 @@ const itemDefaults = {
|
|
|
47
52
|
display: "grid",
|
|
48
53
|
gridTemplateColumns: "auto 1fr auto",
|
|
49
54
|
gridTemplateRows: "1fr auto",
|
|
50
|
-
gridTemplateAreas: `
|
|
51
|
-
'left-slot item-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
minHeight: "$11",
|
|
56
|
-
padding: "$100 $150",
|
|
55
|
+
gridTemplateAreas: `'left-slot item-text right-slot'
|
|
56
|
+
'left-slot item-description right-slot'`,
|
|
57
|
+
alignItems: "start",
|
|
58
|
+
minHeight: "$10",
|
|
59
|
+
padding: "$100 $100",
|
|
57
60
|
position: "relative",
|
|
58
61
|
userSelect: "none",
|
|
59
62
|
cursor: "pointer",
|
|
63
|
+
"&[data-no-left-slot]": {
|
|
64
|
+
gridTemplateColumns: "1fr auto",
|
|
65
|
+
gridTemplateRows: "auto",
|
|
66
|
+
gridTemplateAreas: `'item-text right-slot'
|
|
67
|
+
'item-description right-slot'`
|
|
68
|
+
},
|
|
69
|
+
"&:not(:last-child)": {
|
|
70
|
+
marginBottom: "$50"
|
|
71
|
+
},
|
|
72
|
+
"&:not(:first-child)": {
|
|
73
|
+
marginTop: "$50"
|
|
74
|
+
},
|
|
60
75
|
...focus.defaults,
|
|
61
76
|
'&:disabled, &[aria-disabled="true"], &[data-disabled]': {
|
|
62
77
|
pointerEvents: "none",
|
|
@@ -84,7 +99,9 @@ const itemDefaults = {
|
|
|
84
99
|
}
|
|
85
100
|
};
|
|
86
101
|
|
|
87
|
-
const StyledIndicator = styled(Primitive.span, {
|
|
102
|
+
const StyledIndicator = styled(Primitive.span, {
|
|
103
|
+
padding: "4px 6px"
|
|
104
|
+
});
|
|
88
105
|
const StyledCheckboxItem = styled(RadixDropdownMenu.CheckboxItem, {
|
|
89
106
|
...itemDefaults,
|
|
90
107
|
[`&[data-state="checked"] ${StyledIndicator}`]: {
|
|
@@ -101,6 +118,53 @@ const StyledCheckboxItem = styled(RadixDropdownMenu.CheckboxItem, {
|
|
|
101
118
|
}
|
|
102
119
|
});
|
|
103
120
|
|
|
121
|
+
const Context = createContext({
|
|
122
|
+
counter: {
|
|
123
|
+
right: 0,
|
|
124
|
+
left: 0
|
|
125
|
+
},
|
|
126
|
+
increaseCounter: () => {
|
|
127
|
+
},
|
|
128
|
+
decreaseCounter: () => {
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
const SlotsProvider = ({
|
|
132
|
+
children
|
|
133
|
+
}) => {
|
|
134
|
+
const [counter, setCounter] = useState({
|
|
135
|
+
right: 0,
|
|
136
|
+
left: 0
|
|
137
|
+
});
|
|
138
|
+
return /* @__PURE__ */ React.createElement(Context.Provider, {
|
|
139
|
+
value: {
|
|
140
|
+
counter,
|
|
141
|
+
increaseCounter: (side) => {
|
|
142
|
+
setCounter((counter2) => ({
|
|
143
|
+
...counter2,
|
|
144
|
+
[side]: counter2[side] + 1
|
|
145
|
+
}));
|
|
146
|
+
},
|
|
147
|
+
decreaseCounter: (side) => setCounter((counter2) => ({
|
|
148
|
+
...counter2,
|
|
149
|
+
[side]: counter2[side] - 1
|
|
150
|
+
}))
|
|
151
|
+
}
|
|
152
|
+
}, children);
|
|
153
|
+
};
|
|
154
|
+
const useSlots = () => useContext(Context);
|
|
155
|
+
|
|
156
|
+
const RightSlot = (props) => {
|
|
157
|
+
const { increaseCounter, decreaseCounter } = useSlots();
|
|
158
|
+
useEffect(() => {
|
|
159
|
+
increaseCounter("right");
|
|
160
|
+
return () => decreaseCounter("right");
|
|
161
|
+
}, []);
|
|
162
|
+
return /* @__PURE__ */ React.createElement(StyledRightSlot, {
|
|
163
|
+
...props
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
const HotkeySlot = RightSlot;
|
|
167
|
+
|
|
104
168
|
const useAriaDisabled = ({ "aria-disabled": ariaDisabled, onKeyDown, onSelect }, preventDefault = false) => useMemo(
|
|
105
169
|
() => ({
|
|
106
170
|
"aria-disabled": booleanify(ariaDisabled) ? ariaDisabled : void 0,
|
|
@@ -138,26 +202,17 @@ const CheckboxItem = React.forwardRef(({ children, checked, onChange, disabled,
|
|
|
138
202
|
}, children, /* @__PURE__ */ React.createElement(RightSlot, null, /* @__PURE__ */ React.createElement(StyledIndicator, null, (disabled === true || booleanify(ariaDisabled)) && !checked && /* @__PURE__ */ React.createElement(IconProhibit, {
|
|
139
203
|
size: "small"
|
|
140
204
|
}), checked && /* @__PURE__ */ React.createElement(IconCheckMark, {
|
|
141
|
-
|
|
205
|
+
css: { width: "12px", display: "block" }
|
|
142
206
|
}))));
|
|
143
207
|
});
|
|
144
208
|
|
|
145
|
-
const
|
|
146
|
-
const CONTENT_GUTTER = parseInt(theme.space[GUTTER_TOKEN]);
|
|
209
|
+
const CONTENT_GUTTER = parseInt(theme.space[150]);
|
|
147
210
|
const CONTENT_OFFSET = parseInt(theme.space[50]);
|
|
148
|
-
const ITEM_WITHOUT_RIGHT_SLOT = `[role="menuitem"]:not(:has(${RightSlot}))`;
|
|
149
211
|
const contentDefaults = {
|
|
150
212
|
maxWidth: "$125",
|
|
151
213
|
backgroundColor: "$white",
|
|
152
214
|
borderRadius: "$50",
|
|
153
|
-
padding: `$${GUTTER_TOKEN}`,
|
|
154
215
|
boxShadow: "$50",
|
|
155
|
-
[`&:has(${RightSlot}) > ${ITEM_WITHOUT_RIGHT_SLOT}`]: {
|
|
156
|
-
paddingRight: "44px"
|
|
157
|
-
},
|
|
158
|
-
[`&:has([role="switch"]) > ${ITEM_WITHOUT_RIGHT_SLOT}`]: {
|
|
159
|
-
paddingRight: "56px"
|
|
160
|
-
},
|
|
161
216
|
"@media (prefers-reduced-motion: no-preference)": {
|
|
162
217
|
animationDuration: "150ms",
|
|
163
218
|
animationTimingFunction: "cubic-bezier(0.25, 0.5, 0.5, 0.9)",
|
|
@@ -189,7 +244,28 @@ const contentDefaults = {
|
|
|
189
244
|
zIndex: "$dropdownMenu"
|
|
190
245
|
};
|
|
191
246
|
|
|
192
|
-
const StyledContent = styled(RadixDropdownMenu.Content,
|
|
247
|
+
const StyledContent = styled(RadixDropdownMenu.Content, {
|
|
248
|
+
...contentDefaults,
|
|
249
|
+
variants: {
|
|
250
|
+
containerSpacing: {
|
|
251
|
+
small: {
|
|
252
|
+
'&, [role="menu"]': {
|
|
253
|
+
padding: "$50 $150"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
medium: {
|
|
257
|
+
'&, [role="menu"]': {
|
|
258
|
+
padding: "$150"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
large: {
|
|
262
|
+
'&, [role="menu"]': {
|
|
263
|
+
padding: "$150 $300"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
});
|
|
193
269
|
|
|
194
270
|
const Content = React.forwardRef(
|
|
195
271
|
({
|
|
@@ -202,8 +278,9 @@ const Content = React.forwardRef(
|
|
|
202
278
|
avoidCollisions = true,
|
|
203
279
|
sticky = "partial",
|
|
204
280
|
hideWhenDetached = false,
|
|
281
|
+
containerSpacing = "medium",
|
|
205
282
|
...restProps
|
|
206
|
-
}, forwardRef) => /* @__PURE__ */ React.createElement(StyledContent, {
|
|
283
|
+
}, forwardRef) => /* @__PURE__ */ React.createElement(SlotsProvider, null, /* @__PURE__ */ React.createElement(StyledContent, {
|
|
207
284
|
...restProps,
|
|
208
285
|
ref: forwardRef,
|
|
209
286
|
loop,
|
|
@@ -214,20 +291,32 @@ const Content = React.forwardRef(
|
|
|
214
291
|
avoidCollisions,
|
|
215
292
|
collisionPadding,
|
|
216
293
|
sticky,
|
|
217
|
-
hideWhenDetached
|
|
218
|
-
|
|
294
|
+
hideWhenDetached,
|
|
295
|
+
containerSpacing
|
|
296
|
+
}))
|
|
219
297
|
);
|
|
220
298
|
|
|
221
|
-
const StyledItem = styled(RadixDropdownMenu.Item,
|
|
299
|
+
const StyledItem = styled(RadixDropdownMenu.Item, {
|
|
300
|
+
...itemDefaults,
|
|
301
|
+
variants: {
|
|
302
|
+
hasRightSlot: {
|
|
303
|
+
true: {
|
|
304
|
+
paddingRight: "$600"
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
});
|
|
222
309
|
|
|
223
310
|
const Item = React.forwardRef(
|
|
224
311
|
({ disabled = false, ...restProps }, forwardRef) => {
|
|
312
|
+
const { counter } = useSlots();
|
|
225
313
|
const ariaDisabledProps = useAriaDisabled(restProps);
|
|
226
314
|
return /* @__PURE__ */ React.createElement(StyledItem, {
|
|
227
315
|
...restProps,
|
|
228
316
|
...ariaDisabledProps,
|
|
229
317
|
disabled,
|
|
230
|
-
ref: forwardRef
|
|
318
|
+
ref: forwardRef,
|
|
319
|
+
hasRightSlot: counter.right > 0
|
|
231
320
|
});
|
|
232
321
|
}
|
|
233
322
|
);
|
|
@@ -244,7 +333,9 @@ const LinkItem = React.forwardRef(({ children, href, ...restProps }, forwardRef)
|
|
|
244
333
|
}, children));
|
|
245
334
|
});
|
|
246
335
|
|
|
247
|
-
const StyledRadioGroup = styled(RadixDropdownMenu.RadioGroup
|
|
336
|
+
const StyledRadioGroup = styled(RadixDropdownMenu.RadioGroup, {
|
|
337
|
+
marginY: "$50"
|
|
338
|
+
});
|
|
248
339
|
|
|
249
340
|
const RadioGroup = React.forwardRef((props, forwardRef) => {
|
|
250
341
|
const { onChange, ...restProps } = props;
|
|
@@ -263,7 +354,8 @@ const StyledRadioContainer = styled(Primitive.span, {
|
|
|
263
354
|
height: "$4",
|
|
264
355
|
boxSizing: "border-box",
|
|
265
356
|
border: "1px solid $border-neutrals",
|
|
266
|
-
borderRadius: "$half"
|
|
357
|
+
borderRadius: "$half",
|
|
358
|
+
marginTop: "2px"
|
|
267
359
|
});
|
|
268
360
|
const StyledPill = styled(Primitive.span, {
|
|
269
361
|
display: "none",
|
|
@@ -322,8 +414,7 @@ const RadioItem = React.forwardRef(({ disabled = false, children, ...restProps }
|
|
|
322
414
|
});
|
|
323
415
|
|
|
324
416
|
const StyledSeparator = styled(RadixDropdownMenu.Separator, {
|
|
325
|
-
borderTop: "1px solid $border-neutrals-subtle"
|
|
326
|
-
marginY: "$100"
|
|
417
|
+
borderTop: "1px solid $border-neutrals-subtle"
|
|
327
418
|
});
|
|
328
419
|
|
|
329
420
|
const Separator = React.forwardRef((props, forwardRef) => /* @__PURE__ */ React.createElement(StyledSeparator, {
|
|
@@ -334,7 +425,8 @@ const Separator = React.forwardRef((props, forwardRef) => /* @__PURE__ */ React.
|
|
|
334
425
|
const StyledSwitch = styled(Primitive.span, {
|
|
335
426
|
...styles.default,
|
|
336
427
|
width: "$7",
|
|
337
|
-
height: "$4"
|
|
428
|
+
height: "$4",
|
|
429
|
+
marginTop: "2px"
|
|
338
430
|
});
|
|
339
431
|
const StyledSwitchItem = styled(RadixDropdownMenu.CheckboxItem, {
|
|
340
432
|
...itemDefaults,
|
|
@@ -361,19 +453,18 @@ const SwitchItem = React.forwardRef(
|
|
|
361
453
|
}
|
|
362
454
|
);
|
|
363
455
|
|
|
364
|
-
const defaultStyles = {
|
|
365
|
-
boxSizing: "border-box",
|
|
366
|
-
cursor: "pointer",
|
|
367
|
-
...focus.defaults
|
|
368
|
-
};
|
|
369
456
|
const StyledTrigger = styled(RadixDropdownMenu.Trigger, {
|
|
370
457
|
variants: {
|
|
371
458
|
unstyled: {
|
|
372
459
|
true: {
|
|
373
460
|
all: "unset",
|
|
374
|
-
|
|
461
|
+
boxSizing: "border-box",
|
|
462
|
+
cursor: "pointer",
|
|
463
|
+
...focus.defaults
|
|
375
464
|
},
|
|
376
|
-
false:
|
|
465
|
+
false: {
|
|
466
|
+
cursor: "pointer"
|
|
467
|
+
}
|
|
377
468
|
}
|
|
378
469
|
}
|
|
379
470
|
});
|
|
@@ -387,7 +478,8 @@ const Trigger = React.forwardRef(({ asChild = false, onPress, onClick, ...restPr
|
|
|
387
478
|
}));
|
|
388
479
|
|
|
389
480
|
const StyledIconContainer = styled(Primitive.span, {
|
|
390
|
-
color: "$icon-neutrals-with-text"
|
|
481
|
+
color: "$icon-neutrals-with-text",
|
|
482
|
+
marginRight: "-4px"
|
|
391
483
|
});
|
|
392
484
|
const StyledSubTrigger = styled(RadixDropdownMenu.SubTrigger, {
|
|
393
485
|
...itemDefaults,
|
|
@@ -430,7 +522,7 @@ const SubContent = React.forwardRef(
|
|
|
430
522
|
hideWhenDetached = false,
|
|
431
523
|
sticky = "partial",
|
|
432
524
|
...restProps
|
|
433
|
-
}, forwardRef) => /* @__PURE__ */ React.createElement(StyledSubContent, {
|
|
525
|
+
}, forwardRef) => /* @__PURE__ */ React.createElement(SlotsProvider, null, /* @__PURE__ */ React.createElement(StyledSubContent, {
|
|
434
526
|
...restProps,
|
|
435
527
|
ref: forwardRef,
|
|
436
528
|
sideOffset,
|
|
@@ -439,7 +531,7 @@ const SubContent = React.forwardRef(
|
|
|
439
531
|
loop,
|
|
440
532
|
hideWhenDetached,
|
|
441
533
|
sticky
|
|
442
|
-
})
|
|
534
|
+
}))
|
|
443
535
|
);
|
|
444
536
|
|
|
445
537
|
const StyledSub = styled(RadixDropdownMenu.Sub, {});
|
|
@@ -466,7 +558,7 @@ const Portal = (props) => /* @__PURE__ */ React.createElement(Portal$1, {
|
|
|
466
558
|
});
|
|
467
559
|
|
|
468
560
|
const StyledIconSlot = styled(LeftSlot, {
|
|
469
|
-
|
|
561
|
+
paddingTop: "2px",
|
|
470
562
|
variants: {
|
|
471
563
|
customIcon: {
|
|
472
564
|
true: {
|