@kiva/kv-tokens 1.3.3 → 2.1.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 +37 -0
- package/README.md +1 -1
- package/configs/{kivaColors.js → kivaColors.cjs} +1 -1
- package/configs/{kivaTypography.js → kivaTypography.cjs} +28 -17
- package/configs/{tailwind.config.js → tailwind.config.cjs} +7 -3
- package/configs/{util.js → util.cjs} +0 -0
- package/package.json +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,43 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* adding tailwind line-clamp ([#186](https://github.com/kiva/kv-ui-elements/issues/186)) ([a18aa7c](https://github.com/kiva/kv-ui-elements/commit/a18aa7c87a5d92166d9565806da4d385795136ed))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **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))
|
|
23
|
+
* set correct module type for importing the package ([ef7e828](https://github.com/kiva/kv-ui-elements/commit/ef7e82876544f9016a09e743d68da3451e1ab3d6))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# [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)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
* feat!: upgrade Tailwind to v3 ([18c1653](https://github.com/kiva/kv-ui-elements/commit/18c1653565eb42b8abfaaba6b3712173ff341850))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### BREAKING CHANGES
|
|
36
|
+
|
|
37
|
+
* Tailwind dependency is now v3
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
6
43
|
## [1.3.3](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-tokens@1.3.2...@kiva/kv-tokens@1.3.3) (2022-02-03)
|
|
7
44
|
|
|
8
45
|
**Note:** Version bump only for package @kiva/kv-tokens
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The package contains
|
|
4
4
|
|
|
5
5
|
- A JSON file specifying the design definitions of Kiva's style guide.
|
|
6
|
-
- A custom Tailwind configuration set to Kiva's style guide that can be used as a preset for your Tailwind
|
|
6
|
+
- A custom Tailwind configuration set to Kiva's style guide that can be used as a preset for your Tailwind project.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
@@ -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::
|
|
213
|
+
'ol > li::marker': {
|
|
214
214
|
fontWeight: false,
|
|
215
215
|
color: false,
|
|
216
216
|
},
|
|
217
|
-
'ul > li::
|
|
218
|
-
|
|
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
|
-
|
|
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:
|
|
243
|
-
h2:
|
|
244
|
-
h3:
|
|
245
|
-
h4:
|
|
246
|
-
|
|
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
|
|
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
|
|
4
|
-
const
|
|
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": "1.
|
|
3
|
+
"version": "2.1.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": "
|
|
17
|
+
"gitHead": "5c86f86ecd7a78899659fe0e13749e81ad22926d"
|
|
13
18
|
}
|