@iconify/react
Advanced tools
Comparing version 3.1.0-beta.3 to 3.1.0-beta.5
@@ -29,6 +29,6 @@ import { default as React_2 } from 'react'; | ||
declare interface APIIconAttributes { | ||
// True if icon is hidden. | ||
// Used in icon sets to keep icons that no longer exist, but should still be accessible | ||
// from API, preventing websites from breaking when icon is removed by developer. | ||
hidden?: boolean; | ||
// True if icon is hidden. | ||
// Used in icon sets to keep icons that no longer exist, but should still be accessible | ||
// from API, preventing websites from breaking when icon is removed by developer. | ||
hidden?: boolean; | ||
} | ||
@@ -85,3 +85,3 @@ | ||
*/ | ||
export declare const Icon: React_2.ForwardRefExoticComponent<Pick<IconProps, "string" | "end" | "local" | "color" | "clip" | "slice" | "style" | "inline" | "flip" | "fill" | "stroke" | "x" | "y" | "icon" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "unicodeRange" | "orientation" | "path" | "children" | "key" | "origin" | "name" | "hAlign" | "vAlign" | "hFlip" | "vFlip" | "className" | "id" | "lang" | "max" | "media" | "method" | "min" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unitsPerEm" | "vAlphabetic" | "values" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align"> & React_2.RefAttributes<IconRef>>; | ||
export declare const Icon: React_2.ForwardRefExoticComponent<Pick<IconProps, "string" | "slice" | "end" | "local" | "color" | "clip" | "style" | "inline" | "flip" | "fill" | "stroke" | "x" | "y" | "icon" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "values" | "path" | "children" | "key" | "crossOrigin" | "href" | "max" | "media" | "method" | "min" | "name" | "className" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "target" | "type" | "accentHeight" | "accumulate" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "hFlip" | "vFlip" | "hAlign" | "vAlign"> & React_2.RefAttributes<IconRef>>; | ||
@@ -97,8 +97,8 @@ /** | ||
declare interface IconifyAlias extends IconifyOptional { | ||
// Parent icon index without prefix, required. | ||
parent: string; | ||
// Parent icon index without prefix, required. | ||
parent: string; | ||
// IconifyOptional properties. | ||
// Alias should have only properties that it overrides. | ||
// Transformations are merged, not overridden. See IconifyTransformations comments. | ||
// IconifyOptional properties. | ||
// Alias should have only properties that it overrides. | ||
// Transformations are merged, not overridden. See IconifyTransformations comments. | ||
} | ||
@@ -110,4 +110,4 @@ | ||
declare interface IconifyAliases { | ||
// Index is name of icon, without prefix. Value is ExtendedIconifyAlias object. | ||
[index: string]: ExtendedIconifyAlias; | ||
// Index is name of icon, without prefix. Value is ExtendedIconifyAlias object. | ||
[index: string]: ExtendedIconifyAlias; | ||
} | ||
@@ -233,6 +233,6 @@ | ||
declare interface IconifyCategories { | ||
// Index is category title, such as "Weather". | ||
// Value is array of icons that belong to that category. | ||
// Each icon can belong to multiple categories or no categories. | ||
[index: string]: string[]; | ||
// Index is category title, such as "Weather". | ||
// Value is array of icons that belong to that category. | ||
// Each icon can belong to multiple categories or no categories. | ||
[index: string]: string[]; | ||
} | ||
@@ -244,5 +244,5 @@ | ||
declare interface IconifyChars { | ||
// Index is character, such as "f000". | ||
// Value is icon name. | ||
[index: string]: string; | ||
// Index is character, such as "f000". | ||
// Value is icon name. | ||
[index: string]: string; | ||
} | ||
@@ -259,17 +259,17 @@ | ||
declare interface IconifyDimenisons { | ||
// Left position of viewBox. | ||
// Defaults to 0. | ||
left?: number; | ||
// Left position of viewBox. | ||
// Defaults to 0. | ||
left?: number; | ||
// Top position of viewBox. | ||
// Defaults to 0. | ||
top?: number; | ||
// Top position of viewBox. | ||
// Defaults to 0. | ||
top?: number; | ||
// Width of viewBox. | ||
// Defaults to 16. | ||
width?: number; | ||
// Width of viewBox. | ||
// Defaults to 16. | ||
width?: number; | ||
// Height of viewBox. | ||
// Defaults to 16. | ||
height?: number; | ||
// Height of viewBox. | ||
// Defaults to 16. | ||
height?: number; | ||
} | ||
@@ -291,7 +291,7 @@ | ||
export declare interface IconifyIcon extends IconifyOptional { | ||
// Icon body: <path d="..." />, required. | ||
body: string; | ||
// Icon body: <path d="..." />, required. | ||
body: string; | ||
// IconifyOptional properties. | ||
// If property is missing in JSON file, look in root object for default value. | ||
// IconifyOptional properties. | ||
// If property is missing in JSON file, look in root object for default value. | ||
} | ||
@@ -362,4 +362,4 @@ | ||
declare interface IconifyIcons { | ||
// Index is name of icon, without prefix. Value is ExtendedIconifyIcon object. | ||
[index: string]: ExtendedIconifyIcon; | ||
// Index is name of icon, without prefix. Value is ExtendedIconifyIcon object. | ||
[index: string]: ExtendedIconifyIcon; | ||
} | ||
@@ -376,47 +376,47 @@ | ||
declare interface IconifyInfo { | ||
// Icon set name. | ||
name: string; | ||
// Icon set name. | ||
name: string; | ||
// Total number of icons. | ||
total?: number; | ||
// Total number of icons. | ||
total?: number; | ||
// Version string. | ||
version?: string; | ||
// Version string. | ||
version?: string; | ||
// Author information. | ||
author: { | ||
// Author name. | ||
name: string; | ||
// Author information. | ||
author: { | ||
// Author name. | ||
name: string; | ||
// Link to author's website or icon set website. | ||
url?: string; | ||
}; | ||
// Link to author's website or icon set website. | ||
url?: string; | ||
}; | ||
// License | ||
license: { | ||
// Human readable license. | ||
title: string; | ||
// License | ||
license: { | ||
// Human readable license. | ||
title: string; | ||
// SPDX license identifier. | ||
spdx?: string; | ||
// SPDX license identifier. | ||
spdx?: string; | ||
// License URL. | ||
url?: string; | ||
}; | ||
// License URL. | ||
url?: string; | ||
}; | ||
// Array of icons that should be used for samples in icon sets list. | ||
samples: string[]; | ||
// Array of icons that should be used for samples in icon sets list. | ||
samples: string[]; | ||
// Icon grid: number or array of numbers. | ||
height?: number | number[]; | ||
// Icon grid: number or array of numbers. | ||
height?: number | number[]; | ||
// Display height for samples: 16 - 24 | ||
displayHeight?: number; | ||
// Display height for samples: 16 - 24 | ||
displayHeight?: number; | ||
// Category on Iconify collections list. | ||
category?: string; | ||
// Category on Iconify collections list. | ||
category?: string; | ||
// Palette status. True if icons have predefined color scheme, false if icons use currentColor. | ||
// Icon set should not mix icons with and without palette to simplify search. | ||
palette: boolean; | ||
// Palette status. True if icons have predefined color scheme, false if icons use currentColor. | ||
// Icon set should not mix icons with and without palette to simplify search. | ||
palette: boolean; | ||
} | ||
@@ -429,21 +429,26 @@ | ||
*/ | ||
export declare interface IconifyJSON extends IconifyOptional, IconifyMetaData { | ||
// Prefix for icons in JSON file, required. | ||
prefix: string; | ||
export declare interface IconifyJSON extends IconifyJSONIconsData, IconifyMetaData { | ||
// Optional list of missing icons. Returned by Iconify API when querying for icons that do not exist. | ||
not_found?: string[]; | ||
} | ||
// API provider, optional. | ||
provider?: string; | ||
/** | ||
* JSON structure, contains only icon data | ||
*/ | ||
declare interface IconifyJSONIconsData extends IconifyOptional { | ||
// Prefix for icons in JSON file, required. | ||
prefix: string; | ||
// List of icons, required. | ||
icons: IconifyIcons; | ||
// API provider, optional. | ||
provider?: string; | ||
// Optional aliases. | ||
aliases?: IconifyAliases; | ||
// List of icons, required. | ||
icons: IconifyIcons; | ||
// Optional list of missing icons. Returned by Iconify API when querying for icons that do not exist. | ||
not_found?: string[]; | ||
// Optional aliases. | ||
aliases?: IconifyAliases; | ||
// IconifyOptional properties that are used as default values for icons when icon is missing value. | ||
// If property exists in both icon and root, use value from icon. | ||
// This is used to reduce duplication. | ||
// IconifyOptional properties that are used as default values for icons when icon is missing value. | ||
// If property exists in both icon and root, use value from icon. | ||
// This is used to reduce duplication. | ||
} | ||
@@ -460,17 +465,17 @@ | ||
declare interface IconifyMetaData { | ||
// Icon set information block. Used for public icon sets, can be skipped for private icon sets. | ||
info?: IconifyInfo; | ||
// Icon set information block. Used for public icon sets, can be skipped for private icon sets. | ||
info?: IconifyInfo; | ||
// Characters used in font. Used for searching by character for icon sets imported from font, exporting icon set to font. | ||
chars?: IconifyChars; | ||
// Characters used in font. Used for searching by character for icon sets imported from font, exporting icon set to font. | ||
chars?: IconifyChars; | ||
// Categories. Used for filtering icons. | ||
categories?: IconifyCategories; | ||
// Categories. Used for filtering icons. | ||
categories?: IconifyCategories; | ||
// Optional themes (old format). | ||
themes?: LegacyIconifyThemes; | ||
// Optional themes (old format). | ||
themes?: LegacyIconifyThemes; | ||
// Optional themes (new format). Key is prefix or suffix, value is title. | ||
prefixes?: Record<string, string>; | ||
suffixes?: Record<string, string>; | ||
// Optional themes (new format). Key is prefix or suffix, value is title. | ||
prefixes?: Record<string, string>; | ||
suffixes?: Record<string, string>; | ||
} | ||
@@ -484,3 +489,3 @@ | ||
IconifyTransformations { | ||
// | ||
// | ||
} | ||
@@ -523,15 +528,15 @@ | ||
declare interface IconifyTransformations { | ||
// Number of 90 degrees rotations. | ||
// 0 = 0, 1 = 90deg and so on. | ||
// Defaults to 0. | ||
// When merged (such as alias + icon), result is icon.rotation + alias.rotation. | ||
rotate?: number; | ||
// Number of 90 degrees rotations. | ||
// 0 = 0, 1 = 90deg and so on. | ||
// Defaults to 0. | ||
// When merged (such as alias + icon), result is icon.rotation + alias.rotation. | ||
rotate?: number; | ||
// Horizontal flip. | ||
// Defaults to false. | ||
// When merged, result is icon.hFlip !== alias.hFlip | ||
hFlip?: boolean; | ||
// Horizontal flip. | ||
// Defaults to false. | ||
// When merged, result is icon.hFlip !== alias.hFlip | ||
hFlip?: boolean; | ||
// Vertical flip. (see hFlip comments) | ||
vFlip?: boolean; | ||
// Vertical flip. (see hFlip comments) | ||
vFlip?: boolean; | ||
} | ||
@@ -553,3 +558,3 @@ | ||
*/ | ||
export declare const InlineIcon: React_2.ForwardRefExoticComponent<Pick<IconProps, "string" | "end" | "local" | "color" | "clip" | "slice" | "style" | "inline" | "flip" | "fill" | "stroke" | "x" | "y" | "icon" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "unicodeRange" | "orientation" | "path" | "children" | "key" | "origin" | "name" | "hAlign" | "vAlign" | "hFlip" | "vFlip" | "className" | "id" | "lang" | "max" | "media" | "method" | "min" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unitsPerEm" | "vAlphabetic" | "values" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align"> & React_2.RefAttributes<IconRef>>; | ||
export declare const InlineIcon: React_2.ForwardRefExoticComponent<Pick<IconProps, "string" | "slice" | "end" | "local" | "color" | "clip" | "style" | "inline" | "flip" | "fill" | "stroke" | "x" | "y" | "icon" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "values" | "path" | "children" | "key" | "crossOrigin" | "href" | "max" | "media" | "method" | "min" | "name" | "className" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "target" | "type" | "accentHeight" | "accumulate" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "hFlip" | "vFlip" | "hAlign" | "vAlign"> & React_2.RefAttributes<IconRef>>; | ||
@@ -562,11 +567,11 @@ /** | ||
declare interface LegacyIconifyThemes { | ||
// Key is unique string. | ||
[index: string]: { | ||
// Theme title. | ||
title: string; | ||
// Key is unique string. | ||
[index: string]: { | ||
// Theme title. | ||
title: string; | ||
// Icon prefix or suffix, including dash. All icons that start with prefix and end with suffix belong to theme. | ||
prefix?: string; // Example: 'baseline-' | ||
suffix?: string; // Example: '-filled' | ||
}; | ||
// Icon prefix or suffix, including dash. All icons that start with prefix and end with suffix belong to theme. | ||
prefix?: string; // Example: 'baseline-' | ||
suffix?: string; // Example: '-filled' | ||
}; | ||
} | ||
@@ -674,2 +679,15 @@ | ||
/** | ||
* IDs usage: | ||
* | ||
* id="{id}" | ||
* xlink:href="#{id}" | ||
* url(#{id}) | ||
* | ||
* From SVG animations: | ||
* | ||
* begin="0;{id}.end" | ||
* begin="{id}.end" | ||
* begin="{id}.click" | ||
*/ | ||
/** | ||
* Replace IDs in SVG output with unique IDs | ||
@@ -676,0 +694,0 @@ * Fast replacement without parsing XML, assuming commonly used patterns and clean XML (icon should have been cleaned up with Iconify Tools or SVGO). |
@@ -512,8 +512,7 @@ 'use strict'; | ||
var regex = /\sid="(\S+)"/g; | ||
var replaceValue = "([^A-Za-z0-9_-])"; | ||
function escapeRegExp(str) { | ||
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); | ||
} | ||
var randomPrefix = "IconifyId-" + Date.now().toString(16) + "-" + (Math.random() * 16777216 | 0).toString(16) + "-"; | ||
var counter = 0; | ||
function isQuote(char) { | ||
return char === '"' || char === "'"; | ||
} | ||
function replaceIDs(body, prefix = randomPrefix) { | ||
@@ -528,5 +527,30 @@ const ids = []; | ||
} | ||
ids.sort((a, b) => b.length - a.length); | ||
ids.forEach((id) => { | ||
const newID = typeof prefix === "function" ? prefix() : prefix + counter++; | ||
body = body.replace(new RegExp(replaceValue + "(" + escapeRegExp(id) + ")" + replaceValue, "g"), "$1" + newID + "$3"); | ||
const parts = body.split(id); | ||
let lastPart = parts.shift(); | ||
body = lastPart; | ||
parts.forEach((part) => { | ||
if (!part.length) { | ||
body += id + part; | ||
lastPart += id + part; | ||
return; | ||
} | ||
const lastChar = lastPart.slice(lastPart.length - 1); | ||
const nextChar = part.slice(0, 1); | ||
function test() { | ||
if (lastChar === "#") { | ||
return isQuote(nextChar) || nextChar === ")"; | ||
} | ||
const isAnimationDot = nextChar === "." && !!part.slice(1, 2).match(/\w/); | ||
if (isQuote(lastChar) || lastChar === ";") { | ||
return isQuote(nextChar) || isAnimationDot; | ||
} | ||
return false; | ||
} | ||
const success = test(); | ||
body += (success ? newID : id) + part; | ||
lastPart = part; | ||
}); | ||
}); | ||
@@ -1760,3 +1784,3 @@ return body; | ||
} | ||
return React__default['default'].createElement('svg', componentProps); | ||
return React__default["default"].createElement('svg', componentProps); | ||
}; | ||
@@ -1841,3 +1865,3 @@ | ||
} | ||
class IconComponent extends React__default['default'].Component { | ||
class IconComponent extends React__default["default"].Component { | ||
constructor(props) { | ||
@@ -1967,3 +1991,3 @@ super(props); | ||
? props.children | ||
: React__default['default'].createElement('span', {}); | ||
: React__default["default"].createElement('span', {}); | ||
} | ||
@@ -1989,3 +2013,3 @@ // Add classes | ||
*/ | ||
const Icon = React__default['default'].forwardRef(function Icon(props, ref) { | ||
const Icon = React__default["default"].forwardRef(function Icon(props, ref) { | ||
const newProps = { | ||
@@ -1996,3 +2020,3 @@ ...props, | ||
}; | ||
return React__default['default'].createElement(IconComponent, newProps); | ||
return React__default["default"].createElement(IconComponent, newProps); | ||
}); | ||
@@ -2004,5 +2028,5 @@ /** | ||
*/ | ||
const InlineIcon = React__default['default'].forwardRef(function InlineIcon(props, ref) { | ||
const InlineIcon = React__default["default"].forwardRef(function InlineIcon(props, ref) { | ||
const newProps = { ...props, _ref: ref, _inline: true }; | ||
return React__default['default'].createElement(IconComponent, newProps); | ||
return React__default["default"].createElement(IconComponent, newProps); | ||
}); | ||
@@ -2009,0 +2033,0 @@ /** |
@@ -25,6 +25,6 @@ import { default as React_2 } from 'react'; | ||
declare interface APIIconAttributes { | ||
// True if icon is hidden. | ||
// Used in icon sets to keep icons that no longer exist, but should still be accessible | ||
// from API, preventing websites from breaking when icon is removed by developer. | ||
hidden?: boolean; | ||
// True if icon is hidden. | ||
// Used in icon sets to keep icons that no longer exist, but should still be accessible | ||
// from API, preventing websites from breaking when icon is removed by developer. | ||
hidden?: boolean; | ||
} | ||
@@ -41,3 +41,3 @@ | ||
*/ | ||
export declare const Icon: React_2.ForwardRefExoticComponent<Pick<IconProps, "string" | "end" | "local" | "color" | "clip" | "slice" | "style" | "inline" | "flip" | "fill" | "stroke" | "x" | "y" | "icon" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "unicodeRange" | "orientation" | "path" | "children" | "key" | "origin" | "name" | "hAlign" | "vAlign" | "hFlip" | "vFlip" | "className" | "id" | "lang" | "max" | "media" | "method" | "min" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unitsPerEm" | "vAlphabetic" | "values" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align"> & React_2.RefAttributes<IconRef>>; | ||
export declare const Icon: React_2.ForwardRefExoticComponent<Pick<IconProps, "string" | "slice" | "end" | "local" | "color" | "clip" | "style" | "inline" | "flip" | "fill" | "stroke" | "x" | "y" | "icon" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "values" | "path" | "children" | "key" | "crossOrigin" | "href" | "max" | "media" | "method" | "min" | "name" | "className" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "target" | "type" | "accentHeight" | "accumulate" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "hFlip" | "vFlip" | "hAlign" | "vAlign"> & React_2.RefAttributes<IconRef>>; | ||
@@ -48,8 +48,8 @@ /** | ||
declare interface IconifyAlias extends IconifyOptional { | ||
// Parent icon index without prefix, required. | ||
parent: string; | ||
// Parent icon index without prefix, required. | ||
parent: string; | ||
// IconifyOptional properties. | ||
// Alias should have only properties that it overrides. | ||
// Transformations are merged, not overridden. See IconifyTransformations comments. | ||
// IconifyOptional properties. | ||
// Alias should have only properties that it overrides. | ||
// Transformations are merged, not overridden. See IconifyTransformations comments. | ||
} | ||
@@ -61,4 +61,4 @@ | ||
declare interface IconifyAliases { | ||
// Index is name of icon, without prefix. Value is ExtendedIconifyAlias object. | ||
[index: string]: ExtendedIconifyAlias; | ||
// Index is name of icon, without prefix. Value is ExtendedIconifyAlias object. | ||
[index: string]: ExtendedIconifyAlias; | ||
} | ||
@@ -70,6 +70,6 @@ | ||
declare interface IconifyCategories { | ||
// Index is category title, such as "Weather". | ||
// Value is array of icons that belong to that category. | ||
// Each icon can belong to multiple categories or no categories. | ||
[index: string]: string[]; | ||
// Index is category title, such as "Weather". | ||
// Value is array of icons that belong to that category. | ||
// Each icon can belong to multiple categories or no categories. | ||
[index: string]: string[]; | ||
} | ||
@@ -81,5 +81,5 @@ | ||
declare interface IconifyChars { | ||
// Index is character, such as "f000". | ||
// Value is icon name. | ||
[index: string]: string; | ||
// Index is character, such as "f000". | ||
// Value is icon name. | ||
[index: string]: string; | ||
} | ||
@@ -96,17 +96,17 @@ | ||
declare interface IconifyDimenisons { | ||
// Left position of viewBox. | ||
// Defaults to 0. | ||
left?: number; | ||
// Left position of viewBox. | ||
// Defaults to 0. | ||
left?: number; | ||
// Top position of viewBox. | ||
// Defaults to 0. | ||
top?: number; | ||
// Top position of viewBox. | ||
// Defaults to 0. | ||
top?: number; | ||
// Width of viewBox. | ||
// Defaults to 16. | ||
width?: number; | ||
// Width of viewBox. | ||
// Defaults to 16. | ||
width?: number; | ||
// Height of viewBox. | ||
// Defaults to 16. | ||
height?: number; | ||
// Height of viewBox. | ||
// Defaults to 16. | ||
height?: number; | ||
} | ||
@@ -128,7 +128,7 @@ | ||
export declare interface IconifyIcon extends IconifyOptional { | ||
// Icon body: <path d="..." />, required. | ||
body: string; | ||
// Icon body: <path d="..." />, required. | ||
body: string; | ||
// IconifyOptional properties. | ||
// If property is missing in JSON file, look in root object for default value. | ||
// IconifyOptional properties. | ||
// If property is missing in JSON file, look in root object for default value. | ||
} | ||
@@ -179,4 +179,4 @@ | ||
declare interface IconifyIcons { | ||
// Index is name of icon, without prefix. Value is ExtendedIconifyIcon object. | ||
[index: string]: ExtendedIconifyIcon; | ||
// Index is name of icon, without prefix. Value is ExtendedIconifyIcon object. | ||
[index: string]: ExtendedIconifyIcon; | ||
} | ||
@@ -193,47 +193,47 @@ | ||
declare interface IconifyInfo { | ||
// Icon set name. | ||
name: string; | ||
// Icon set name. | ||
name: string; | ||
// Total number of icons. | ||
total?: number; | ||
// Total number of icons. | ||
total?: number; | ||
// Version string. | ||
version?: string; | ||
// Version string. | ||
version?: string; | ||
// Author information. | ||
author: { | ||
// Author name. | ||
name: string; | ||
// Author information. | ||
author: { | ||
// Author name. | ||
name: string; | ||
// Link to author's website or icon set website. | ||
url?: string; | ||
}; | ||
// Link to author's website or icon set website. | ||
url?: string; | ||
}; | ||
// License | ||
license: { | ||
// Human readable license. | ||
title: string; | ||
// License | ||
license: { | ||
// Human readable license. | ||
title: string; | ||
// SPDX license identifier. | ||
spdx?: string; | ||
// SPDX license identifier. | ||
spdx?: string; | ||
// License URL. | ||
url?: string; | ||
}; | ||
// License URL. | ||
url?: string; | ||
}; | ||
// Array of icons that should be used for samples in icon sets list. | ||
samples: string[]; | ||
// Array of icons that should be used for samples in icon sets list. | ||
samples: string[]; | ||
// Icon grid: number or array of numbers. | ||
height?: number | number[]; | ||
// Icon grid: number or array of numbers. | ||
height?: number | number[]; | ||
// Display height for samples: 16 - 24 | ||
displayHeight?: number; | ||
// Display height for samples: 16 - 24 | ||
displayHeight?: number; | ||
// Category on Iconify collections list. | ||
category?: string; | ||
// Category on Iconify collections list. | ||
category?: string; | ||
// Palette status. True if icons have predefined color scheme, false if icons use currentColor. | ||
// Icon set should not mix icons with and without palette to simplify search. | ||
palette: boolean; | ||
// Palette status. True if icons have predefined color scheme, false if icons use currentColor. | ||
// Icon set should not mix icons with and without palette to simplify search. | ||
palette: boolean; | ||
} | ||
@@ -246,21 +246,26 @@ | ||
*/ | ||
export declare interface IconifyJSON extends IconifyOptional, IconifyMetaData { | ||
// Prefix for icons in JSON file, required. | ||
prefix: string; | ||
export declare interface IconifyJSON extends IconifyJSONIconsData, IconifyMetaData { | ||
// Optional list of missing icons. Returned by Iconify API when querying for icons that do not exist. | ||
not_found?: string[]; | ||
} | ||
// API provider, optional. | ||
provider?: string; | ||
/** | ||
* JSON structure, contains only icon data | ||
*/ | ||
declare interface IconifyJSONIconsData extends IconifyOptional { | ||
// Prefix for icons in JSON file, required. | ||
prefix: string; | ||
// List of icons, required. | ||
icons: IconifyIcons; | ||
// API provider, optional. | ||
provider?: string; | ||
// Optional aliases. | ||
aliases?: IconifyAliases; | ||
// List of icons, required. | ||
icons: IconifyIcons; | ||
// Optional list of missing icons. Returned by Iconify API when querying for icons that do not exist. | ||
not_found?: string[]; | ||
// Optional aliases. | ||
aliases?: IconifyAliases; | ||
// IconifyOptional properties that are used as default values for icons when icon is missing value. | ||
// If property exists in both icon and root, use value from icon. | ||
// This is used to reduce duplication. | ||
// IconifyOptional properties that are used as default values for icons when icon is missing value. | ||
// If property exists in both icon and root, use value from icon. | ||
// This is used to reduce duplication. | ||
} | ||
@@ -272,17 +277,17 @@ | ||
declare interface IconifyMetaData { | ||
// Icon set information block. Used for public icon sets, can be skipped for private icon sets. | ||
info?: IconifyInfo; | ||
// Icon set information block. Used for public icon sets, can be skipped for private icon sets. | ||
info?: IconifyInfo; | ||
// Characters used in font. Used for searching by character for icon sets imported from font, exporting icon set to font. | ||
chars?: IconifyChars; | ||
// Characters used in font. Used for searching by character for icon sets imported from font, exporting icon set to font. | ||
chars?: IconifyChars; | ||
// Categories. Used for filtering icons. | ||
categories?: IconifyCategories; | ||
// Categories. Used for filtering icons. | ||
categories?: IconifyCategories; | ||
// Optional themes (old format). | ||
themes?: LegacyIconifyThemes; | ||
// Optional themes (old format). | ||
themes?: LegacyIconifyThemes; | ||
// Optional themes (new format). Key is prefix or suffix, value is title. | ||
prefixes?: Record<string, string>; | ||
suffixes?: Record<string, string>; | ||
// Optional themes (new format). Key is prefix or suffix, value is title. | ||
prefixes?: Record<string, string>; | ||
suffixes?: Record<string, string>; | ||
} | ||
@@ -296,3 +301,3 @@ | ||
IconifyTransformations { | ||
// | ||
// | ||
} | ||
@@ -309,15 +314,15 @@ | ||
declare interface IconifyTransformations { | ||
// Number of 90 degrees rotations. | ||
// 0 = 0, 1 = 90deg and so on. | ||
// Defaults to 0. | ||
// When merged (such as alias + icon), result is icon.rotation + alias.rotation. | ||
rotate?: number; | ||
// Number of 90 degrees rotations. | ||
// 0 = 0, 1 = 90deg and so on. | ||
// Defaults to 0. | ||
// When merged (such as alias + icon), result is icon.rotation + alias.rotation. | ||
rotate?: number; | ||
// Horizontal flip. | ||
// Defaults to false. | ||
// When merged, result is icon.hFlip !== alias.hFlip | ||
hFlip?: boolean; | ||
// Horizontal flip. | ||
// Defaults to false. | ||
// When merged, result is icon.hFlip !== alias.hFlip | ||
hFlip?: boolean; | ||
// Vertical flip. (see hFlip comments) | ||
vFlip?: boolean; | ||
// Vertical flip. (see hFlip comments) | ||
vFlip?: boolean; | ||
} | ||
@@ -339,3 +344,3 @@ | ||
*/ | ||
export declare const InlineIcon: React_2.ForwardRefExoticComponent<Pick<IconProps, "string" | "end" | "local" | "color" | "clip" | "slice" | "style" | "inline" | "flip" | "fill" | "stroke" | "x" | "y" | "icon" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "unicodeRange" | "orientation" | "path" | "children" | "key" | "origin" | "name" | "hAlign" | "vAlign" | "hFlip" | "vFlip" | "className" | "id" | "lang" | "max" | "media" | "method" | "min" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unitsPerEm" | "vAlphabetic" | "values" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align"> & React_2.RefAttributes<IconRef>>; | ||
export declare const InlineIcon: React_2.ForwardRefExoticComponent<Pick<IconProps, "string" | "slice" | "end" | "local" | "color" | "clip" | "style" | "inline" | "flip" | "fill" | "stroke" | "x" | "y" | "icon" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "values" | "path" | "children" | "key" | "crossOrigin" | "href" | "max" | "media" | "method" | "min" | "name" | "className" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "target" | "type" | "accentHeight" | "accumulate" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "hFlip" | "vFlip" | "hAlign" | "vAlign"> & React_2.RefAttributes<IconRef>>; | ||
@@ -348,11 +353,11 @@ /** | ||
declare interface LegacyIconifyThemes { | ||
// Key is unique string. | ||
[index: string]: { | ||
// Theme title. | ||
title: string; | ||
// Key is unique string. | ||
[index: string]: { | ||
// Theme title. | ||
title: string; | ||
// Icon prefix or suffix, including dash. All icons that start with prefix and end with suffix belong to theme. | ||
prefix?: string; // Example: 'baseline-' | ||
suffix?: string; // Example: '-filled' | ||
}; | ||
// Icon prefix or suffix, including dash. All icons that start with prefix and end with suffix belong to theme. | ||
prefix?: string; // Example: 'baseline-' | ||
suffix?: string; // Example: '-filled' | ||
}; | ||
} | ||
@@ -359,0 +364,0 @@ |
@@ -407,8 +407,7 @@ 'use strict'; | ||
var regex = /\sid="(\S+)"/g; | ||
var replaceValue = "([^A-Za-z0-9_-])"; | ||
function escapeRegExp(str) { | ||
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); | ||
} | ||
var randomPrefix = "IconifyId-" + Date.now().toString(16) + "-" + (Math.random() * 16777216 | 0).toString(16) + "-"; | ||
var counter = 0; | ||
function isQuote(char) { | ||
return char === '"' || char === "'"; | ||
} | ||
function replaceIDs(body, prefix = randomPrefix) { | ||
@@ -423,5 +422,30 @@ const ids = []; | ||
} | ||
ids.sort((a, b) => b.length - a.length); | ||
ids.forEach((id) => { | ||
const newID = typeof prefix === "function" ? prefix() : prefix + counter++; | ||
body = body.replace(new RegExp(replaceValue + "(" + escapeRegExp(id) + ")" + replaceValue, "g"), "$1" + newID + "$3"); | ||
const parts = body.split(id); | ||
let lastPart = parts.shift(); | ||
body = lastPart; | ||
parts.forEach((part) => { | ||
if (!part.length) { | ||
body += id + part; | ||
lastPart += id + part; | ||
return; | ||
} | ||
const lastChar = lastPart.slice(lastPart.length - 1); | ||
const nextChar = part.slice(0, 1); | ||
function test() { | ||
if (lastChar === "#") { | ||
return isQuote(nextChar) || nextChar === ")"; | ||
} | ||
const isAnimationDot = nextChar === "." && !!part.slice(1, 2).match(/\w/); | ||
if (isQuote(lastChar) || lastChar === ";") { | ||
return isQuote(nextChar) || isAnimationDot; | ||
} | ||
return false; | ||
} | ||
const success = test(); | ||
body += (success ? newID : id) + part; | ||
lastPart = part; | ||
}); | ||
}); | ||
@@ -543,3 +567,3 @@ return body; | ||
} | ||
return React__default['default'].createElement('svg', componentProps); | ||
return React__default["default"].createElement('svg', componentProps); | ||
}; | ||
@@ -567,3 +591,3 @@ | ||
? props.children | ||
: React__default['default'].createElement('span', {}); | ||
: React__default["default"].createElement('span', {}); | ||
} | ||
@@ -578,3 +602,3 @@ // Valid icon: render it | ||
*/ | ||
const Icon = React__default['default'].forwardRef(function Icon(props, ref) { | ||
const Icon = React__default["default"].forwardRef(function Icon(props, ref) { | ||
return component(props, false, ref); | ||
@@ -587,3 +611,3 @@ }); | ||
*/ | ||
const InlineIcon = React__default['default'].forwardRef(function InlineIcon(props, ref) { | ||
const InlineIcon = React__default["default"].forwardRef(function InlineIcon(props, ref) { | ||
return component(props, true, ref); | ||
@@ -590,0 +614,0 @@ }); |
@@ -5,3 +5,3 @@ { | ||
"author": "Vjacheslav Trushkin", | ||
"version": "3.1.0-beta.3", | ||
"version": "3.1.0-beta.5", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "bugs": "https://github.com/iconify/iconify/issues", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
219676
6297
2