@fluentui/react-utilities 9.9.2 → 9.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@fluentui/react-utilities",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 31 May 2023 06:43:05 GMT",
5
+ "date": "Tue, 20 Jun 2023 12:34:50 GMT",
6
+ "tag": "@fluentui/react-utilities_v9.9.3",
7
+ "version": "9.9.3",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "lingfangao@hotmail.com",
12
+ "package": "@fluentui/react-utilities",
13
+ "commit": "8b6d1d1fee189c864aa6a201888ed94f61b6dc7d",
14
+ "comment": "fix: getNativeElementProps should support animation event handlers"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Wed, 31 May 2023 06:46:22 GMT",
6
21
  "tag": "@fluentui/react-utilities_v9.9.2",
7
22
  "version": "9.9.2",
8
23
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui/react-utilities
2
2
 
3
- This log was last generated on Wed, 31 May 2023 06:43:05 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 20 Jun 2023 12:34:50 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.9.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.9.3)
8
+
9
+ Tue, 20 Jun 2023 12:34:50 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.9.2..@fluentui/react-utilities_v9.9.3)
11
+
12
+ ### Patches
13
+
14
+ - fix: getNativeElementProps should support animation event handlers ([PR #28094](https://github.com/microsoft/fluentui/pull/28094) by lingfangao@hotmail.com)
15
+
7
16
  ## [9.9.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.9.2)
8
17
 
9
- Wed, 31 May 2023 06:43:05 GMT
18
+ Wed, 31 May 2023 06:46:22 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.9.1..@fluentui/react-utilities_v9.9.2)
11
20
 
12
21
  ### Patches
@@ -14,6 +14,8 @@ const toObjectMap = (...items)=>{
14
14
  * @public
15
15
  */ export const baseElementEvents = toObjectMap([
16
16
  'onAuxClick',
17
+ 'onAnimationEnd',
18
+ 'onAnimationStart',
17
19
  'onCopy',
18
20
  'onCut',
19
21
  'onPaste',
@@ -1 +1 @@
1
- {"version":3,"sources":["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 '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 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 '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 '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 '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":["toObjectMap","items","result","item","keys","Array","isArray","Object","key","baseElementEvents","baseElementProperties","microdataProperties","htmlElementProperties","labelProperties","audioProperties","videoProperties","olProperties","liProperties","anchorProperties","timeProperties","buttonProperties","inputProperties","textAreaProperties","selectProperties","optionProperties","tableProperties","trProperties","thProperties","tdProperties","colGroupProperties","colProperties","fieldsetProperties","formProperties","iframeProperties","imgProperties","dialogProperties","divProperties","getNativeProps","props","allowedPropNames","excludedPropNames","isNativeProp","indexOf"],"mappings":"AAAA,MAAMA,cAAc,CAAC,GAAGC,QAAiD;IACvE,MAAMC,SAAiC,CAAC;IAExC,KAAK,MAAMC,QAAQF,MAAO;QACxB,MAAMG,OAAOC,MAAMC,OAAO,CAACH,QAAQA,OAAOI,OAAOH,IAAI,CAACD,KAAK;QAE3D,KAAK,MAAMK,OAAOJ,KAAM;YACtBF,MAAM,CAACM,IAAI,GAAG;QAChB;IACF;IAEA,OAAON;AACT;AAEA;;;;CAIC,GACD,OAAO,MAAMO,oBAAoBT,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;CACD,EAAE;AAEH;;;;CAIC,GACD,OAAO,MAAMU,wBAAwBV,YAAY;IAC/C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH;;;;CAIC,GACD,OAAO,MAAMW,sBAAsBX,YAAY;IAC7C;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH;;;;CAIC,GACD,OAAO,MAAMY,wBAAwBZ,YAAYU,uBAAuBD,mBAAmBE,qBAAqB;AAEhH;;;;CAIC,GACD,OAAO,MAAME,kBAAkBb,YAAYY,uBAAuB;IAChE;CACD,EAAE;AAEH;;;;CAIC,GACD,OAAO,MAAME,kBAAkBd,YAAYY,uBAAuB;IAChE;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH;;;;CAIC,GACD,OAAO,MAAMG,kBAAkBf,YAAYc,iBAAiB;IAC1D;C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aAAa,KACzBlC,IAAIkC,OAAO,CAAC,aAAa;QAE3B,IAAID,gBAAiB,CAAA,CAACD,qBAAqBA,CAAAA,8BAAAA,+BAAAA,KAAAA,IAAAA,kBAAmBE,OAAO,CAAClC,UAAS,CAAC,CAAA,GAAI;YAClF,8DAA8D;YAC9DN,MAAM,CAACM,IAAI,GAAG8B,KAAM,CAAC9B,IAAI;QAC3B,CAAC;IACH;IAEA,OAAON;AACT,CAAC"}
1
+ {"version":3,"sources":["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 '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 '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 '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 '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":["toObjectMap","items","result","item","keys","Array","isArray","Object","key","baseElementEvents","baseElementProperties","microdataProperties","htmlElementProperties","labelProperties","audioProperties","videoProperties","olProperties","liProperties","anchorProperties","timeProperties","buttonProperties","inputProperties","textAreaProperties","selectProperties","optionProperties","tableProperties","trProperties","thProperties","tdProperties","colGroupProperties","colProperties","fieldsetProperties","formProperties","iframeProperties","imgProperties","dialogProperties","divProperties","getNativeProps","props","allowedPropNames","excludedPropNames","isNativeProp","indexOf"],"mappings":"AAAA,MAAMA,cAAc,CAAC,GAAGC,QAAiD;IACvE,MAAMC,SAAiC,CAAC;IAExC,KAAK,MAAMC,QAAQF,MAAO;QACxB,MAAMG,OAAOC,MAAMC,OAAO,CAACH,QAAQA,OAAOI,OAAOH,IAAI,CAACD,KAAK;QAE3D,KAAK,MAAMK,OAAOJ,KAAM;YACtBF,MAAM,CAACM,IAAI,GAAG;QAChB;IACF;IAEA,OAAON;AACT;AAEA;;;;CAIC,GACD,OAAO,MAAMO,oBAAoBT,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,EAAE;AAEH;;;;CAIC,GACD,OAAO,MAAMU,wBAAwBV,YAAY;IAC/C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH;;;;CAIC,GACD,OAAO,MAAMW,sBAAsBX,YAAY;IAC7C;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH;;;;CAIC,GACD,OAAO,MAAMY,wBAAwBZ,YAAYU,uBAAuBD,mBAAmBE,qBAAqB;AAEhH;;;;CAIC,GACD,OAAO,MAAME,kBAAkBb,YAAYY,uBAAuB;IAChE;CACD,EAAE;AAEH;;;;CAIC,GACD,OAAO,MAAME,kBAAkBd,YAAYY,uBAAuB;IAChE;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH;;;;CAIC,GACD,OAAO,MAAMG,kBAAkBf,YAAYc,iBAAiB;IAC1D;CACD,EAAE;AAEH;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AAIkC,OAAO,CAAC,aAAa;QAE3B,IAAID,gBAAiB,CAAA,CAACD,qBAAqBA,CAAAA,8BAAAA,+BAAAA,KAAAA,IAAAA,kBAAmBE,OAAO,CAAClC,UAAS,CAAC,CAAA,GAAI;YAClF,8DAA8D;YAC9DN,MAAM,CAACM,IAAI,GAAG8B,KAAM,CAAC9B,IAAI;QAC3B,CAAC;IACH;IAEA,OAAON;AACT,CAAC"}
@@ -51,6 +51,8 @@ const toObjectMap = (...items)=>{
51
51
  };
52
52
  const baseElementEvents = toObjectMap([
53
53
  'onAuxClick',
54
+ 'onAnimationEnd',
55
+ 'onAnimationStart',
54
56
  'onCopy',
55
57
  'onCut',
56
58
  'onPaste',
@@ -1 +1 @@
1
- {"version":3,"sources":["properties.js"],"sourcesContent":["const toObjectMap = (...items)=>{\n const result = {};\n for (const item of items){\n const keys = Array.isArray(item) ? item : Object.keys(item);\n for (const key of keys){\n result[key] = 1;\n }\n }\n return result;\n};\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */ export 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 * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */ export const baseElementProperties = toObjectMap([\n 'accessKey',\n 'children',\n 'className',\n 'contentEditable',\n 'dir',\n 'draggable',\n 'hidden',\n 'htmlFor',\n 'id',\n 'lang',\n 'ref',\n 'role',\n 'style',\n 'tabIndex',\n 'title',\n 'translate',\n 'spellCheck',\n 'name'\n]);\n/**\n * An array of microdata attributes that are allowed on every html element type.\n *\n * @public\n */ export const microdataProperties = toObjectMap([\n 'itemID',\n 'itemProp',\n 'itemRef',\n 'itemScope',\n 'itemType'\n]);\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */ export const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents, microdataProperties);\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */ export const labelProperties = toObjectMap(htmlElementProperties, [\n 'form'\n]);\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */ export const audioProperties = toObjectMap(htmlElementProperties, [\n 'height',\n 'loop',\n 'muted',\n 'preload',\n 'src',\n 'width'\n]);\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */ export const videoProperties = toObjectMap(audioProperties, [\n 'poster'\n]);\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */ export const olProperties = toObjectMap(htmlElementProperties, [\n 'start'\n]);\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */ export const liProperties = toObjectMap(htmlElementProperties, [\n 'value'\n]);\n/**\n * An array of A tag properties and events.\n *\n * @public\n */ export const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download',\n 'href',\n 'hrefLang',\n 'media',\n 'rel',\n 'target',\n 'type'\n]);\n/**\n * An array of TIME tag properties and events.\n *\n * @public\n */ export const timeProperties = toObjectMap(htmlElementProperties, [\n 'dateTime'\n]);\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */ export const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus',\n 'disabled',\n 'form',\n 'formAction',\n 'formEncType',\n 'formMethod',\n 'formNoValidate',\n 'formTarget',\n 'type',\n 'value'\n]);\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */ export const inputProperties = toObjectMap(buttonProperties, [\n 'accept',\n 'alt',\n 'autoCapitalize',\n 'autoComplete',\n 'checked',\n 'dirname',\n 'form',\n 'height',\n 'inputMode',\n 'list',\n 'max',\n 'maxLength',\n 'min',\n 'multiple',\n 'pattern',\n 'placeholder',\n 'readOnly',\n 'required',\n 'src',\n 'step',\n 'size',\n 'type',\n 'value',\n 'width'\n]);\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */ export const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize',\n 'cols',\n 'dirname',\n 'form',\n 'maxLength',\n 'placeholder',\n 'readOnly',\n 'required',\n 'rows',\n 'wrap'\n]);\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */ export const selectProperties = toObjectMap(buttonProperties, [\n 'form',\n 'multiple',\n 'required'\n]);\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected',\n 'value'\n]);\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */ export const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding',\n 'cellSpacing'\n]);\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */ export const trProperties = htmlElementProperties;\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */ export const thProperties = toObjectMap(htmlElementProperties, [\n 'colSpan',\n 'rowSpan',\n 'scope'\n]);\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */ export const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan',\n 'headers',\n 'rowSpan',\n 'scope'\n]);\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span'\n]);\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span'\n]);\n/**\n * An array of FIELDSET tag properties and events.\n *\n * @public\n */ export const fieldsetProperties = toObjectMap(htmlElementProperties, [\n 'disabled',\n 'form'\n]);\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */ export const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset',\n 'action',\n 'encType',\n 'encType',\n 'method',\n 'noValidate',\n 'target'\n]);\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */ export const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow',\n 'allowFullScreen',\n 'allowPaymentRequest',\n 'allowTransparency',\n 'csp',\n 'height',\n 'importance',\n 'referrerPolicy',\n 'sandbox',\n 'src',\n 'srcDoc',\n 'width'\n]);\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */ export const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt',\n 'crossOrigin',\n 'height',\n 'src',\n 'srcSet',\n 'useMap',\n 'width'\n]);\n/**\n * An array of DIALOG tag properties and events.\n *\n * @public\n */ export const dialogProperties = toObjectMap(htmlElementProperties, [\n 'open',\n 'onCancel',\n 'onClose'\n]);\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */ export const divProperties = htmlElementProperties;\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 */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps(// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprops, allowedPropNames, excludedPropNames) {\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 const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result = {};\n const keys = Object.keys(props);\n for (const key of keys){\n const isNativeProp = !isArray && allowedPropNames[key] || isArray && allowedPropNames.indexOf(key) >= 0 || key.indexOf('data-') === 0 || key.indexOf('aria-') === 0;\n if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props[key];\n }\n }\n return result;\n}\n"],"names":["baseElementEvents","baseElementProperties","microdataProperties","htmlElementProperties","labelProperties","audioProperties","videoProperties","olProperties","liProperties","anchorProperties","timeProperties","buttonProperties","inputProperties","textAreaProperties","selectProperties","optionProperties","tableProperties","trProperties","thProperties","tdProperties","colGroupProperties","colProperties","fieldsetProperties","formProperties","iframeProperties","imgProperties","dialogProperties","divProperties","getNativeProps","toObjectMap","items","result","item","keys","Array","isArray","Object","key","props","allowedPropNames","excludedPropNames","isNativeProp","indexOf"],"mappings":";;;;;;;;;;;IAciBA,iBAAiB,MAAjBA;IAsFAC,qBAAqB,MAArBA;IAw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;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAM5B,wBAAwB4B,YAAY;IACjD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAM3B,sBAAsB2B,YAAY;IAC/C;IACA;IACA;IACA;IACA;CACH;AAKU,MAAM1B,wBAAwB0B,YAAY5B,uBAAuBD,mBAAmBE;AAKpF,MAAME,kBAAkByB,YAAY1B,uBAAuB;IAClE;CACH;AAKU,MAAME,kBAAkBwB,YAAY1B,uBAAuB;IAClE;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMG,kBAAkBuB,YAAYxB,iBAAiB;IAC5D;CACH;AAKU,MAAME,eAAesB,YAAY1B,uBAAuB;IAC/D;CACH;AAKU,MAAMK,eAAeqB,YAAY1B,uBAAuB;IAC/D;CACH;AAKU,MAAMM,mBAAmBoB,YAAY1B,uBAAuB;IACnE;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMO,iBAAiBmB,YAAY1B,uBAAuB;IACjE;CACH;AAKU,MAAMQ,mBAAmBkB,YAAY1B,uBAAuB;IACnE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMS,kBAAkBiB,YAAYlB,kBAAkB;IAC7D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAME,qBAAqBgB,YAAYlB,kBAAkB;IAChE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMG,mBAAmBe,YAAYlB,kBAAkB;IAC9D;IACA;IACA;CACH;AACM,MAAMI,mBAAmBc,YAAY1B,uBAAuB;IAC/D;IACA;CACH;AAKU,MAAMa,kBAAkBa,YAAY1B,uBAAuB;IAClE;IACA;CACH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BE,OAAO,CAACL,IAAI,AAAD,MAAO,CAAC,CAAA,GAAI;YACvJ,8DAA8D;YAC9DN,MAAM,CAACM,IAAI,GAAGC,KAAK,CAACD,IAAI;QAC5B,CAAC;IACL;IACA,OAAON;AACX"}
1
+ {"version":3,"sources":["properties.js"],"sourcesContent":["const toObjectMap = (...items)=>{\n const result = {};\n for (const item of items){\n const keys = Array.isArray(item) ? item : Object.keys(item);\n for (const key of keys){\n result[key] = 1;\n }\n }\n return result;\n};\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */ export 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 * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */ export const baseElementProperties = toObjectMap([\n 'accessKey',\n 'children',\n 'className',\n 'contentEditable',\n 'dir',\n 'draggable',\n 'hidden',\n 'htmlFor',\n 'id',\n 'lang',\n 'ref',\n 'role',\n 'style',\n 'tabIndex',\n 'title',\n 'translate',\n 'spellCheck',\n 'name'\n]);\n/**\n * An array of microdata attributes that are allowed on every html element type.\n *\n * @public\n */ export const microdataProperties = toObjectMap([\n 'itemID',\n 'itemProp',\n 'itemRef',\n 'itemScope',\n 'itemType'\n]);\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */ export const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents, microdataProperties);\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */ export const labelProperties = toObjectMap(htmlElementProperties, [\n 'form'\n]);\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */ export const audioProperties = toObjectMap(htmlElementProperties, [\n 'height',\n 'loop',\n 'muted',\n 'preload',\n 'src',\n 'width'\n]);\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */ export const videoProperties = toObjectMap(audioProperties, [\n 'poster'\n]);\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */ export const olProperties = toObjectMap(htmlElementProperties, [\n 'start'\n]);\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */ export const liProperties = toObjectMap(htmlElementProperties, [\n 'value'\n]);\n/**\n * An array of A tag properties and events.\n *\n * @public\n */ export const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download',\n 'href',\n 'hrefLang',\n 'media',\n 'rel',\n 'target',\n 'type'\n]);\n/**\n * An array of TIME tag properties and events.\n *\n * @public\n */ export const timeProperties = toObjectMap(htmlElementProperties, [\n 'dateTime'\n]);\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */ export const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus',\n 'disabled',\n 'form',\n 'formAction',\n 'formEncType',\n 'formMethod',\n 'formNoValidate',\n 'formTarget',\n 'type',\n 'value'\n]);\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */ export const inputProperties = toObjectMap(buttonProperties, [\n 'accept',\n 'alt',\n 'autoCapitalize',\n 'autoComplete',\n 'checked',\n 'dirname',\n 'form',\n 'height',\n 'inputMode',\n 'list',\n 'max',\n 'maxLength',\n 'min',\n 'multiple',\n 'pattern',\n 'placeholder',\n 'readOnly',\n 'required',\n 'src',\n 'step',\n 'size',\n 'type',\n 'value',\n 'width'\n]);\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */ export const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize',\n 'cols',\n 'dirname',\n 'form',\n 'maxLength',\n 'placeholder',\n 'readOnly',\n 'required',\n 'rows',\n 'wrap'\n]);\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */ export const selectProperties = toObjectMap(buttonProperties, [\n 'form',\n 'multiple',\n 'required'\n]);\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected',\n 'value'\n]);\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */ export const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding',\n 'cellSpacing'\n]);\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */ export const trProperties = htmlElementProperties;\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */ export const thProperties = toObjectMap(htmlElementProperties, [\n 'colSpan',\n 'rowSpan',\n 'scope'\n]);\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */ export const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan',\n 'headers',\n 'rowSpan',\n 'scope'\n]);\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span'\n]);\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span'\n]);\n/**\n * An array of FIELDSET tag properties and events.\n *\n * @public\n */ export const fieldsetProperties = toObjectMap(htmlElementProperties, [\n 'disabled',\n 'form'\n]);\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */ export const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset',\n 'action',\n 'encType',\n 'encType',\n 'method',\n 'noValidate',\n 'target'\n]);\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */ export const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow',\n 'allowFullScreen',\n 'allowPaymentRequest',\n 'allowTransparency',\n 'csp',\n 'height',\n 'importance',\n 'referrerPolicy',\n 'sandbox',\n 'src',\n 'srcDoc',\n 'width'\n]);\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */ export const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt',\n 'crossOrigin',\n 'height',\n 'src',\n 'srcSet',\n 'useMap',\n 'width'\n]);\n/**\n * An array of DIALOG tag properties and events.\n *\n * @public\n */ export const dialogProperties = toObjectMap(htmlElementProperties, [\n 'open',\n 'onCancel',\n 'onClose'\n]);\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */ export const divProperties = htmlElementProperties;\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 */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps(// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprops, allowedPropNames, excludedPropNames) {\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 const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result = {};\n const keys = Object.keys(props);\n for (const key of keys){\n const isNativeProp = !isArray && allowedPropNames[key] || isArray && allowedPropNames.indexOf(key) >= 0 || key.indexOf('data-') === 0 || key.indexOf('aria-') === 0;\n if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props[key];\n }\n }\n return result;\n}\n"],"names":["baseElementEvents","baseElementProperties","microdataProperties","htmlElementProperties","labelProperties","audioProperties","videoProperties","olProperties","liProperties","anchorProperties","timeProperties","buttonProperties","inputProperties","textAreaProperties","selectProperties","optionProperties","tableProperties","trProperties","thProperties","tdProperties","colGroupProperties","colProperties","fieldsetProperties","formProperties","iframeProperties","imgProperties","dialogProperties","divProperties","getNativeProps","toObjectMap","items","result","item","keys","Array","isArray","Object","key","props","allowedPropNames","excludedPropNames","isNativeProp","indexOf"],"mappings":";;;;;;;;;;;IAciBA,iBAAiB,MAAjBA;IAwFAC,qBAAqB,MAArBA;IAwBAC,mBAAmB,MAAnBA;IAWAC,qBAAqB,MAArBA;IAKAC,eAAe,MAAfA;IAOAC,eAAe,MAAfA;IAYAC,eAAe,MAAfA;IAOAC,YAAY,MAAZA;IAOAC,YAAY,MAAZA;IAOAC,gBAAgB,MAAhBA;IAaAC,cAAc,MAAdA;IAOAC,gBAAgB,MAAhBA;IAgBAC,eAAe,MAAfA;IA8BAC,kBAAkB,MAAlBA;IAgBAC,gBAAgB,MAAhBA;IAKJC,gBAAgB,MAAhBA;IAQIC,eAAe,MAAfA;IAQAC,YAAY,MAAZA;IAKAC,YAAY,MAAZA;IASAC,YAAY,MAAZA;IAMJC,kBAAkB,MAAlBA;IAGAC,aAAa,MAAbA;IAOIC,kBAAkB,MAAlBA;IAQAC,cAAc,MAAdA;IAaAC,gBAAgB,MAAhBA;IAkBAC,aAAa,MAAbA;IAaAC,gBAAgB,MAAhBA;IASAC,aAAa,MAAbA;IAgBDC,cAAc,MAAdA;;AAxYhB,MAAMC,cAAc,CAAC,GAAGC,QAAQ;IAC5B,MAAMC,SAAS,CAAC;IAChB,KAAK,MAAMC,QAAQF,MAAM;QACrB,MAAMG,OAAOC,MAAMC,OAAO,CAACH,QAAQA,OAAOI,OAAOH,IAAI,CAACD,KAAK;QAC3D,KAAK,MAAMK,OAAOJ,KAAK;YACnBF,MAAM,CAACM,IAAI,GAAG;QAClB;IACJ;IACA,OAAON;AACX;AAKW,MAAM/B,oBAAoB6B,YAAY;IAC7C;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;CACH;AAKU,MAAM5B,wBAAwB4B,YAAY;IACjD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAM3B,sBAAsB2B,YAAY;IAC/C;IACA;IACA;IACA;IACA;CACH;AAKU,MAA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MAAMmB,qBAAqBO,YAAY1B,uBAAuB;IACrE;IACA;CACH;AAKU,MAAMoB,iBAAiBM,YAAY1B,uBAAuB;IACjE;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMqB,mBAAmBK,YAAY1B,uBAAuB;IACnE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMsB,gBAAgBI,YAAY1B,uBAAuB;IAChE;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAKU,MAAMuB,mBAAmBG,YAAY1B,uBAAuB;IACnE;IACA;IACA;CACH;AAKU,MAAMwB,gBAAgBxB;AAgB1B,SAASyB,eAChBU,KAAK,EAAEC,gBAAgB,EAAEC,iBAAiB,EAAE;IACxC,6GAA6G;IAC7G,2GAA2G;IAC3G,2GAA2G;IAC3G,uBAAuB;IACvB,0GAA0G;IAC1G,MAAML,UAAUD,MAAMC,OAAO,CAACI;IAC9B,8DAA8D;IAC9D,MAAMR,SAAS,CAAC;IAChB,MAAME,OAAOG,OAAOH,IAAI,CAACK;IACzB,KAAK,MAAMD,OAAOJ,KAAK;QACnB,MAAMQ,eAAe,CAACN,WAAWI,gBAAgB,CAACF,IAAI,IAAIF,WAAWI,iBAAiBG,OAAO,CAACL,QAAQ,KAAKA,IAAIK,OAAO,CAAC,aAAa,KAAKL,IAAIK,OAAO,CAAC,aAAa;QAClK,IAAID,gBAAiB,CAAA,CAACD,qBAAqB,AAACA,CAAAA,sBAAsB,IAAI,IAAIA,sBAAsB,KAAK,IAAI,KAAK,IAAIA,kBAAkBE,OAAO,CAACL,IAAI,AAAD,MAAO,CAAC,CAAA,GAAI;YACvJ,8DAA8D;YAC9DN,MAAM,CAACM,IAAI,GAAGC,KAAK,CAACD,IAAI;QAC5B,CAAC;IACL;IACA,OAAON;AACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-utilities",
3
- "version": "9.9.2",
3
+ "version": "9.9.3",
4
4
  "description": "A set of general React-specific utilities.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",