Checkbox
A checkbox element for use in forms and elsewhere.
Installation
yarn add @kalamazoo/checkbox
Usage
Detailed docs and example usage can be found here.
Checkbox component for use in forms
A checkbox element for use in forms and elsewhere.
yarn add @kalamazoo/checkbox
Detailed docs and example usage can be found here.
[patch]24865cfaff:
Form has been converted to Typescript. TypeScript consumers will now get static type safety. Flow types are no longer provided. No API changes.- [patch]24865cfaff:
fixes disabled checkbox not having correct cursor when hovering over icons- Updated dependencies 24865cfaff:
Updated dependencies 24865cfaff:
[patch]d222c2b987:
Theme has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided.
** getTokens props changes **
When defining the value function passed into a ThemeProvider, the getTokens parameter cannot be called without props; if no props are provided an empty object {}
must be passed in:
<CustomTheme.Provider
value={t => ({ ...t(), backgroundColor: '#333'})}
>
becomes:
<CustomTheme.Provider
value={t => ({ ...t({}), backgroundColor: '#333'})}
>
** Color palette changes ** Color palettes have been moved into their own file. Users will need to update imports from this:
import { colors } from '@kalamazoo/theme';
colors.colorPalette('8');
to this:
import { colorPalette } from '@kalamazoo/theme';
colorPalette.colorPalette('8');
or for multi entry-point users:
import * as colors from '@kalamazoo/theme/colors';
colors.colorPalette('8');
to this:
import * as colorPalettes from '@kalamazoo/theme/color-palette';
colorPalettes.colorPalette('8');
[patch]35d2229b2a:
Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.
[patch]a2d0043716:
Updated version of analytics-next to fix potential incompatibilities with TS 3.6
[minor]f22f6e1e4f:
Adding an optional prop testId
that will set the attribute value data-testid
. It will help products to write better integration and end to end tests.
[major]97bab7fd28:
@kalamazoo/checkbox
10.x includes the following changes:
@kalamazoo/theme
v2 implementationoverrides
prop which enables targeted customisations of key components in the @kalamazoo/checkbox package.HiddenCheckbox and spread props
Passing props to the <Checkbox/>
component for them to be spread onto the underlying <HiddenCheckbox/>
component is now no longer possible.
@kalamazoo/checkbox
still supports passing props down to the <HiddenCheckbox/>
component, however we've opted to make this behaviour more explicit.
Whereas previously you would do this:
<Checkbox
...supportedCheckboxProps
'data-testid'='test-checkbox'
/>
Now you would leverage the overrides prop to pass these props down to the <HiddenCheckbox/>
component like so:
<Checkbox
...supportedCheckboxProps
overrides={{
HiddenCheckbox:{
attributesFn: () => ({ 'data-testid': 'test-checkbox' })
}
}}
/>
[patch]097b696613:
Components now depend on TS 3.6 internally, in order to fix an issue with TS resolving non-relative imports as relative imports
[patch]ecca4d1dbb:
Upgraded Typescript to 3.3.x
[patch]708028db86:
Change all the imports to theme in Core to use multi entry points
[patch]de35ce8c67:
Updates component maintainers
[patch]926b43142b:
Analytics-next has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No behavioural changes.
Breaking changes
withAnalyticsForSumTypeProps
alias has been removed, please use withAnalyticsEvents
AnalyticsContextWrappedComp
alias has been removed, please use withAnalyticsContext
Breaking changes to TypeScript annotations
withAnalyticsEvents
now infers proptypes automatically, consumers no longer need to provide props as a generic type.withAnalyticsContext
now infers proptypes automatically, consumers no longer need to provide props as a generic type.WithAnalyticsEventProps
has been renamed to WithAnalyticsEventsProps
to match source codeCreateUIAnalyticsEventSignature
has been renamed to CreateUIAnalyticsEvent
to match source codeUIAnalyticsEventHandlerSignature
has been renamed to UIAnalyticsEventHandler
to match source codeAnalyticsEventsPayload
has been renamed to AnalyticsEventPayload
ObjectType
has been removed, please use Record<string, any>
or [key: string]: any
UIAnalyticsEventInterface
has been removed, please use UIAnalyticsEvent
AnalyticsEventInterface
has been removed, please use AnalyticsEvent
CreateAndFireEventFunction
removed and should now be inferred by TypeScriptAnalyticsEventUpdater
removed and should now be inferred by TypeScript[patch]9f8ab1084b:
Consume analytics-next ts type definitions as an ambient declaration.
[patch]bbff8a7d87:
Fixes bug, missing version.json file
[patch]18dfac7332:
In this PR, we are:
[patch]d0db01b410:
TypeScript users of withAnalyticsEvents and withAnalyticsContext are now required to provide props as a generic type. This is so that TypeScript can correctly calculate the props and defaultProps of the returned component.
Before:
withAnalyticsEvents()(Button) as ComponentClass<Props>;
After:
withAnalyticsEvents<Props>()(Button);
[major]87a2638655:
Replaced styled-components
with emotion 10
as part of Atlaskit-wide conversion process.
No changes to styling or API; only a breaking change if checkbox is being styled using the styled-components styled
function or via the styled-components theming library.
[patch]9c404c7c44:
Using updated icons
[patch]9c80ef7539:
The update to node 10 reveals that unknown type is breaking the extract react types. I had to replace unknown type by any
[patch]c67483c207:
Fixed a scrollbar bug with checkboxes
[major]70862830d6:
[major]7c17b35107:
[patch]98e11001ff:
[major]76299208e6:
As a breaking change, all @atlaskit packages will be dropping cjs distributions and will only distribute esm. This means all distributed code will be transpiled, but will still contain import
and
export
declarations.
The major reason for doing this is to allow us to support multiple entry points in packages, e.g:
import colors from `@kalamazoo/theme/colors`;
Previously this was sort of possible for consumers by doing something like:
import colors from `@kalamazoo/theme/dist/esm/colors`;
This has a couple of issues. 1, it treats the file system as API making internal refactors harder, we have to worry about how consumers might be using things that aren't actually supposed to be used. 2. We are unable to do this internally in @atlaskit packages. This leads to lots of packages bundling all of theme, just to use a single color, especially in situations where tree shaking fails.
To support being able to use multiple entrypoints internally, we unfortunately cannot have multiple distributions as they would need to have very different imports from of their own internal dependencies.
ES Modules are widely supported by all modern bundlers and can be worked around in node environments.
We may choose to revisit this solution in the future if we find any unintended condequences, but we see this as a pretty sane path forward which should lead to some major bundle size decreases, saner API's and simpler package architecture.
Please reach out to #fabric-build (if in Atlassian) or create an issue in Design System Support (for external) if you have any questions or queries about this.
[patch]c0ad531a70:
[patch]3ae465b6f0:
[patch]b0153ee6c9:
[patch]fad28be: