@dfds-ui/icons 0.9.6-alpha.ade43e9d → 0.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SystemIcon.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import React, { ComponentPropsWithRef } from 'react';
1
2
  import * as systemIcons from './system';
2
3
  declare type SystemIcon = keyof typeof systemIcons;
3
4
  declare type Size = 's' | 'm' | 'l' | 'xl';
@@ -9,7 +10,7 @@ export declare type SystemIconProps = {
9
10
  /**
10
11
  * Predefined size to use.
11
12
  */
12
- size: Size;
13
+ size?: Size;
13
14
  /**
14
15
  * Class name to be assigned to the component.
15
16
  */
@@ -21,9 +22,9 @@ export declare type SystemIconProps = {
21
22
  * NB! Using `inline` will result in the `size` prop being ignored.
22
23
  */
23
24
  inline?: boolean;
24
- };
25
+ } & ComponentPropsWithRef<'svg'>;
25
26
  /**
26
27
  * The `SystemIcon` component is a helper component for displaying icons in the **system** set in "sane" sizes.
27
28
  */
28
- export declare const SystemIcon: ({ icon, size, className, inline }: SystemIconProps) => JSX.Element;
29
+ export declare const SystemIcon: React.ForwardRefExoticComponent<Pick<SystemIconProps, "string" | "filter" | "values" | "fill" | "max" | "type" | "inline" | "accumulate" | "offset" | "key" | "id" | "media" | "origin" | "height" | "width" | "end" | "name" | "alignmentBaseline" | "baselineShift" | "clip" | "clipPath" | "clipRule" | "color" | "colorInterpolation" | "colorInterpolationFilters" | "cursor" | "direction" | "display" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "opacity" | "order" | "overflow" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "textDecoration" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "style" | "path" | "method" | "target" | "lang" | "className" | "children" | "tabIndex" | "size" | "orientation" | "local" | "x" | "y" | "icon" | "mathematical" | "azimuth" | "colorRendering" | "glyphOrientationVertical" | "vectorEffect" | "additive" | "unicodeRange" | "crossOrigin" | "href" | "min" | "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" | "accentHeight" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "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" | "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" | "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" | "css"> & React.RefAttributes<SVGSVGElement>>;
29
30
  export {};
package/SystemIcon.js CHANGED
@@ -1,5 +1,13 @@
1
+ var _excluded = ["icon", "size", "className", "inline"];
2
+
3
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+
5
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
+
7
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
+
1
9
  import { css } from '@emotion/react';
2
- import React from 'react';
10
+ import React, { forwardRef } from 'react';
3
11
  import * as systemIcons from './system';
4
12
  import { jsx as ___EmotionJSX } from "@emotion/react";
