Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@kalamazoo/checkbox

stevenselcuk29Apache-2.01.0.2TypeScript support: included

Checkbox component for use in forms

atlaskit, react, ui

readme

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.

changelog

@kalamazoo/checkbox

10.1.4

Patch Changes

10.1.3

Patch Changes

  • [patch]d222c2b987:

    Theme has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided.

    Breaking

    ** 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');

10.1.2

Patch Changes

  • [patch]35d2229b2a:

    Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.

10.1.1

Patch Changes

  • [patch]a2d0043716:

    Updated version of analytics-next to fix potential incompatibilities with TS 3.6

10.1.0

Minor Changes

  • [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.

10.0.0

Major Changes

  • [major]97bab7fd28:

    @kalamazoo/checkbox 10.x includes the following changes:

    • Replaced previous theme implementation with new @kalamazoo/theme v2 implementation
      • Please read more about this implementation in the theming guide
    • Added overrides prop which enables targeted customisations of key components in the @kalamazoo/checkbox package.

    Breaking Changes

    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' })
        }
      }}
    />

9.0.9

Patch Changes

  • [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

9.0.8

Patch Changes

9.0.7

Patch Changes

  • [patch]708028db86:

    Change all the imports to theme in Core to use multi entry points

9.0.6

Patch Changes

  • [patch]de35ce8c67:

    Updates component maintainers

9.0.5

Patch Changes

  • [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.
    • Type WithAnalyticsEventProps has been renamed to WithAnalyticsEventsProps to match source code
    • Type CreateUIAnalyticsEventSignature has been renamed to CreateUIAnalyticsEvent to match source code
    • Type UIAnalyticsEventHandlerSignature has been renamed to UIAnalyticsEventHandler to match source code
    • Type AnalyticsEventsPayload has been renamed to AnalyticsEventPayload
    • Type ObjectType has been removed, please use Record<string, any> or [key: string]: any
    • Type UIAnalyticsEventInterface has been removed, please use UIAnalyticsEvent
    • Type AnalyticsEventInterface has been removed, please use AnalyticsEvent
    • Type CreateAndFireEventFunction removed and should now be inferred by TypeScript
    • Type AnalyticsEventUpdater removed and should now be inferred by TypeScript

9.0.4

Patch Changes

  • [patch]9f8ab1084b:

    Consume analytics-next ts type definitions as an ambient declaration.

9.0.3

Patch Changes

  • [patch]bbff8a7d87:

    Fixes bug, missing version.json file

9.0.2

Patch Changes

  • [patch]18dfac7332:

    In this PR, we are:

    • Re-introducing dist build folders
    • Adding back cjs
    • Replacing es5 by cjs and es2015 by esm
    • Creating folders at the root for entry-points
    • Removing the generation of the entry-points at the root Please see this ticket or this page for further details

9.0.1

Patch Changes

  • [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);

9.0.0

Major Changes

  • [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.

8.0.5

8.0.4

Patch Changes

8.0.3

Patch Changes

  • [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

8.0.2

8.0.1

Patch Changes

  • [patch]c67483c207:

    Fixed a scrollbar bug with checkboxes

8.0.0

  • [major]70862830d6:

    • Checkbox has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or behavioural changes.

7.0.1

7.0.0

  • [major]7c17b35107:

    • Updates react and react-dom peer dependencies to react@^16.8.0 and react-dom@^16.8.0. To use this package, please ensure you use at least this version of react and react-dom.

6.0.4

6.0.3

6.0.2

  • [patch]98e11001ff:

    • Removes duplicate babel-runtime dependency

6.0.1

6.0.0

  • [major]76299208e6:

    • Drop ES5 from all the flow modules

    Dropping CJS support in all @atlaskit packages

    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.

5.0.14

  • [patch]c0ad531a70:

    • Added test to make use props are passed down to hidden input

5.0.13

  • [patch]3ae465b6f0:

    • fix for checkbox logging error on mount

5.0.12

  • [patch]b0153ee6c9:

    • Enabled the isRequired validation on checkbox and added the asterisk after the checkbox label to signify the required field

5.0.11

5.0.10

  • [patch]fad28be:

    • Fixing invalid type for checkbox id prop

5.0.9

5.0.8

5.0.7

5.0.6

5.0.5

  • [patch] Upgrade guide & minor flow type fixes 0be287d

5.0.4

  • [patch] Adds missing implicit @babel/runtime dependency b71751b

5.0.3

  • [patch] Fixed bug where checkbox would use state isChecked value when passing false to isChecked as props eaf8d16

5.0.2

5.0.1

  • [patch] Checkbox now only fires onChange once c78e59e

5.0.0

  • [major] Checkbox refactored to remove the need for CheckboxStateless 80e1925

4.0.6

  • [patch] Adds sideEffects: false to allow proper tree shaking b5d6d04

4.0.4

4.0.3

4.0.2

4.0.1

4.0.0

3.1.3

  • [patch] Button should be a dev dependency 50ca31b
  • [none] Updated dependencies 50ca31b

3.1.2

3.1.1

  • [patch] update to active box color of checkbox to b50 to inline with ADG3 guideline 21073ca
  • [none] Updated dependencies 21073ca

3.1.0

3.0.6

3.0.5

3.0.4

3.0.3

  • [patch] ref prop on checkbox stateless component is now reference to class 05b4ffd
  • [none] Updated dependencies 05b4ffd

3.0.2

  • [patch] Fix for flow 33f632f
  • [patch] Update onChange function to pass type for name and value f3e768c
  • [none] Updated dependencies 33f632f
  • [none] Updated dependencies f3e768c

3.0.1

3.0.0

2.1.0

  • [minor] Updated the appearance for checkbox and radio items ece7426
  • [none] Updated dependencies ece7426

2.0.2

2.0.0

  • [major] Bump to React 16.3. 4251858

1.4.0

  • [minor] Add indeterminate prop to stateless checkbox 3fc6c5e

1.3.1

  • [patch] Re-releasing due to potentially broken babel release 9ed0bba

1.3.0

  • [minor] Update styled-components dependency to support versions 1.4.6 - 3 ceccf30

1.2.3

1.2.2

  • [patch] Packages Flow types for elements components 3111e74

1.2.1

  • [patch] Resolved low hanging flow errors in field-base field-text comment icon item and website, $ 007de27

1.2.0

  • [minor] Add React 16 support. 12ea6e4

1.1.8

  • [patch] update flow dep, fix flow errors 722ad83

1.1.7

  • [patch] Updates dependency on button to 6.0.0 2b02ebc
  • [patch] Moved to new repo & build system. Cleaned up docs & examples & added Flow 9b55672

1.1.6 (2017-11-24)

Bug Fixes

  • component: fixed typo in Checkbox defaultProps (4388a11)

1.1.5 (2017-11-22)

Bug Fixes

  • component: checkbox and radio should not highlight when parent element is focused (5c900ff)
  • component: removed focus styling from radio and checkbox svg as they will never be focused (ec68128)

1.1.4 (2017-11-15)

Bug Fixes

  • component: bumping internal dependencies to latest major version (91833c3)

1.1.3 (2017-10-27)

Bug Fixes

  • stories: rebuild stories (7aa7337)

1.1.2 (2017-10-22)

Bug Fixes

  • package: update dependencies for react-16 (077d1ad)

1.1.1 (2017-10-10)

Bug Fixes

  • package: removed internal label from keywords (b76b4f2)

1.1.0 (2017-09-27)

Bug Fixes

  • component: change margin of icon (4459e96)

Features

  • component: dark mode checkbox (554c978)

1.0.0 (2017-09-13)

Features

  • component: create checkbox component (5ce7055)