@fluentui/react-utilities 9.26.5 → 9.26.7

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.
Files changed (205) hide show
  1. package/CHANGELOG.md +24 -2
  2. package/dist/index.d.cts +1249 -0
  3. package/lib/compose/assertSlots.js +3 -3
  4. package/lib/compose/assertSlots.js.map +1 -1
  5. package/lib/compose/deprecated/getSlots.js +4 -4
  6. package/lib/compose/deprecated/getSlots.js.map +1 -1
  7. package/lib/compose/deprecated/resolveShorthand.js +1 -1
  8. package/lib/compose/deprecated/resolveShorthand.js.map +1 -1
  9. package/lib/compose/getIntrinsicElementProps.js +1 -1
  10. package/lib/compose/getIntrinsicElementProps.js.map +1 -1
  11. package/lib/compose/getSlotClassNameProp.js +1 -1
  12. package/lib/compose/getSlotClassNameProp.js.map +1 -1
  13. package/lib/compose/index.js +10 -10
  14. package/lib/compose/index.js.map +1 -1
  15. package/lib/compose/isResolvedShorthand.js +1 -1
  16. package/lib/compose/isSlot.js +1 -1
  17. package/lib/compose/isSlot.js.map +1 -1
  18. package/lib/compose/slot.js +2 -2
  19. package/lib/compose/slot.js.map +1 -1
  20. package/lib/events/index.js +1 -1
  21. package/lib/events/index.js.map +1 -1
  22. package/lib/hooks/index.js +14 -14
  23. package/lib/hooks/index.js.map +1 -1
  24. package/lib/hooks/useAnimationFrame.js +2 -2
  25. package/lib/hooks/useAnimationFrame.js.map +1 -1
  26. package/lib/hooks/useApplyScrollbarWidth.js +2 -2
  27. package/lib/hooks/useApplyScrollbarWidth.js.map +1 -1
  28. package/lib/hooks/useBrowserTimer.js +1 -1
  29. package/lib/hooks/useControllableState.js +1 -1
  30. package/lib/hooks/useEventCallback.js +2 -2
  31. package/lib/hooks/useEventCallback.js.map +1 -1
  32. package/lib/hooks/useFirstMount.js +1 -1
  33. package/lib/hooks/useForceUpdate.js +1 -1
  34. package/lib/hooks/useId.js +2 -2
  35. package/lib/hooks/useId.js.map +1 -1
  36. package/lib/hooks/useIsomorphicLayoutEffect.js +2 -2
  37. package/lib/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  38. package/lib/hooks/useMergedRefs.js +1 -1
  39. package/lib/hooks/useOnClickOutside.js +3 -3
  40. package/lib/hooks/useOnClickOutside.js.map +1 -1
  41. package/lib/hooks/useOnScrollOutside.js +2 -2
  42. package/lib/hooks/useOnScrollOutside.js.map +1 -1
  43. package/lib/hooks/usePrevious.js +1 -1
  44. package/lib/hooks/useScrollbarWidth.js +2 -2
  45. package/lib/hooks/useScrollbarWidth.js.map +1 -1
  46. package/lib/hooks/useTimeout.js +2 -2
  47. package/lib/hooks/useTimeout.js.map +1 -1
  48. package/lib/index.js +8 -8
  49. package/lib/index.js.map +1 -1
  50. package/lib/selection/index.js +1 -1
  51. package/lib/selection/index.js.map +1 -1
  52. package/lib/selection/useSelection.js +3 -3
  53. package/lib/selection/useSelection.js.map +1 -1
  54. package/lib/ssr/SSRContext.js +2 -2
  55. package/lib/ssr/SSRContext.js.map +1 -1
  56. package/lib/ssr/index.js +2 -2
  57. package/lib/ssr/index.js.map +1 -1
  58. package/lib/trigger/applyTriggerPropsToChildren.js +2 -2
  59. package/lib/trigger/applyTriggerPropsToChildren.js.map +1 -1
  60. package/lib/trigger/getTriggerChild.js +2 -2
  61. package/lib/trigger/getTriggerChild.js.map +1 -1
  62. package/lib/trigger/index.js +3 -3
  63. package/lib/trigger/index.js.map +1 -1
  64. package/lib/utils/getNativeElementProps.js +1 -1
  65. package/lib/utils/getNativeElementProps.js.map +1 -1
  66. package/lib/utils/getReactElementRef.js +1 -1
  67. package/lib/utils/index.js +11 -11
  68. package/lib/utils/index.js.map +1 -1
  69. package/lib/utils/isInteractiveHTMLElement.js +1 -1
  70. package/lib/utils/isInteractiveHTMLElement.js.map +1 -1
  71. package/lib/utils/properties.js +1 -0
  72. package/lib/utils/properties.js.map +1 -1
  73. package/lib/virtualParent/elementContains.js +1 -1
  74. package/lib/virtualParent/elementContains.js.map +1 -1
  75. package/lib/virtualParent/getParent.js +1 -1
  76. package/lib/virtualParent/getParent.js.map +1 -1
  77. package/lib/virtualParent/index.js +3 -3
  78. package/lib/virtualParent/index.js.map +1 -1
  79. package/lib-commonjs/compose/{assertSlots.js → assertSlots.cjs} +3 -3
  80. package/lib-commonjs/compose/deprecated/{getSlots.js → getSlots.cjs} +3 -3
  81. package/lib-commonjs/compose/deprecated/{resolveShorthand.js → resolveShorthand.cjs} +1 -1
  82. package/lib-commonjs/compose/{getIntrinsicElementProps.js → getIntrinsicElementProps.cjs} +1 -1
  83. package/lib-commonjs/compose/{getSlotClassNameProp.js → getSlotClassNameProp.cjs} +1 -1
  84. package/lib-commonjs/compose/{index.js → index.cjs} +10 -10
  85. package/lib-commonjs/compose/{isSlot.js → isSlot.cjs} +1 -1
  86. package/lib-commonjs/compose/{slot.js → slot.cjs} +1 -1
  87. package/lib-commonjs/events/{index.js → index.cjs} +1 -1
  88. package/lib-commonjs/hooks/{index.js → index.cjs} +14 -14
  89. package/lib-commonjs/hooks/{useAnimationFrame.js → useAnimationFrame.cjs} +1 -1
  90. package/lib-commonjs/hooks/{useApplyScrollbarWidth.js → useApplyScrollbarWidth.cjs} +1 -1
  91. package/lib-commonjs/hooks/{useEventCallback.js → useEventCallback.cjs} +1 -1
  92. package/lib-commonjs/hooks/{useId.js → useId.cjs} +1 -1
  93. package/lib-commonjs/hooks/{useIsomorphicLayoutEffect.js → useIsomorphicLayoutEffect.cjs} +1 -1
  94. package/lib-commonjs/hooks/{useOnClickOutside.js → useOnClickOutside.cjs} +1 -1
  95. package/lib-commonjs/hooks/{useOnScrollOutside.js → useOnScrollOutside.cjs} +1 -1
  96. package/lib-commonjs/hooks/{useScrollbarWidth.js → useScrollbarWidth.cjs} +1 -1
  97. package/lib-commonjs/hooks/{useTimeout.js → useTimeout.cjs} +1 -1
  98. package/lib-commonjs/{index.js → index.cjs} +8 -8
  99. package/lib-commonjs/selection/{index.js → index.cjs} +1 -1
  100. package/lib-commonjs/selection/{useSelection.js → useSelection.cjs} +2 -2
  101. package/lib-commonjs/ssr/{SSRContext.js → SSRContext.cjs} +1 -1
  102. package/lib-commonjs/ssr/{index.js → index.cjs} +2 -2
  103. package/lib-commonjs/trigger/{applyTriggerPropsToChildren.js → applyTriggerPropsToChildren.cjs} +1 -1
  104. package/lib-commonjs/trigger/{getTriggerChild.js → getTriggerChild.cjs} +1 -1
  105. package/lib-commonjs/trigger/{index.js → index.cjs} +3 -3
  106. package/lib-commonjs/utils/{getNativeElementProps.js → getNativeElementProps.cjs} +1 -1
  107. package/lib-commonjs/utils/{index.js → index.cjs} +11 -11
  108. package/lib-commonjs/utils/{isInteractiveHTMLElement.js → isInteractiveHTMLElement.cjs} +1 -1
  109. package/lib-commonjs/utils/{properties.js → properties.cjs} +1 -0
  110. package/lib-commonjs/utils/{properties.js.map → properties.cjs.map} +1 -1
  111. package/lib-commonjs/virtualParent/{elementContains.js → elementContains.cjs} +1 -1
  112. package/lib-commonjs/virtualParent/{getParent.js → getParent.cjs} +1 -1
  113. package/lib-commonjs/virtualParent/{index.js → index.cjs} +3 -3
  114. package/package.json +20 -9
  115. /package/lib-commonjs/compose/{assertSlots.js.map → assertSlots.cjs.map} +0 -0
  116. /package/lib-commonjs/compose/{constants.js → constants.cjs} +0 -0
  117. /package/lib-commonjs/compose/{constants.js.map → constants.cjs.map} +0 -0
  118. /package/lib-commonjs/compose/deprecated/{getSlots.js.map → getSlots.cjs.map} +0 -0
  119. /package/lib-commonjs/compose/deprecated/{getSlotsNext.js → getSlotsNext.cjs} +0 -0
  120. /package/lib-commonjs/compose/deprecated/{getSlotsNext.js.map → getSlotsNext.cjs.map} +0 -0
  121. /package/lib-commonjs/compose/deprecated/{resolveShorthand.js.map → resolveShorthand.cjs.map} +0 -0
  122. /package/lib-commonjs/compose/{getIntrinsicElementProps.js.map → getIntrinsicElementProps.cjs.map} +0 -0
  123. /package/lib-commonjs/compose/{getSlotClassNameProp.js.map → getSlotClassNameProp.cjs.map} +0 -0
  124. /package/lib-commonjs/compose/{index.js.map → index.cjs.map} +0 -0
  125. /package/lib-commonjs/compose/{isResolvedShorthand.js → isResolvedShorthand.cjs} +0 -0
  126. /package/lib-commonjs/compose/{isResolvedShorthand.js.map → isResolvedShorthand.cjs.map} +0 -0
  127. /package/lib-commonjs/compose/{isSlot.js.map → isSlot.cjs.map} +0 -0
  128. /package/lib-commonjs/compose/{slot.js.map → slot.cjs.map} +0 -0
  129. /package/lib-commonjs/compose/{types.js → types.cjs} +0 -0
  130. /package/lib-commonjs/compose/{types.js.map → types.cjs.map} +0 -0
  131. /package/lib-commonjs/events/{index.js.map → index.cjs.map} +0 -0
  132. /package/lib-commonjs/events/{mouseTouchHelpers.js → mouseTouchHelpers.cjs} +0 -0
  133. /package/lib-commonjs/events/{mouseTouchHelpers.js.map → mouseTouchHelpers.cjs.map} +0 -0
  134. /package/lib-commonjs/hooks/{index.js.map → index.cjs.map} +0 -0
  135. /package/lib-commonjs/hooks/{useAnimationFrame.js.map → useAnimationFrame.cjs.map} +0 -0
  136. /package/lib-commonjs/hooks/{useApplyScrollbarWidth.js.map → useApplyScrollbarWidth.cjs.map} +0 -0
  137. /package/lib-commonjs/hooks/{useBrowserTimer.js → useBrowserTimer.cjs} +0 -0
  138. /package/lib-commonjs/hooks/{useBrowserTimer.js.map → useBrowserTimer.cjs.map} +0 -0
  139. /package/lib-commonjs/hooks/{useControllableState.js → useControllableState.cjs} +0 -0
  140. /package/lib-commonjs/hooks/{useControllableState.js.map → useControllableState.cjs.map} +0 -0
  141. /package/lib-commonjs/hooks/{useEventCallback.js.map → useEventCallback.cjs.map} +0 -0
  142. /package/lib-commonjs/hooks/{useFirstMount.js → useFirstMount.cjs} +0 -0
  143. /package/lib-commonjs/hooks/{useFirstMount.js.map → useFirstMount.cjs.map} +0 -0
  144. /package/lib-commonjs/hooks/{useForceUpdate.js → useForceUpdate.cjs} +0 -0
  145. /package/lib-commonjs/hooks/{useForceUpdate.js.map → useForceUpdate.cjs.map} +0 -0
  146. /package/lib-commonjs/hooks/{useId.js.map → useId.cjs.map} +0 -0
  147. /package/lib-commonjs/hooks/{useIsomorphicLayoutEffect.js.map → useIsomorphicLayoutEffect.cjs.map} +0 -0
  148. /package/lib-commonjs/hooks/{useMergedRefs.js → useMergedRefs.cjs} +0 -0
  149. /package/lib-commonjs/hooks/{useMergedRefs.js.map → useMergedRefs.cjs.map} +0 -0
  150. /package/lib-commonjs/hooks/{useOnClickOutside.js.map → useOnClickOutside.cjs.map} +0 -0
  151. /package/lib-commonjs/hooks/{useOnScrollOutside.js.map → useOnScrollOutside.cjs.map} +0 -0
  152. /package/lib-commonjs/hooks/{usePrevious.js → usePrevious.cjs} +0 -0
  153. /package/lib-commonjs/hooks/{usePrevious.js.map → usePrevious.cjs.map} +0 -0
  154. /package/lib-commonjs/hooks/{useScrollbarWidth.js.map → useScrollbarWidth.cjs.map} +0 -0
  155. /package/lib-commonjs/hooks/{useTimeout.js.map → useTimeout.cjs.map} +0 -0
  156. /package/lib-commonjs/{index.js.map → index.cjs.map} +0 -0
  157. /package/lib-commonjs/selection/{index.js.map → index.cjs.map} +0 -0
  158. /package/lib-commonjs/selection/{types.js → types.cjs} +0 -0
  159. /package/lib-commonjs/selection/{types.js.map → types.cjs.map} +0 -0
  160. /package/lib-commonjs/selection/{useSelection.js.map → useSelection.cjs.map} +0 -0
  161. /package/lib-commonjs/ssr/{SSRContext.js.map → SSRContext.cjs.map} +0 -0
  162. /package/lib-commonjs/ssr/{canUseDOM.js → canUseDOM.cjs} +0 -0
  163. /package/lib-commonjs/ssr/{canUseDOM.js.map → canUseDOM.cjs.map} +0 -0
  164. /package/lib-commonjs/ssr/{index.js.map → index.cjs.map} +0 -0
  165. /package/lib-commonjs/trigger/{applyTriggerPropsToChildren.js.map → applyTriggerPropsToChildren.cjs.map} +0 -0
  166. /package/lib-commonjs/trigger/{getTriggerChild.js.map → getTriggerChild.cjs.map} +0 -0
  167. /package/lib-commonjs/trigger/{index.js.map → index.cjs.map} +0 -0
  168. /package/lib-commonjs/trigger/{isFluentTrigger.js → isFluentTrigger.cjs} +0 -0
  169. /package/lib-commonjs/trigger/{isFluentTrigger.js.map → isFluentTrigger.cjs.map} +0 -0
  170. /package/lib-commonjs/trigger/{types.js → types.cjs} +0 -0
  171. /package/lib-commonjs/trigger/{types.js.map → types.cjs.map} +0 -0
  172. /package/lib-commonjs/utils/{clamp.js → clamp.cjs} +0 -0
  173. /package/lib-commonjs/utils/{clamp.js.map → clamp.cjs.map} +0 -0
  174. /package/lib-commonjs/utils/{createSetFromIterable.js → createSetFromIterable.cjs} +0 -0
  175. /package/lib-commonjs/utils/{createSetFromIterable.js.map → createSetFromIterable.cjs.map} +0 -0
  176. /package/lib-commonjs/utils/{getNativeElementProps.js.map → getNativeElementProps.cjs.map} +0 -0
  177. /package/lib-commonjs/utils/{getRTLSafeKey.js → getRTLSafeKey.cjs} +0 -0
  178. /package/lib-commonjs/utils/{getRTLSafeKey.js.map → getRTLSafeKey.cjs.map} +0 -0
  179. /package/lib-commonjs/utils/{getReactCallbackName.js → getReactCallbackName.cjs} +0 -0
  180. /package/lib-commonjs/utils/{getReactCallbackName.js.map → getReactCallbackName.cjs.map} +0 -0
  181. /package/lib-commonjs/utils/{getReactElementRef.js → getReactElementRef.cjs} +0 -0
  182. /package/lib-commonjs/utils/{getReactElementRef.js.map → getReactElementRef.cjs.map} +0 -0
  183. /package/lib-commonjs/utils/{index.js.map → index.cjs.map} +0 -0
  184. /package/lib-commonjs/utils/{isHTMLElement.js → isHTMLElement.cjs} +0 -0
  185. /package/lib-commonjs/utils/{isHTMLElement.js.map → isHTMLElement.cjs.map} +0 -0
  186. /package/lib-commonjs/utils/{isInteractiveHTMLElement.js.map → isInteractiveHTMLElement.cjs.map} +0 -0
  187. /package/lib-commonjs/utils/{measureScrollBarWidth.js → measureScrollBarWidth.cjs} +0 -0
  188. /package/lib-commonjs/utils/{measureScrollBarWidth.js.map → measureScrollBarWidth.cjs.map} +0 -0
  189. /package/lib-commonjs/utils/{mergeCallbacks.js → mergeCallbacks.cjs} +0 -0
  190. /package/lib-commonjs/utils/{mergeCallbacks.js.map → mergeCallbacks.cjs.map} +0 -0
  191. /package/lib-commonjs/utils/{omit.js → omit.cjs} +0 -0
  192. /package/lib-commonjs/utils/{omit.js.map → omit.cjs.map} +0 -0
  193. /package/lib-commonjs/utils/{priorityQueue.js → priorityQueue.cjs} +0 -0
  194. /package/lib-commonjs/utils/{priorityQueue.js.map → priorityQueue.cjs.map} +0 -0
  195. /package/lib-commonjs/utils/{types.js → types.cjs} +0 -0
  196. /package/lib-commonjs/utils/{types.js.map → types.cjs.map} +0 -0
  197. /package/lib-commonjs/virtualParent/{elementContains.js.map → elementContains.cjs.map} +0 -0
  198. /package/lib-commonjs/virtualParent/{getParent.js.map → getParent.cjs.map} +0 -0
  199. /package/lib-commonjs/virtualParent/{index.js.map → index.cjs.map} +0 -0
  200. /package/lib-commonjs/virtualParent/{isVirtualElement.js → isVirtualElement.cjs} +0 -0
  201. /package/lib-commonjs/virtualParent/{isVirtualElement.js.map → isVirtualElement.cjs.map} +0 -0
  202. /package/lib-commonjs/virtualParent/{setVirtualParent.js → setVirtualParent.cjs} +0 -0
  203. /package/lib-commonjs/virtualParent/{setVirtualParent.js.map → setVirtualParent.cjs.map} +0 -0
  204. /package/lib-commonjs/virtualParent/{types.js → types.cjs} +0 -0
  205. /package/lib-commonjs/virtualParent/{types.js.map → types.cjs.map} +0 -0
