@khanacademy/wonder-blocks-core
Advanced tools
Comparing version 2.3.1 to 2.4.0
@@ -5,3 +5,3 @@ // @flow | ||
// NOTE: Potentially add to this as more cases come up. | ||
type ClickableRole = | ||
export type ClickableRole = | ||
| "button" | ||
@@ -52,3 +52,6 @@ | "link" | ||
*/ | ||
children: (state: State, handlers: ClickableHandlers) => React$Element<*>, | ||
children: ( | ||
state: ClickableState, | ||
handlers: ClickableHandlers, | ||
) => React$Element<*>, | ||
@@ -94,3 +97,3 @@ /** | ||
type State = {| | ||
export type ClickableState = {| | ||
/** | ||
@@ -241,3 +244,6 @@ * Whether the component is hovered. | ||
*/ | ||
export default class ClickableBehavior extends React.Component<Props, State> { | ||
export default class ClickableBehavior extends React.Component< | ||
Props, | ||
ClickableState, | ||
> { | ||
waitingForClick: boolean; | ||
@@ -251,3 +257,3 @@ enterClick: boolean; | ||
static getDerivedStateFromProps(props: Props, state: State) { | ||
static getDerivedStateFromProps(props: Props, state: ClickableState) { | ||
// If new props are disabled, reset the hovered/focused/pressed states | ||
@@ -254,0 +260,0 @@ if (props.disabled) { |
// @flow | ||
import type {ClickableHandlers} from "./components/clickable-behavior.js"; | ||
import type { | ||
ClickableHandlers, | ||
ClickableState, | ||
ClickableRole, | ||
} from "./components/clickable-behavior.js"; | ||
import type {AriaProps, IIdentifierFactory, StyleType} from "./util/types.js"; | ||
@@ -25,2 +29,4 @@ import type {Intersection} from "./util/get-element-intersection.js"; | ||
ClickableHandlers, | ||
ClickableState, | ||
ClickableRole, | ||
Intersection, | ||
@@ -27,0 +33,0 @@ IIdentifierFactory, |
{ | ||
"name": "@khanacademy/wonder-blocks-core", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"design": "v1", | ||
@@ -16,3 +16,3 @@ "publishConfig": { | ||
"dependencies": { | ||
"@khanacademy/wonder-blocks-spacing": "^2.1.5" | ||
"@khanacademy/wonder-blocks-spacing": "^2.1.6" | ||
}, | ||
@@ -19,0 +19,0 @@ "peerDependencies": { |
@@ -103,2 +103,11 @@ // @flow | ||
"aria-controls"?: IdRefList, | ||
// https://www.w3.org/TR/wai-aria-1.1/#aria-current | ||
"aria-current"?: | ||
| "false" | ||
| "true" | ||
| "page" | ||
| "step" | ||
| "location" | ||
| "date" | ||
| "time", | ||
"aria-describedat"?: string, // URI | ||
@@ -105,0 +114,0 @@ "aria-describedby"?: IdRefList, |
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
337166
7187