@contentful/f36-icon
Advanced tools
Comparing version 5.0.0-alpha.2 to 5.0.0-alpha.3
@@ -24,2 +24,3 @@ "use strict"; | ||
var _react = /*#__PURE__*/ _interop_require_wildcard(require("react")); | ||
var _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens")); | ||
var _f36core = require("@contentful/f36-core"); | ||
@@ -39,2 +40,7 @@ function _define_property(obj, key, value) { | ||
} | ||
function _interop_require_default(obj) { | ||
return obj && obj.__esModule ? obj : { | ||
default: obj | ||
}; | ||
} | ||
function _getRequireWildcardCache(nodeInterop) { | ||
@@ -165,3 +171,3 @@ if (typeof WeakMap !== "function") return null; | ||
forwardedRef) { | ||
var as = _param.as, children = _param.children, className = _param.className, _param_isActive = _param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_color = _param.color, color = _param_color === void 0 ? isActive ? "blue500" : "gray900" : _param_color, _param_role = _param.role, role = _param_role === void 0 ? "img" : _param_role, _param_size = _param.size, size = _param_size === void 0 ? "medium" : _param_size, _param_testId = _param.testId, testId = _param_testId === void 0 ? "cf-ui-icon" : _param_testId, _param_viewBox = _param.viewBox, viewBox = _param_viewBox === void 0 ? "0 0 20 20" : _param_viewBox, otherProps = _object_without_properties(_param, [ | ||
var as = _param.as, children = _param.children, className = _param.className, _param_isActive = _param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_color = _param.color, color = _param_color === void 0 ? isActive ? _f36tokens.default.blue500 : _f36tokens.default.gray900 : _param_color, _param_role = _param.role, role = _param_role === void 0 ? "img" : _param_role, _param_size = _param.size, size = _param_size === void 0 ? "medium" : _param_size, _param_testId = _param.testId, testId = _param_testId === void 0 ? "cf-ui-icon" : _param_testId, _param_viewBox = _param.viewBox, viewBox = _param_viewBox === void 0 ? "0 0 20 20" : _param_viewBox, otherProps = _object_without_properties(_param, [ | ||
"as", | ||
@@ -168,0 +174,0 @@ "children", |
@@ -83,3 +83,3 @@ "use strict"; | ||
as: _md.MdHelp, | ||
color: "red100" | ||
color: "red" | ||
})).getByTestId; | ||
@@ -92,3 +92,3 @@ var icon = getByTestId("cf-ui-icon"); | ||
as: _md.MdHelp, | ||
color: "red100", | ||
color: "red", | ||
"aria-label": "external icon" | ||
@@ -95,0 +95,0 @@ })).getByTestId; |
@@ -12,2 +12,3 @@ "use strict"; | ||
var _react = /*#__PURE__*/ _interop_require_default(require("react")); | ||
var _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens")); | ||
var _Icon = require("../Icon"); | ||
@@ -100,3 +101,3 @@ function _define_property(obj, key, value) { | ||
var Component = function(_param) { | ||
var _param_isActive = _param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_color = _param.color, color = _param_color === void 0 ? isActive ? "blue500" : "gray900" : _param_color, _param_size = _param.size, size = _param_size === void 0 ? "medium" : _param_size, props = _object_without_properties(_param, [ | ||
var _param_isActive = _param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_color = _param.color, color = _param_color === void 0 ? isActive ? _f36tokens.default.blue500 : _f36tokens.default.gray900 : _param_color, _param_size = _param.size, size = _param_size === void 0 ? "medium" : _param_size, props = _object_without_properties(_param, [ | ||
"isActive", | ||
@@ -103,0 +104,0 @@ "color", |
@@ -82,2 +82,3 @@ function _define_property(obj, key, value) { | ||
import React, { forwardRef } from "react"; | ||
import tokens from "@contentful/f36-tokens"; | ||
import { Box } from "@contentful/f36-core"; | ||
@@ -102,3 +103,3 @@ var ICON_DEFAULT_TAG = "svg"; | ||
forwardedRef) { | ||
var as = _param.as, children = _param.children, className = _param.className, _param_isActive = _param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_color = _param.color, color = _param_color === void 0 ? isActive ? "blue500" : "gray900" : _param_color, _param_role = _param.role, role = _param_role === void 0 ? "img" : _param_role, _param_size = _param.size, size = _param_size === void 0 ? "medium" : _param_size, _param_testId = _param.testId, testId = _param_testId === void 0 ? "cf-ui-icon" : _param_testId, _param_viewBox = _param.viewBox, viewBox = _param_viewBox === void 0 ? "0 0 20 20" : _param_viewBox, otherProps = _object_without_properties(_param, [ | ||
var as = _param.as, children = _param.children, className = _param.className, _param_isActive = _param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_color = _param.color, color = _param_color === void 0 ? isActive ? tokens.blue500 : tokens.gray900 : _param_color, _param_role = _param.role, role = _param_role === void 0 ? "img" : _param_role, _param_size = _param.size, size = _param_size === void 0 ? "medium" : _param_size, _param_testId = _param.testId, testId = _param_testId === void 0 ? "cf-ui-icon" : _param_testId, _param_viewBox = _param.viewBox, viewBox = _param_viewBox === void 0 ? "0 0 20 20" : _param_viewBox, otherProps = _object_without_properties(_param, [ | ||
"as", | ||
@@ -105,0 +106,0 @@ "children", |
@@ -38,3 +38,3 @@ import React, { Fragment } from "react"; | ||
as: ExternalIcon, | ||
color: "red100" | ||
color: "red" | ||
})).getByTestId; | ||
@@ -47,3 +47,3 @@ var icon = getByTestId("cf-ui-icon"); | ||
as: ExternalIcon, | ||
color: "red100", | ||
color: "red", | ||
"aria-label": "external icon" | ||
@@ -50,0 +50,0 @@ })).getByTestId; |
@@ -81,2 +81,3 @@ function _define_property(obj, key, value) { | ||
import React from "react"; | ||
import tokens from "@contentful/f36-tokens"; | ||
import { Icon, sizes } from "../Icon"; | ||
@@ -86,3 +87,3 @@ // Unfortunately we have to pass props directly to the Phosphor icon | ||
var Component = function(_param) { | ||
var _param_isActive = _param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_color = _param.color, color = _param_color === void 0 ? isActive ? "blue500" : "gray900" : _param_color, _param_size = _param.size, size = _param_size === void 0 ? "medium" : _param_size, props = _object_without_properties(_param, [ | ||
var _param_isActive = _param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_color = _param.color, color = _param_color === void 0 ? isActive ? tokens.blue500 : tokens.gray900 : _param_color, _param_size = _param.size, size = _param_size === void 0 ? "medium" : _param_size, props = _object_without_properties(_param, [ | ||
"isActive", | ||
@@ -89,0 +90,0 @@ "color", |
import React, { type ElementType, type ReactElement, type SVGAttributes } from 'react'; | ||
import type { ColorTokens } from '@contentful/f36-tokens'; | ||
import { type CommonProps, type PolymorphicComponent, type PolymorphicProps, type ExpandProps } from '@contentful/f36-core'; | ||
@@ -14,3 +13,3 @@ import type { IconComponent, IconSize } from './types'; | ||
*/ | ||
color?: ColorTokens; | ||
color?: string; | ||
/** | ||
@@ -17,0 +16,0 @@ * Determines the active state of the icon |
import { type ReactElement } from 'react'; | ||
import type { MappedOmit } from '@contentful/f36-core'; | ||
import { type IconProps } from '../Icon'; | ||
declare type MappedOmit<T, K extends keyof T> = { | ||
[P in keyof T as P extends K ? never : P]: T[P]; | ||
}; | ||
export declare type GeneratedIconProps = MappedOmit<IconProps, 'as' | 'children' | 'name' | 'viewBox'> & { | ||
@@ -7,0 +5,0 @@ children?: never; |
{ | ||
"name": "@contentful/f36-icon", | ||
"version": "5.0.0-alpha.2", | ||
"version": "5.0.0-alpha.3", | ||
"description": "Forma 36: Icon component", | ||
@@ -48,3 +48,3 @@ "license": "MIT", | ||
"type": "git", | ||
"url": "git+https://github.com/contentful/forma-36.git" | ||
"url": "https://github.com/contentful/forma-36" | ||
}, | ||
@@ -51,0 +51,0 @@ "publishConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
69351
1268
0