@@ -9,9 +9,9 @@ Object.defineProperty(exports, "assertSlots", {
9
9
  }
10
10
  });
11
11
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
- const _constants = require("./constants");
13
- const _isSlot = require("./isSlot");
14
- const _slot = /*#__PURE__*/ _interop_require_wildcard._(require("./slot"));
12
+ const _constants = require("./constants.cjs");
13
+ const _isSlot = require("./isSlot.cjs");
14
+ const _slot = /*#__PURE__*/ _interop_require_wildcard._(require("./slot.cjs"));
15
15
  function assertSlots(state) {
16
16
  /**
17
17
  * This verification is not necessary in production
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "getSlots", {
10
10
  });
11
11
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
- const _omit = require("../../utils/omit");
14
- const _isSlot = require("../isSlot");
15
- const _constants = require("../constants");
13
+ const _omit = require("../../utils/omit.cjs");
14
+ const _isSlot = require("../isSlot.cjs");
15
+ const _constants = require("../constants.cjs");
16
16
  function getSlots(state) {
17
17
  const typeState = state;
18
18
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "resolveShorthand", {
9
9
  }
10
10
  });
11
11
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
- const _slot = /*#__PURE__*/ _interop_require_wildcard._(require("../slot"));
12
+ const _slot = /*#__PURE__*/ _interop_require_wildcard._(require("../slot.cjs"));
13
13
  const resolveShorthand = (value, options)=>_slot.optional(value, {
14
14
  ...options,
15
15
  renderByDefault: options === null || options === void 0 ? void 0 : options.required,
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "getIntrinsicElementProps", {
8
8
  return getIntrinsicElementProps;
9
9
  }
10
10
  });
11
- const _getNativeElementProps = require("../utils/getNativeElementProps");
11
+ const _getNativeElementProps = require("../utils/getNativeElementProps.cjs");
12
12
  const getIntrinsicElementProps = (tagName, // eslint-disable-next-line @typescript-eslint/no-restricted-types -- in order to not introduce Type Restriction CHANGe which is kinda "breaking change from Types POV", we don't enforce our custom `RefAttributes` in this API, to be compatible with scenarios where non v9 interfaces might be used. This may/will change with React 19
13
13
  props, excludedPropNames)=>{
14
14
  var _props_as;
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "getSlotClassNameProp", {
8
8
  return getSlotClassNameProp;
9
9
  }
10
10
  });
