@kaizen/tailwind 1.2.14 → 1.3.0

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 (77) hide show
  1. package/dist/cjs/index.cjs +5 -0
  2. package/dist/cjs/kz-spacing.cjs +21 -0
  3. package/dist/cjs/tailwind-presets.cjs +112 -0
  4. package/dist/esm/index.mjs +1 -0
  5. package/dist/esm/kz-spacing.mjs +18 -0
  6. package/dist/esm/tailwind-presets.mjs +109 -0
  7. package/dist/{index.d.ts → types/index.d.ts} +0 -1
  8. package/dist/{kz-height.d.ts → types/kz-height.d.ts} +0 -1
  9. package/dist/{kz-spacing.d.ts → types/kz-spacing.d.ts} +0 -1
  10. package/dist/{tailwind-presets.d.ts → types/tailwind-presets.d.ts} +0 -1
  11. package/package.json +16 -5
  12. package/src/_docs/assets/copy-utility-class.gif +0 -0
  13. package/src/_docs/assets/css-generation.png +0 -0
  14. package/src/_docs/assets/inline-fold.gif +0 -0
  15. package/src/_docs/assets/tailwind-play.gif +0 -0
  16. package/src/_docs/assets/tw-anatomy.png +0 -0
  17. package/src/_docs/assets/utility-search-result.png +0 -0
  18. package/src/_docs/pages/backgrounds/background-color.mdx +10 -0
  19. package/src/_docs/pages/backgrounds/background-color.stories.tsx +43 -0
  20. package/src/_docs/pages/borders/border-color.mdx +10 -0
  21. package/src/_docs/pages/borders/border-color.stories.tsx +45 -0
  22. package/src/_docs/pages/borders/border-radius.mdx +10 -0
  23. package/src/_docs/pages/borders/border-radius.stories.tsx +47 -0
  24. package/src/_docs/pages/borders/border-spacing.mdx +10 -0
  25. package/src/_docs/pages/borders/border-spacing.stories.tsx +52 -0
  26. package/src/_docs/pages/borders/border-width.mdx +28 -0
  27. package/src/_docs/pages/borders/border-width.stories.tsx +47 -0
  28. package/src/_docs/pages/configuration.mdx +78 -0
  29. package/src/_docs/pages/contributing.mdx +38 -0
  30. package/src/_docs/pages/effects/shadow.mdx +10 -0
  31. package/src/_docs/pages/effects/shadow.stories.tsx +40 -0
  32. package/src/_docs/pages/getting-started.mdx +125 -0
  33. package/src/_docs/pages/modifiers/media-queries.mdx +16 -0
  34. package/src/_docs/pages/modifiers/media-queries.stories.tsx +81 -0
  35. package/src/_docs/pages/modifiers/pseudo-states.mdx +26 -0
  36. package/src/_docs/pages/modifiers/pseudo-states.stories.tsx +49 -0
  37. package/src/_docs/pages/overview.mdx +26 -0
  38. package/src/_docs/pages/spacing/margin.mdx +27 -0
  39. package/src/_docs/pages/spacing/margin.stories.tsx +49 -0
  40. package/src/_docs/pages/spacing/padding.mdx +27 -0
  41. package/src/_docs/pages/spacing/padding.stories.tsx +47 -0
  42. package/src/_docs/pages/typography/font-family.mdx +10 -0
  43. package/src/_docs/pages/typography/font-family.stories.tsx +41 -0
  44. package/src/_docs/pages/typography/font-size.mdx +10 -0
  45. package/src/_docs/pages/typography/font-size.stories.tsx +38 -0
  46. package/src/_docs/pages/typography/font-weight.mdx +10 -0
  47. package/src/_docs/pages/typography/font-weight.stories.tsx +41 -0
  48. package/src/_docs/pages/typography/line-height.mdx +10 -0
  49. package/src/_docs/pages/typography/line-height.stories.tsx +44 -0
  50. package/src/_docs/pages/typography/max-text-width.mdx +12 -0
  51. package/src/_docs/pages/typography/max-text-width.stories.tsx +60 -0
  52. package/src/_docs/pages/typography/text-color.mdx +10 -0
  53. package/src/_docs/pages/typography/text-color.stories.tsx +52 -0
  54. package/src/_docs/pages/utility-class-helpers-overview.mdx +95 -0
  55. package/src/_docs/pages/working-with-tailwind.mdx +85 -0
  56. package/src/_docs/pages/working-with-tailwind.stories.tsx +100 -0
  57. package/src/_docs/utils/TailwindStoryTemplate/TailwindStoryTemplate.tsx +81 -0
  58. package/src/_docs/utils/TailwindStoryTemplate/components/CardContent/CardContent.tsx +26 -0
  59. package/src/_docs/utils/TailwindStoryTemplate/components/CardContent/index.ts +1 -0
  60. package/src/_docs/utils/TailwindStoryTemplate/components/CodeSnippet/CodeSnippet.tsx +36 -0
  61. package/src/_docs/utils/TailwindStoryTemplate/components/CodeSnippet/index.ts +1 -0
  62. package/src/_docs/utils/TailwindStoryTemplate/index.ts +1 -0
  63. package/src/_docs/utils/flattenEntries.ts +37 -0
  64. package/src/_docs/utils/utilityDescription.ts +5 -0
  65. package/src/tailwind-presets.ts +53 -53
  66. package/dist/index.d.ts.map +0 -1
  67. package/dist/index.js +0 -18
  68. package/dist/index.js.map +0 -1
  69. package/dist/kz-height.d.ts.map +0 -1
  70. package/dist/kz-height.js +0 -16
  71. package/dist/kz-height.js.map +0 -1
  72. package/dist/kz-spacing.d.ts.map +0 -1
  73. package/dist/kz-spacing.js +0 -41
  74. package/dist/kz-spacing.js.map +0 -1
  75. package/dist/tailwind-presets.d.ts.map +0 -1
  76. package/dist/tailwind-presets.js +0 -112
  77. package/dist/tailwind-presets.js.map +0 -1
