Comparing version 4.3.0 to 4.4.0
@@ -11,2 +11,3 @@ "use strict"; | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _useConfig = require("../../config/use-config"); | ||
var _sizeToRem = require("../../utils/size-to-rem"); | ||
@@ -30,2 +31,5 @@ var _block = require("../block"); | ||
} = _ref; | ||
const { | ||
v3Button | ||
} = (0, _useConfig.useConfig)(); | ||
return /*#__PURE__*/_react.default.createElement(_block.Block, { | ||
@@ -45,3 +49,4 @@ extend: { | ||
disabled, | ||
loading | ||
loading, | ||
v3Button | ||
}) | ||
@@ -154,3 +159,4 @@ }), loading && /*#__PURE__*/_react.default.createElement(_block.Block, { | ||
disabled, | ||
loading | ||
loading, | ||
v3Button | ||
} = _ref5; | ||
@@ -177,3 +183,3 @@ return _ref6 => { | ||
alignItems: 'baseline', | ||
...padding(theme.tokens.buttonPaddingVertical, theme.tokens.buttonPaddingHorizontal), | ||
...padding(theme.tokens.buttonPaddingVertical, v3Button ? 24 : theme.tokens.buttonPaddingHorizontal), | ||
fontFamily: theme.fontTypes.NOVUM, | ||
@@ -193,2 +199,8 @@ textAlign: 'center', | ||
extend: [{ | ||
condition: v3Button, | ||
style: { | ||
fontSize: (0, _sizeToRem.sizeToRem)(1.75), | ||
textTransform: 'uppercase' | ||
} | ||
}, { | ||
condition: size === 'small', | ||
@@ -195,0 +207,0 @@ style: { |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import PropTypes from 'prop-types'; | ||
@@ -14,3 +13,3 @@ import { COLORS, SIZES, TYPES } from './iconTypes'; | ||
} | ||
export declare function Icon({ type, color, label, ...props }: IconProps): JSX.Element; | ||
export declare function Icon({ type, color, label, ...props }: IconProps): import("react/jsx-runtime").JSX.Element; | ||
export declare namespace Icon { | ||
@@ -17,0 +16,0 @@ var propTypes: { |
@@ -12,2 +12,3 @@ "use strict"; | ||
var _reactFela = require("react-fela"); | ||
var _useConfig = require("../../config/use-config"); | ||
var _useTheme = require("../../styling/use-theme"); | ||
@@ -76,2 +77,5 @@ var _helpers = require("../../utils/helpers"); | ||
const theme = (0, _useTheme.useTheme)(); | ||
const { | ||
v3Button | ||
} = (0, _useConfig.useConfig)(); | ||
const rel = (0, _helpers.getLinkRel)({ | ||
@@ -110,2 +114,8 @@ rel: props.rel, | ||
extend: [{ | ||
condition: v3Button, | ||
style: { | ||
fontSize: '0.875rem', | ||
textTransform: 'uppercase' | ||
} | ||
}, { | ||
condition: props.disabled, | ||
@@ -112,0 +122,0 @@ style: { |
@@ -5,2 +5,3 @@ import React from 'react'; | ||
locale?: string; | ||
v3Button?: boolean; | ||
} | ||
@@ -7,0 +8,0 @@ export declare const defaultConfig: { |
@@ -7,4 +7,5 @@ import React from 'react'; | ||
locale?: string; | ||
v3Button?: boolean; | ||
}; | ||
} | ||
export declare const ConfigProvider: React.FC<ConfigProviderProps>; |
import _extends from "@babel/runtime/helpers/extends"; | ||
import React, { forwardRef } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { useConfig } from '../../config/use-config'; | ||
import { sizeToRem } from '../../utils/size-to-rem'; | ||
@@ -20,2 +21,5 @@ import { Block } from '../block'; | ||
} = _ref; | ||
const { | ||
v3Button | ||
} = useConfig(); | ||
return /*#__PURE__*/React.createElement(Block, { | ||
@@ -35,3 +39,4 @@ extend: { | ||
disabled, | ||
loading | ||
loading, | ||
v3Button | ||
}) | ||
@@ -143,3 +148,4 @@ }), loading && /*#__PURE__*/React.createElement(Block, { | ||
disabled, | ||
loading | ||
loading, | ||
v3Button | ||
} = _ref5; | ||
@@ -166,3 +172,3 @@ return _ref6 => { | ||
alignItems: 'baseline', | ||
...padding(theme.tokens.buttonPaddingVertical, theme.tokens.buttonPaddingHorizontal), | ||
...padding(theme.tokens.buttonPaddingVertical, v3Button ? 24 : theme.tokens.buttonPaddingHorizontal), | ||
fontFamily: theme.fontTypes.NOVUM, | ||
@@ -182,2 +188,8 @@ textAlign: 'center', | ||
extend: [{ | ||
condition: v3Button, | ||
style: { | ||
fontSize: sizeToRem(1.75), | ||
textTransform: 'uppercase' | ||
} | ||
}, { | ||
condition: size === 'small', | ||
@@ -184,0 +196,0 @@ style: { |
@@ -5,2 +5,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import { useFela } from 'react-fela'; | ||
import { useConfig } from '../../config/use-config'; | ||
import { useTheme } from '../../styling/use-theme'; | ||
@@ -67,2 +68,5 @@ import { getLinkRel } from '../../utils/helpers'; | ||
const theme = useTheme(); | ||
const { | ||
v3Button | ||
} = useConfig(); | ||
const rel = getLinkRel({ | ||
@@ -101,2 +105,8 @@ rel: props.rel, | ||
extend: [{ | ||
condition: v3Button, | ||
style: { | ||
fontSize: '0.875rem', | ||
textTransform: 'uppercase' | ||
} | ||
}, { | ||
condition: props.disabled, | ||
@@ -103,0 +113,0 @@ style: { |
{ | ||
"name": "vcc-ui", | ||
"version": "4.3.0", | ||
"version": "4.4.0", | ||
"license": "UNLICENSED", | ||
@@ -25,3 +25,4 @@ "description": "A React library for building user interfaces at Volvo Cars", | ||
"build:docs": "node scripts/build-docs.js", | ||
"test": "yarn run -T jest packages/vcc-ui", | ||
"test": "yarn run test:jest", | ||
"test:jest": "yarn run -T jest packages/vcc-ui", | ||
"dev": "yarn run watch:cjs & yarn run watch:esm", | ||
@@ -66,9 +67,9 @@ "watch:cjs": "BABEL_ENV=commonjs babel src -d dist -w --extensions '.ts,.tsx,.js,.jsx'", | ||
"@babel/plugin-transform-modules-commonjs": "7.21.5", | ||
"@babel/plugin-transform-runtime": "7.21.4", | ||
"@babel/plugin-transform-runtime": "7.22.4", | ||
"@babel/polyfill": "7.12.1", | ||
"@babel/preset-env": "7.21.5", | ||
"@babel/preset-react": "7.18.6", | ||
"@babel/preset-env": "7.22.4", | ||
"@babel/preset-react": "7.22.3", | ||
"@babel/preset-typescript": "7.21.5", | ||
"@storybook/react": "7.0.11", | ||
"@types/react": "18.0.38", | ||
"@storybook/react": "7.0.20", | ||
"@types/react": "18.2.8", | ||
"@vcc/docs-utils": "workspace:*", | ||
@@ -84,4 +85,4 @@ "@volvo-cars/browserslist-config": "workspace:*", | ||
"fs-extra": "11.1.1", | ||
"glob": "10.2.4", | ||
"jsdom": "22.0.0", | ||
"glob": "10.2.7", | ||
"jsdom": "22.1.0", | ||
"prop-types": "15.8.1", | ||
@@ -93,3 +94,3 @@ "react": "18.2.0", | ||
"shelljs": "0.8.5", | ||
"typescript": "5.0.4" | ||
"typescript": "5.1.3" | ||
}, | ||
@@ -96,0 +97,0 @@ "browserslist": [ |
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
540733
15538