@fluentui/react-utilities 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.4

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 (216) hide show
  1. package/CHANGELOG.json +209 -8
  2. package/CHANGELOG.md +64 -6
  3. package/dist/react-utilities.d.ts +225 -198
  4. package/lib/compose/getSlots.d.ts +11 -10
  5. package/lib/compose/getSlots.js +21 -30
  6. package/lib/compose/getSlots.js.map +1 -1
  7. package/lib/compose/index.d.ts +0 -5
  8. package/lib/compose/index.js +0 -5
  9. package/lib/compose/index.js.map +1 -1
  10. package/lib/compose/resolveShorthand.d.ts +10 -6
  11. package/lib/compose/resolveShorthand.js +13 -12
  12. package/lib/compose/resolveShorthand.js.map +1 -1
  13. package/lib/compose/types.d.ts +86 -76
  14. package/lib/compose/types.js +5 -1
  15. package/lib/compose/types.js.map +1 -1
  16. package/lib/hooks/index.d.ts +1 -1
  17. package/lib/hooks/index.js +1 -1
  18. package/lib/hooks/index.js.map +1 -1
  19. package/lib/hooks/useBoolean.js +10 -21
  20. package/lib/hooks/useBoolean.js.map +1 -1
  21. package/lib/hooks/useConst.js +1 -1
  22. package/lib/hooks/useConst.js.map +1 -1
  23. package/lib/hooks/useControllableState.d.ts +16 -6
  24. package/lib/hooks/useControllableState.js +26 -25
  25. package/lib/hooks/useControllableState.js.map +1 -1
  26. package/lib/hooks/useEventCallback.js +6 -12
  27. package/lib/hooks/useEventCallback.js.map +1 -1
  28. package/lib/hooks/useFirstMount.js +1 -1
  29. package/lib/hooks/useFirstMount.js.map +1 -1
  30. package/lib/hooks/useForceUpdate.js +1 -3
  31. package/lib/hooks/useForceUpdate.js.map +1 -1
  32. package/lib/hooks/useId.d.ts +1 -1
  33. package/lib/hooks/useId.js +9 -5
  34. package/lib/hooks/useId.js.map +1 -1
  35. package/lib/hooks/useIsomorphicLayoutEffect.js +1 -1
  36. package/lib/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  37. package/lib/hooks/useMergedEventCallbacks.d.ts +18 -0
  38. package/lib/hooks/useMergedEventCallbacks.js +26 -0
  39. package/lib/hooks/useMergedEventCallbacks.js.map +1 -0
  40. package/lib/hooks/useMergedRefs.js +5 -13
  41. package/lib/hooks/useMergedRefs.js.map +1 -1
  42. package/lib/hooks/useMount.js +3 -3
  43. package/lib/hooks/useMount.js.map +1 -1
  44. package/lib/hooks/useOnClickOutside.js +30 -36
  45. package/lib/hooks/useOnClickOutside.js.map +1 -1
  46. package/lib/hooks/useOnScrollOutside.js +13 -15
  47. package/lib/hooks/useOnScrollOutside.js.map +1 -1
  48. package/lib/hooks/usePrevious.js +3 -3
  49. package/lib/hooks/usePrevious.js.map +1 -1
  50. package/lib/hooks/useTimeout.js +13 -17
  51. package/lib/hooks/useTimeout.js.map +1 -1
  52. package/lib/hooks/useUnmount.js +5 -7
  53. package/lib/hooks/useUnmount.js.map +1 -1
  54. package/lib/index.js.map +1 -1
  55. package/lib/ssr/SSRContext.js +9 -15
  56. package/lib/ssr/SSRContext.js.map +1 -1
  57. package/lib/ssr/canUseDOM.js.map +1 -1
  58. package/lib/ssr/index.js.map +1 -1
  59. package/lib/utils/applyTriggerPropsToChildren.d.ts +1 -1
  60. package/lib/utils/applyTriggerPropsToChildren.js +24 -4
  61. package/lib/utils/applyTriggerPropsToChildren.js.map +1 -1
  62. package/lib/utils/clamp.js +1 -3
  63. package/lib/utils/clamp.js.map +1 -1
  64. package/lib/utils/getNativeElementProps.d.ts +22 -0
  65. package/lib/utils/getNativeElementProps.js +26 -3
  66. package/lib/utils/getNativeElementProps.js.map +1 -1
  67. package/lib/utils/getRTLSafeKey.js +1 -1
  68. package/lib/utils/getRTLSafeKey.js.map +1 -1
  69. package/lib/utils/getReactCallbackName.d.ts +25 -0
  70. package/lib/utils/getReactCallbackName.js +26 -0
  71. package/lib/utils/getReactCallbackName.js.map +1 -0
  72. package/lib/utils/getTriggerChild.d.ts +22 -0
  73. package/lib/utils/getTriggerChild.js +26 -0
  74. package/lib/utils/getTriggerChild.js.map +1 -0
  75. package/lib/utils/index.d.ts +2 -1
  76. package/lib/utils/index.js +2 -1
  77. package/lib/utils/index.js.map +1 -1
  78. package/lib/utils/isFluentTrigger.d.ts +22 -0
  79. package/lib/utils/isFluentTrigger.js +8 -0
  80. package/lib/utils/isFluentTrigger.js.map +1 -0
  81. package/lib/utils/omit.js +2 -2
  82. package/lib/utils/omit.js.map +1 -1
  83. package/lib/utils/properties.d.ts +6 -0
  84. package/lib/utils/properties.js +63 -44
  85. package/lib/utils/properties.js.map +1 -1
  86. package/lib/utils/shouldPreventDefaultOnKeyDown.js +4 -4
  87. package/lib/utils/shouldPreventDefaultOnKeyDown.js.map +1 -1
  88. package/lib-commonjs/compose/getSlots.d.ts +11 -10
  89. package/lib-commonjs/compose/getSlots.js +23 -34
  90. package/lib-commonjs/compose/getSlots.js.map +1 -1
  91. package/lib-commonjs/compose/index.d.ts +0 -5
  92. package/lib-commonjs/compose/index.js +1 -11
  93. package/lib-commonjs/compose/index.js.map +1 -1
  94. package/lib-commonjs/compose/resolveShorthand.d.ts +10 -6
  95. package/lib-commonjs/compose/resolveShorthand.js +14 -14
  96. package/lib-commonjs/compose/resolveShorthand.js.map +1 -1
  97. package/lib-commonjs/compose/types.d.ts +86 -76
  98. package/lib-commonjs/compose/types.js +5 -1
  99. package/lib-commonjs/compose/types.js.map +1 -1
  100. package/lib-commonjs/hooks/index.d.ts +1 -1
  101. package/lib-commonjs/hooks/index.js +3 -3
  102. package/lib-commonjs/hooks/index.js.map +1 -1
  103. package/lib-commonjs/hooks/useBoolean.js +12 -23
  104. package/lib-commonjs/hooks/useBoolean.js.map +1 -1
  105. package/lib-commonjs/hooks/useConst.js +2 -2
  106. package/lib-commonjs/hooks/useConst.js.map +1 -1
  107. package/lib-commonjs/hooks/useControllableState.d.ts +16 -6
  108. package/lib-commonjs/hooks/useControllableState.js +28 -27
  109. package/lib-commonjs/hooks/useControllableState.js.map +1 -1
  110. package/lib-commonjs/hooks/useEventCallback.js +8 -14
  111. package/lib-commonjs/hooks/useEventCallback.js.map +1 -1
  112. package/lib-commonjs/hooks/useFirstMount.js +2 -2
  113. package/lib-commonjs/hooks/useFirstMount.js.map +1 -1
  114. package/lib-commonjs/hooks/useForceUpdate.js +2 -4
  115. package/lib-commonjs/hooks/useForceUpdate.js.map +1 -1
  116. package/lib-commonjs/hooks/useId.d.ts +1 -1
  117. package/lib-commonjs/hooks/useId.js +11 -7
  118. package/lib-commonjs/hooks/useId.js.map +1 -1
  119. package/lib-commonjs/hooks/useIsomorphicLayoutEffect.js +2 -2
  120. package/lib-commonjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  121. package/lib-commonjs/hooks/useMergedEventCallbacks.d.ts +18 -0
  122. package/lib-commonjs/hooks/useMergedEventCallbacks.js +36 -0
  123. package/lib-commonjs/hooks/useMergedEventCallbacks.js.map +1 -0
  124. package/lib-commonjs/hooks/useMergedRefs.js +6 -15
  125. package/lib-commonjs/hooks/useMergedRefs.js.map +1 -1
  126. package/lib-commonjs/hooks/useMount.js +4 -4
  127. package/lib-commonjs/hooks/useMount.js.map +1 -1
  128. package/lib-commonjs/hooks/useOnClickOutside.js +32 -38
  129. package/lib-commonjs/hooks/useOnClickOutside.js.map +1 -1
  130. package/lib-commonjs/hooks/useOnScrollOutside.js +15 -17
  131. package/lib-commonjs/hooks/useOnScrollOutside.js.map +1 -1
  132. package/lib-commonjs/hooks/usePrevious.js +4 -4
  133. package/lib-commonjs/hooks/usePrevious.js.map +1 -1
  134. package/lib-commonjs/hooks/useTimeout.js +15 -19
  135. package/lib-commonjs/hooks/useTimeout.js.map +1 -1
  136. package/lib-commonjs/hooks/useUnmount.js +6 -8
  137. package/lib-commonjs/hooks/useUnmount.js.map +1 -1
  138. package/lib-commonjs/index.js +1 -1
  139. package/lib-commonjs/index.js.map +1 -1
  140. package/lib-commonjs/ssr/SSRContext.js +9 -15
  141. package/lib-commonjs/ssr/SSRContext.js.map +1 -1
  142. package/lib-commonjs/ssr/canUseDOM.js.map +1 -1
  143. package/lib-commonjs/ssr/index.js +1 -1
  144. package/lib-commonjs/ssr/index.js.map +1 -1
  145. package/lib-commonjs/utils/applyTriggerPropsToChildren.d.ts +1 -1
  146. package/lib-commonjs/utils/applyTriggerPropsToChildren.js +26 -6
  147. package/lib-commonjs/utils/applyTriggerPropsToChildren.js.map +1 -1
  148. package/lib-commonjs/utils/clamp.js +1 -3
  149. package/lib-commonjs/utils/clamp.js.map +1 -1
  150. package/lib-commonjs/utils/getNativeElementProps.d.ts +22 -0
  151. package/lib-commonjs/utils/getNativeElementProps.js +29 -4
  152. package/lib-commonjs/utils/getNativeElementProps.js.map +1 -1
  153. package/lib-commonjs/utils/getRTLSafeKey.js +1 -1
  154. package/lib-commonjs/utils/getRTLSafeKey.js.map +1 -1
  155. package/lib-commonjs/utils/getReactCallbackName.d.ts +25 -0
  156. package/lib-commonjs/utils/getReactCallbackName.js +35 -0
  157. package/lib-commonjs/utils/getReactCallbackName.js.map +1 -0
  158. package/lib-commonjs/utils/getTriggerChild.d.ts +22 -0
  159. package/lib-commonjs/utils/getTriggerChild.js +37 -0
  160. package/lib-commonjs/utils/getTriggerChild.js.map +1 -0
  161. package/lib-commonjs/utils/index.d.ts +2 -1
  162. package/lib-commonjs/utils/index.js +5 -3
  163. package/lib-commonjs/utils/index.js.map +1 -1
  164. package/lib-commonjs/utils/isFluentTrigger.d.ts +22 -0
  165. package/lib-commonjs/utils/isFluentTrigger.js +17 -0
  166. package/lib-commonjs/utils/isFluentTrigger.js.map +1 -0
  167. package/lib-commonjs/utils/omit.js +2 -2
  168. package/lib-commonjs/utils/omit.js.map +1 -1
  169. package/lib-commonjs/utils/properties.d.ts +6 -0
  170. package/lib-commonjs/utils/properties.js +60 -41
  171. package/lib-commonjs/utils/properties.js.map +1 -1
  172. package/lib-commonjs/utils/shouldPreventDefaultOnKeyDown.js +5 -5
  173. package/lib-commonjs/utils/shouldPreventDefaultOnKeyDown.js.map +1 -1
  174. package/package.json +6 -11
  175. package/lib/compose/getSlotsCompat.d.ts +0 -22
  176. package/lib/compose/getSlotsCompat.js +0 -56
  177. package/lib/compose/getSlotsCompat.js.map +0 -1
  178. package/lib/compose/makeMergeProps.d.ts +0 -15
  179. package/lib/compose/makeMergeProps.js +0 -106
  180. package/lib/compose/makeMergeProps.js.map +0 -1
  181. package/lib/compose/makeMergePropsCompat.d.ts +0 -9
  182. package/lib/compose/makeMergePropsCompat.js +0 -9
  183. package/lib/compose/makeMergePropsCompat.js.map +0 -1
  184. package/lib/compose/nullRender.d.ts +0 -4
  185. package/lib/compose/nullRender.js +0 -7
  186. package/lib/compose/nullRender.js.map +0 -1
  187. package/lib/compose/resolveShorthandProps.d.ts +0 -8
  188. package/lib/compose/resolveShorthandProps.js +0 -30
  189. package/lib/compose/resolveShorthandProps.js.map +0 -1
  190. package/lib/hooks/useControllableValue.d.ts +0 -20
  191. package/lib/hooks/useControllableValue.js +0 -62
  192. package/lib/hooks/useControllableValue.js.map +0 -1
  193. package/lib/utils/onlyChild.d.ts +0 -5
  194. package/lib/utils/onlyChild.js +0 -13
  195. package/lib/utils/onlyChild.js.map +0 -1
  196. package/lib-commonjs/compose/getSlotsCompat.d.ts +0 -22
  197. package/lib-commonjs/compose/getSlotsCompat.js +0 -68
  198. package/lib-commonjs/compose/getSlotsCompat.js.map +0 -1
  199. package/lib-commonjs/compose/makeMergeProps.d.ts +0 -15
  200. package/lib-commonjs/compose/makeMergeProps.js +0 -117
  201. package/lib-commonjs/compose/makeMergeProps.js.map +0 -1
  202. package/lib-commonjs/compose/makeMergePropsCompat.d.ts +0 -9
  203. package/lib-commonjs/compose/makeMergePropsCompat.js +0 -17
  204. package/lib-commonjs/compose/makeMergePropsCompat.js.map +0 -1
  205. package/lib-commonjs/compose/nullRender.d.ts +0 -4
  206. package/lib-commonjs/compose/nullRender.js +0 -16
  207. package/lib-commonjs/compose/nullRender.js.map +0 -1
  208. package/lib-commonjs/compose/resolveShorthandProps.d.ts +0 -8
  209. package/lib-commonjs/compose/resolveShorthandProps.js +0 -41
  210. package/lib-commonjs/compose/resolveShorthandProps.js.map +0 -1
  211. package/lib-commonjs/hooks/useControllableValue.d.ts +0 -20
  212. package/lib-commonjs/hooks/useControllableValue.js +0 -73
  213. package/lib-commonjs/hooks/useControllableValue.js.map +0 -1
  214. package/lib-commonjs/utils/onlyChild.d.ts +0 -5
  215. package/lib-commonjs/utils/onlyChild.js +0 -23
  216. package/lib-commonjs/utils/onlyChild.js.map +0 -1
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Allows a component to be tagged as a FluentUI trigger component.
4
+ *
5
+ * Triggers are special-case components: they attach event listeners and other props on their child,
6
+ * and use them to trigger another component to show. Examples include `MenuTrigger` and `Tooltip`.
7
+ *
8
+ * A component can be tagged as a trigger as follows:
9
+ * ```ts
10
+ * const MyComponent: React.FC<MyComponentProps> & FluentTriggerComponent = ...;
11
+ *
12
+ * MyComponent.isFluentTriggerComponent = true; // MUST also set this to true
13
+ * ```
14
+ */
15
+ export declare type FluentTriggerComponent = {
16
+ isFluentTriggerComponent?: boolean;
17
+ };
18
+ /**
19
+ * Checks if a given element is a FluentUI trigger (e.g. `MenuTrigger` or `Tooltip`).
20
+ * See the {@link FluentTriggerComponent} type for more info.
21
+ */
22
+ export declare const isFluentTrigger: (element: React.ReactElement) => boolean | undefined;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isFluentTrigger = void 0;
7
+ /**
8
+ * Checks if a given element is a FluentUI trigger (e.g. `MenuTrigger` or `Tooltip`).
9
+ * See the {@link FluentTriggerComponent} type for more info.
10
+ */
11
+
12
+ const isFluentTrigger = element => {
13
+ return element.type.isFluentTriggerComponent;
14
+ };
15
+
16
+ exports.isFluentTrigger = isFluentTrigger;
17
+ //# sourceMappingURL=isFluentTrigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["utils/isFluentTrigger.ts"],"names":[],"mappings":";;;;;;AAmBA;;;AAGG;;AACI,MAAM,eAAe,GAAI,OAAD,IAAgC;AAC7D,SAAQ,OAAO,CAAC,IAAR,CAAwC,wBAAhD;AACD,CAFM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourcesContent":["import * as React from 'react';\n\n/**\n * Allows a component to be tagged as a FluentUI trigger component.\n *\n * Triggers are special-case components: they attach event listeners and other props on their child,\n * and use them to trigger another component to show. Examples include `MenuTrigger` and `Tooltip`.\n *\n * A component can be tagged as a trigger as follows:\n * ```ts\n * const MyComponent: React.FC<MyComponentProps> & FluentTriggerComponent = ...;\n *\n * MyComponent.isFluentTriggerComponent = true; // MUST also set this to true\n * ```\n */\nexport type FluentTriggerComponent = {\n isFluentTriggerComponent?: boolean;\n};\n\n/**\n * Checks if a given element is a FluentUI trigger (e.g. `MenuTrigger` or `Tooltip`).\n * See the {@link FluentTriggerComponent} type for more info.\n */\nexport const isFluentTrigger = (element: React.ReactElement) => {\n return (element.type as FluentTriggerComponent).isFluentTriggerComponent;\n};\n"],"sourceRoot":"../src/"}
@@ -21,9 +21,9 @@ exports.omit = void 0;
21
21
 
