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

Package detail

@kalamazoo/radio

stevenselcuk17Apache-2.01.0.2TypeScript support: included

A radio group React component used for selecting discrete values in a form

atlaskit, react, ui

readme

Radio

Provides a standard way to select a single option from a list.

Installation

yarn add @kalamazoo/radio

Usage

Detailed docs and example usage can be found here.

changelog

@kalamazoo/radio

3.1.5

Patch Changes

3.1.4

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

3.1.3

Patch Changes

  • [patch]70e57645f2:

    Updates controlled example to show better pattern for state duplication between RadioGroup and Form

3.1.2

Patch Changes

  • [patch]35d2229b2a:

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

3.1.1

Patch Changes

  • [patch]a2d0043716:

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

3.1.0

Minor Changes

  • [minor]ff521a0e20:

    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.

3.0.18

3.0.17

Patch Changes

  • [patch]7dc767eabb:

    onChange is now marked as an optional prop

3.0.16

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

3.0.15

Patch Changes

3.0.14

Patch Changes

  • [patch]708028db86:

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

3.0.13

Patch Changes

  • [patch]de35ce8c67:

    Updates component maintainers

3.0.12

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

3.0.11

Patch Changes

  • [patch]9f8ab1084b:

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

3.0.10

Patch Changes

  • [patch]bbff8a7d87:

    Fixes bug, missing version.json file

3.0.9

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

3.0.8

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

3.0.7

3.0.6

3.0.5

Patch Changes

  • [patch]4615439434:

    index.ts will now be ignored when publishing to npm

3.0.4

Patch Changes

3.0.3

3.0.2

3.0.1

  • [patch]b0ef06c685:

    • This is just a safety release in case anything strange happened in in the previous one. See Pull Request #5942 for details

3.0.0

  • [major]1da5351f72:

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

2.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.

1.0.0

  • [major]6c4e41ff36:

    • This major release indicates that this package is no longer under dev preview but is ready for use

0.5.3

0.5.2

0.5.1

0.5.0

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

0.4.7

  • [patch]942e0aec04:

    • Added test to make sure props are passed hidden input

0.4.6

0.4.5

0.4.4

0.4.3

0.4.2

0.4.1

0.4.0

  • [minor]b42680b:

    • Add isDisabled prop to RadioGroup, once set will set the isDisabled value for all Radio elements within the group

0.3.0

  • [minor]8199088:

    • BREAKING: defaultCheckedValue and checkedValue props in the RadioGroup component now changed to defaultValue and value respectively

0.2.4

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

0.2.3

0.2.2

  • [patch] Fixing analytics events for checkbox/radio/select 3e428e3

0.2.1

  • [patch] Fixed radio indent styling 88520b2

0.2.0

  • [minor] Removed radioInput component, replaced Radio children prop with optional label prop to enable the use case facilitated by RadioInput. Added aria-label prop to Radio for accessibility. Wrapped Radio component in Analytics. 866a29b

0.1.0

  • [minor] Dev release of @kalamazoo/radio 2b37611

0.0.3

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

0.0.1

  • [patch] Bump radio to include the new version of theme. ea62d3d