@khanacademy/wonder-blocks-icon-button
Advanced tools
Comparing version 0.0.0-PR2225-20240718145801 to 0.0.0-PR2225-20240828142709
# @khanacademy/wonder-blocks-icon-button | ||
## 0.0.0-PR2225-20240718145801 | ||
## 0.0.0-PR2225-20240828142709 | ||
### Minor Changes | ||
- fa952500: Add onMouseDown prop | ||
- ea506e85: Add onMouseDown prop | ||
## 5.3.5 | ||
### Patch Changes | ||
- Updated dependencies [07f7f407] | ||
- @khanacademy/wonder-blocks-core@7.0.0 | ||
- @khanacademy/wonder-blocks-clickable@4.2.7 | ||
- @khanacademy/wonder-blocks-icon@4.1.4 | ||
## 5.3.4 | ||
### Patch Changes | ||
- Updated dependencies [f17dc1ee] | ||
- Updated dependencies [991eb43f] | ||
- @khanacademy/wonder-blocks-tokens@2.0.0 | ||
- @khanacademy/wonder-blocks-clickable@4.2.6 | ||
## 5.3.3 | ||
### Patch Changes | ||
- 559e82d5: Update to build tooling, generating smaller output | ||
- Updated dependencies [559e82d5] | ||
- @khanacademy/wonder-blocks-clickable@4.2.5 | ||
- @khanacademy/wonder-blocks-core@6.4.3 | ||
- @khanacademy/wonder-blocks-icon@4.1.3 | ||
- @khanacademy/wonder-blocks-theming@2.0.3 | ||
- @khanacademy/wonder-blocks-tokens@1.3.1 | ||
## 5.3.2 | ||
### Patch Changes | ||
- Updated dependencies [eab37b8b] | ||
- @khanacademy/wonder-blocks-core@6.4.2 | ||
- @khanacademy/wonder-blocks-clickable@4.2.4 | ||
- @khanacademy/wonder-blocks-icon@4.1.2 | ||
## 5.3.1 | ||
### Patch Changes | ||
- Updated dependencies [f099cf87] | ||
- @khanacademy/wonder-blocks-clickable@4.2.3 | ||
## 5.3.0 | ||
@@ -10,0 +56,0 @@ |
@@ -0,1 +1,3 @@ | ||
import _extends from '@babel/runtime/helpers/extends'; | ||
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/objectWithoutPropertiesLoose'; | ||
import * as React from 'react'; | ||
@@ -11,30 +13,2 @@ import { StyleSheet } from 'aphrodite'; | ||
function _extends() { | ||
_extends = Object.assign ? Object.assign.bind() : 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); | ||
} | ||
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; | ||
} | ||
const iconSizeForButtonSize = size => { | ||
@@ -41,0 +15,0 @@ switch (size) { |
'use strict'; | ||
var _extends = require('@babel/runtime/helpers/extends'); | ||
var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose'); | ||
var React = require('react'); | ||
@@ -13,51 +15,27 @@ var aphrodite = require('aphrodite'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { return e[k]; } | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { return e[k]; } | ||
}); | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
n["default"] = e; | ||
return Object.freeze(n); | ||
} | ||
n["default"] = e; | ||
return Object.freeze(n); | ||
} | ||
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends); | ||
var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose); | ||
var React__namespace = /*#__PURE__*/_interopNamespace(React); | ||
var tokens__namespace = /*#__PURE__*/_interopNamespace(tokens); | ||
function _extends() { | ||
_extends = Object.assign ? Object.assign.bind() : 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); | ||
} | ||
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; | ||
} | ||
const iconSizeForButtonSize = size => { | ||
@@ -268,3 +246,3 @@ switch (size) { | ||
} = props, | ||
restProps = _objectWithoutPropertiesLoose(props, _excluded$1); | ||
restProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded$1); | ||
const { | ||
@@ -281,3 +259,3 @@ theme, | ||
}); | ||
const commonProps = _extends({ | ||
const commonProps = _extends__default["default"]({ | ||
"data-testid": testId, | ||
@@ -287,6 +265,6 @@ style: [defaultStyle, style] | ||
if (href && !disabled) { | ||
return router && !skipClientNav && wonderBlocksClickable.isClientSideUrl(href) ? React__namespace.createElement(StyledLink, _extends({}, commonProps, { | ||
return router && !skipClientNav && wonderBlocksClickable.isClientSideUrl(href) ? React__namespace.createElement(StyledLink, _extends__default["default"]({}, commonProps, { | ||
to: href, | ||
ref: ref | ||
}), child) : React__namespace.createElement(StyledAnchor, _extends({}, commonProps, { | ||
}), child) : React__namespace.createElement(StyledAnchor, _extends__default["default"]({}, commonProps, { | ||
href: href, | ||
@@ -296,3 +274,3 @@ ref: ref | ||
} else { | ||
return React__namespace.createElement(StyledButton, _extends({ | ||
return React__namespace.createElement(StyledButton, _extends__default["default"]({ | ||
type: "button" | ||
@@ -403,3 +381,3 @@ }, commonProps, { | ||
borderRadius: theme.border.radius.default, | ||
":hover": _extends({ | ||
":hover": _extends__default["default"]({ | ||
boxShadow: "none", | ||
@@ -426,3 +404,3 @@ color: defaultStrokeColor, | ||
}, | ||
":focus-visible": _extends({ | ||
":focus-visible": _extends__default["default"]({ | ||
boxShadow: "none", | ||
@@ -435,3 +413,3 @@ outlineWidth: theme.border.width.default, | ||
}, kindOverrides[":focus-visible"]), | ||
":active": _extends({ | ||
":active": _extends__default["default"]({ | ||
color: light ? activeInverseColor : activeColor, | ||
@@ -448,6 +426,6 @@ outlineWidth: theme.border.width.default, | ||
cursor: "not-allowed", | ||
":hover": _extends({}, disabledStatesStyles, { | ||
":hover": _extends__default["default"]({}, disabledStatesStyles, { | ||
outline: "none" | ||
}), | ||
":active": _extends({}, disabledStatesStyles, { | ||
":active": _extends__default["default"]({}, disabledStatesStyles, { | ||
outline: "none" | ||
@@ -482,3 +460,3 @@ }), | ||
} = props, | ||
sharedProps = _objectWithoutPropertiesLoose(props, _excluded); | ||
sharedProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded); | ||
function handleKeyDown(e) { | ||
@@ -498,3 +476,3 @@ const keyCode = e.key; | ||
} | ||
return React__namespace.createElement(ThemedIconButton, null, React__namespace.createElement(IconButtonCore, _extends({}, sharedProps, { | ||
return React__namespace.createElement(ThemedIconButton, null, React__namespace.createElement(IconButtonCore, _extends__default["default"]({}, sharedProps, { | ||
color: color, | ||
@@ -501,0 +479,0 @@ disabled: disabled, |
{ | ||
"name": "@khanacademy/wonder-blocks-icon-button", | ||
"version": "0.0.0-PR2225-20240718145801", | ||
"version": "0.0.0-PR2225-20240828142709", | ||
"design": "v1", | ||
@@ -19,7 +19,7 @@ "publishConfig": { | ||
"@babel/runtime": "^7.18.6", | ||
"@khanacademy/wonder-blocks-clickable": "^4.2.2", | ||
"@khanacademy/wonder-blocks-core": "^6.4.1", | ||
"@khanacademy/wonder-blocks-icon": "^4.1.1", | ||
"@khanacademy/wonder-blocks-theming": "^2.0.2", | ||
"@khanacademy/wonder-blocks-tokens": "^1.3.0" | ||
"@khanacademy/wonder-blocks-clickable": "^4.2.7", | ||
"@khanacademy/wonder-blocks-core": "^7.0.0", | ||
"@khanacademy/wonder-blocks-icon": "^4.1.4", | ||
"@khanacademy/wonder-blocks-theming": "^2.0.3", | ||
"@khanacademy/wonder-blocks-tokens": "^2.0.0" | ||
}, | ||
@@ -33,4 +33,4 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@khanacademy/wb-dev-build-settings": "^1.0.0" | ||
"@khanacademy/wb-dev-build-settings": "^1.0.1" | ||
} | ||
} |
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
196919
2596
- Removed@khanacademy/wonder-blocks-core@6.4.3(transitive)
- Removed@khanacademy/wonder-blocks-tokens@1.3.1(transitive)