22
22
  function omit(obj, exclusions) {
23
23
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
- var result = {};
24
+ const result = {};
25
25
 
26
- for (var key in obj) {
26
+ for (const key in obj) {
27
27
  if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {
28
28
  result[key] = obj[key];
29
29
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/omit.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;AAYG;AACH;;AACA,SAAgB,IAAhB,CACE,GADF,EAEE,UAFF,EAEwB;AAEtB;AACA,MAAM,MAAM,GAAwB,EAApC;;AAEA,OAAK,IAAM,GAAX,IAAkB,GAAlB,EAAuB;AACrB,QAAI,UAAU,CAAC,OAAX,CAAmB,GAAnB,MAA4B,CAAC,CAA7B,IAAkC,GAAG,CAAC,cAAJ,CAAmB,GAAnB,CAAtC,EAA+D;AAC7D,MAAA,MAAM,CAAC,GAAD,CAAN,GAAc,GAAG,CAAC,GAAD,CAAjB;AACD;AACF;;AAED,SAAO,MAAP;AACD;;AAdD,OAAA,CAAA,IAAA,GAAA,IAAA","sourceRoot":""}
1
+ {"version":3,"sources":["utils/omit.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;AAYG;AACH;;AACA,SAAgB,IAAhB,CACE,GADF,EAEE,UAFF,EAEwB;AAEtB;AACA,QAAM,MAAM,GAAwB,EAApC;;AAEA,OAAK,MAAM,GAAX,IAAkB,GAAlB,EAAuB;AACrB,QAAI,UAAU,CAAC,OAAX,CAAmB,GAAnB,MAA4B,CAAC,CAA7B,IAAkC,GAAG,CAAC,cAAJ,CAAmB,GAAnB,CAAtC,EAA+D;AAC7D,MAAA,MAAM,CAAC,GAAD,CAAN,GAAc,GAAG,CAAC,GAAD,CAAjB;AACD;AACF;;AAED,SAAO,MAAP;AACD;;AAdD,OAAA,CAAA,IAAA,GAAA,IAAA","sourcesContent":["/**\n * Tiny helper to do the minimal amount of work in duplicating an object but omitting some\n * props. This ends up faster than using object ...rest or reduce to filter.\n *\n * This behaves very much like filteredAssign, but does not merge many objects together,\n * uses an exclusion object map, and avoids spreads all for optimal performance.\n *\n * See perf test for background:\n * https://jsperf.com/omit-vs-rest-vs-reduce/1\n *\n * @param obj - The object to clone\n * @param exclusions - The array of keys to exclude\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function omit<TObj extends Record<string, any>, Exclusions extends (keyof TObj)[]>(\n obj: TObj,\n exclusions: Exclusions,\n): Omit<TObj, Exclusions[number]> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n\n for (const key in obj) {\n if (exclusions.indexOf(key) === -1 && obj.hasOwnProperty(key)) {\n result[key] = obj[key];\n }\n }\n\n return result as TObj;\n}\n"],"sourceRoot":"../src/"}
@@ -103,6 +103,12 @@ export declare const thProperties: Record<string, number>;
103
103
  export declare const tdProperties: Record<string, number>;
104
104
  export declare const colGroupProperties: Record<string, number>;
105
105
  export declare const colProperties: Record<string, number>;
106
+ /**
107
+ * An array of FIELDSET tag properties and events.
108
+ *
109
+ * @public
110
+ */
111
+ export declare const fieldsetProperties: Record<string, number>;
106
112
  /**
107
113
  * An array of FORM tag properties and events.
108
114
  *
@@ -3,23 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getNativeProps = exports.divProperties = exports.imageProperties = exports.imgProperties = exports.iframeProperties = exports.formProperties = exports.colProperties = exports.colGroupProperties = exports.tdProperties = exports.thProperties = exports.trProperties = exports.tableProperties = exports.optionProperties = exports.selectProperties = exports.textAreaProperties = exports.inputProperties = exports.buttonProperties = exports.anchorProperties = exports.liProperties = exports.olProperties = exports.videoProperties = exports.audioProperties = exports.labelProperties = exports.htmlElementProperties = exports.baseElementProperties = exports.baseElementEvents = void 0;
6
+ exports.getNativeProps = exports.divProperties = exports.imageProperties = exports.imgProperties = exports.iframeProperties = exports.formProperties = exports.fieldsetProperties = exports.colProperties = exports.colGroupProperties = exports.tdProperties = exports.thProperties = exports.trProperties = exports.tableProperties = exports.optionProperties = exports.selectProperties = exports.textAreaProperties = exports.inputProperties = exports.buttonProperties = exports.anchorProperties = exports.liProperties = exports.olProperties = exports.videoProperties = exports.audioProperties = exports.labelProperties = exports.htmlElementProperties = exports.baseElementProperties = exports.baseElementEvents = void 0;
7
7
 
8
- var toObjectMap = function () {
9
- var items = [];
8
+ const toObjectMap = (...items) => {
9
+ const result = {};
10
10
 
11
- for (var _i = 0; _i < arguments.length; _i++) {
12
- items[_i] = arguments[_i];
13
- }
14
-
15
- var result = {};
11
+ for (const item of items) {
12
+ const keys = Array.isArray(item) ? item : Object.keys(item);
16
13
 
17
- for (var _a = 0, items_1 = items; _a < items_1.length; _a++) {
18
- var item = items_1[_a];
19
- var keys = Array.isArray(item) ? item : Object.keys(item);
20
-
21
- for (var _b = 0, keys_1 = keys; _b < keys_1.length; _b++) {
22
- var key = keys_1[_b];
14
+ for (const key of keys) {
23
15
  result[key] = 1;
24
16
  }
25
17
  }
@@ -33,14 +25,15 @@ var toObjectMap = function () {
33
25
  */
34
26
 
35
27
 
36
- exports.baseElementEvents = /*#__PURE__*/toObjectMap(['onCopy', 'onCut', 'onPaste', 'onCompositionEnd', 'onCompositionStart', 'onCompositionUpdate', 'onFocus', 'onFocusCapture', 'onBlur', 'onBlurCapture', 'onChange', 'onInput', 'onSubmit', 'onLoad', 'onError', 'onKeyDown', 'onKeyDownCapture', 'onKeyPress', 'onKeyUp', 'onAbort', 'onCanPlay', 'onCanPlayThrough', 'onDurationChange', 'onEmptied', 'onEncrypted', 'onEnded', 'onLoadedData', 'onLoadedMetadata', 'onLoadStart', 'onPause', 'onPlay', 'onPlaying', 'onProgress', 'onRateChange', 'onSeeked', 'onSeeking', 'onStalled', 'onSuspend', 'onTimeUpdate', 'onVolumeChange', 'onWaiting', 'onClick', 'onClickCapture', 'onContextMenu', 'onDoubleClick', 'onDrag', 'onDragEnd', 'onDragEnter', 'onDragExit', 'onDragLeave', 'onDragOver', 'onDragStart', 'onDrop', 'onMouseDown', 'onMouseDownCapture', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onMouseUpCapture', 'onSelect', 'onTouchCancel', 'onTouchEnd', 'onTouchMove', 'onTouchStart', 'onScroll', 'onWheel', 'onPointerCancel', 'onPointerDown', 'onPointerEnter', 'onPointerLeave', 'onPointerMove', 'onPointerOut', 'onPointerOver', 'onPointerUp', 'onGotPointerCapture', 'onLostPointerCapture']);
28
+ exports.baseElementEvents = /*#__PURE__*/toObjectMap(['onAuxClick', 'onCopy', 'onCut', 'onPaste', 'onCompositionEnd', 'onCompositionStart', 'onCompositionUpdate', 'onFocus', 'onFocusCapture', 'onBlur', 'onBlurCapture', 'onChange', 'onInput', 'onSubmit', 'onLoad', 'onError', 'onKeyDown', 'onKeyDownCapture', 'onKeyPress', 'onKeyUp', 'onAbort', 'onCanPlay', 'onCanPlayThrough', 'onDurationChange', 'onEmptied', 'onEncrypted', 'onEnded', 'onLoadedData', 'onLoadedMetadata', 'onLoadStart', 'onPause', 'onPlay', 'onPlaying', 'onProgress', 'onRateChange', 'onSeeked', 'onSeeking', 'onStalled', 'onSuspend', 'onTimeUpdate', 'onVolumeChange', 'onWaiting', 'onClick', 'onClickCapture', 'onContextMenu', 'onDoubleClick', 'onDrag', 'onDragEnd', 'onDragEnter', 'onDragExit', 'onDragLeave', 'onDragOver', 'onDragStart', 'onDrop', 'onMouseDown', 'onMouseDownCapture', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onMouseUpCapture', 'onSelect', 'onTouchCancel', 'onTouchEnd', 'onTouchMove', 'onTouchStart', 'onScroll', 'onWheel', 'onPointerCancel', 'onPointerDown', 'onPointerEnter', 'onPointerLeave', 'onPointerMove', 'onPointerOut', 'onPointerOver', 'onPointerUp', 'onGotPointerCapture', 'onLostPointerCapture']);
37
29
  /**
38
30
  * An array of element attributes which are allowed on every html element type.
39
31
  *
40
32
  * @public
41
33
  */
42
34
 
43
- exports.baseElementProperties = /*#__PURE__*/toObjectMap(['accessKey', 'children', 'className', 'contentEditable', 'dir', 'draggable', 'hidden', 'htmlFor', 'id', 'lang', 'ref', 'role', 'style', 'tabIndex', 'title', 'translate', 'spellCheck', 'name']);
35
+ exports.baseElementProperties = /*#__PURE__*/toObjectMap(['accessKey', 'children', 'className', 'contentEditable', 'dir', 'draggable', 'hidden', 'htmlFor', 'id', 'lang', 'ref', 'role', 'style', 'tabIndex', 'title', 'translate', 'spellCheck', 'name' // global
36
+ ]);
44
37
  /**
45
38
  * An array of HTML element properties and events.
46
39
  *
@@ -54,78 +47,90 @@ exports.htmlElementProperties = /*#__PURE__*/toObjectMap(exports.baseElementProp
54
47
  * @public
55
48
  */
56
49
 
57
- exports.labelProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['form']);
50
+ exports.labelProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['form' // button, fieldset, input, label, meter, object, output, select, textarea
51
+ ]);
58
52
  /**
59
53
  * An array of AUDIO tag properties and events.
60
54
 
61
55
  * @public
62
56
  */
63
57
 
64
- exports.audioProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['height', 'loop', 'muted', 'preload', 'src', 'width']);
58
+ exports.audioProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['height', 'loop', 'muted', 'preload', 'src', 'width' // canvas, embed, iframe, img, input, object, video
59
+ ]);
65
60
  /**
66
61
  * An array of VIDEO tag properties and events.
67
62
  *
68
63
  * @public
69
64
  */
70
65
 
71
- exports.videoProperties = /*#__PURE__*/toObjectMap(exports.audioProperties, ['poster']);
66
+ exports.videoProperties = /*#__PURE__*/toObjectMap(exports.audioProperties, ['poster' // video
67
+ ]);
72
68
  /**
73
69
  * An array of OL tag properties and events.
74
70
  *
75
71
  * @public
76
72
  */
77
73
 
78
- exports.olProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['start']);
74
+ exports.olProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['start' // ol
75
+ ]);
79
76
  /**
80
77
  * An array of LI tag properties and events.
81
78
  *
82
79
  * @public
83
80
  */
84
81
 
85
- exports.liProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['value']);
82
+ exports.liProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['value' // button, input, li, option, meter, progress, param
83
+ ]);
86
84
  /**
87
85
  * An array of A tag properties and events.
88
86
  *
89
87
  * @public
90
88
  */
91
89
 
92
- exports.anchorProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['download', 'href', 'hrefLang', 'media', 'rel', 'target', 'type']);
90
+ exports.anchorProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['download', 'href', 'hrefLang', 'media', 'rel', 'target', 'type' // a, button, input, link, menu, object, script, source, style
91
+ ]);
93
92
  /**
94
93
  * An array of BUTTON tag properties and events.
95
94
  *
96
95
  * @public
97
96
  */