11
- const _constants = require("../compose/constants");
11
+ const _constants = require("./constants.cjs");
12
12
  const getSlotClassNameProp = (slot)=>{
13
13
  if (_constants.SLOT_CLASS_NAME_PROP_SYMBOL in slot && typeof slot[_constants.SLOT_CLASS_NAME_PROP_SYMBOL] === 'string') {
14
14
  return slot[_constants.SLOT_CLASS_NAME_PROP_SYMBOL];
@@ -47,13 +47,13 @@ _export(exports, {
47
47
  }
48
48
  });
49
49
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
50
- const _slot = /*#__PURE__*/ _interop_require_wildcard._(require("./slot"));
51
- const _isResolvedShorthand = require("./isResolvedShorthand");
52
- const _constants = require("./constants");
53
- const _isSlot = require("./isSlot");
54
- const _assertSlots = require("./assertSlots");
55
- const _getIntrinsicElementProps = require("./getIntrinsicElementProps");
56
- const _getSlotClassNameProp = require("./getSlotClassNameProp");
57
- const _getSlots = require("./deprecated/getSlots");
58
- const _resolveShorthand = require("./deprecated/resolveShorthand");
59
- const _getSlotsNext = require("./deprecated/getSlotsNext");
50
+ const _slot = /*#__PURE__*/ _interop_require_wildcard._(require("./slot.cjs"));
51
+ const _isResolvedShorthand = require("./isResolvedShorthand.cjs");
52
+ const _constants = require("./constants.cjs");
53
+ const _isSlot = require("./isSlot.cjs");
54
+ const _assertSlots = require("./assertSlots.cjs");
55
+ const _getIntrinsicElementProps = require("./getIntrinsicElementProps.cjs");
56
+ const _getSlotClassNameProp = require("./getSlotClassNameProp.cjs");
57
+ const _getSlots = require("./deprecated/getSlots.cjs");
58
+ const _resolveShorthand = require("./deprecated/resolveShorthand.cjs");
59
+ const _getSlotsNext = require("./deprecated/getSlotsNext.cjs");
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "isSlot", {
8
8
  return isSlot;
9
9
  }
10
10
  });
11
- const _constants = require("./constants");
11
+ const _constants = require("./constants.cjs");
12
12
  function isSlot(element) {
13
13
  return Boolean(element === null || element === void 0 ? void 0 : element.hasOwnProperty(_constants.SLOT_ELEMENT_TYPE_SYMBOL));
14
14
  }
@@ -21,7 +21,7 @@ _export(exports, {
21
21
  });
22
22
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
23
23
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
24
- const _constants = require("./constants");
24
+ const _constants = require("./constants.cjs");
25
25
  function always(value, options) {
26
26
  const { defaultProps, elementType } = options;
27
27
  const props = resolveShorthand(value);
@@ -19,4 +19,4 @@ _export(exports, {
19
19
  return _mouseTouchHelpers.isTouchEvent;
20
20
  }
21
21
  });
22
- const _mouseTouchHelpers = require("./mouseTouchHelpers");
22
+ const _mouseTouchHelpers = require("./mouseTouchHelpers.cjs");
@@ -58,17 +58,17 @@ _export(exports, {
58
58
  return _useTimeout.useTimeout;
59
59
  }
60
60
  });
