@kiva/kv-tokens 2.0.0 → 2.2.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,40 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.2.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-tokens@2.1.0...@kiva/kv-tokens@2.2.0) (2022-07-19)
7
+
8
+
9
+ ### Features
10
+
11
+ * add new caution variant to buttons ([#191](https://github.com/kiva/kv-ui-elements/issues/191)) ([14f3eb6](https://github.com/kiva/kv-ui-elements/commit/14f3eb6548bfc925cc2cb656966829f127a8864e))
12
+
13
+
14
+
15
+
16
+
17
+ # [2.1.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-tokens@2.0.1...@kiva/kv-tokens@2.1.0) (2022-06-23)
18
+
19
+
20
+ ### Features
21
+
22
+ * adding tailwind line-clamp ([#186](https://github.com/kiva/kv-ui-elements/issues/186)) ([a18aa7c](https://github.com/kiva/kv-ui-elements/commit/a18aa7c87a5d92166d9565806da4d385795136ed))
23
+
24
+
25
+
26
+
27
+
28
+ ## [2.0.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-tokens@2.0.0...@kiva/kv-tokens@2.0.1) (2022-02-16)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **KvTokens:** adjust prose styles to override new tailwind/typography defaults ([#176](https://github.com/kiva/kv-ui-elements/issues/176)) ([bdef740](https://github.com/kiva/kv-ui-elements/commit/bdef7403575df7c9a7b3ef0891a8262f7d503bd5))
34
+ * set correct module type for importing the package ([ef7e828](https://github.com/kiva/kv-ui-elements/commit/ef7e82876544f9016a09e743d68da3451e1ab3d6))
35
+
36
+
37
+
38
+
39
+
6
40
  # [2.0.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-tokens@1.3.3...@kiva/kv-tokens@2.0.0) (2022-02-03)
7
41
 
8
42
 
@@ -1,4 +1,4 @@
1
- const { hexToRGB } = require('./util');
1
+ const { hexToRGB } = require('./util.cjs');
2
2
  const designtokens = require('../primitives.json');
3
3
 
4
4
  const {
@@ -1,4 +1,4 @@
1
- const { rem, em } = require('./util');
1
+ const { rem, em } = require('./util.cjs');
2
2
  const designtokens = require('../primitives.json');
3
3
 
4
4
  const {
@@ -210,18 +210,20 @@ const proseOverrides = () => ({
210
210
  a: false,
211
211
  strong: false,
212
212
  b: false,
213
- 'ol > li::before': {
213
+ 'ol > li::marker': {
214
214
  fontWeight: false,
215
215
  color: false,
216
216
  },
217
- 'ul > li::before': {
218
- backgroundColor: textBaseColor,
217
+ 'ul > li::marker': {
218
+ color: false,
219
+ fontSize: textStyles.textSubhead.fontSize,
220
+ lineHeight: 1,
219
221
  },
220
222
  hr: {
221
223
  borderColor: false,
222
224
  },
223
225
  blockquote: {
224
- ...textStyles.textSubhead,
226
+ fontWeight: false,
225
227
  fontStyle: 'italic',
226
228
  color: false,
227
229
  borderLeftWidth: false,
@@ -239,11 +241,14 @@ const proseOverrides = () => ({
239
241
  'blockquote p:last-of-type::after': {
240
242
  visibility: 'hidden',
241
243
  },
242
- h1: textStyles.textH1,
243
- h2: textStyles.textH2,
244
- h3: textStyles.textH3,
245
- h4: textStyles.textH4,
246
- 'figure figcaption': textStyles.textSmall,
244
+ h1: false,
245
+ h2: false,
246
+ h3: false,
247
+ h4: false,
248
+ figcaption: {
249
+ fontSize: false,
250
+ lineHeight: false,
251
+ },
247
252
  code: {
248
253
  color: false,
249
254
  },
@@ -265,23 +270,27 @@ const proseOverrides = () => ({
265
270
  },
266
271
  h1: {
267
272
  fontSize: false,
273
+ letterSpacing: false,
268
274
  marginTop: '0',
269
275
  marginBottom: rem(space[4]),
270
276
  color: textBaseColor,
271
277
  },
272
278
  h2: {
273
279
  fontSize: false,
280
+ letterSpacing: false,
274
281
  marginTop: rem(space[4]),
275
282
  marginBottom: rem(space[4]),
276
283
  color: textBaseColor,
277
284
  },
278
285
  h3: {
279
286
  fontSize: false,
287
+ letterSpacing: false,
280
288
  marginTop: rem(space[4]),
281
289
  marginBottom: rem(space[2]),
282
290
  color: textBaseColor,
283
291
  },
284
292
  h4: {
293
+ letterSpacing: false,
285
294
  marginTop: false,
286
295
  marginBottom: rem(space[4]),
287
296
  color: textBaseColor,
@@ -322,21 +331,23 @@ const proseOverrides = () => ({
322
331
  ol: {
323
332
  marginTop: rem(space[4]),
324
333
  marginBottom: rem(space[4]),
334
+ paddingLeft: em(18, 16),
335
+ },
336
+ 'ol > li': {
337
+ paddingLeft: em(10, 16),
325
338
  },
326
339
  ul: {
327
340
  marginTop: rem(space[4]),
328
341
  marginBottom: rem(space[4]),
342
+ paddingLeft: em(18, 16),
343
+ },
344
+ 'ul > li': {
345
+ paddingLeft: em(10, 16),
329
346
  },
330
347
  li: {
331
348
  marginTop: rem(space[2]),
332
349
  marginBottom: rem(space[2]),
333
350
  },
334
- 'ul > li::before': {
335
- width: em(6, 16),
336
- height: em(6, 16),
337
- top: '0.5em',
338
- left: em(4, 16),
339
- },
340
351
  '> ul > li p': {
341
352
  marginTop: em(12, 16),
342
353
  marginBottom: em(12, 16),
@@ -392,7 +403,7 @@ const proseOverrides = () => ({
392
403
  },
393
404
  ],
394
405
  },
395
- // Our typography breakpoints are handled elsewhere.
406
+ // Our typography breakpoints are handled by our default styles (e.g. textH1, textBase, etc.).
396
407
  // No need to use `<div class="prose prose-sm prose-lg prose-xl">. Only <div class="prose">
397
408
  sm: false,
398
409
  lg: false,
@@ -1,9 +1,10 @@
1
1
  const plugin = require('tailwindcss/plugin');
2
2
  const typographyPlugin = require('@tailwindcss/typography');
3
- const kivaTypography = require('./kivaTypography');
4
- const { defaultTheme, buildColorChoices } = require('./kivaColors');
3
+ const lineClampPlugin = require('@tailwindcss/line-clamp');
4
+ const kivaTypography = require('./kivaTypography.cjs');
5
+ const { defaultTheme, buildColorChoices } = require('./kivaColors.cjs');
5
6
  const designtokens = require('../primitives.json');
6
- const { rem } = require('./util');
7
+ const { rem } = require('./util.cjs');
7
8
 
8
9
  const {
9
10
  fonts,
@@ -162,6 +163,7 @@ module.exports = {
162
163
  },
163
164
  plugins: [
164
165
  typographyPlugin, // prose plugin. See overrides in theme.extend.typography
166
+ lineClampPlugin,
165
167
  plugin(({ addBase, addUtilities }) => {
166
168
  const { webFonts, textStyles, textBaseColor } = kivaTypography;
167
169
  addBase(webFonts);
@@ -182,6 +184,8 @@ module.exports = {
182
184
  code: {
183
185
  fontSize: '0.875em',
184
186
  },
187
+ blockquote: textStyles.textSubhead,
188
+ 'figure figcaption': textStyles.textSmall,
185
189
  'button:focus': {
186
190
  outline: 'revert', // undo tailwind button focus styling
187
191
  },
File without changes
package/package.json CHANGED
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "name": "@kiva/kv-tokens",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
+ "type": "module",
4
5
  "publishConfig": {
5
6
  "access": "public"
6
7
  },
7
8
  "main": "index.js",
9
+ "scripts": {
10
+ "test": "echo No tests specified for @kiva/kv-tokens."
11
+ },
8
12
  "dependencies": {
13
+ "@tailwindcss/line-clamp": "^0.4.0",
9
14
  "@tailwindcss/typography": "^0.5.1",
10
15
  "tailwindcss": "^3.0.18"
11
16
  },
12
- "gitHead": "b5b3dc488e1a437d2af4e26a07b5d0798981651d"
17
+ "gitHead": "408647638638310803b48e4a93cb2744e5ec4bce"
13
18
  }
package/primitives.json CHANGED
@@ -50,7 +50,8 @@
50
50
  "action-highlight": "#277056",
51
51
  "danger": "#E42A2A",
52
52
  "danger-highlight": "#CE2626",
53
- "caution": "#FEE16E"
53
+ "caution": "#E6CB55",
54
+ "caution-highlight": "#D9BC3B"
54
55
  },
55
56
  "border": {
56
57
  "primary": "#212121",
@@ -83,7 +84,8 @@
83
84
  "action-highlight": "#6AC395",
84
85
  "danger": "#E42A2A",
85
86
  "danger-highlight": "#CE2626",
86
- "caution": "#FEE16E"
87
+ "caution": "#E6CB55",
88
+ "caution-highlight": "#D9BC3B"
87
89
  },
88
90
  "border": {
89
91
  "primary": "#F5F5F5",