98
97
 
99
- exports.buttonProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['autoFocus', 'disabled', 'form', 'formAction', 'formEncType', 'formMethod', 'formNoValidate', 'formTarget', 'type', 'value']);
98
+ exports.buttonProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['autoFocus', 'disabled', 'form', 'formAction', 'formEncType', 'formMethod', 'formNoValidate', 'formTarget', 'type', 'value' // button, input, li, option, meter, progress, param,
99
+ ]);
100
100
  /**
101
101
  * An array of INPUT tag properties and events.
102
102
  *
103
103
  * @public
104
104
  */
105
105
 
106
- exports.inputProperties = /*#__PURE__*/toObjectMap(exports.buttonProperties, ['accept', 'alt', 'autoCapitalize', 'autoComplete', 'checked', 'dirname', 'form', 'height', 'inputMode', 'list', 'max', 'maxLength', 'min', 'multiple', 'pattern', 'placeholder', 'readOnly', 'required', 'src', 'step', 'size', 'type', 'value', 'width']);
106
+ exports.inputProperties = /*#__PURE__*/toObjectMap(exports.buttonProperties, ['accept', 'alt', 'autoCapitalize', 'autoComplete', 'checked', 'dirname', 'form', 'height', 'inputMode', 'list', 'max', 'maxLength', 'min', 'multiple', 'pattern', 'placeholder', 'readOnly', 'required', 'src', 'step', 'size', 'type', 'value', 'width' // canvas, embed, iframe, img, input, object, video
107
+ ]);
107
108
  /**
108
109
  * An array of TEXTAREA tag properties and events.
109
110
  *
110
111
  * @public
111
112
  */