61
- const _useAnimationFrame = require("./useAnimationFrame");
62
- const _useApplyScrollbarWidth = require("./useApplyScrollbarWidth");
63
- const _useControllableState = require("./useControllableState");
64
- const _useEventCallback = require("./useEventCallback");
65
- const _useFirstMount = require("./useFirstMount");
66
- const _useForceUpdate = require("./useForceUpdate");
67
- const _useId = require("./useId");
68
- const _useIsomorphicLayoutEffect = require("./useIsomorphicLayoutEffect");
69
- const _useMergedRefs = require("./useMergedRefs");
70
- const _useOnClickOutside = require("./useOnClickOutside");
71
- const _useOnScrollOutside = require("./useOnScrollOutside");
72
- const _usePrevious = require("./usePrevious");
73
- const _useScrollbarWidth = require("./useScrollbarWidth");
74
- const _useTimeout = require("./useTimeout");
61
+ const _useAnimationFrame = require("./useAnimationFrame.cjs");
62
+ const _useApplyScrollbarWidth = require("./useApplyScrollbarWidth.cjs");
63
+ const _useControllableState = require("./useControllableState.cjs");
64
+ const _useEventCallback = require("./useEventCallback.cjs");
65
+ const _useFirstMount = require("./useFirstMount.cjs");
66
+ const _useForceUpdate = require("./useForceUpdate.cjs");
67
+ const _useId = require("./useId.cjs");
68
+ const _useIsomorphicLayoutEffect = require("./useIsomorphicLayoutEffect.cjs");
69
+ const _useMergedRefs = require("./useMergedRefs.cjs");
70
+ const _useOnClickOutside = require("./useOnClickOutside.cjs");
71
+ const _useOnScrollOutside = require("./useOnScrollOutside.cjs");
72
+ const _usePrevious = require("./usePrevious.cjs");
73
+ const _useScrollbarWidth = require("./useScrollbarWidth.cjs");
74
+ const _useTimeout = require("./useTimeout.cjs");
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "useAnimationFrame", {
9
9
  return useAnimationFrame;
10
10
  }
11
11
  });
