@khanacademy/wonder-blocks-button
Advanced tools
Comparing version 0.0.0-PR2271-20240712184100 to 0.0.0-PR2275-20240717000016
# @khanacademy/wonder-blocks-button | ||
## 0.0.0-PR2271-20240712184100 | ||
## 0.0.0-PR2275-20240717000016 | ||
### Patch Changes | ||
- Updated dependencies [7d2ef86f] | ||
- @khanacademy/wonder-blocks-core@0.0.0-PR2275-20240717000016 | ||
- @khanacademy/wonder-blocks-clickable@0.0.0-PR2275-20240717000016 | ||
- @khanacademy/wonder-blocks-icon@0.0.0-PR2275-20240717000016 | ||
- @khanacademy/wonder-blocks-progress-spinner@0.0.0-PR2275-20240717000016 | ||
- @khanacademy/wonder-blocks-typography@0.0.0-PR2275-20240717000016 | ||
## 6.3.6 | ||
### 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-progress-spinner@2.1.4 | ||
- @khanacademy/wonder-blocks-theming@2.0.3 | ||
- @khanacademy/wonder-blocks-tokens@1.3.1 | ||
- @khanacademy/wonder-blocks-typography@2.1.14 | ||
## 6.3.5 | ||
### Patch Changes | ||
- Updated dependencies [eab37b8b] | ||
- @khanacademy/wonder-blocks-core@0.0.0-PR2271-20240712184100 | ||
- @khanacademy/wonder-blocks-clickable@0.0.0-PR2271-20240712184100 | ||
- @khanacademy/wonder-blocks-icon@0.0.0-PR2271-20240712184100 | ||
- @khanacademy/wonder-blocks-progress-spinner@0.0.0-PR2271-20240712184100 | ||
- @khanacademy/wonder-blocks-typography@0.0.0-PR2271-20240712184100 | ||
- @khanacademy/wonder-blocks-core@6.4.2 | ||
- @khanacademy/wonder-blocks-clickable@4.2.4 | ||
- @khanacademy/wonder-blocks-icon@4.1.2 | ||
- @khanacademy/wonder-blocks-progress-spinner@2.1.3 | ||
- @khanacademy/wonder-blocks-typography@2.1.13 | ||
@@ -14,0 +39,0 @@ ## 6.3.4 |
@@ -0,1 +1,3 @@ | ||
import _extends from '@babel/runtime/helpers/extends'; | ||
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/objectWithoutPropertiesLoose'; | ||
import * as React from 'react'; | ||
@@ -13,30 +15,2 @@ import { __RouterContext } from 'react-router'; | ||
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 theme$1 = { | ||
@@ -43,0 +17,0 @@ color: { |
'use strict'; | ||
var _extends = require('@babel/runtime/helpers/extends'); | ||
var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose'); | ||
var React = require('react'); | ||
@@ -15,51 +17,27 @@ var reactRouter = require('react-router'); | ||
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 theme$1 = { | ||
@@ -250,3 +228,3 @@ color: { | ||
case "small": | ||
return React__namespace.createElement(wonderBlocksIcon.PhosphorIcon, _extends({}, commonProps, { | ||
return React__namespace.createElement(wonderBlocksIcon.PhosphorIcon, _extends__default["default"]({}, commonProps, { | ||
size: "small", | ||
@@ -257,3 +235,3 @@ icon: icon | ||
default: | ||
return React__namespace.createElement(wonderBlocksIcon.PhosphorIcon, _extends({}, commonProps, { | ||
return React__namespace.createElement(wonderBlocksIcon.PhosphorIcon, _extends__default["default"]({}, commonProps, { | ||
size: "medium", | ||
@@ -297,7 +275,7 @@ icon: icon | ||
} = props, | ||
restProps = _objectWithoutPropertiesLoose(props, _excluded$1); | ||
restProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded$1); | ||
const buttonStyles = _generateStyles(color, kind, light, size, theme, themeName); | ||
const disabled = spinner || disabledProp; | ||
const defaultStyle = [sharedStyles.shared, disabled && sharedStyles.disabled, startIcon && sharedStyles.withStartIcon, endIcon && sharedStyles.withEndIcon, buttonStyles.default, disabled && buttonStyles.disabled, kind !== "tertiary" && !disabled && (pressed ? buttonStyles.active : (hovered || focused) && buttonStyles.focus), kind === "tertiary" && !pressed && focused && [buttonStyles.focus, disabled && buttonStyles.disabledFocus], size === "small" && sharedStyles.small, size === "large" && sharedStyles.large]; | ||
const commonProps = _extends({ | ||
const commonProps = _extends__default["default"]({ | ||
"data-testid": testId, | ||
@@ -340,6 +318,6 @@ id: id, | ||
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 | ||
}), contents) : React__namespace.createElement(StyledAnchor, _extends({}, commonProps, { | ||
}), contents) : React__namespace.createElement(StyledAnchor, _extends__default["default"]({}, commonProps, { | ||
href: href, | ||
@@ -349,3 +327,3 @@ ref: ref | ||
} else { | ||
return React__namespace.createElement(StyledButton, _extends({ | ||
return React__namespace.createElement(StyledButton, _extends__default["default"]({ | ||
type: type || "button" | ||
@@ -586,7 +564,7 @@ }, commonProps, { | ||
} = props, | ||
sharedButtonCoreProps = _objectWithoutPropertiesLoose(props, _excluded); | ||
sharedButtonCoreProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded); | ||
const renderClickableBehavior = router => { | ||
const ClickableBehavior = wonderBlocksClickable.getClickableBehavior(href, skipClientNav, router); | ||
const renderProp = (state, restChildProps) => { | ||
return React__namespace.createElement(ButtonCore, _extends({}, sharedButtonCoreProps, state, restChildProps, { | ||
return React__namespace.createElement(ButtonCore, _extends__default["default"]({}, sharedButtonCoreProps, state, restChildProps, { | ||
disabled: disabled, | ||
@@ -593,0 +571,0 @@ spinner: spinner || state.waiting, |
{ | ||
"name": "@khanacademy/wonder-blocks-button", | ||
"version": "0.0.0-PR2271-20240712184100", | ||
"version": "0.0.0-PR2275-20240717000016", | ||
"design": "v1", | ||
@@ -19,9 +19,9 @@ "publishConfig": { | ||
"@babel/runtime": "^7.18.6", | ||
"@khanacademy/wonder-blocks-clickable": "0.0.0-PR2271-20240712184100", | ||
"@khanacademy/wonder-blocks-core": "0.0.0-PR2271-20240712184100", | ||
"@khanacademy/wonder-blocks-icon": "0.0.0-PR2271-20240712184100", | ||
"@khanacademy/wonder-blocks-progress-spinner": "0.0.0-PR2271-20240712184100", | ||
"@khanacademy/wonder-blocks-theming": "^2.0.2", | ||
"@khanacademy/wonder-blocks-tokens": "^1.3.0", | ||
"@khanacademy/wonder-blocks-typography": "0.0.0-PR2271-20240712184100" | ||
"@khanacademy/wonder-blocks-clickable": "0.0.0-PR2275-20240717000016", | ||
"@khanacademy/wonder-blocks-core": "0.0.0-PR2275-20240717000016", | ||
"@khanacademy/wonder-blocks-icon": "0.0.0-PR2275-20240717000016", | ||
"@khanacademy/wonder-blocks-progress-spinner": "0.0.0-PR2275-20240717000016", | ||
"@khanacademy/wonder-blocks-theming": "^2.0.3", | ||
"@khanacademy/wonder-blocks-tokens": "^1.3.1", | ||
"@khanacademy/wonder-blocks-typography": "0.0.0-PR2275-20240717000016" | ||
}, | ||
@@ -35,4 +35,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
382476
3959
12
12
2
190
+ Added@khanacademy/wonder-blocks-clickable@0.0.0-PR2275-20240717000016(transitive)
+ Added@khanacademy/wonder-blocks-core@0.0.0-PR2275-20240717000016(transitive)
+ Added@khanacademy/wonder-blocks-icon@0.0.0-PR2275-20240717000016(transitive)
+ Added@khanacademy/wonder-blocks-progress-spinner@0.0.0-PR2275-20240717000016(transitive)
+ Added@khanacademy/wonder-blocks-typography@0.0.0-PR2275-20240717000016(transitive)
- Removed@khanacademy/wonder-blocks-clickable@0.0.0-PR2271-20240712184100(transitive)
- Removed@khanacademy/wonder-blocks-core@0.0.0-PR2271-20240712184100(transitive)
- Removed@khanacademy/wonder-blocks-icon@0.0.0-PR2271-20240712184100(transitive)
- Removed@khanacademy/wonder-blocks-progress-spinner@0.0.0-PR2271-20240712184100(transitive)
- Removed@khanacademy/wonder-blocks-typography@0.0.0-PR2271-20240712184100(transitive)
Updated@khanacademy/wonder-blocks-clickable@0.0.0-PR2275-20240717000016
Updated@khanacademy/wonder-blocks-core@0.0.0-PR2275-20240717000016
Updated@khanacademy/wonder-blocks-icon@0.0.0-PR2275-20240717000016
Updated@khanacademy/wonder-blocks-progress-spinner@0.0.0-PR2275-20240717000016
Updated@khanacademy/wonder-blocks-typography@0.0.0-PR2275-20240717000016