112
113
 
113
- exports.textAreaProperties = /*#__PURE__*/toObjectMap(exports.buttonProperties, ['autoCapitalize', 'cols', 'dirname', 'form', 'maxLength', 'placeholder', 'readOnly', 'required', 'rows', 'wrap']);
114
+ exports.textAreaProperties = /*#__PURE__*/toObjectMap(exports.buttonProperties, ['autoCapitalize', 'cols', 'dirname', 'form', 'maxLength', 'placeholder', 'readOnly', 'required', 'rows', 'wrap' // textarea
115
+ ]);
114
116
  /**
115
117
  * An array of SELECT tag properties and events.
116
118
  *
117
119
  * @public
118
120
  */
119
121
 
120
- exports.selectProperties = /*#__PURE__*/toObjectMap(exports.buttonProperties, ['form', 'multiple', 'required']);
121
- exports.optionProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['selected', 'value']);
122
+ exports.selectProperties = /*#__PURE__*/toObjectMap(exports.buttonProperties, ['form', 'multiple', 'required' // input, select, textarea
123
+ ]);
124
+ exports.optionProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['selected', 'value' // button, input, li, option, meter, progress, param
125
+ ]);
122
126
  /**
123
127
  * An array of TABLE tag properties and events.
124
128
  *
125
129
  * @public
126
130
  */