@@ -0,0 +1,100 @@
1
+ import React from "react"
2
+ import { StoryFn } from "@storybook/react"
3
+ import { Card } from "~components/Card"
4
+ import { Heading } from "~components/Heading"
5
+ import {
6
+ CustomSurvey,
7
+ CustomUnattributedSurvey,
8
+ } from "~components/Illustration"
9
+ import { Skirt } from "~components/Skirt"
10
+ import { Button } from "~components/__actions__/v2"
11
+ import { TailwindStoryTemplate } from "../utils/TailwindStoryTemplate"
12
+
13
+ export default {
14
+ title: "Guides/Tailwind/Working with Tailwind",
15
+ }
16
+
17
+ export const TailwindExampleSpacingAndLayouts: StoryFn = () => (
18
+ <div className="flex justify-center border-solid p-16">
19
+ <Button label="Kaizen Button" primary />
20
+ </div>
21
+ )
22
+
23
+ export const TailwindExampleSpacingAndLayoutsComplex: StoryFn = () => (
24
+ <>
25
+ <Skirt>
26
+ <Heading variant="heading-2" color="white" classNameOverride="pt-24">
27
+ Laid out with Tailwind
28
+ </Heading>
29
+ <Card variant="informative" classNameOverride="mt-24">
30
+ <div className="h-[300px]" />
31
+ </Card>
32
+ </Skirt>
33
+ {/* Adds flex, makes the width 100% and centers content */}
34
+ <div className="flex w-full justify-center">
35
+ {/* Adds margins, width, and max width */}
36
+ <div className="mx-72 my-24 w-full max-w-[1392px]">
37
+ {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
38
+ <a
39
+ className="font-weight-[500px] font-family-paragraph text-heading-5 text-blue-500"
40
+ href="#"
41
+ >
42
+ Clickable link
43
+ </a>
44
+ {/* Adds spacing with margin-top */}
45
+ <p className="mt-12 font-family-paragraph text-heading-6 font-weight-paragraph leading-paragraph-sm text-purple-800">
46
+ Supporting text
47
+ </p>
48
+ {/* Adds margin-top, flex, and a height of 200px */}
49
+ <div className="mt-64 flex h-[200px]">
50
+ {[0, 1, 2, 3].map(index => (
51
+ <Card
52
+ key={index}
53
+ variant="informative"
54
+ classNameOverride="mr-24 last:mr-0 w-full"
55
+ >
56
+ {/* Adds height and width of 100% */}
57
+ <div className="w-full h-100" />
58
+ </Card>
59
+ ))}
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </>
64
+ )
65
+
66
+ export const TailwindExampleClassNameOverrideMargin: StoryFn = () => (
67
+ <div className="flex justify-center">
68
+ {/* Adds margin-right: 24px */}
69
+ <Card classNameOverride="mr-24">
70
+ <TailwindStoryTemplate.CardContent
71
+ title="Card 1"
72
+ illustration={<CustomSurvey alt="custom-survey" />}
73
+ />
74
+ </Card>
75
+ <Card>
76
+ <TailwindStoryTemplate.CardContent
77
+ title="Card 2"
78
+ illustration={
79
+ <CustomUnattributedSurvey alt="custom-unattributed-survey" />
80
+ }
81
+ />
82
+ </Card>
83
+ </div>
84
+ )
85
+
86
+ export const TailwindExampleClassNameOverrideHeading: StoryFn = () => (
87
+ <Heading variant="heading-1" classNameOverride="first-letter:capitalize">
88
+ capitalize me with tailwind
89
+ </Heading>
90
+ )
91
+
92
+ export const TailwindExampleSnowflake: StoryFn = () => (
93
+ <div className="flex justify-center">
94
+ <div className="w-[250px] rounded border-dashed border-red-500 bg-blue-100">
95
+ <p className="m-0 p-12 pl-16 font-family-paragraph text-blue-500 text-center">
96
+ Not a Kaizen Component
97
+ </p>
98
+ </div>
99
+ </div>
100
+ )
@@ -0,0 +1,81 @@
1
+ import React, { useState } from "react"
2
+ import { InlineNotification } from "~components/Notification"
3
+ import { StickerSheet } from "~storybook/components/StickerSheet"
4
+ import { CardContent } from "./components/CardContent"
5
+ import { CodeSnippet } from "./components/CodeSnippet"
6
+
7
+ type Props = {
8
+ compiledCssPropertyName: string
9
+ classKeyValues: Array<{ utilityClassName: string; cssProperty: string }>
10
+ renderExampleComponent: (utilityClass: string) => React.ReactElement
11
+ isReversed?: boolean
12
+ }
13
+
14
+ export const TailwindStoryTemplate = ({
15
+ compiledCssPropertyName,
16
+ classKeyValues,
17
+ renderExampleComponent,
18
+ isReversed = false,
19
+ }: Props): React.ReactElement => {
20
+ const [copiedText, setCopiedText] = useState<null | string>(null)
21
+
22
+ return (
23
+ <div className="w-full">
24
+ <StickerSheet
25
+ className="border-none w-full"
26
+ isReversed={isReversed}
27
+ border={1}
28
+ rules="rows"
29
+ >
30
+ <StickerSheet.Header
31
+ className="text-left border-b border-gray-400"
32
+ headings={["Utility Class", "Compiled CSS", "Example"]}
33
+ />
34
+ <StickerSheet.Body>
35
+ {classKeyValues.map((presetData, _index) => {
36
+ const { utilityClassName, cssProperty } = presetData
37
+ return (
38
+ <StickerSheet.Row
39
+ key={_index}
40
+ rowTitle=""
41
+ className="border-b-1 border-gray-400"
42
+ >
43
+ <div className="mr-32 min-w-max max-w-[300px]">
44
+ <CodeSnippet
45
+ text={utilityClassName.replace("-DEFAULT", "")}
46
+ onCopy={(text: string): void => setCopiedText(text)}
47
+ />
48
+ </div>
49
+ <p className="mr-32 w-max font-family-paragraph">
50
+ {compiledCssPropertyName}: {cssProperty}
51
+ </p>
52
+ <div className="font-family-paragraph">
53
+ {renderExampleComponent(utilityClassName)}
54
+ </div>
55
+ </StickerSheet.Row>
56
+ )
57
+ })}
58
+ </StickerSheet.Body>
59
+ </StickerSheet>
60
+ <div className="fixed top-[10px] left-[10px]">
61
+ {copiedText && (
62
+ <InlineNotification
63
+ type="positive"
64
+ hideCloseIcon
65
+ onHide={(): void => setCopiedText(null)}
66
+ headingProps={{
67
+ children: "Copied to clipboard: ",
68
+ variant: "heading-6",
69
+ }}
70
+ >
71
+ {copiedText}
72
+ </InlineNotification>
73
+ )}
74
+ </div>
75
+ </div>
76
+ )
77
+ }
78
+
79
+ TailwindStoryTemplate.CardContent = CardContent
80
+
81
+ TailwindStoryTemplate.displayName = "TailwindStoryTemplate"
@@ -0,0 +1,26 @@
1
+ import React from "react"
2
+ import { Heading } from "~components/Heading"
3
+ import { Button } from "~components/__actions__/v2"
4
+
5
+ type CardContentProps = {
6
+ title: string
7
+ illustration: React.ReactElement
8
+ }
9
+
10
+ export const CardContent = ({
11
+ title,
12
+ illustration,
13
+ }: CardContentProps): React.ReactElement => (
14
+ <div className="flex w-[400px] flex-col items-center p-24 pt-48">
15
+ <Heading variant="heading-3">{title}</Heading>
16
+ <p className="pt-12 pb-24 text-center font-family-paragraph text-heading-6 font-weight-paragraph text-purple-800">
17
+ Lorem ipsum oogum boogum. Tutant meenage neetle teetles.
18
+ </p>
19
+ <div className="w-[200px]">{illustration}</div>
20
+ <div className="pt-24">
21
+ <Button label="Button" />
22
+ </div>
23
+ </div>
24
+ )
25
+
26
+ CardContent.displayName = "CardContent"
@@ -0,0 +1 @@
1
+ export * from "./CardContent"
@@ -0,0 +1,36 @@
1
+ import React, { useState } from "react"
2
+ import { ClosedIcon, SurveysIcon } from "~components/Icon"
3
+
4
+ type Props = {
5
+ text: string
6
+ onCopy?: (text: string) => void
7
+ }
8
+
9
+ export const CodeSnippet = ({ text, onCopy }: Props): React.ReactElement => {
10
+ const [copyIconIsChecked, setCopyIconIsChecked] = useState(false)
11
+ const handleCopy = (utilityClassNameName: string): void => {
12
+ navigator.clipboard.writeText(text)
13
+ setCopyIconIsChecked(true)
14
+ onCopy && onCopy(utilityClassNameName)
15
+ }
16
+
17
+ return (
18
+ <button
19
+ type="button"
20
+ className="bg-[#00182e] h-min rounded px-12 border-none cursor-pointer w-full"
21
+ onClick={(): void => handleCopy(text)}
22
+ onBlur={(): void => setCopyIconIsChecked(false)}
23
+ >
24
+ <p className="font-family-paragraph text-white flex justify-between items-center">
25
+ <span>{text}</span>
26
+ <span className="text-underline text-white">
27
+ {copyIconIsChecked ? (
28
+ <ClosedIcon role="img" aria-label="copied" />
29
+ ) : (
30
+ <SurveysIcon role="img" aria-label="copy" />
31
+ )}
32
+ </span>
33
+ </p>
34
+ </button>
35
+ )
36
+ }
@@ -0,0 +1 @@
1
+ export * from "./CodeSnippet"
@@ -0,0 +1 @@
1
+ export * from "./TailwindStoryTemplate"
@@ -0,0 +1,37 @@
1
+ type RecursiveKeyValuePair<K extends keyof any = string, V = string> = {
2
+ [key: string]: V | RecursiveKeyValuePair<K, V>
3
+ }
4
+ // needed until we can use satisfies to create a similar object to tailwind class consumption
5
+ type ResolvableTo<T> = T | ((utils: any) => T)
6
+
7
+ export const flattenEntries = (
8
+ prefix: string,
9
+ themeObj: ResolvableTo<RecursiveKeyValuePair<string, string>>
10
+ ): Array<{
11
+ utilityClassName: string
12
+ cssProperty: string
13
+ }> => {
14
+ const classKeyVal: string[][] = Object.entries(themeObj || [])
15
+ const flattenedEntries: Array<{
16
+ utilityClassName: string
17
+ cssProperty: string
18
+ }> = []
19
+ classKeyVal.forEach(colorGroup => {
20
+ const [classModifier, cssProperty] = colorGroup
21
+ if (typeof cssProperty === "string") {
22
+ flattenedEntries.push({
23
+ utilityClassName: `${prefix}${classModifier}`,
24
+ cssProperty,
25
+ })
26
+ } else {
27
+ Object.entries(cssProperty as Record<string, string>).forEach(
28
+ classNamePair =>
29
+ flattenedEntries.push({
30
+ utilityClassName: `${prefix}${classModifier}-${classNamePair[0]}`,
31
+ cssProperty: classNamePair[1],
32
+ })
33
+ )
34
+ }
35
+ })
36
+ return flattenedEntries
37
+ }
@@ -0,0 +1,5 @@
1
+ export const utilityDescription = (
2
+ prefix: string,
3
+ utilityClassName: string
4
+ ): string =>
5
+ `Use class \`${prefix}\\<SUFFIX>\`, ie: \`className="${utilityClassName}"\``
@@ -1,5 +1,5 @@
1
1
  import { CustomThemeConfig } from "tailwindcss/types/config"
2
- import { defaultTheme } from "@kaizen/design-tokens/"
2
+ import { tokens } from "@kaizen/design-tokens/js"
3
3
  import { kzSpacing } from "./kz-spacing"
4
4
 
5
5
  export type KaizenTailwindTheme = Partial<CustomThemeConfig>
@@ -11,24 +11,24 @@ export type KaizenTailwindPreset = {
11
11
  export const kaizenTailwindTheme: KaizenTailwindTheme = {
12
12
  extend: {
13
13
  maxWidth: {
14
- paragraph: `${defaultTheme.typography.paragraphBody.maxWidth}`,
15
- "paragraph-lede": `${defaultTheme.typography.paragraphIntroLede.maxWidth}`,
16
- "paragraph-sm": `${defaultTheme.typography.paragraphSmall.maxWidth}`,
17
- "paragraph-xs": `${defaultTheme.typography.paragraphExtraSmall.maxWidth}`,
14
+ paragraph: `${tokens.typography.paragraphBody.maxWidth}`,
15
+ "paragraph-lede": `${tokens.typography.paragraphIntroLede.maxWidth}`,
16
+ "paragraph-sm": `${tokens.typography.paragraphSmall.maxWidth}`,
17
+ "paragraph-xs": `${tokens.typography.paragraphExtraSmall.maxWidth}`,
18
18
  },
19
19
  },
20
20
  colors: {
21
21
  transparent: "transparent",
22
22
  current: "currentColor",
23
23
  inherit: "inherit",
24
- ...defaultTheme.color,
25
- ...defaultTheme.dataViz,
24
+ ...tokens.color,
25
+ ...tokens.dataViz,
26
26
  },
27
27
  spacing: kzSpacing,
28
28
  boxShadow: {
29
29
  none: "none",
30
- sm: defaultTheme.shadow.small.boxShadow,
31
- lg: defaultTheme.shadow.large.boxShadow,
30
+ sm: tokens.shadow.small.boxShadow,
31
+ lg: tokens.shadow.large.boxShadow,
32
32
  },
33
33
  borderRadius: {
34
34
  DEFAULT: "7px",
@@ -45,35 +45,35 @@ export const kaizenTailwindTheme: KaizenTailwindTheme = {
45
45
  "focus-ring": "2px",
46
46
  },
47
47
  borderColor: {
48
- "default-color": `${defaultTheme.border.solid.borderColor}`,
49
- transparent: `${defaultTheme.border.borderless.borderColor}`,
50
- "focus-ring": defaultTheme.color.blue[600],
51
- ...defaultTheme.color,
48
+ "default-color": `${tokens.border.solid.borderColor}`,
49
+ transparent: `${tokens.border.borderless.borderColor}`,
50
+ "focus-ring": tokens.color.blue[600],
51
+ ...tokens.color,
52
52
  },
53
53
  fontFamily: {
54
- "family-paragraph": [`${defaultTheme.typography.paragraphBody.fontFamily}`],
55
- "family-heading": [`${defaultTheme.typography.heading1.fontFamily}`],
56
- "family-data": [`${defaultTheme.typography.dataLarge.fontFamily}`],
57
- "family-display": [`${defaultTheme.typography.display0.fontFamily}`],
54
+ "family-paragraph": [`${tokens.typography.paragraphBody.fontFamily}`],
55
+ "family-heading": [`${tokens.typography.heading1.fontFamily}`],
56
+ "family-data": [`${tokens.typography.dataLarge.fontFamily}`],
57
+ "family-display": [`${tokens.typography.display0.fontFamily}`],
58
58
  },
59
59
  fontSize: {
60
- display: `${defaultTheme.typography.display0.fontSize}`,
61
- "heading-1": `${defaultTheme.typography.heading1.fontSize}`,
62
- "heading-2": `${defaultTheme.typography.heading2.fontSize}`,
63
- "heading-3": `${defaultTheme.typography.heading3.fontSize}`,
64
- "heading-4": `${defaultTheme.typography.heading4.fontSize}`,
65
- "heading-5": `${defaultTheme.typography.heading5.fontSize}`,
66
- "heading-6": `${defaultTheme.typography.heading6.fontSize}`,
67
- paragraph: `${defaultTheme.typography.paragraphBody.fontSize}`,
68
- "paragraph-lede": `${defaultTheme.typography.paragraphIntroLede.fontSize}`,
69
- "paragraph-sm": `${defaultTheme.typography.paragraphSmall.fontSize}`,
70
- "paragraph-xs": `${defaultTheme.typography.paragraphExtraSmall.fontSize}`,
71
- "data-lg": `${defaultTheme.typography.dataLarge.fontSize}`,
72
- "data-md": `${defaultTheme.typography.dataMedium.fontSize}`,
73
- "data-sm": `${defaultTheme.typography.dataSmall.fontSize}`,
74
- "data-units-lg": `${defaultTheme.typography.dataLargeUnits.fontSize}`,
75
- "data-units-md": `${defaultTheme.typography.dataMediumUnits.fontSize}`,
76
- "data-units-sm": `${defaultTheme.typography.dataSmallUnits.fontSize}`,
60
+ display: `${tokens.typography.display0.fontSize}`,
61
+ "heading-1": `${tokens.typography.heading1.fontSize}`,
62
+ "heading-2": `${tokens.typography.heading2.fontSize}`,
63
+ "heading-3": `${tokens.typography.heading3.fontSize}`,
64
+ "heading-4": `${tokens.typography.heading4.fontSize}`,
65
+ "heading-5": `${tokens.typography.heading5.fontSize}`,
66
+ "heading-6": `${tokens.typography.heading6.fontSize}`,
67
+ paragraph: `${tokens.typography.paragraphBody.fontSize}`,
68
+ "paragraph-lede": `${tokens.typography.paragraphIntroLede.fontSize}`,
69
+ "paragraph-sm": `${tokens.typography.paragraphSmall.fontSize}`,
70
+ "paragraph-xs": `${tokens.typography.paragraphExtraSmall.fontSize}`,
71
+ "data-lg": `${tokens.typography.dataLarge.fontSize}`,
72
+ "data-md": `${tokens.typography.dataMedium.fontSize}`,
73
+ "data-sm": `${tokens.typography.dataSmall.fontSize}`,
74
+ "data-units-lg": `${tokens.typography.dataLargeUnits.fontSize}`,
75
+ "data-units-md": `${tokens.typography.dataMediumUnits.fontSize}`,
76
+ "data-units-sm": `${tokens.typography.dataSmallUnits.fontSize}`,
77
77
  },
78
78
  fontWeight: {
79
79
  "weight-paragraph": "400",
@@ -83,31 +83,31 @@ export const kaizenTailwindTheme: KaizenTailwindTheme = {
83
83
  "weight-display": "800",
84
84
  },
85
85
  lineHeight: {
86
- display: `${defaultTheme.typography.display0.lineHeight}`,
87
- "heading-1": `${defaultTheme.typography.heading1.lineHeight}`,
88
- "heading-2": `${defaultTheme.typography.heading2.lineHeight}`,
89
- "heading-3": `${defaultTheme.typography.heading3.lineHeight}`,
90
- "heading-4": `${defaultTheme.typography.heading4.lineHeight}`,
91
- "heading-5": `${defaultTheme.typography.heading5.lineHeight}`,
92
- "heading-6": `${defaultTheme.typography.heading6.lineHeight}`,
93
- paragraph: `${defaultTheme.typography.paragraphBody.lineHeight}`,
94
- "paragraph-lede": `${defaultTheme.typography.paragraphIntroLede.lineHeight}`,
95
- "paragraph-sm": `${defaultTheme.typography.paragraphSmall.lineHeight}`,
96
- "paragraph-xs": `${defaultTheme.typography.paragraphExtraSmall.lineHeight}`,
97
- "data-lg": `${defaultTheme.typography.dataLarge.lineHeight}`,
98
- "data-md": `${defaultTheme.typography.dataMedium.lineHeight}`,
99
- "data-sm": `${defaultTheme.typography.dataSmall.lineHeight}`,
100
- "data-units-lg": `${defaultTheme.typography.dataLargeUnits.lineHeight}`,
101
- "data-units-md": `${defaultTheme.typography.dataMediumUnits.lineHeight}`,
102
- "data-units-sm": `${defaultTheme.typography.dataSmallUnits.lineHeight}`,
86
+ display: `${tokens.typography.display0.lineHeight}`,
87
+ "heading-1": `${tokens.typography.heading1.lineHeight}`,
88
+ "heading-2": `${tokens.typography.heading2.lineHeight}`,
89
+ "heading-3": `${tokens.typography.heading3.lineHeight}`,
90
+ "heading-4": `${tokens.typography.heading4.lineHeight}`,
91
+ "heading-5": `${tokens.typography.heading5.lineHeight}`,
92
+ "heading-6": `${tokens.typography.heading6.lineHeight}`,
93
+ paragraph: `${tokens.typography.paragraphBody.lineHeight}`,
94
+ "paragraph-lede": `${tokens.typography.paragraphIntroLede.lineHeight}`,
95
+ "paragraph-sm": `${tokens.typography.paragraphSmall.lineHeight}`,
96
+ "paragraph-xs": `${tokens.typography.paragraphExtraSmall.lineHeight}`,
97
+ "data-lg": `${tokens.typography.dataLarge.lineHeight}`,
98
+ "data-md": `${tokens.typography.dataMedium.lineHeight}`,
99
+ "data-sm": `${tokens.typography.dataSmall.lineHeight}`,
100
+ "data-units-lg": `${tokens.typography.dataLargeUnits.lineHeight}`,
101
+ "data-units-md": `${tokens.typography.dataMediumUnits.lineHeight}`,
102
+ "data-units-sm": `${tokens.typography.dataSmallUnits.lineHeight}`,
103
103
  },
104
104
  letterSpacing: {
105
105
  "letter-spacing-normal": "normal",
106
106
  },
107
107
  // A mix of layout styles
108
108
  screens: {
109
- md: defaultTheme.layout.breakpoints.medium, // => @media (min-width: 768px) { ... }
110
- lg: defaultTheme.layout.breakpoints.large, // => @media (min-width: 1080px) { ... }
109
+ md: tokens.layout.breakpoints.medium, // => @media (min-width: 768px) { ... }
110
+ lg: tokens.layout.breakpoints.large, // => @media (min-width: 1080px) { ... }
111
111
  },
112
112
  } as const
113
113
 
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
package/dist/index.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./tailwind-presets"), exports);
18
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAkC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"kz-height.d.ts","sourceRoot":"","sources":["../src/kz-height.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;CAWpB,CAAA"}
package/dist/kz-height.js DELETED
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.kzHeight = void 0;
4
- exports.kzHeight = {
5
- 0: "0",
6
- 25: "25%",
7
- 33: "33.333333%",
8
- 50: "50%",
9
- 75: "75%",
10
- 100: "100%",
11
- auto: "auto",
12
- min: "min-content",
13
- max: "max-content",
14
- fit: "fit-content",
15
- };
16
- //# sourceMappingURL=kz-height.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kz-height.js","sourceRoot":"","sources":["../src/kz-height.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACtB,CAAC,EAAE,GAAG;IACN,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,YAAY;IAChB,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,aAAa;CACnB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"kz-spacing.d.ts","sourceRoot":"","sources":["../src/kz-spacing.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,oBAAoB,wBACV,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC1C,MAAM,CAAC,MAAM,EAAE,MAAM,CAIvB,CAAA;AAED,eAAO,MAAM,SAAS,wBAA2C,CAAA"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.kzSpacing = exports.filterDenyListValues = void 0;
4
- var design_tokens_1 = require("@kaizen/design-tokens");
5
- var tokenDenyList = [
6
- "xs",
7
- "sm",
8
- "md",
9
- "lg",
10
- "xl",
11
- "xxl",
12
- "xxxl",
13
- "xxxxl",
14
- "xxxxxl",
15
- "xs-id",
16
- "sm-id",
17
- "md-id",
18
- "lg-id",
19
- "xl-id",
20
- "xxl-id",
21
- "xxxl-id",
22
- "xxxxl-id",
23
- "xxxxxl-id",
24
- ];
25
- /**
26
- * checks if a key from design tokens should be filtered from tailwind
27
- */
28
- var isValidToken = function (key) {
29
- return tokenDenyList.indexOf("".concat(key)) < 0;
30
- };
31
- // Filters out non-pixel-based spacing tokens, such as shirt sizes
32
- var filterDenyListValues = function (spacingTokensObject) {
33
- var keyValuePairs = Object.entries(spacingTokensObject);
34
- return Object.fromEntries(keyValuePairs.filter(function (_a) {
35
- var key = _a[0];
36
- return isValidToken(key);
37
- }));
38
- };
39
- exports.filterDenyListValues = filterDenyListValues;
40
- exports.kzSpacing = (0, exports.filterDenyListValues)(design_tokens_1.heartTheme.spacing);
41
- //# sourceMappingURL=kz-spacing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kz-spacing.js","sourceRoot":"","sources":["../src/kz-spacing.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAElD,IAAM,aAAa,GAAa;IAC9B,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,WAAW;CACZ,CAAA;AAED;;GAEG;AACH,IAAM,YAAY,GAAG,UAAC,GAAoB;IACxC,OAAA,aAAa,CAAC,OAAO,CAAC,UAAG,GAAG,CAAE,CAAC,GAAG,CAAC;AAAnC,CAAmC,CAAA;AAErC,kEAAkE;AAC3D,IAAM,oBAAoB,GAAG,UAClC,mBAA2C;IAE3C,IAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;IAEzD,OAAO,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,UAAC,EAAK;YAAJ,GAAG,QAAA;QAAM,OAAA,YAAY,CAAC,GAAG,CAAC;IAAjB,CAAiB,CAAC,CAAC,CAAA;AAC/E,CAAC,CAAA;AANY,QAAA,oBAAoB,wBAMhC;AAEY,QAAA,SAAS,GAAG,IAAA,4BAAoB,EAAC,0BAAU,CAAC,OAAO,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tailwind-presets.d.ts","sourceRoot":"","sources":["../src/tailwind-presets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAI5D,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;AAC5D,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,mBAAmB,CAAA;CAC3B,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,mBAqGxB,CAAA;AAEV,eAAO,MAAM,MAAM,EAAE,oBAEpB,CAAA"}