5
13
  var sizes = {
@@ -10,25 +18,29 @@ var sizes = {
10
18
  };
11
19
 
12
20
  var inlineCss = function inlineCss(size) {
13
- return /*#__PURE__*/css("margin-top:calc(-", size, " / 6);margin-bottom:calc(-", size, " / 6);" + (process.env.NODE_ENV === "production" ? "" : ";label:inlineCss;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9TeXN0ZW1JY29uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3Q3VDIiwiZmlsZSI6Ii4uL3NyYy9TeXN0ZW1JY29uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0ICogYXMgc3lzdGVtSWNvbnMgZnJvbSAnLi9zeXN0ZW0nXG5cbnR5cGUgU3lzdGVtSWNvbiA9IGtleW9mIHR5cGVvZiBzeXN0ZW1JY29uc1xuXG50eXBlIFNpemUgPSAncycgfCAnbScgfCAnbCcgfCAneGwnXG5cbmV4cG9ydCB0eXBlIFN5c3RlbUljb25Qcm9wcyA9IHtcbiAgLyoqXG4gICAqIE5hbWUgb2YgdGhlIGljb24gaW4gdGhlIFN5c3RlbSBzZXQgb2YgaWNvbnMuXG4gICAqL1xuICBpY29uOiBTeXN0ZW1JY29uXG5cbiAgLyoqXG4gICAqIFByZWRlZmluZWQgc2l6ZSB0byB1c2UuXG4gICAqL1xuICBzaXplOiBTaXplXG5cbiAgLyoqXG4gICAqIENsYXNzIG5hbWUgdG8gYmUgY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H06IFN5c3RlbUljb25Qcm9wcykgPT4ge1xuICBjb25zdCBJY29uID0gc3lzdGVtSWNvbnNbaWNvbl1cbiAgY29uc3Qgc2l6ZVZhbHVlID0gaW5saW5lID8gJzEuNWVtJyA6IHNpemVzW3NpemVdXG4gIHJldHVybiA8SWNvbiBjbGFzc05hbWU9e2NsYXNzTmFtZX0gaGVpZ2h0PXtzaXplVmFsdWV9IHdpZHRoPXtzaXplVmFsdWV9IGNzcz17aW5saW5lICYmIGlubGluZUNzcyhzaXplVmFsdWUpfSAvPlxufVxuIl19 */");
21
+ return /*#__PURE__*/css("margin-top:calc(-", size, " / 6);margin-bottom:calc(-", size, " / 6);" + (process.env.NODE_ENV === "production" ? "" : ";label:inlineCss;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9TeXN0ZW1JY29uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3Q3VDIiwiZmlsZSI6Ii4uL3NyYy9TeXN0ZW1JY29uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IFJlYWN0LCB7IENvbXBvbmVudFByb3BzV2l0aFJlZiwgZm9yd2FyZFJlZiB9IGZyb20gJ3JlYWN0J1xuaW1wb3J0ICogYXMgc3lzdGVtSWNvbnMgZnJvbSAnLi9zeXN0ZW0nXG5cbnR5cGUgU3lzdGVtSWNvbiA9IGtleW9mIHR5cGVvZiBzeXN0ZW1JY29uc1xuXG50eXBlIFNpemUgPSAncycgfCAnbScgfCAnbCcgfCAneGwnXG5cbmV4cG9ydCB0eXBlIFN5c3RlbUljb25Qcm9wcyA9IHtcbiAgLyoqXG4gICAqIE5hbWUgb2YgdGhlIGljb24gaW4gdGhlIFN5c3RlbSBzZXQgb2YgaWNvbnMuXG4gICAqL1xuIC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lzcGxheWluZyBpY29ucyBpbiB0aGUgKipzeXN0ZW0qKiBzZXQgaW4gXCJzYW5lXCIgc2l6ZXMuXG4gKi9cbmV4cG9ydCBjb25zdCBTeXN0ZW1JY29uID0gZm9yd2FyZFJlZjxTVkdTVkdFbGVtZW50LCBTeXN0ZW1JY29uUHJvcHM+KFxuICAoeyBpY29uLCBzaXplID0gJ20nLCBjbGFzc05hbWUsIGlubGluZSwgLi4ucmVzdCB9LCByZWYpID0+IHtcbiAgICBjb25zdCBJY29uID0gc3lzdGVtSWNvbnNbaWNvbl1cbiAgICBjb25zdCBzaXplVmFsdWUgPSBpbmxpbmUgPyAnMS41ZW0nIDogc2l6ZXNbc2l6ZV1cbiAgICByZXR1cm4gKFxuICAgICAgPEljb25cbiAgICAgICAgY2xhc3NOYW1lPXtjbGFzc05hbWV9XG4gICAgICAgIGhlaWdodD17c2l6ZVZhbHVlfVxuICAgICAgICB3aWR0aD17c2l6ZVZhbHVlfVxuICAgICAgICBjc3M9e2lubGluZSAmJiBpbmxpbmVDc3Moc2l6ZVZhbHVlKX1cbiAgICAgICAgey4uLnJlc3R9XG4gICAgICAgIHJlZj17cmVmfVxuICAgICAgLz5cbiAgICApXG4gIH1cbilcbiJdfQ== */");
14
22
  };
15
23
  /**
16
24
  * The `SystemIcon` component is a helper component for displaying icons in the **system** set in "sane" sizes.
17
25
  */
18
26
 
19
27
 
20
- export var SystemIcon = function SystemIcon(_ref) {
28
+ export var SystemIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
21
29
  var icon = _ref.icon,
22
30
  _ref$size = _ref.size,
23
31
  size = _ref$size === void 0 ? 'm' : _ref$size,
24
32
  className = _ref.className,
25
- inline = _ref.inline;
33
+ inline = _ref.inline,
34
+ rest = _objectWithoutProperties(_ref, _excluded);
35
+
26
36
  var Icon = systemIcons[icon];
27
37
  var sizeValue = inline ? '1.5em' : sizes[size];
28
- return ___EmotionJSX(Icon, {
38
+ return ___EmotionJSX(Icon, _extends({
29
39
  className: className,
30
40
  height: sizeValue,
31
41
  width: sizeValue,
32
42
  css: inline && inlineCss(sizeValue)
33
- });
34
- };
43
+ }, rest, {
44
+ ref: ref
45
+ }));
46
+ });
@@ -1,3 +1,4 @@
1
+ import React, { ComponentPropsWithRef } from 'react';
1
2
  import * as systemIcons from './system';
2
3
  declare type SystemIcon = keyof typeof systemIcons;
3
4
  declare type Size = 's' | 'm' | 'l' | 'xl';
@@ -9,7 +10,7 @@ export declare type SystemIconProps = {
9
10
  /**
10
11
  * Predefined size to use.
11
12
  */
12
- size: Size;
13
+ size?: Size;
13
14
  /**
14
15
  * Class name to be assigned to the component.
15
16
  */
@@ -21,9 +22,9 @@ export declare type SystemIconProps = {
21
22
  * NB! Using `inline` will result in the `size` prop being ignored.
22
23
  */
23
24
  inline?: boolean;
24
- };
25
+ } & ComponentPropsWithRef<'svg'>;
25
26
  /**
26
27
  * The `SystemIcon` component is a helper component for displaying icons in the **system** set in "sane" sizes.
27
28
  */
28
- export declare const SystemIcon: ({ icon, size, className, inline }: SystemIconProps) => JSX.Element;
29
+ export declare const SystemIcon: React.ForwardRefExoticComponent<Pick<SystemIconProps, "string" | "filter" | "values" | "fill" | "max" | "type" | "inline" | "accumulate" | "offset" | "key" | "id" | "media" | "origin" | "height" | "width" | "end" | "name" | "alignmentBaseline" | "baselineShift" | "clip" | "clipPath" | "clipRule" | "color" | "colorInterpolation" | "colorInterpolationFilters" | "cursor" | "direction" | "display" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "opacity" | "order" | "overflow" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "textDecoration" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "style" | "path" | "method" | "target" | "lang" | "className" | "children" | "tabIndex" | "size" | "orientation" | "local" | "x" | "y" | "icon" | "mathematical" | "azimuth" | "colorRendering" | "glyphOrientationVertical" | "vectorEffect" | "additive" | "unicodeRange" | "crossOrigin" | "href" | "min" | "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" | "accentHeight" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "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" | "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" | "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" | "css"> & React.RefAttributes<SVGSVGElement>>;
29
30
  export {};
package/cjs/SystemIcon.js CHANGED
@@ -7,15 +7,21 @@ exports.SystemIcon = void 0;
7
7
 
8
8
  var _react = require("@emotion/react");
9
9
 
10
- var _react2 = _interopRequireDefault(require("react"));
10
+ var _react2 = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var systemIcons = _interopRequireWildcard(require("./system"));
13
13
 
14
+ const _excluded = ["icon", "size", "className", "inline"];
15
+
14
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
17
 
16
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
19
 
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+
22
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
23
+
24
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
19
25
 
20
26
  const sizes = {
21
27
  s: '1rem',
@@ -24,26 +30,29 @@ const sizes = {
24
30
  xl: '2.5rem'
25
31
  };
26
32
 
27
- const inlineCss = size => /*#__PURE__*/(0, _react.css)("margin-top:calc(-", size, " / 6);margin-bottom:calc(-", size, " / 6);" + (process.env.NODE_ENV === "production" ? "" : ";label:inlineCss;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9TeXN0ZW1JY29uLnR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xpbmVgIHdpbGwgcmVzdWx0IGluIHRoZSBgc2l6ZWAgcHJvcCBiZWluZyBpZ25vcmVkLlxuICAgKi9cbiAgaW5saW5lPzogYm9vbGVhblxufVxuXG5jb25zdCBzaXplczogeyBbayBpbiBTaXplXTogc3RyaW5nIH0gPSB7XG4gIHM6ICcxcmVtJyxcbiAgbTogJzEuNXJlbScsXG4gIGw6ICcycmVtJyxcbiAgeGw6ICcyLjVyZW0nLFxufVxuXG5jb25zdCBpbmxpbmVDc3MgPSAoc2l6ZTogc3RyaW5nKSA9PiBjc3NgXG4gIG1hcmdpbi10b3A6IGNhbGMoLSR7c2l6ZX0gLyA2KTtcbiAgbWFyZ2luLWJvdHRvbTogY2FsYygtJHtzaXplfSAvIDYpO1xuYFxuLyoqXG4gKiBUaGUgYFN5c3RlbUljb25gIGNvbXBvbmVudCBpcyBhIGhlbHBlciBjb21wb25lbnQgZm9yIGRpc3BsYXlpbmcgaWNvbnMgaW4gdGhlICoqc3lzdGVtKiogc2V0IGluIFwic2FuZVwiIHNpemVzLlxuICovXG5leHBvcnQgY29uc3QgU3lzdGVtSWNvbiA9ICh7IGljb24sIHNpemUgPSAnbScsIGNsYXNzTmFtZSwgaW5saW5lIH06IFN5c3RlbUljb25Qcm9wcykgPT4ge1xuICBjb25zdCBJY29uID0gc3lzdGVtSWNvbnNbaWNvbl1cbiAgY29uc3Qgc2l6ZVZhbHVlID0gaW5saW5lID8gJzEuNWVtJyA6IHNpemVzW3NpemVdXG4gIHJldHVybiA8SWNvbiBjbGFzc05hbWU9e2NsYXNzTmFtZX0gaGVpZ2h0PXtzaXplVmFsdWV9IHdpZHRoPXtzaXplVmFsdWV9IGNzcz17aW5saW5lICYmIGlubGluZUNzcyhzaXplVmFsdWUpfSAvPlxufVxuIl19 */");
33
+ const inlineCss = size => /*#__PURE__*/(0, _react.css)("margin-top:calc(-", size, " / 6);margin-bottom:calc(-", size, " / 6);" + (process.env.NODE_ENV === "production" ? "" : ";label:inlineCss;"), process.env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gKFxuICAgICAgPEljb25cbiAgICAgICAgY2xhc3NOYW1lPXtjbGFzc05hbWV9XG4gICAgICAgIGhlaWdodD17c2l6ZVZhbHVlfVxuICAgICAgICB3aWR0aD17c2l6ZVZhbHVlfVxuICAgICAgICBjc3M9e2lubGluZSAmJiBpbmxpbmVDc3Moc2l6ZVZhbHVlKX1cbiAgICAgICAgey4uLnJlc3R9XG4gICAgICAgIHJlZj17cmVmfVxuICAgICAgLz5cbiAgICApXG4gIH1cbilcbiJdfQ== */");
28
34
  /**
29
35
  * The `SystemIcon` component is a helper component for displaying icons in the **system** set in "sane" sizes.
30
36
  */
31
37
 
32
38
 
33
- const SystemIcon = ({
34
- icon,
35
- size = 'm',
36
- className,
37
- inline
38
- }) => {
39
+ const SystemIcon = /*#__PURE__*/(0, _react2.forwardRef)((_ref, ref) => {
40
+ let icon = _ref.icon,
41
+ _ref$size = _ref.size,
42
+ size = _ref$size === void 0 ? 'm' : _ref$size,
43
+ className = _ref.className,
44
+ inline = _ref.inline,
45
+ rest = _objectWithoutProperties(_ref, _excluded);
46
+
39
47
  const Icon = systemIcons[icon];
40
48
  const sizeValue = inline ? '1.5em' : sizes[size];
41
- return (0, _react.jsx)(Icon, {
49
+ return (0, _react.jsx)(Icon, _extends({
42
50
  className: className,
43
51
  height: sizeValue,
44
52
  width: sizeValue,
45
53
  css: inline && inlineCss(sizeValue)
46
- });
47
- };
48
-
54
+ }, rest, {
55
+ ref: ref
56
+ }));
57
+ });
49
58
  exports.SystemIcon = SystemIcon;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Shared icons within DFDS",
4
4
  "license": "MIT",
5
5
  "private": false,
6
- "version": "0.9.6-alpha.ade43e9d",
6
+ "version": "0.9.7",
7
7
  "sideEffects": false,
8
8
  "main": "./cjs/index.js",
9
9
  "module": "./index.js",
@@ -15,7 +15,7 @@
15
15
  "react": ">= 16.8.0",
16
16
  "react-dom": ">= 16.8.0"
17
17
  },
18
- "gitHead": "ade43e9d933e29884063bae460d35729e6c60303",
18
+ "gitHead": "725c7e10278d5653e6b3f09c52b61245cfadaa94",
19
19
  "publishConfig": {
20
20
  "access": "public"
21
21
  }