127
131
 
128
- exports.tableProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['cellPadding', 'cellSpacing']);
132
+ exports.tableProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['cellPadding', 'cellSpacing' // table
133
+ ]);
129
134
  /**
130
135
  * An array of TR tag properties and events.
131
136
  *
@@ -139,37 +144,52 @@ exports.trProperties = exports.htmlElementProperties;
139
144
  * @public
140
145
  */
141
146
 
142
- exports.thProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['rowSpan', 'scope']);
147
+ exports.thProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['rowSpan', 'scope' // th
148
+ ]);
143
149
  /**
144
150
  * An array of TD tag properties and events.
145
151
  *
146
152
  * @public
147
153
  */
148
154
 
149
- exports.tdProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['colSpan', 'headers', 'rowSpan', 'scope']);
150
- exports.colGroupProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['span']);
151
- exports.colProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['span']);
155
+ exports.tdProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['colSpan', 'headers', 'rowSpan', 'scope' // th
156
+ ]);
157
+ exports.colGroupProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['span' // col, colgroup
158
+ ]);
159
+ exports.colProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['span' // col, colgroup
160
+ ]);
161
+ /**
162
+ * An array of FIELDSET tag properties and events.
163
+ *
164
+ * @public
165
+ */
166
+
167
+ exports.fieldsetProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['disabled', 'form' // button, fieldset, input, label, meter, object, output, select, textarea
168
+ ]);
152
169
  /**
153
170
  * An array of FORM tag properties and events.
154
171
  *
155
172
  * @public
156
173
  */
