Theme
The Atlaskit theme framework, helpers and the ADG color palette.
Installation
yarn add @kalamazoo/themeUsage
Detailed docs and example usage can be found here.
The Atlaskit theme framework
The Atlaskit theme framework, helpers and the ADG color palette.
yarn add @kalamazoo/themeDetailed docs and example usage can be found here.
[minor]429925f854:
Adds skeleton color.
Import and use like:
import { skeleton } from '@kalamazoo/theme';
skeleton(); // '#F4F5F7'[minor]f9c291923c:
Corrects the type exports for typography, colors, elevation and layers. If you were doing any dynamic code it may break you. Refer to the upgrade guide for help upgrading.
[patch]3c0f6feee5:
Fixes types property in package json to point to the correct location.
[patch]ea75c17b3a:
internal typescript fixes
[patch]c3dc8235f2:
Preventing circular dep within theme
[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]2119c45dfc:
Add missing Theme/GlobalThemeTokens to constants.d.ts
[patch]35d2229b2a:
Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.
[patch]decd6fceea:
ED-5137 added heading anchor link
Values for heading sizes(h100 - h900) are exported as part of typography. Places need to calculate heights for heading can use those values to calculate.
[patch]8d0f37c23e:
@kalamazoo/avatar has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or behavioural changes.
[patch]94620ae46a:
Updating the temporary ts definition file for Theme.
[minor]c6efb2f5b6:
Prefix the legacy lifecycle methods with UNSAFE_* to avoid warning in React 16.9+
More information about the deprecation of lifecycles methods can be found here: https://reactjs.org/blog/2018/03/29/react-v-16-3.html#component-lifecycle-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
[patch]ecca4d1dbb:
Upgraded Typescript to 3.3.x
[patch]9eceb8379f:
Moves typescript declaration files to the root of theme
[patch]de35ce8c67:
Updates component maintainers
[patch]c6ad66d326:
The types property in package.json now points to the correct file"
[patch]4615439434:
index.ts will now be ignored when publishing to npm
[minor]70862830d6:
[patch]d5f0e7d767:
[major]7c17b35107:
[patch]e0e3fabf8e:
[patch]453838d3c5:
[patch]9c0b4744be:
[patch]9ac668e13d:
[patch]4368278bb4:
import { N500, N0 } from '@kalamazoo/theme/colors';
import { focusRing } from '@kalamazoo/theme/constants';
import { withTheme } from '@kalamazoo/theme/components';[patch]b4732a178b:
[patch]0f17bb7c20:
[patch]7fe933beaa:
[minor]a561af5fc6:
[patch]5150860405:
[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]b46504d2e4:
[patch]1a98f74:
[patch]899fac7:
[patch]ca16fa9:
[major]d13242d: