@kaizen/tailwind 1.3.12 → 1.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/types/tailwind-presets.d.ts +1 -1
  2. package/package.json +5 -5
  3. package/src/_docs/pages/backgrounds/background-color.stories.tsx +1 -1
  4. package/src/_docs/pages/borders/border-color.stories.tsx +1 -1
  5. package/src/_docs/pages/borders/border-radius.stories.tsx +1 -1
  6. package/src/_docs/pages/borders/border-spacing.stories.tsx +1 -1
  7. package/src/_docs/pages/borders/border-width.stories.tsx +1 -1
  8. package/src/_docs/pages/configuration.mdx +22 -15
  9. package/src/_docs/pages/effects/shadow.stories.tsx +1 -1
  10. package/src/_docs/pages/getting-started.mdx +5 -5
  11. package/src/_docs/pages/modifiers/media-queries.stories.tsx +1 -1
  12. package/src/_docs/pages/modifiers/pseudo-states.stories.tsx +1 -1
  13. package/src/_docs/pages/overview.mdx +0 -4
  14. package/src/_docs/pages/spacing/margin.stories.tsx +1 -1
  15. package/src/_docs/pages/spacing/padding.stories.tsx +1 -1
  16. package/src/_docs/pages/typography/font-family.stories.tsx +1 -1
  17. package/src/_docs/pages/typography/font-size.stories.tsx +1 -1
  18. package/src/_docs/pages/typography/font-weight.stories.tsx +1 -1
  19. package/src/_docs/pages/typography/line-height.stories.tsx +1 -1
  20. package/src/_docs/pages/typography/max-text-width.stories.tsx +2 -2
  21. package/src/_docs/pages/typography/text-color.stories.tsx +1 -1
  22. package/src/_docs/pages/working-with-tailwind.mdx +2 -2
  23. package/src/_docs/pages/working-with-tailwind.stories.tsx +2 -2
  24. package/src/_docs/utils/TailwindStoryTemplate/components/CardContent/CardContent.tsx +1 -1
  25. package/src/_docs/utils/TailwindStoryTemplate/components/CodeSnippet/CodeSnippet.tsx +1 -1
  26. package/src/tailwind-presets.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { CustomThemeConfig } from 'tailwindcss/types/config';
1
+ import { type CustomThemeConfig } from 'tailwindcss/types/config';
2
2
  export type KaizenTailwindTheme = Partial<CustomThemeConfig>;
3
3
  export type KaizenTailwindPreset = {
4
4
  theme: KaizenTailwindTheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/tailwind",
3
- "version": "1.3.12",
3
+ "version": "1.3.14",
4
4
  "description": "Kaizen Tailwind presets",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,14 +22,14 @@
22
22
  "private": false,
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
- "@kaizen/design-tokens": "10.8.6"
25
+ "@kaizen/design-tokens": "10.8.8"
26
26
  },