157
174
 
158
- exports.formProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['acceptCharset', 'action', 'encType', 'encType', 'method', 'noValidate', 'target']);
175
+ exports.formProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['acceptCharset', 'action', 'encType', 'encType', 'method', 'noValidate', 'target' // form
176
+ ]);
159
177
  /**
160
178
  * An array of IFRAME tag properties and events.
161
179
  *
162
180
  * @public
163
181
  */
164
182
 
165
- exports.iframeProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['allow', 'allowFullScreen', 'allowPaymentRequest', 'allowTransparency', 'csp', 'height', 'importance', 'referrerPolicy', 'sandbox', 'src', 'srcDoc', 'width']);
183
+ exports.iframeProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['allow', 'allowFullScreen', 'allowPaymentRequest', 'allowTransparency', 'csp', 'height', 'importance', 'referrerPolicy', 'sandbox', 'src', 'srcDoc', 'width' // canvas, embed, iframe, img, input, object, video,
184
+ ]);
166
185
  /**
167
186
  * An array of IMAGE tag properties and events.
168
187
  *
169
188
  * @public
170
189
  */
171
190
 
172
- exports.imgProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['alt', 'crossOrigin', 'height', 'src', 'srcSet', 'useMap', 'width']);
191
+ exports.imgProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['alt', 'crossOrigin', 'height', 'src', 'srcSet', 'useMap', 'width' // canvas, embed, iframe, img, input, object, video
192
+ ]);
173
193
  /**
174
194
  * @deprecated Use imgProperties for img elements.
175
195
  */
