@volvo-cars/react-icons
Advanced tools
Comparing version 0.5.0 to 0.6.0
/// <reference types="react" /> | ||
import { IconType } from './icons'; | ||
declare const COLOR: readonly ["neutral", "destructive"]; | ||
declare const VARIANT: readonly ["filled", "outlined", "clear"]; | ||
export type IconButtonColor = (typeof COLOR)[number]; | ||
export type IconButtonVariant = (typeof VARIANT)[number]; | ||
type IconButtonColor = (typeof COLOR)[number]; | ||
type IconButtonVariant = (typeof VARIANT)[number]; | ||
export type IconButtonIcon = 'avatar' | 'communication-email' | 'communication-phone' | 'copy' | 'externallink' | 'favorite' | 'filter' | 'info' | 'media-pause' | 'media-play' | 'navigation-arrowback' | 'navigation-arrowdown' | 'navigation-arrowforward' | 'navigation-arrowup' | 'navigation-chevronback' | 'navigation-chevrondown' | 'navigation-chevronforward' | 'navigation-chevronup' | 'navigation-close' | 'navigation-minus' | 'navigation-plus' | 'other-eye' | 'other-eyeslash' | 'refresh' | 'search' | 'settings'; | ||
type BaseProps = { | ||
@@ -12,3 +12,3 @@ className?: string; | ||
*/ | ||
iconName: IconType; | ||
iconName: IconButtonIcon; | ||
/** | ||
@@ -15,0 +15,0 @@ * The visual style of the IconButton |
@@ -31,4 +31,6 @@ /// <reference types="react" /> | ||
* such as when hovering a button, use `color="currentColor"` to inherit the surrounding `color`. | ||
* | ||
* To create a clickable icon, see [IconButton](https://developer.volvocars.com/design-system/web/?path=/docs/components-iconbutton--docs). | ||
*/ | ||
export declare const Icon: import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<HTMLImageElement>>; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import{d as a}from"./chunk-PF2M2S37.js";export{a as Icon}; | ||
import{d as a}from"./chunk-IAQIKXX7.js";export{a as Icon}; | ||
//# sourceMappingURL=icon.js.map |
@@ -5,5 +5,5 @@ export type { IconType } from './icons'; | ||
export { IconButton } from './icon-button'; | ||
export type { IconButtonProps, IconButtonColor, IconButtonVariant, } from './icon-button'; | ||
export type { IconButtonProps, IconButtonIcon } from './icon-button'; | ||
export { getIconSrc, setBaseUrl } from './config'; | ||
export { Wordmark } from './wordmark'; | ||
export type { WordmarkProps } from './wordmark'; |
@@ -1,2 +0,2 @@ | ||
import{a as I,b,c as u,d as m}from"./chunk-PF2M2S37.js";import{Children as d,cloneElement as B,forwardRef as h}from"react";import{jsx as e}from"react/jsx-runtime";var C=["neutral","destructive"],R=["filled","outlined","clear"],P=h(function({iconName:a,className:o,color:r="neutral",variant:n="filled","aria-label":l,...t},p){let c=R.includes(n)?`icon-button-${n}`:"icon-button-filled",i=C.includes(r)?r:"neutral",y=a.split("-").slice(0,-1).join("-"),s=()=>e(m,{type:`${y}-16`,color:"currentColor"});return t.children&&t.asChild&&d.count(t.children)===1?B(d.only(t.children),{...t,className:`${c} ${o||""}`,"aria-label":l,"data-color":i},e(s,{})):t.href?e("a",{ref:p,...t,className:`${c} ${o||""}`,"aria-label":l,"data-color":i,children:e(s,{})}):e("button",{ref:p,type:"button",...t,className:`${c} ${o||""}`,"aria-label":l,"data-color":i,children:e(s,{})})});import{forwardRef as g}from"react";import{jsx as E}from"react/jsx-runtime";var v=g(function({alt:a,height:o=8,...r},n){return E("img",{...r,ref:n,className:`wordmark text-primary ${r.className||""}`.trim(),width:o*13,height:o,src:u(),alt:a,style:{"--mask-url":`url('${u()}')`}})});export{m as Icon,P as IconButton,v as Wordmark,b as getIconSrc,I as setBaseUrl}; | ||
import{a as y,b as h,c as u,d as m}from"./chunk-IAQIKXX7.js";import{Children as d,cloneElement as v,forwardRef as g}from"react";import{jsx as e}from"react/jsx-runtime";var b=["neutral","destructive"],I=["filled","outlined","clear"],B=g(function({iconName:a,className:o,color:n,variant:r="outlined","aria-label":c,...t},p){let i=I.includes(r)?`icon-button-${r}`:"icon-button-filled",l=b.includes(n)?n:"neutral",s=()=>e(m,{type:`${a}-16`,color:"currentColor"});return t.children&&t.asChild&&d.count(t.children)===1?v(d.only(t.children),{...t,className:`${i} ${o||""}`,"aria-label":c,"data-color":l},e(s,{})):t.href?e("a",{ref:p,...t,className:`${i} ${o||""}`,"aria-label":c,"data-color":l,children:e(s,{})}):e("button",{ref:p,type:"button",...t,className:`${i} ${o||""}`,"aria-label":c,"data-color":l,children:e(s,{})})});import{forwardRef as C}from"react";import{jsx as P}from"react/jsx-runtime";var R=C(function({alt:a,height:o=8,...n},r){return P("img",{...n,ref:r,className:`wordmark text-primary ${n.className||""}`.trim(),width:o*13,height:o,src:u(),alt:a,style:{"--mask-url":`url('${u()}')`}})});export{m as Icon,B as IconButton,R as Wordmark,h as getIconSrc,y as setBaseUrl}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use client";import{d as o}from"./chunk-PF2M2S37.js";import t,{useRef as s}from"react";import{jsx as c}from"react/jsx-runtime";var u=t.forwardRef(function(n){let e=s(null),[r,a]=t.useState(!0);return c(o,{...n,ref:e,loading:"lazy",...!e.current?.complete&&r?{onLoad:()=>a(!1)}:{"data-loaded":!0}})});export{u as LazyIcon}; | ||
"use client";import{d as o}from"./chunk-IAQIKXX7.js";import t,{useRef as s}from"react";import{jsx as c}from"react/jsx-runtime";var u=t.forwardRef(function(n){let e=s(null),[r,a]=t.useState(!0);return c(o,{...n,ref:e,loading:"lazy",...!e.current?.complete&&r?{onLoad:()=>a(!1)}:{"data-loaded":!0}})});export{u as LazyIcon}; | ||
//# sourceMappingURL=lazy-icon.js.map |
{ | ||
"name": "@volvo-cars/react-icons", | ||
"description": "React Icons", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"license": "UNLICENSED", | ||
@@ -6,0 +6,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
133928
379