27
27
  "devDependencies": {
28
28
  "classnames": "^2.5.1",
29
- "rollup": "^4.28.0",
30
- "tailwindcss": "^3.4.15",
29
+ "rollup": "^4.35.0",
30
+ "tailwindcss": "^3.4.17",
31
31
  "tslib": "^2.8.1",
32
- "@kaizen/package-bundler": "2.0.3"
32
+ "@kaizen/package-bundler": "2.0.5"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "tailwindcss": ">=3.4.7"
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import classnames from 'classnames'
4
4
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
5
5
  import { flattenEntries } from '~tailwind/_docs/utils/flattenEntries'
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import classnames from 'classnames'
4
4
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
5
5
  import { flattenEntries } from '~tailwind/_docs/utils/flattenEntries'
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import classnames from 'classnames'
4
4
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
5
5
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
4
4
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
5
5
  import { kaizenTailwindTheme } from '~tailwind/tailwind-presets'
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import classnames from 'classnames'
4
4
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
5
5
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
@@ -1,4 +1,4 @@
1
- import { Meta } from '@storybook/blocks'
1
+ import { Meta, Unstyled } from '@storybook/blocks'
2
2
  import { InlineNotification } from '~components/Notification'
3
3
 
4
4
  <Meta title="Guides/Tailwind/Configuration" />
@@ -58,17 +58,24 @@ If this is changed or you are not using the [Frontend Template](https://github.c
58
58
  <div id="#root">{/* Application code */}</div>
59
59
  ```
60
60
 
61
- <InlineNotification persistent type="cautionary" style="inline" title="Changing the selector">
62
- We advise using an <code>id</code> with <code>&quot;#root&quot;</code> as the default selector.
63
- Using different id&apos;s, classes or HTML elements like <code>body</code> as the selector could
64
- result in:
65
- <ul>
66
- <li>
67
- Utility classes not superseding Kaizen defaults when using <code>classNameOverride</code>
68
- </li>
69
- <li>
70
- Duplication of utillity classes in your CSS bundle caused by consuming components with
71
- different <code>important</code> selectors
72
- </li>
73
- </ul>
74
- </InlineNotification>
61
+ <Unstyled>
62
+ <InlineNotification persistent type="cautionary" style="inline" title="Changing the selector">
63
+ {
64
+ <>
65
+ We advise using an <code>id</code> with <code>&quot;#root&quot;</code> as the default
66
+ selector. Using different id&apos;s, classes or HTML elements like <code>body</code> as the
67
+ selector could result in:
68
+ <ul>
69
+ <li>
70
+ Utility classes not superseding Kaizen defaults when using{' '}
71
+ <code>classNameOverride</code>
72
+ </li>
73
+ <li>
74
+ Duplication of utillity classes in your CSS bundle caused by consuming components with
75
+ different <code>important</code> selectors
76
+ </li>
77
+ </ul>
78
+ </>
79
+ }
80
+ </InlineNotification>
81
+ </Unstyled>
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import classnames from 'classnames'
4
4
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
5
5
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
@@ -23,7 +23,7 @@ If your project was created from this template, you should only need to do [Step
23
23
  ## 1. Install the preset
24
24
 
25
25
  ```bash
26
- yarn add -D @kaizen/tailwind
26
+ pnpm add -D @kaizen/tailwind
27
27
  ```
28
28
 
29
29
  ## 2. Implement the Preset
@@ -50,7 +50,7 @@ module.exports = {
50
50
  }
51
51
  ```
52
52
 
53
- For preset configuration options, see our [configuration docs](/story/systems-tailwind-configuration--page)
53
+ For preset configuration options, see our [configuration docs](/story/systems-tailwind-configuration--page).
54
54
 
55
55
  ## 3. Add the Tailwind Directives
56
56
 
@@ -71,11 +71,11 @@ For more information, see [here](https://tailwindcss.com/docs/functions-and-dire
71
71
 
72
72
  Tailwind Play is an online code sandbox with Tailwind set up out of the box. The Kaizen Team has created an instance with the Kaizen Preset values [here](https://play.tailwindcss.com/OUogvUgXQR)
73
73
 
74
- Use this playground to get familiar with our preset, test out new config extensions, create a quick proof of concept, or share code examples with other engineers. Feel free to hit Share - itll create a new url without overriding the one provided here.
74
+ Use this playground to get familiar with our preset, test out new config extensions, create a quick proof of concept, or share code examples with other engineers. Feel free to hit &apos;Share&apos; - it&apos;ll create a new url without overriding the one provided here.
75
75
 
76
76
  <img src={TailwindPlay} alt="Tailwind Play" />
77
77
 
78
- The playground also has a great “Generated CSS” feature that lets you see which css classes are generated by your preset when you implement tailwind utilities. Its a great way to see what Tailwind is doing under the hood.
78
+ The playground also has a great “Generated CSS” feature that let&apos;s you see which css classes are generated by your preset when you implement tailwind utilities. It&apos;s a great way to see what Tailwind is doing under the hood.
79
79
 
80
80
  <div className="flex justify-center">
81
81
  <img src={CssGeneration} alt="CSS Generation" />
@@ -122,4 +122,4 @@ Check it out [here](https://marketplace.visualstudio.com/items?itemName=moalamri
122
122
  ### Prettier plugin
123
123
 
124
124
  Tailwind now has prettier support! 🎉 This [prettier plugin](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) will order your classnames for you.
125
- Wed highly recommend it for the sake of consistency. The Tailwind docs even have a guide [here](https://tailwindcss.com/blog/automatic-class-sorting-with-prettier).
125
+ We&apos;d highly recommend it for the sake of consistency. The Tailwind docs even have a guide [here](https://tailwindcss.com/blog/automatic-class-sorting-with-prettier).
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import { Heading } from '~components/Heading'
4
4
  import { Text } from '~components/Text'
5
5
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import { StickerSheet } from '~storybook/components/StickerSheet'
4
4
 
5
5
  export default {
@@ -7,10 +7,6 @@ import AnatomyDiagram from '../assets/tw-anatomy.png'
7
7
 
8
8
  <br />
9
9
 
10
- ## Caveat before use
11
-
12
- This is an early release of the Kaizen Tailwind Preset - the API may change and evolve as we receive feedback from our teams. We will endeavour to assist where possible if classes or utilities are updated in the future.
13
-
14
10
  ## What our package does
15
11
 
16
12
  The `@kaizen/tailwind` package is essentially a custom Tailwind preset. For more information about Tailwind presets, see their docs [here](https://tailwindcss.com/docs/presets). This package does not change how Tailwind works; it only defines the suffixes that can be applied when constructing utility classes.
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import classnames from 'classnames'
4
4
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
5
5
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import classnames from 'classnames'
4
4
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
5
5
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
4
4
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
5
5
  import { kaizenTailwindTheme } from '~tailwind/tailwind-presets'
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { StoryFn } from '@storybook/react'
2
+ import { type StoryFn } from '@storybook/react'
3
3
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
4
4
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
5
5
  import { kaizenTailwindTheme } from '~tailwind/tailwind-presets'
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
4
4
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
5
5
  import { kaizenTailwindTheme } from '~tailwind/tailwind-presets'
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import classnames from 'classnames'
4
4
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
5
5
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
@@ -1,11 +1,11 @@
1
1
  import React from 'react'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import { type Meta, type StoryFn } from '@storybook/react'
3
3
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
4
4
  import { utilityDescription } from '~tailwind/_docs/utils/utilityDescription'
5
5
  import { kaizenTailwindTheme } from '~tailwind/tailwind-presets'
6
6
 
7
7
  const prefix = 'max-w-'
8
- const classEntries = Object.entries(kaizenTailwindTheme.extend.maxWidth || []).map(
8
+ const classEntries = Object.entries(kaizenTailwindTheme.extend.maxWidth ?? []).map(
9
9
  ([suffix, cssPropertyArr]) => ({
10
10
  utilityClassName: `${prefix}${suffix}`,
11
11
  cssProperty: cssPropertyArr as string,
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { StoryFn } from '@storybook/react'
2
+ import { type StoryFn } from '@storybook/react'
3
3
  import classnames from 'classnames'
4
4
  import { TailwindStoryTemplate } from '~tailwind/_docs/utils/TailwindStoryTemplate'
5
5
  import { flattenEntries } from '~tailwind/_docs/utils/flattenEntries'
@@ -16,7 +16,7 @@ This page describes and demonstrates the main intended use cases for this packag
16
16
 
17
17
  ## Spacing and layouts
18
18
 
19
- For information about Cultureamp's spacing and layout system in general, see [here](/story/systems-layout-and-spacing--page)
19
+ For information about Cultureamp's spacing and layout system in general, see [here](/story/systems-layout-and-spacing--page).
20
20
 
21
21
  When building a page, ideally [Kaizen](https://github.com/cultureamp/kaizen-design-system) components should be used as much as possible, with the front-end engineer responsible for the spacing between them. In these cases, our Tailwind preset makes it easy by adding our spacing tokens to Tailwind's core spacing modules.
22
22
 
@@ -46,7 +46,7 @@ In this example, a Tailwind css rule is being applied to a Kaizen `<Heading />`
46
46
 
47
47
  <Canvas of={Examples.TailwindExampleClassNameOverrideHeading} />
48
48
 
49
- - first-letter:capitalize: Adds text-transform: capitalize on the first-letter pseudo selector
49
+ - `first-letter:capitalize`: Adds text-transform: capitalize on the first-letter pseudo selector
50
50
 
51
51
  <br />
52
52
 
@@ -1,10 +1,10 @@
1
1
  import React from 'react'
2
- import { StoryFn } from '@storybook/react'
2
+ import { type StoryFn } from '@storybook/react'
3
+ import { Button } from '~components/Button'
3
4
  import { Card } from '~components/Card'
4
5
  import { Heading } from '~components/Heading'
5
6
  import { CustomSurvey, CustomUnattributedSurvey } from '~components/Illustration'
6
7
  import { Skirt } from '~components/Skirt'
7
- import { Button } from '~components/__actions__/v2'
8
8
  import { TailwindStoryTemplate } from '../utils/TailwindStoryTemplate'
9
9
 
10
10
  export default {
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
+ import { Button } from '~components/Button'
2
3
  import { Heading } from '~components/Heading'
3
- import { Button } from '~components/__actions__/v2'
4
4
 
5
5
  type CardContentProps = {
6
6
  title: string
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import { Icon } from '~components/__future__'
2
+ import { Icon } from '~components/__next__'
3
3
 
4
4
  type Props = {
5
5
  text: string
@@ -1,4 +1,4 @@
1
- import { CustomThemeConfig } from 'tailwindcss/types/config'
1
+ import { type CustomThemeConfig } from 'tailwindcss/types/config'
2
2
  import { tokens } from '@kaizen/design-tokens/js'
3
3
  import { kzSpacing } from './kz-spacing'
4
4