@@ -205,14 +225,13 @@ props, allowedPropNames, excludedPropNames) {
205
225
  // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then
206
226
  // return native props.
207
227
  // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797
208
- var isArray = Array.isArray(allowedPropNames); // eslint-disable-next-line @typescript-eslint/no-explicit-any
228
+ const isArray = Array.isArray(allowedPropNames); // eslint-disable-next-line @typescript-eslint/no-explicit-any
209
229
 
210
- var result = {};
211
- var keys = Object.keys(props);
230
+ const result = {};
231
+ const keys = Object.keys(props);
212
232
 
213
- for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) {
214
- var key = keys_2[_i];
215
- var isNativeProp = !isArray && allowedPropNames[key] || isArray && allowedPropNames.indexOf(key) >= 0 || key.indexOf('data-') === 0 || key.indexOf('aria-') === 0;
233
+ for (const key of keys) {
234
+ const isNativeProp = !isArray && allowedPropNames[key] || isArray && allowedPropNames.indexOf(key) >= 0 || key.indexOf('data-') === 0 || key.indexOf('aria-') === 0;
216
235
 
217
236
  if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {
218
237
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/properties.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAM,WAAW,GAAG,YAAA;AAAC,MAAA,KAAA,GAAA,EAAA;;OAAA,IAAA,EAAA,GAAA,C,EAAA,EAAA,GAAA,SAAA,CAAA,M,EAAA,EAAA,E,EAA+C;AAA/C,IAAA,KAAA,CAAA,EAAA,CAAA,GAAA,SAAA,CAAA,EAAA,CAAA;;;AACnB,MAAM,MAAM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AI,GAAG,MAAM,CAAC,IAAP,CAAY,KAAZ,CAAb;;AAEA,OAAK,MAAM,GAAX,IAAkB,IAAlB,EAAwB;AACtB,UAAM,YAAY,GACf,CAAC,OAAD,IAAa,gBAA2C,CAAC,GAAD,CAAzD,IACC,OAAO,IAAK,gBAA6B,CAAC,OAA9B,CAAsC,GAAtC,KAA8C,CAD3D,IAEA,GAAG,CAAC,OAAJ,CAAY,OAAZ,MAAyB,CAFzB,IAGA,GAAG,CAAC,OAAJ,CAAY,OAAZ,MAAyB,CAJ3B;;AAMA,QAAI,YAAY,KAAK,CAAC,iBAAD,IAAsB,CAAA,iBAAiB,KAAA,IAAjB,IAAA,iBAAiB,KAAA,KAAA,CAAjB,GAAiB,KAAA,CAAjB,GAAA,iBAAiB,CAAE,OAAnB,CAA2B,GAA3B,CAAA,MAAoC,CAAC,CAAhE,CAAhB,EAAoF;AAClF;AACA,MAAA,MAAM,CAAC,GAAD,CAAN,GAAc,KAAM,CAAC,GAAD,CAApB;AACD;AACF;;AAED,SAAO,MAAP;AACD;;AA/BD,OAAA,CAAA,cAAA,GAAA,cAAA","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 '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 '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 HTML element properties and events.\n *\n * @public\n */\nexport const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents);\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 '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 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 '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 '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 '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 '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 * @deprecated Use imgProperties for img elements.\n */\nexport const imageProperties = imgProperties;\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 allowedPropsNames - The array or record of allowed prop names.\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"],"sourceRoot":"../src/"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.shouldPreventDefaultOnKeyDown = void 0;
7
7
 
8
- var keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
8
+ const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
9
9
  /**
10
10
  * Checks if the keyboard event should preventDefault() for Enter and Spacebar keys
11
11
  *
@@ -14,15 +14,15 @@ var keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
14
14
 
15
15
 
16
16
  function shouldPreventDefaultOnKeyDown(e) {
17
- var key = e.key;
18
- var target = e.target;
19
- var matchesByKey = key === keyboard_keys_1.Space || key === keyboard_keys_1.Enter;
17
+ const key = e.key;
18
+ const target = e.target;
19
+ const matchesByKey = key === keyboard_keys_1.Space || key === keyboard_keys_1.Enter;
20
20
 
21
21
  if ((target === null || target === void 0 ? void 0 : target.tagName) === 'A') {
22
22
  return key === keyboard_keys_1.Space;
23
23
  }
24
24
 
25
- var ignoredByTag = (target === null || target === void 0 ? void 0 : target.tagName) === 'INPUT' || (target === null || target === void 0 ? void 0 : target.tagName) === 'TEXTAREA' || (target === null || target === void 0 ? void 0 : target.isContentEditable) === true;
25
+ const ignoredByTag = (target === null || target === void 0 ? void 0 : target.tagName) === 'INPUT' || (target === null || target === void 0 ? void 0 : target.tagName) === 'TEXTAREA' || (target === null || target === void 0 ? void 0 : target.isContentEditable) === true;
26
26
  return matchesByKey && !ignoredByTag;
27
27
  }
28
28
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/shouldPreventDefaultOnKeyDown.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAGA;;;;AAIG;;;AACH,SAAgB,6BAAhB,CAA8C,CAA9C,EAAoF;AAClF,MAAM,GAAG,GAAG,CAAC,CAAC,GAAd;AACA,MAAM,MAAM,GAA4B,CAAC,CAAC,MAA1C;AAEA,MAAM,YAAY,GAAG,GAAG,KAAK,eAAA,CAAA,KAAR,IAAiB,GAAG,KAAK,eAAA,CAAA,KAA9C;;AAEA,MAAI,CAAA,MAAM,KAAA,IAAN,IAAA,MAAM,KAAA,KAAA,CAAN,GAAM,KAAA,CAAN,GAAA,MAAM,CAAE,OAAR,MAAoB,GAAxB,EAA6B;AAC3B,WAAO,GAAG,KAAK,eAAA,CAAA,KAAf;AACD;;AAED,MAAM,YAAY,GAChB,CAAA,MAAM,KAAA,IAAN,IAAA,M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,MAAM,KAAA,KAAA,CAAN,GAAM,KAAA,CAAN,GAAA,MAAM,CAAE,iBAAR,MAA8B,IADjG;AAGA,SAAO,YAAY,IAAI,CAAC,YAAxB;AACD;;AAdD,OAAA,CAAA,6BAAA,GAAA,6BAAA","sourcesContent":["import { Space, Enter } from '@fluentui/keyboard-keys';\nimport * as React from 'react';\n\n/**\n * Checks if the keyboard event should preventDefault() for Enter and Spacebar keys\n *\n * Useful for situations where a keydown needs to be transformed to a click event\n */\nexport function shouldPreventDefaultOnKeyDown(e: KeyboardEvent | React.KeyboardEvent) {\n const key = e.key;\n const target: HTMLElement | undefined = e.target as HTMLElement;\n\n const matchesByKey = key === Space || key === Enter;\n\n if (target?.tagName === 'A') {\n return key === Space;\n }\n\n const ignoredByTag =\n target?.tagName === 'INPUT' || target?.tagName === 'TEXTAREA' || target?.isContentEditable === true;\n\n return matchesByKey && !ignoredByTag;\n}\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-utilities",
3
- "version": "9.0.0-nightly.f81b28ceb3.1",
3
+ "version": "9.0.0-rc.4",
4
4
  "description": "A set of general React-specific utilities.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -18,26 +18,22 @@
18
18
  "code-style": "just-scripts code-style",
19
19
  "just": "just-scripts",
20
20
  "lint": "just-scripts lint",
21
- "test": "jest",
21
+ "test": "jest --passWithNoTests",
22
22
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
23
- "build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-utilities/src && yarn docs",
24
- "storybook": "start-storybook",
25
- "start": "yarn storybook"
23
+ "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-utilities/src && yarn docs",
24
+ "start": "yarn storybook",
25
+ "type-check": "tsc -b tsconfig.json"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@fluentui/eslint-plugin": "*",
29
29
  "@fluentui/scripts": "^1.0.0",
30
- "@types/enzyme": "3.10.3",
31
- "@types/enzyme-adapter-react-16": "1.0.3",
32
30
  "@types/react": "16.9.42",
33
31
  "@types/react-test-renderer": "^16.0.0",
34
- "enzyme": "~3.10.0",
35
- "enzyme-adapter-react-16": "^1.15.0",
36
32
  "react": "16.8.6",
37
33
  "react-test-renderer": "^16.3.0"
38
34
  },
39
35
  "dependencies": {
40
- "@fluentui/keyboard-keys": "9.0.0-nightly.f81b28ceb3.1",
36
+ "@fluentui/keyboard-keys": "9.0.0-rc.3",
41
37
  "tslib": "^2.1.0"
42
38
  },
43
39
  "peerDependencies": {
@@ -45,7 +41,6 @@
45
41
  "react": ">=16.8.0 <18.0.0"
46
42
  },
47
43
  "beachball": {
48
- "tag": "beta",
49
44
  "disallowedChangeTypes": [
50
45
  "major",
51
46
  "minor",
@@ -1,22 +0,0 @@
1
- declare type GenericDictionary = Record<string, any>;
2
- /**
3
- * Given the state and an array of slot names, will break out `slots` and `slotProps`
4
- * collections.
5
- *
6
- * The root is always derived from the `as` prop.
7
- *
8
- * Slots will render as null if they are rendered as primitives with undefined children.
9
- *
10
- * The slotProps will always omit the `as` prop within them, and for slots that are string
11
- * primitives, the props will be filtered according the the slot type. For example, if the
12
- * slot is rendered `as: 'a'`, the props will be filtered for acceptable anchor props.
13
- *
14
- * @param state - State including slot definitions
15
- * @param slotNames - Name of which props are slots
16
- * @returns An object containing the `slots` map and `slotProps` map.
17
- */
18
- export declare const getSlotsCompat: (state: GenericDictionary, slotNames?: readonly string[] | undefined) => {
19
- slots: Record<string, any>;
20
- slotProps: Record<string, any>;
21
- };
22
- export {};
@@ -1,56 +0,0 @@
1
- import * as React from 'react';
2
- import { nullRender } from './nullRender';
3
- import { getNativeElementProps, omit } from '../utils/index';
4
- /**
5
- * Given the state and an array of slot names, will break out `slots` and `slotProps`
6
- * collections.
7
- *
8
- * The root is always derived from the `as` prop.
9
- *
10
- * Slots will render as null if they are rendered as primitives with undefined children.
11
- *
12
- * The slotProps will always omit the `as` prop within them, and for slots that are string
13
- * primitives, the props will be filtered according the the slot type. For example, if the
14
- * slot is rendered `as: 'a'`, the props will be filtered for acceptable anchor props.
15
- *
16
- * @param state - State including slot definitions
17
- * @param slotNames - Name of which props are slots
18
- * @returns An object containing the `slots` map and `slotProps` map.
19
- */
20
-
21
- export var getSlotsCompat = function (state, slotNames) {
22
- var slots = {
23
- root: state.as || 'div'
24
- };
25
- var slotProps = {
26
- root: typeof slots.root === 'string' ? getNativeElementProps(slots.root, state, ['as']) : omit(state, ['as'])
27
- };
28
-
29
- if (slotNames) {
30
- for (var _i = 0, slotNames_1 = slotNames; _i < slotNames_1.length; _i++) {
31
- var name_1 = slotNames_1[_i];
32
- var slotDefinition = state[name_1] || {};
33
- var _a = slotDefinition.as,
34
- slotAs = _a === void 0 ? 'span' : _a,
35
- children = slotDefinition.children;
36
- var isSlotPrimitive = typeof slotAs === 'string';
37
- var isSlotEmpty = isSlotPrimitive && slotDefinition.children === undefined;
38
- slots[name_1] = isSlotEmpty ? nullRender : slotAs;
39
-
40
- if (typeof children === 'function') {
41
- slotProps[name_1] = {
42
- children: children(slots[name_1], omit(slotDefinition, ['as', 'children']))
43
- };
44
- slots[name_1] = React.Fragment;
45
- } else if (slots[name_1] !== nullRender) {
46
- slotProps[name_1] = isSlotPrimitive ? getNativeElementProps(slotAs, slotDefinition, ['as']) : omit(slotDefinition, ['as']);
47
- }
48
- }
49
- }
50
-
51
- return {
52
- slots: slots,
53
- slotProps: slotProps
54
- };
55
- };
56
- //# sourceMappingURL=getSlotsCompat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/compose/getSlotsCompat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,SAAS,UAAT,QAA2B,cAA3B;AACA,SAAS,qBAAT,EAAgC,IAAhC,QAA4C,gBAA5C;AAKA;;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AAP,CAAjB,CAAlB;AADF,SAAlB;AAGA,QAAA,KAAK,CAAC,MAAD,CAAL,GAAc,KAAK,CAAC,QAApB;AACD,OALD,MAKO,IAAI,KAAK,CAAC,MAAD,CAAL,KAAgB,UAApB,EAAgC;AACrC,QAAA,SAAS,CAAC,MAAD,CAAT,GAAkB,eAAe,GAC7B,qBAAqB,CAAC,MAAD,EAAS,cAAT,EAAyB,CAAC,IAAD,CAAzB,CADQ,GAE7B,IAAI,CAAC,cAAD,EAAiB,CAAC,IAAD,CAAjB,CAFR;AAGD;AACF;AACF;;AAED,SAAO;AAAE,IAAA,KAAK,EAAA,KAAP;AAAS,IAAA,SAAS,EAAA;AAAlB,GAAP;AACD,CAhCM","sourceRoot":""}
@@ -1,15 +0,0 @@
1
- export declare type MergePropsOptions<TState> = {
2
- /**
3
- * A list of props to deep merge. By default, `style` will
4
- * always be deep merged so it's not required to be provided.
5
- */
6
- deepMerge?: readonly (keyof TState)[];
7
- };
8
- /**
9
- * Helper which deep clones props, but respectively assigns JSX, object refs, and class names
10
- * appropriately.
11
- *
12
- * @param target - the target object to merge onto.
13
- * @param propSets - one or more prop sets to deep merge onto the target.
14
- */
15
- export declare const makeMergeProps: <TState>(options?: MergePropsOptions<TState>) => (target: TState, ...propSets: (Partial<TState> | undefined)[]) => TState;