12
- const _useBrowserTimer = require("./useBrowserTimer");
12
+ const _useBrowserTimer = require("./useBrowserTimer.cjs");
13
13
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
14
14
  const setAnimationFrameNoop = (callback)=>{
15
15
  callback(0);
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "useApplyScrollbarWidth", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _measureScrollBarWidth = require("../utils/measureScrollBarWidth");
14
+ const _measureScrollBarWidth = require("../utils/measureScrollBarWidth.cjs");
15
15
  const cache = new WeakMap();
16
16
  function useApplyScrollbarWidth(options = {}) {
17
17
  const { force, property = 'width' } = options;
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "useEventCallback", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useIsomorphicLayoutEffect = require("./useIsomorphicLayoutEffect");
14
+ const _useIsomorphicLayoutEffect = require("./useIsomorphicLayoutEffect.cjs");
15
15
  const useEventCallback = (fn)=>{
16
16
  const callbackRef = _react.useRef(()=>{
17
17
  throw new Error('Cannot call an event handler while rendering');
@@ -22,7 +22,7 @@ _export(exports, {
22
22
  });
23
23
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
24
24
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
25
- const _index = require("../ssr/index");
25
+ const _index = require("../ssr/index.cjs");
26
26
  const IdPrefixContext = _react.createContext(undefined);
27
27
  const IdPrefixProvider = IdPrefixContext.Provider;
28
28
  function useIdPrefix() {
@@ -11,5 +11,5 @@ Object.defineProperty(exports, "useIsomorphicLayoutEffect", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _index = require("../ssr/index");
14
+ const _index = require("../ssr/index.cjs");
15
15
  const useIsomorphicLayoutEffect = (0, _index.canUseDOM)() ? _react.useLayoutEffect : _react.useEffect;
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "useOnClickOutside", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useEventCallback = require("./useEventCallback");
14
+ const _useEventCallback = require("./useEventCallback.cjs");
15
15
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
16
16
  const DEFAULT_CONTAINS = (parent, child)=>!!(parent === null || parent === void 0 ? void 0 : parent.contains(child));
17
17
  const useOnClickOutside = (options)=>{
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "useOnScrollOutside", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useEventCallback = require("./useEventCallback");
14
+ const _useEventCallback = require("./useEventCallback.cjs");
15
15
  const useOnScrollOutside = (options)=>{
16
16
  const { refs, callback, element, disabled, contains: containsProp } = options;
17
17
  const listener = (0, _useEventCallback.useEventCallback)((ev)=>{
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "useScrollbarWidth", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _measureScrollBarWidth = require("../utils/measureScrollBarWidth");
14
+ const _measureScrollBarWidth = require("../utils/measureScrollBarWidth.cjs");
15
15
  const cache = new WeakMap();
16
16
  function useScrollbarWidth(options) {
17
17
  const { targetDocument, force } = options;
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "useTimeout", {
9
9
  return useTimeout;
10
10
  }
11
11
  });
12
- const _useBrowserTimer = require("./useBrowserTimer");
12
+ const _useBrowserTimer = require("./useBrowserTimer.cjs");
13
13
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
14
14
  const setTimeoutNoop = (_callback)=>-1;
15
15
  const clearTimeoutNoop = (_handle)=>undefined;
@@ -167,11 +167,11 @@ _export(exports, {
167
167
  return _index1.useTimeout;
168
168
  }
169
169
  });
170
- const _index = require("./compose/index");
171
- const _index1 = require("./hooks/index");
172
- const _index2 = require("./ssr/index");
173
- const _index3 = require("./utils/index");
174
- const _index4 = require("./trigger/index");
175
- const _index5 = require("./events/index");
176
- const _index6 = require("./selection/index");
177
- const _index7 = require("./virtualParent/index");
170
+ const _index = require("./compose/index.cjs");
171
+ const _index1 = require("./hooks/index.cjs");
172
+ const _index2 = require("./ssr/index.cjs");
173
+ const _index3 = require("./utils/index.cjs");
174
+ const _index4 = require("./trigger/index.cjs");
175
+ const _index5 = require("./events/index.cjs");
176
+ const _index6 = require("./selection/index.cjs");
177
+ const _index7 = require("./virtualParent/index.cjs");
@@ -8,4 +8,4 @@ Object.defineProperty(exports, "useSelection", {
8
8
  return _useSelection.useSelection;
9
9
  }
10
10
  });
11
- const _useSelection = require("./useSelection");
11
+ const _useSelection = require("./useSelection.cjs");
@@ -11,8 +11,8 @@ Object.defineProperty(exports, "useSelection", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useControllableState = require("../hooks/useControllableState");
15
- const _createSetFromIterable = require("../utils/createSetFromIterable");
14
+ const _useControllableState = require("../hooks/useControllableState.cjs");
15
+ const _createSetFromIterable = require("../utils/createSetFromIterable.cjs");
16
16
  function useSelectionState(params) {
17
17
  const [selected, setSelected] = (0, _useControllableState.useControllableState)({
18
18
  initialState: new Set(),
@@ -28,7 +28,7 @@ _export(exports, {
28
28
  });
29
29
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
30
30
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
31
- const _canUseDOM = require("./canUseDOM");
31
+ const _canUseDOM = require("./canUseDOM.cjs");
32
32
  const defaultSSRContextValue = {
33
33
  current: 0
34
34
  };
@@ -28,5 +28,5 @@ _export(exports, {
28
28
  return _SSRContext.useSSRContext;
29
29
  }
30
30
  });
31
- const _canUseDOM = require("./canUseDOM");
32
- const _SSRContext = require("./SSRContext");
31
+ const _canUseDOM = require("./canUseDOM.cjs");
32
+ const _SSRContext = require("./SSRContext.cjs");
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "applyTriggerPropsToChildren", {
10
10
  });
11
11
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
- const _isFluentTrigger = require("./isFluentTrigger");
13
+ const _isFluentTrigger = require("./isFluentTrigger.cjs");
14
14
  function applyTriggerPropsToChildren(children, triggerChildProps) {
15
15
  if (typeof children === 'function') {
16
16
  return children(triggerChildProps);
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "getTriggerChild", {
10
10
  });
11
11
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
- const _isFluentTrigger = require("./isFluentTrigger");
13
+ const _isFluentTrigger = require("./isFluentTrigger.cjs");
14
14
  function getTriggerChild(children) {
15
15
  if (!_react.isValidElement(children)) {
16
16
  return null;
@@ -19,6 +19,6 @@ _export(exports, {
19
19
  return _isFluentTrigger.isFluentTrigger;
20
20
  }
21
21
  });
22
- const _applyTriggerPropsToChildren = require("./applyTriggerPropsToChildren");
23
- const _getTriggerChild = require("./getTriggerChild");
24
- const _isFluentTrigger = require("./isFluentTrigger");
22
+ const _applyTriggerPropsToChildren = require("./applyTriggerPropsToChildren.cjs");
23
+ const _getTriggerChild = require("./getTriggerChild.cjs");
24
+ const _isFluentTrigger = require("./isFluentTrigger.cjs");
@@ -16,7 +16,7 @@ _export(exports, {
16
16
  return getPartitionedNativeProps;
17
17
  }
18
18
  });
19
- const _properties = require("./properties");
19
+ const _properties = require("./properties.cjs");
20
20
  const nativeElementMap = {
21
21
  label: _properties.labelProperties,
22
22
  audio: _properties.audioProperties,
@@ -131,14 +131,14 @@ _export(exports, {
131
131
  return _properties.videoProperties;
132
132
  }
133
133
  });
134
- const _clamp = require("./clamp");
135
- const _getNativeElementProps = require("./getNativeElementProps");
136
- const _getReactElementRef = require("./getReactElementRef");
137
- const _getRTLSafeKey = require("./getRTLSafeKey");
138
- const _mergeCallbacks = require("./mergeCallbacks");
139
- const _omit = require("./omit");
140
- const _properties = require("./properties");
141
- const _isHTMLElement = require("./isHTMLElement");
142
- const _isInteractiveHTMLElement = require("./isInteractiveHTMLElement");
143
- const _priorityQueue = require("./priorityQueue");
144
- const _measureScrollBarWidth = require("./measureScrollBarWidth");
134
+ const _clamp = require("./clamp.cjs");
135
+ const _getNativeElementProps = require("./getNativeElementProps.cjs");
136
+ const _getReactElementRef = require("./getReactElementRef.cjs");
137
+ const _getRTLSafeKey = require("./getRTLSafeKey.cjs");
138
+ const _mergeCallbacks = require("./mergeCallbacks.cjs");
139
+ const _omit = require("./omit.cjs");
140
+ const _properties = require("./properties.cjs");
141
+ const _isHTMLElement = require("./isHTMLElement.cjs");
142
+ const _isInteractiveHTMLElement = require("./isInteractiveHTMLElement.cjs");
143
+ const _priorityQueue = require("./priorityQueue.cjs");
144
+ const _measureScrollBarWidth = require("./measureScrollBarWidth.cjs");
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "isInteractiveHTMLElement", {
8
8
  return isInteractiveHTMLElement;
9
9
  }
10
10
  });
11
- const _isHTMLElement = require("./isHTMLElement");
11
+ const _isHTMLElement = require("./isHTMLElement.cjs");
12
12
  function isInteractiveHTMLElement(element) {
13
13
  if (!(0, _isHTMLElement.isHTMLElement)(element)) {
14
14
  return false;
@@ -371,6 +371,7 @@ const imgProperties = toObjectMap(htmlElementProperties, [
371
371
  'alt',
372
372
  'crossOrigin',
373
373
  'height',
374
+ 'loading',
374
375
  'src',
375
376
  'srcSet',
376
377
  'useMap',
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/properties.ts"],"sourcesContent":["const toObjectMap = (...items: (string[] | Record<string, number>)[]) => {\n const result: Record<string, number> = {};\n\n for (const item of items) {\n const keys = Array.isArray(item) ? item : Object.keys(item);\n\n for (const key of keys) {\n result[key] = 1;\n }\n }\n\n return result;\n};\n\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementEvents = toObjectMap([\n 'onAuxClick',\n 'onAnimationEnd',\n 'onAnimationStart',\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onFocus',\n 'onFocusCapture',\n 'onBlur',\n 'onBlurCapture',\n 'onChange',\n 'onInput',\n 'onSubmit',\n 'onLoad',\n 'onError',\n 'onKeyDown',\n 'onKeyDownCapture',\n 'onKeyPress',\n 'onKeyUp',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onClick',\n 'onClickCapture',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseDownCapture',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onMouseUpCapture',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onPointerCancel',\n 'onPointerDown',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerMove',\n 'onPointerOut',\n 'onPointerOver',\n 'onPointerUp',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n]);\n\n/**\n * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementProperties = toObjectMap([\n 'accessKey', // global\n 'children', // global\n 'className', // global\n 'contentEditable', // global\n 'dir', // global\n 'draggable', // global\n 'hidden', // global\n 'htmlFor', // global\n 'id', // global\n 'lang', // global\n 'popover', // global\n 'focusgroup', // global\n 'focusgroupstart', // global\n 'ref', // global\n 'role', // global\n 'style', // global\n 'tabIndex', // global\n 'title', // global\n 'translate', // global\n 'spellCheck', // global\n 'name', // global\n]);\n\n/**\n * An array of microdata attributes that are allowed on every html element type.\n *\n * @public\n */\nexport const microdataProperties = toObjectMap([\n 'itemID', // global\n 'itemProp', // global\n 'itemRef', // global\n 'itemScope', // global\n 'itemType', // global\n]);\n\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */\nexport const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents, microdataProperties);\n\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */\nexport const labelProperties = toObjectMap(htmlElementProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */\nexport const audioProperties = toObjectMap(htmlElementProperties, [\n 'height', // canvas, embed, iframe, img, input, object, video\n 'loop', // audio, video\n 'muted', // audio, video\n 'preload', // audio, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */\nexport const videoProperties = toObjectMap(audioProperties, [\n 'poster', // video\n]);\n\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */\nexport const olProperties = toObjectMap(htmlElementProperties, [\n 'start', // ol\n]);\n\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */\nexport const liProperties = toObjectMap(htmlElementProperties, [\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of A tag properties and events.\n *\n * @public\n */\nexport const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download', // a, area\n 'href', // a, area, base, link\n 'hrefLang', // a, area, link\n 'media', // a, area, link, source, style\n 'referrerPolicy', // a, area\n 'rel', // a, area, link\n 'target', // a, area, base, form\n 'type', // a, button, input, link, menu, object, script, source, style\n]);\n\n/**\n * An array of TIME tag properties and events.\n *\n * @public\n */\nexport const timeProperties = toObjectMap(htmlElementProperties, [\n 'dateTime', // time\n]);\n\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */\nexport const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus', // button, input, select, textarea\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'formAction', // input, button\n 'formEncType', // input, button\n 'formMethod', // input, button\n 'formNoValidate', // input, button\n 'formTarget', // input, button\n 'popoverTarget', // input, button\n 'popoverTargetAction', // input, button\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param,\n]);\n\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */\nexport const inputProperties = toObjectMap(buttonProperties, [\n 'accept', // input\n 'alt', // area, img, input\n 'autoCorrect', // input, textarea\n 'autoCapitalize', // input, textarea\n 'autoComplete', // form, input\n 'checked', // input\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'height', // canvas, embed, iframe, img, input, object, video\n 'inputMode', // input\n 'list', // input\n 'max', // input, meter\n 'maxLength', // input, textarea\n 'min', // input, meter\n 'minLength', // input, textarea\n 'multiple', // input, select\n 'pattern', // input\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'step', // input\n 'size', // input\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */\nexport const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize', // input, textarea\n 'cols', // textarea\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'maxLength', // input, textarea\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'rows', // textarea\n 'wrap', // textarea\n]);\n\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */\nexport const selectProperties = toObjectMap(buttonProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'multiple', // input, select\n 'required', // input, select, textarea\n]);\n\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected', // option\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */\nexport const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding', // table\n 'cellSpacing', // table\n]);\n\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */\nexport const trProperties = htmlElementProperties;\n\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */\nexport const thProperties = toObjectMap(htmlElementProperties, [\n 'colSpan', // td, th\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */\nexport const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan', // td\n 'headers', // td\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\n/**\n * An array of FIELDSET tag properties and events.\n *\n * @public\n */\nexport const fieldsetProperties = toObjectMap(htmlElementProperties, [\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */\nexport const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset', // form\n 'action', // form\n 'encType', // form\n 'encType', // form\n 'method', // form\n 'noValidate', // form\n 'target', // form\n]);\n\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */\nexport const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow', // iframe\n 'allowFullScreen', // iframe\n 'allowPaymentRequest', // iframe\n 'allowTransparency', // iframe\n 'csp', // iframe\n 'height', // canvas, embed, iframe, img, input, object, video\n 'importance', // iframe\n 'referrerPolicy', // iframe\n 'sandbox', // iframe\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcDoc', // iframe\n 'width', // canvas, embed, iframe, img, input, object, video,\n]);\n\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */\nexport const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt', // area, img, input\n 'crossOrigin', // img\n 'height', // canvas, embed, iframe, img, input, object, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcSet', // img, source\n 'useMap', // img, object,\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of DIALOG tag properties and events.\n *\n * @public\n */\nexport const dialogProperties = toObjectMap(htmlElementProperties, ['open', 'onCancel', 'onClose']);\n\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */\nexport const divProperties = htmlElementProperties;\n\n/**\n * Gets native supported props for an html element provided the allowance set. Use one of the property\n * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given\n * props set. Note that all data- and aria- prefixed attributes will be allowed.\n * NOTE: getNativeProps should always be applied first when adding props to a react component. The\n * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.\n * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to\n * the component after an onClick function is added, then the getNativeProps onClick will override it.\n *\n * @public\n * @param props - The unfiltered input props\n * @param allowedPropNames - The array or record of allowed prop names.\n * @param excludedPropNames\n * @returns The filtered props\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps<T extends Record<string, any>>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: Record<string, any>,\n allowedPropNames: string[] | Record<string, number>,\n excludedPropNames?: string[],\n): T {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n\n const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n const keys = Object.keys(props);\n\n for (const key of keys) {\n const isNativeProp =\n (!isArray && (allowedPropNames as Record<string, number>)[key]) ||\n (isArray && (allowedPropNames as string[]).indexOf(key) >= 0) ||\n key.indexOf('data-') === 0 ||\n key.indexOf('aria-') === 0;\n\n if (isNativeProp && (!excludedPropNames || excludedPropNames?.indexOf(key) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props![key] as any;\n }\n }\n\n return result as T;\n}\n"],"names":["anchorProperties","audioProperties","baseElementEvents","baseElementProperties","buttonProperties","colGroupProperties","colProperties","dialogProperties","divProperties","fieldsetProperties","formProperties","getNativeProps","htmlElementProperties","iframeProperties","imgProperties","inputProperties","labelProperties","liProperties","microdataProperties","olProperties","optionProperties","selectProperties","tableProperties","tdProperties","textAreaProperties","thProperties","timeProperties","trProperties","videoProperties","toObjectMap","items","result","item","keys","Array","isArray","Object","key","props","allowedPropNames","excludedPropNames","isNativeProp","indexOf"],"mappings":";;;;;;;;;;;IAgNaA,gBAAgB;eAAhBA;;IAzCAC,eAAe;eAAfA;;IApJAC,iBAAiB;eAAjBA;;IA0FAC,qBAAqB;eAArBA;;IA4HAC,gBAAgB;eAAhBA;;IA2HAC,kBAAkB;eAAlBA;;IAIAC,aAAa;eAAbA;;IAqEAC,gBAAgB;eAAhBA;;IAOAC,aAAa;eAAbA;;IAnEAC,kBAAkB;eAAlBA;;IAUAC,cAAc;eAAdA;;IA2EGC,cAAc;eAAdA;;IA/SHC,qBAAqB;eAArBA;;IAmPAC,gBAAgB;eAAhBA;;IAoBAC,aAAa;eAAbA;;IAjKAC,eAAe;eAAfA;;IA/FAC,eAAe;eAAfA;;IAyCAC,YAAY;eAAZA;;IA7DAC,mBAAmB;eAAnBA;;IAoDAC,YAAY;eAAZA;;IAyHAC,gBAAgB;eAAhBA;;IANAC,gBAAgB;eAAhBA;;IAgBAC,eAAe;eAAfA;;IA4BAC,YAAY;eAAZA;;IA9DAC,kBAAkB;eAAlBA;;IAmDAC,YAAY;eAAZA;;IAlHAC,cAAc;eAAdA;;IA2GAC,YAAY;eAAZA;;IAtJAC,eAAe;eAAfA;;;AArLb,MAAMC,cAAc,CAAC,GAAGC;IACtB,MAAMC,SAAiC,CAAC;IAExC,KAAK,MAAMC,QAAQF,MAAO;QACxB,MAAMG,OAAOC,MAAMC,OAAO,CAACH,QAAQA,OAAOI,OAAOH,IAAI,CAACD;QAEtD,KAAK,MAAMK,OAAOJ,KAAM;YACtBF,MAAM,CAACM,IAAI,GAAG;QAChB;IACF;IAEA,OAAON;AACT;AAOO,MAAM7B,oBAAoB2B,YAAY;IAC3C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAM1B,wBAAwB0B,YAAY;IAC/C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMX,sBAAsBW,YAAY;IAC7C;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMjB,wBAAwBiB,YAAY1B,uBAAuBD,mBAAmBgB;AAOpF,MAAMF,kBAAkBa,YAAYjB,uBAAuB;IAChE;CACD;AAOM,MAAMX,kBAAkB4B,YAAYjB,uBAAuB;IAChE;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMgB,kBAAkBC,YAAY5B,iBAAiB;IAC1D;CACD;AAOM,MAAMkB,eAAeU,YAAYjB,uBAAuB;IAC7D;CACD;AAOM,MAAMK,eAAeY,YAAYjB,uBAAuB;IAC7D;CACD;AAOM,MAAMZ,mBAAmB6B,YAAYjB,uBAAuB;IACjE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMc,iBAAiBG,YAAYjB,uBAAuB;IAC/D;CACD;AAOM,MAAMR,mBAAmByB,YAAYjB,uBAAuB;IACjE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMG,kBAAkBc,YAAYzB,kBAAkB;IAC3D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMoB,qBAAqBK,YAAYzB,kBAAkB;IAC9D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMiB,mBAAmBQ,YAAYzB,kBAAkB;IAC5D;IACA;IACA;CACD;AAEM,MAAMgB,mBAAmBS,YAAYjB,uBAAuB;IACjE;IACA;CACD;AAOM,MAAMU,kBAAkBO,YAAYjB,uBAAuB;IAChE;IACA;CACD;AAOM,MAAMe,eAAef;AAOrB,MAAMa,eAAeI,YAAYjB,uBAAuB;IAC7D;IACA;IACA;CACD;AAOM,MAAMW,eAAeM,YAAYjB,uBAAuB;IAC7D;IACA;IACA;IACA;CACD;AAEM,MAAMP,qBAAqBwB,YAAYjB,uBAAuB;IACnE;CACD;AAEM,MAAMN,gBAAgBuB,YAAYjB,uBAAuB;IAC9D;CACD;AAOM,MAAMH,qBAAqBoB,YAAYjB,uBAAuB;IACnE;IACA;CACD;AAOM,MAAMF,iBAAiBmB,YAAYjB,uBAAuB;IAC/D;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMC,mBAAmBgB,YAAYjB,uBAAuB;IACjE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAME,gBAAgBe,YAAYjB,uBAAuB;IAC9D;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAML,mBAAmBsB,YAAYjB,uBAAuB;IAAC;IAAQ;IAAY;CAAU;AAO3F,MAAMJ,gBAAgBI;AAkBtB,SAASD,eACd,8DAA8D;AAC9D2B,KAA0B,EAC1BC,gBAAmD,EACnDC,iBAA4B;IAE5B,6GAA6G;IAC7G,2GAA2G;IAC3G,2GAA2G;IAC3G,uBAAuB;IACvB,0GAA0G;IAE1G,MAAML,UAAUD,MAAMC,OAAO,CAACI;IAC9B,8DAA8D;IAC9D,MAAMR,SAA8B,CAAC;IACrC,MAAME,OAAOG,OAAOH,IAAI,CAACK;IAEzB,KAAK,MAAMD,OAAOJ,KAAM;QACtB,MAAMQ,eACJ,AAAC,CAACN,WAAW,AAACI,gBAA2C,CAACF,IAAI,IAC7DF,WAAW,AAACI,iBAA8BG,OAAO,CAACL,QAAQ,KAC3DA,IAAIK,OAAO,CAAC,aAAa,KACzBL,IAAIK,OAAO,CAAC,aAAa;QAE3B,IAAID,gBAAiB,CAAA,CAACD,qBAAqBA,CAAAA,8BAAAA,wCAAAA,kBAAmBE,OAAO,CAACL,UAAS,CAAC,CAAA,GAAI;YAClF,8DAA8D;YAC9DN,MAAM,CAACM,IAAI,GAAGC,KAAM,CAACD,IAAI;QAC3B;IACF;IAEA,OAAON;AACT"}
1
+ {"version":3,"sources":["../src/utils/properties.ts"],"sourcesContent":["const toObjectMap = (...items: (string[] | Record<string, number>)[]) => {\n const result: Record<string, number> = {};\n\n for (const item of items) {\n const keys = Array.isArray(item) ? item : Object.keys(item);\n\n for (const key of keys) {\n result[key] = 1;\n }\n }\n\n return result;\n};\n\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementEvents = toObjectMap([\n 'onAuxClick',\n 'onAnimationEnd',\n 'onAnimationStart',\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onFocus',\n 'onFocusCapture',\n 'onBlur',\n 'onBlurCapture',\n 'onChange',\n 'onInput',\n 'onSubmit',\n 'onLoad',\n 'onError',\n 'onKeyDown',\n 'onKeyDownCapture',\n 'onKeyPress',\n 'onKeyUp',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onClick',\n 'onClickCapture',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseDownCapture',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onMouseUpCapture',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onPointerCancel',\n 'onPointerDown',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerMove',\n 'onPointerOut',\n 'onPointerOver',\n 'onPointerUp',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n]);\n\n/**\n * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementProperties = toObjectMap([\n 'accessKey', // global\n 'children', // global\n 'className', // global\n 'contentEditable', // global\n 'dir', // global\n 'draggable', // global\n 'hidden', // global\n 'htmlFor', // global\n 'id', // global\n 'lang', // global\n 'popover', // global\n 'focusgroup', // global\n 'focusgroupstart', // global\n 'ref', // global\n 'role', // global\n 'style', // global\n 'tabIndex', // global\n 'title', // global\n 'translate', // global\n 'spellCheck', // global\n 'name', // global\n]);\n\n/**\n * An array of microdata attributes that are allowed on every html element type.\n *\n * @public\n */\nexport const microdataProperties = toObjectMap([\n 'itemID', // global\n 'itemProp', // global\n 'itemRef', // global\n 'itemScope', // global\n 'itemType', // global\n]);\n\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */\nexport const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents, microdataProperties);\n\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */\nexport const labelProperties = toObjectMap(htmlElementProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */\nexport const audioProperties = toObjectMap(htmlElementProperties, [\n 'height', // canvas, embed, iframe, img, input, object, video\n 'loop', // audio, video\n 'muted', // audio, video\n 'preload', // audio, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */\nexport const videoProperties = toObjectMap(audioProperties, [\n 'poster', // video\n]);\n\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */\nexport const olProperties = toObjectMap(htmlElementProperties, [\n 'start', // ol\n]);\n\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */\nexport const liProperties = toObjectMap(htmlElementProperties, [\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of A tag properties and events.\n *\n * @public\n */\nexport const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download', // a, area\n 'href', // a, area, base, link\n 'hrefLang', // a, area, link\n 'media', // a, area, link, source, style\n 'referrerPolicy', // a, area\n 'rel', // a, area, link\n 'target', // a, area, base, form\n 'type', // a, button, input, link, menu, object, script, source, style\n]);\n\n/**\n * An array of TIME tag properties and events.\n *\n * @public\n */\nexport const timeProperties = toObjectMap(htmlElementProperties, [\n 'dateTime', // time\n]);\n\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */\nexport const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus', // button, input, select, textarea\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'formAction', // input, button\n 'formEncType', // input, button\n 'formMethod', // input, button\n 'formNoValidate', // input, button\n 'formTarget', // input, button\n 'popoverTarget', // input, button\n 'popoverTargetAction', // input, button\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param,\n]);\n\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */\nexport const inputProperties = toObjectMap(buttonProperties, [\n 'accept', // input\n 'alt', // area, img, input\n 'autoCorrect', // input, textarea\n 'autoCapitalize', // input, textarea\n 'autoComplete', // form, input\n 'checked', // input\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'height', // canvas, embed, iframe, img, input, object, video\n 'inputMode', // input\n 'list', // input\n 'max', // input, meter\n 'maxLength', // input, textarea\n 'min', // input, meter\n 'minLength', // input, textarea\n 'multiple', // input, select\n 'pattern', // input\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'step', // input\n 'size', // input\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */\nexport const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize', // input, textarea\n 'cols', // textarea\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'maxLength', // input, textarea\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'rows', // textarea\n 'wrap', // textarea\n]);\n\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */\nexport const selectProperties = toObjectMap(buttonProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'multiple', // input, select\n 'required', // input, select, textarea\n]);\n\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected', // option\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */\nexport const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding', // table\n 'cellSpacing', // table\n]);\n\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */\nexport const trProperties = htmlElementProperties;\n\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */\nexport const thProperties = toObjectMap(htmlElementProperties, [\n 'colSpan', // td, th\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */\nexport const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan', // td\n 'headers', // td\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\n/**\n * An array of FIELDSET tag properties and events.\n *\n * @public\n */\nexport const fieldsetProperties = toObjectMap(htmlElementProperties, [\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */\nexport const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset', // form\n 'action', // form\n 'encType', // form\n 'encType', // form\n 'method', // form\n 'noValidate', // form\n 'target', // form\n]);\n\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */\nexport const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow', // iframe\n 'allowFullScreen', // iframe\n 'allowPaymentRequest', // iframe\n 'allowTransparency', // iframe\n 'csp', // iframe\n 'height', // canvas, embed, iframe, img, input, object, video\n 'importance', // iframe\n 'referrerPolicy', // iframe\n 'sandbox', // iframe\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcDoc', // iframe\n 'width', // canvas, embed, iframe, img, input, object, video,\n]);\n\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */\nexport const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt', // area, img, input\n 'crossOrigin', // img\n 'height', // canvas, embed, iframe, img, input, object, video\n 'loading', // img, iframe\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcSet', // img, source\n 'useMap', // img, object,\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of DIALOG tag properties and events.\n *\n * @public\n */\nexport const dialogProperties = toObjectMap(htmlElementProperties, ['open', 'onCancel', 'onClose']);\n\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */\nexport const divProperties = htmlElementProperties;\n\n/**\n * Gets native supported props for an html element provided the allowance set. Use one of the property\n * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given\n * props set. Note that all data- and aria- prefixed attributes will be allowed.\n * NOTE: getNativeProps should always be applied first when adding props to a react component. The\n * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.\n * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to\n * the component after an onClick function is added, then the getNativeProps onClick will override it.\n *\n * @public\n * @param props - The unfiltered input props\n * @param allowedPropNames - The array or record of allowed prop names.\n * @param excludedPropNames\n * @returns The filtered props\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps<T extends Record<string, any>>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: Record<string, any>,\n allowedPropNames: string[] | Record<string, number>,\n excludedPropNames?: string[],\n): T {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n\n const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n const keys = Object.keys(props);\n\n for (const key of keys) {\n const isNativeProp =\n (!isArray && (allowedPropNames as Record<string, number>)[key]) ||\n (isArray && (allowedPropNames as string[]).indexOf(key) >= 0) ||\n key.indexOf('data-') === 0 ||\n key.indexOf('aria-') === 0;\n\n if (isNativeProp && (!excludedPropNames || excludedPropNames?.indexOf(key) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props![key] as any;\n }\n }\n\n return result as T;\n}\n"],"names":["anchorProperties","audioProperties","baseElementEvents","baseElementProperties","buttonProperties","colGroupProperties","colProperties","dialogProperties","divProperties","fieldsetProperties","formProperties","getNativeProps","htmlElementProperties","iframeProperties","imgProperties","inputProperties","labelProperties","liProperties","microdataProperties","olProperties","optionProperties","selectProperties","tableProperties","tdProperties","textAreaProperties","thProperties","timeProperties","trProperties","videoProperties","toObjectMap","items","result","item","keys","Array","isArray","Object","key","props","allowedPropNames","excludedPropNames","isNativeProp","indexOf"],"mappings":";;;;;;;;;;;IAgNaA,gBAAgB;eAAhBA;;IAzCAC,eAAe;eAAfA;;IApJAC,iBAAiB;eAAjBA;;IA0FAC,qBAAqB;eAArBA;;IA4HAC,gBAAgB;eAAhBA;;IA2HAC,kBAAkB;eAAlBA;;IAIAC,aAAa;eAAbA;;IAsEAC,gBAAgB;eAAhBA;;IAOAC,aAAa;eAAbA;;IApEAC,kBAAkB;eAAlBA;;IAUAC,cAAc;eAAdA;;IA4EGC,cAAc;eAAdA;;IAhTHC,qBAAqB;eAArBA;;IAmPAC,gBAAgB;eAAhBA;;IAoBAC,aAAa;eAAbA;;IAjKAC,eAAe;eAAfA;;IA/FAC,eAAe;eAAfA;;IAyCAC,YAAY;eAAZA;;IA7DAC,mBAAmB;eAAnBA;;IAoDAC,YAAY;eAAZA;;IAyHAC,gBAAgB;eAAhBA;;IANAC,gBAAgB;eAAhBA;;IAgBAC,eAAe;eAAfA;;IA4BAC,YAAY;eAAZA;;IA9DAC,kBAAkB;eAAlBA;;IAmDAC,YAAY;eAAZA;;IAlHAC,cAAc;eAAdA;;IA2GAC,YAAY;eAAZA;;IAtJAC,eAAe;eAAfA;;;AArLb,MAAMC,cAAc,CAAC,GAAGC;IACtB,MAAMC,SAAiC,CAAC;IAExC,KAAK,MAAMC,QAAQF,MAAO;QACxB,MAAMG,OAAOC,MAAMC,OAAO,CAACH,QAAQA,OAAOI,OAAOH,IAAI,CAACD;QAEtD,KAAK,MAAMK,OAAOJ,KAAM;YACtBF,MAAM,CAACM,IAAI,GAAG;QAChB;IACF;IAEA,OAAON;AACT;AAOO,MAAM7B,oBAAoB2B,YAAY;IAC3C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAM1B,wBAAwB0B,YAAY;IAC/C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMX,sBAAsBW,YAAY;IAC7C;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMjB,wBAAwBiB,YAAY1B,uBAAuBD,mBAAmBgB;AAOpF,MAAMF,kBAAkBa,YAAYjB,uBAAuB;IAChE;CACD;AAOM,MAAMX,kBAAkB4B,YAAYjB,uBAAuB;IAChE;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMgB,kBAAkBC,YAAY5B,iBAAiB;IAC1D;CACD;AAOM,MAAMkB,eAAeU,YAAYjB,uBAAuB;IAC7D;CACD;AAOM,MAAMK,eAAeY,YAAYjB,uBAAuB;IAC7D;CACD;AAOM,MAAMZ,mBAAmB6B,YAAYjB,uBAAuB;IACjE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMc,iBAAiBG,YAAYjB,uBAAuB;IAC/D;CACD;AAOM,MAAMR,mBAAmByB,YAAYjB,uBAAuB;IACjE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMG,kBAAkBc,YAAYzB,kBAAkB;IAC3D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMoB,qBAAqBK,YAAYzB,kBAAkB;IAC9D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMiB,mBAAmBQ,YAAYzB,kBAAkB;IAC5D;IACA;IACA;CACD;AAEM,MAAMgB,mBAAmBS,YAAYjB,uBAAuB;IACjE;IACA;CACD;AAOM,MAAMU,kBAAkBO,YAAYjB,uBAAuB;IAChE;IACA;CACD;AAOM,MAAMe,eAAef;AAOrB,MAAMa,eAAeI,YAAYjB,uBAAuB;IAC7D;IACA;IACA;CACD;AAOM,MAAMW,eAAeM,YAAYjB,uBAAuB;IAC7D;IACA;IACA;IACA;CACD;AAEM,MAAMP,qBAAqBwB,YAAYjB,uBAAuB;IACnE;CACD;AAEM,MAAMN,gBAAgBuB,YAAYjB,uBAAuB;IAC9D;CACD;AAOM,MAAMH,qBAAqBoB,YAAYjB,uBAAuB;IACnE;IACA;CACD;AAOM,MAAMF,iBAAiBmB,YAAYjB,uBAAuB;IAC/D;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAMC,mBAAmBgB,YAAYjB,uBAAuB;IACjE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAME,gBAAgBe,YAAYjB,uBAAuB;IAC9D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAOM,MAAML,mBAAmBsB,YAAYjB,uBAAuB;IAAC;IAAQ;IAAY;CAAU;AAO3F,MAAMJ,gBAAgBI;AAkBtB,SAASD,eACd,8DAA8D;AAC9D2B,KAA0B,EAC1BC,gBAAmD,EACnDC,iBAA4B;IAE5B,6GAA6G;IAC7G,2GAA2G;IAC3G,2GAA2G;IAC3G,uBAAuB;IACvB,0GAA0G;IAE1G,MAAML,UAAUD,MAAMC,OAAO,CAACI;IAC9B,8DAA8D;IAC9D,MAAMR,SAA8B,CAAC;IACrC,MAAME,OAAOG,OAAOH,IAAI,CAACK;IAEzB,KAAK,MAAMD,OAAOJ,KAAM;QACtB,MAAMQ,eACJ,AAAC,CAACN,WAAW,AAACI,gBAA2C,CAACF,IAAI,IAC7DF,WAAW,AAACI,iBAA8BG,OAAO,CAACL,QAAQ,KAC3DA,IAAIK,OAAO,CAAC,aAAa,KACzBL,IAAIK,OAAO,CAAC,aAAa;QAE3B,IAAID,gBAAiB,CAAA,CAACD,qBAAqBA,CAAAA,8BAAAA,wCAAAA,kBAAmBE,OAAO,CAACL,UAAS,CAAC,CAAA,GAAI;YAClF,8DAA8D;YAC9DN,MAAM,CAACM,IAAI,GAAGC,KAAM,CAACD,IAAI;QAC3B;IACF;IAEA,OAAON;AACT"}
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "elementContains", {
8
8
  return elementContains;
9
9
  }
10
10
  });
11
- const _getParent = require("./getParent");
11
+ const _getParent = require("./getParent.cjs");
12
12
  function elementContains(parent, child) {
13
13
  if (!parent || !child) {
14
14
  return false;
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "getParent", {
8
8
  return getParent;
9
9
  }
10
10
  });
11
- const _isVirtualElement = require("./isVirtualElement");
11
+ const _isVirtualElement = require("./isVirtualElement.cjs");
12
12
  /**
13
13
  * Gets the virtual parent given the child element, if it exists.
14
14
  * @internal
@@ -19,6 +19,6 @@ _export(exports, {
19
19
  return _setVirtualParent.setVirtualParent;
20
20
  }
21
21
  });
22
- const _elementContains = require("./elementContains");
23
- const _setVirtualParent = require("./setVirtualParent");
24
- const _getParent = require("./getParent");
22
+ const _elementContains = require("./elementContains.cjs");
23
+ const _setVirtualParent = require("./setVirtualParent.cjs");
24
+ const _getParent = require("./getParent.cjs");
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@fluentui/react-utilities",
3
- "version": "9.26.5",
3
+ "version": "9.26.7",
4
4
  "description": "A set of general React-specific utilities.",
5
- "main": "lib-commonjs/index.js",
5
+ "main": "lib-commonjs/index.cjs",
6
6
  "module": "lib/index.js",
7
7
  "typings": "./dist/index.d.ts",
8
8
  "sideEffects": false,
@@ -12,14 +12,19 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@fluentui/keyboard-keys": "^9.0.8",
16
- "@fluentui/react-shared-contexts": "^9.26.2",
15
+ "@fluentui/keyboard-keys": "^9.0.9",
16
+ "@fluentui/react-shared-contexts": "^9.26.4",
17
17
  "@swc/helpers": "^0.5.1"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@types/react": ">=16.14.0 <20.0.0",
21
21
  "react": ">=16.14.0 <20.0.0"
22
22
  },
23
+ "peerDependenciesMeta": {
24
+ "@types/react": {
25
+ "optional": true
26
+ }
27
+ },
23
28
  "beachball": {
24
29
  "disallowedChangeTypes": [
25
30
  "major",
@@ -28,17 +33,23 @@
28
33
  },
29
34
  "exports": {
30
35
  ".": {
31
- "types": "./dist/index.d.ts",
32
- "node": "./lib-commonjs/index.js",
33
- "import": "./lib/index.js",
34
- "require": "./lib-commonjs/index.js"
36
+ "import": {
37
+ "types": "./dist/index.d.ts",
38
+ "default": "./lib/index.js"
39
+ },
40
+ "require": {
41
+ "types": "./dist/index.d.cts",
42
+ "default": "./lib-commonjs/index.cjs"
43
+ }
35
44
  },
36
45
  "./package.json": "./package.json"
37
46
  },
38
47
  "files": [
39
48
  "*.md",
40
49
  "dist/*.d.ts",
50
+ "dist/*.d.cts",
41
51
  "lib",
42
52
  "lib-commonjs"
43
- ]
53
+ ],
54
+ "type": "module"
44
55
  }