@mirohq/design-system-dropdown-menu 5.2.0 → 5.3.0-fix-stitches-types.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var jsxRuntime = require('react/jsx-runtime');
6
4
  var React = require('react');
7
5
  var RadixDropdownMenu = require('@radix-ui/react-dropdown-menu');
@@ -19,10 +17,7 @@ var designSystemScrollArea = require('@mirohq/design-system-scroll-area');
19
17
  var designSystemBaseSwitch = require('@mirohq/design-system-base-switch');
20
18
  var designSystemBaseIcon = require('@mirohq/design-system-base-icon');
21
19
 
22
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
23
-
24
- function _interopNamespace(e) {
25
- if (e && e.__esModule) return e;
20
+ function _interopNamespaceDefault(e) {
26
21
  var n = Object.create(null);
27
22
  if (e) {
28
23
  Object.keys(e).forEach(function (k) {
@@ -35,12 +30,11 @@ function _interopNamespace(e) {
35
30
  }
36
31
  });
37
32
  }
38
- n["default"] = e;
33
+ n.default = e;
39
34
  return Object.freeze(n);
40
35
  }
41
36
 
42
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
43
- var RadixDropdownMenu__namespace = /*#__PURE__*/_interopNamespace(RadixDropdownMenu);
37
+ var RadixDropdownMenu__namespace = /*#__PURE__*/_interopNamespaceDefault(RadixDropdownMenu);
44
38
 
45
39
  const Context$1 = React.createContext({
46
40
  leftSlotMount: () => {
@@ -90,7 +84,7 @@ const StyledItemDescription = designSystemStitches.styled(designSystemPrimitive.
90
84
  }
91
85
  }
92
86
  });
93
- const ItemDescription = React__default["default"].forwardRef(({ ...props }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(ItemProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(StyledItemDescription, { ...props, ref: forwardRef }) }));
87
+ const ItemDescription = React.forwardRef(({ ...props }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(ItemProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(StyledItemDescription, { ...props, ref: forwardRef }) }));
94
88
 
95
89
  const LeftSlot = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
96
90
  display: "flex",
@@ -349,7 +343,7 @@ const useAriaDisabled = ({ onSelect, ...restProps }, { exceptions, closeOnSelect
349
343
  };
350
344
  };
351
345
 
352
- const CheckboxItem = React__default["default"].forwardRef(
346
+ const CheckboxItem = React.forwardRef(
353
347
  ({
354
348
  children,
355
349
  checked,
@@ -497,7 +491,7 @@ const DropdownProvider = ({
497
491
  );
498
492
  const useDropdownContext = () => React.useContext(DropdownContext);
499
493
 
500
- const Content = React__default["default"].forwardRef(
494
+ const Content = React.forwardRef(
501
495
  ({
502
496
  loop = false,
503
497
  side = "bottom",
@@ -587,7 +581,7 @@ const StyledItem = designSystemStitches.styled(RadixDropdownMenu__namespace.Item
587
581
  }
588
582
  });
589
583
 
590
- const Item = React__default["default"].forwardRef(
584
+ const Item = React.forwardRef(
591
585
  ({ disabled = false, variant = "subtle", ...restProps }, forwardRef) => {
592
586
  const elementProps = useAriaDisabled(restProps);
593
587
  return /* @__PURE__ */ jsxRuntime.jsx(ItemProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -602,14 +596,14 @@ const Item = React__default["default"].forwardRef(
602
596
  }
603
597
  );
604
598
 
605
- const LinkItem = React__default["default"].forwardRef(({ children, href, ...restProps }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(Item, { asChild: true, ref: forwardRef, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href, children }) }));
599
+ const LinkItem = React.forwardRef(({ children, href, ...restProps }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(Item, { asChild: true, ref: forwardRef, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href, children }) }));
606
600
 
607
601
  const StyledRadioGroup = designSystemStitches.styled(RadixDropdownMenu__namespace.RadioGroup, {
608
602
  display: "grid",
609
603
  gap: CONTENT_GAP
610
604
  });
611
605
 
612
- const RadioGroup = React__default["default"].forwardRef((props, forwardRef) => {
606
+ const RadioGroup = React.forwardRef((props, forwardRef) => {
613
607
  const { onChange, ...restProps } = props;
614
608
  return /* @__PURE__ */ jsxRuntime.jsx(
615
609
  StyledRadioGroup,
@@ -674,7 +668,7 @@ const StyledRadioItem = designSystemStitches.styled(RadixDropdownMenu__namespace
674
668
  }
675
669
  });
676
670
 
677
- const RadioItem = React__default["default"].forwardRef(({ disabled, children, closeOnSelect = false, ...restProps }, forwardRef) => {
671
+ const RadioItem = React.forwardRef(({ disabled, children, closeOnSelect = false, ...restProps }, forwardRef) => {
678
672
  const elementProps = useAriaDisabled(restProps, {
679
673
  closeOnSelect
680
674
  });
@@ -691,7 +685,7 @@ const StyledSeparator = designSystemStitches.styled(RadixDropdownMenu__namespace
691
685
  borderTop: "1px solid $border-neutrals-subtle"
692
686
  });
693
687
 
694
- const Separator = React__default["default"].forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledSeparator, { ...props, ref: forwardRef }));
688
+ const Separator = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledSeparator, { ...props, ref: forwardRef }));
695
689
 
696
690
  const StyledSwitch = designSystemStitches.styled(designSystemPrimitive.Primitive.span, {
697
691
  ...designSystemBaseSwitch.styles.default,
@@ -706,7 +700,7 @@ const StyledSwitchItem = designSystemStitches.styled(RadixDropdownMenu__namespac
706
700
  ['\n &[aria-disabled="true"] '.concat(StyledSwitch, ",\n &[data-disabled] ").concat(StyledSwitch, "\n ")]: designSystemBaseSwitch.styles.disabled
707
701
  });
708
702
 
709
- const SwitchItem = React__default["default"].forwardRef(
703
+ const SwitchItem = React.forwardRef(
710
704
  ({
711
705
  disabled,
712
706
  checked,
@@ -752,7 +746,7 @@ const StyledTrigger = designSystemStitches.styled(RadixDropdownMenu__namespace.T
752
746
  }
753
747
  });
754
748
 
755
- const Trigger = React__default["default"].forwardRef(({ asChild = false, onClick, ...restProps }, forwardRef) => {
749
+ const Trigger = React.forwardRef(({ asChild = false, onClick, ...restProps }, forwardRef) => {
756
750
  const ref = React.useRef(null);
757
751
  return /* @__PURE__ */ jsxRuntime.jsx(
758
752
  StyledTrigger,
@@ -788,7 +782,7 @@ const StyledSubTrigger = designSystemStitches.styled(RadixDropdownMenu__namespac
788
782
  }
789
783
  });
790
784
 
791
- const SubTrigger = React__default["default"].forwardRef(({ children, disabled = false, ...restProps }, forwardRef) => {
785
+ const SubTrigger = React.forwardRef(({ children, disabled = false, ...restProps }, forwardRef) => {
792
786
  let { onSelect, ...elementProps } = restProps;
793
787
  elementProps = useAriaDisabled(elementProps);
794
788
  return /* @__PURE__ */ jsxRuntime.jsxs(StyledSubTrigger, { ...elementProps, disabled, ref: forwardRef, children: [
@@ -808,7 +802,7 @@ const StyledSubContent = designSystemStitches.styled(
808
802
  contentDefaults
809
803
  );
810
804
 
811
- const SubContent = React__default["default"].forwardRef(
805
+ const SubContent = React.forwardRef(
812
806
  ({
813
807
  sideOffset,
814
808
  alignOffset,
@@ -856,7 +850,7 @@ const SubContent = React__default["default"].forwardRef(
856
850
 
857
851
  const StyledSub = designSystemStitches.styled(RadixDropdownMenu__namespace.Sub, {});
858
852
 
859
- const Sub = React__default["default"].forwardRef(
853
+ const Sub = React.forwardRef(
860
854
  ({ defaultOpen, onOpen, onClose, open, ...restProps }, forwardRef) => {
861
855
  const [openState, setOpenState] = React.useState(defaultOpen);
862
856
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -885,7 +879,7 @@ const StyledIconSlot = designSystemStitches.styled(LeftSlot, {
885
879
  }
886
880
  });
887
881
 
888
- const IconSlot = React__default["default"].forwardRef(({ children, ...restProps }, forwardRef) => {
882
+ const IconSlot = React.forwardRef(({ children, ...restProps }, forwardRef) => {
889
883
  const { leftSlotMount, leftSlotDestroy } = useItem();
890
884
  const formattedChildren = designSystemUtils.addPropsToChildren(
891
885
  children,
@@ -902,9 +896,9 @@ const IconSlot = React__default["default"].forwardRef(({ children, ...restProps
902
896
  return /* @__PURE__ */ jsxRuntime.jsx(StyledIconSlot, { ref: forwardRef, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx(designSystemPrimitive.Primitive.svg, { asChild: true, "aria-hidden": true, children: formattedChildren }) });
903
897
  });
904
898
 
905
- const Hotkey = React__default["default"].forwardRef(({ children, ...restProps }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(RightSlot, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystemBaseHotkey.Hotkey, { ref: forwardRef, ...restProps, variant: "neutral", children }) }));
899
+ const Hotkey = React.forwardRef(({ children, ...restProps }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(RightSlot, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystemBaseHotkey.Hotkey, { ref: forwardRef, ...restProps, variant: "neutral", children }) }));
906
900
 
907
- const IllustrationSlot = React__default["default"].forwardRef((props, forwardRef) => {
901
+ const IllustrationSlot = React.forwardRef((props, forwardRef) => {
908
902
  const { leftSlotMount, leftSlotDestroy } = useItem();
909
903
  designSystemUseLayoutEffect.useLayoutEffect(() => {
910
904
  leftSlotMount();