@kiva/kv-tokens 3.6.3 → 3.7.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/AGENTS.md +1 -1
- package/CHANGELOG.md +30 -0
- package/configs/kivaTypography.js +110 -0
- package/configs/tailwind.config.js +9 -1
- package/package.json +2 -2
- package/primitives.js +62 -0
package/AGENTS.md
CHANGED
|
@@ -72,7 +72,7 @@ npm test # No tests specified (placeholder)
|
|
|
72
72
|
|
|
73
73
|
### Technology
|
|
74
74
|
|
|
75
|
-
- **Node.js**: Version specified in [.nvmrc](../../.nvmrc) -
|
|
75
|
+
- **Node.js**: Version specified in [.nvmrc](../../.nvmrc) - Run `nvm use` before terminal commands
|
|
76
76
|
- **Tailwind CSS**: ^3.4.3
|
|
77
77
|
- **@tailwindcss/typography**: ^0.5.1 for prose styling
|
|
78
78
|
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
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
|
+
# [3.7.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-tokens@3.6.4...@kiva/kv-tokens@3.7.0) (2026-02-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* apply semantic type size to small, add comments ([bc7fe4b](https://github.com/kiva/kv-ui-elements/commit/bc7fe4bb20a06a589340ee640b96e4540920655c))
|
|
12
|
+
* remove comments about base style updates as they were reverted ([cf57f81](https://github.com/kiva/kv-ui-elements/commit/cf57f81857bef212ea2fa34a3a191f8518740168))
|
|
13
|
+
* revert base styles and implement absolute line height mapping ([2bea294](https://github.com/kiva/kv-ui-elements/commit/2bea29451e4d44565c217cbc76bab4c8aeea2eb8))
|
|
14
|
+
* revert new small text styles as they rely on updated base styles ([b1b4985](https://github.com/kiva/kv-ui-elements/commit/b1b49857e32580dd57f7382056fe7a16bd6ff5ea))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add new sematic type derived primitives and utility classes ([4196d7c](https://github.com/kiva/kv-ui-elements/commit/4196d7c7b7aafcf2b19a484b4945b743db385e87))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [3.6.4](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-tokens@3.6.3...@kiva/kv-tokens@3.6.4) (2026-01-21)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* clarify when to run nvm use instead of forcing agents to always run it ([db11d9f](https://github.com/kiva/kv-ui-elements/commit/db11d9f726a1d894655103cca4a2364942725129))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
## [3.6.3](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-tokens@3.6.2...@kiva/kv-tokens@3.6.3) (2026-01-06)
|
|
7
37
|
|
|
8
38
|
**Note:** Version bump only for package @kiva/kv-tokens
|
|
@@ -7,7 +7,9 @@ const {
|
|
|
7
7
|
fontWeights,
|
|
8
8
|
letterSpacings,
|
|
9
9
|
lineHeights,
|
|
10
|
+
lineHeightsAbsolute,
|
|
10
11
|
radii,
|
|
12
|
+
semanticFontSizes,
|
|
11
13
|
space,
|
|
12
14
|
} = designTokens;
|
|
13
15
|
|
|
@@ -428,6 +430,106 @@ export const textStyles = (() => {
|
|
|
428
430
|
},
|
|
429
431
|
};
|
|
430
432
|
|
|
433
|
+
const textDisplay = {
|
|
434
|
+
fontFamily: fonts.serif,
|
|
435
|
+
fontWeight: fontWeights.medium,
|
|
436
|
+
fontSize: rem(semanticFontSizes.jumbo.sm),
|
|
437
|
+
letterSpacing: em(letterSpacings['-400'], semanticFontSizes.jumbo.sm),
|
|
438
|
+
lineHeight: em(lineHeightsAbsolute.jumbo.sm, semanticFontSizes.jumbo.sm),
|
|
439
|
+
'@screen md': {
|
|
440
|
+
fontSize: rem(semanticFontSizes.jumbo.md),
|
|
441
|
+
letterSpacing: em(letterSpacings['-500'], semanticFontSizes.jumbo.md),
|
|
442
|
+
lineHeight: em(lineHeightsAbsolute.jumbo.md, semanticFontSizes.jumbo.md),
|
|
443
|
+
},
|
|
444
|
+
'@screen lg': {
|
|
445
|
+
fontSize: rem(semanticFontSizes.jumbo.lg),
|
|
446
|
+
letterSpacing: em(letterSpacings['-600'], semanticFontSizes.jumbo.lg),
|
|
447
|
+
lineHeight: em(lineHeightsAbsolute.jumbo.lg, semanticFontSizes.jumbo.lg),
|
|
448
|
+
},
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
const textHeadline = {
|
|
452
|
+
fontFamily: fonts.serif,
|
|
453
|
+
fontWeight: fontWeights.medium,
|
|
454
|
+
fontSize: rem(semanticFontSizes.h1.sm),
|
|
455
|
+
letterSpacing: em(letterSpacings['-200'], semanticFontSizes.h1.sm),
|
|
456
|
+
lineHeight: em(lineHeightsAbsolute.h1.sm, semanticFontSizes.h1.sm),
|
|
457
|
+
'@screen md': {
|
|
458
|
+
fontSize: rem(semanticFontSizes.h1.md),
|
|
459
|
+
letterSpacing: em(letterSpacings['-200'], semanticFontSizes.h1.md),
|
|
460
|
+
},
|
|
461
|
+
'@screen lg': {
|
|
462
|
+
fontSize: rem(semanticFontSizes.h1.lg),
|
|
463
|
+
letterSpacing: em(letterSpacings['-300'], semanticFontSizes.h1.lg),
|
|
464
|
+
lineHeight: em(lineHeightsAbsolute.h1.lg, semanticFontSizes.h1.lg),
|
|
465
|
+
},
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
const textSubHeadline = {
|
|
469
|
+
fontFamily: fonts.serif,
|
|
470
|
+
fontWeight: fontWeights.medium,
|
|
471
|
+
fontSize: rem(semanticFontSizes.h2.sm),
|
|
472
|
+
letterSpacing: em(letterSpacings['-100'], semanticFontSizes.h2.sm),
|
|
473
|
+
lineHeight: em(lineHeightsAbsolute.h2.sm, semanticFontSizes.h2.sm),
|
|
474
|
+
'@screen md': {
|
|
475
|
+
fontSize: rem(semanticFontSizes.h2.md),
|
|
476
|
+
letterSpacing: em(letterSpacings['-100'], semanticFontSizes.h2.md),
|
|
477
|
+
},
|
|
478
|
+
'@screen lg': {
|
|
479
|
+
fontSize: rem(semanticFontSizes.h2.lg),
|
|
480
|
+
letterSpacing: em(letterSpacings['-200'], semanticFontSizes.h2.lg),
|
|
481
|
+
lineHeight: em(lineHeightsAbsolute.h2.lg, semanticFontSizes.h2.lg),
|
|
482
|
+
},
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
const textTitle = {
|
|
486
|
+
fontFamily: fonts.sans,
|
|
487
|
+
fontWeight: fontWeights.medium,
|
|
488
|
+
fontSize: rem(semanticFontSizes.h3.sm),
|
|
489
|
+
letterSpacing: em(letterSpacings.normal, semanticFontSizes.h3.sm),
|
|
490
|
+
lineHeight: em(lineHeightsAbsolute.h3.sm, semanticFontSizes.h3.sm),
|
|
491
|
+
'@screen md': {
|
|
492
|
+
fontSize: rem(semanticFontSizes.h3.md),
|
|
493
|
+
},
|
|
494
|
+
'@screen lg': {
|
|
495
|
+
fontSize: rem(semanticFontSizes.h3.lg),
|
|
496
|
+
lineHeight: em(lineHeightsAbsolute.h3.lg, semanticFontSizes.h3.lg),
|
|
497
|
+
},
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
const textButton = {
|
|
501
|
+
fontFamily: fonts.sans,
|
|
502
|
+
fontWeight: fontWeights.medium,
|
|
503
|
+
fontSize: rem(semanticFontSizes.button.button),
|
|
504
|
+
letterSpacing: em(letterSpacings.normal, semanticFontSizes.button.button),
|
|
505
|
+
lineHeight: em(lineHeightsAbsolute.button.sm, semanticFontSizes.button.button),
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
const textUpper = {
|
|
509
|
+
fontFamily: fonts.sans,
|
|
510
|
+
fontWeight: fontWeights.medium,
|
|
511
|
+
fontSize: rem(semanticFontSizes.small.small),
|
|
512
|
+
letterSpacing: em(letterSpacings.normal, semanticFontSizes.small.small),
|
|
513
|
+
lineHeight: em(lineHeightsAbsolute.upper.sm, semanticFontSizes.small.small),
|
|
514
|
+
textTransform: 'uppercase',
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
const textLabel = {
|
|
518
|
+
fontFamily: fonts.sans,
|
|
519
|
+
fontWeight: fontWeights.medium,
|
|
520
|
+
fontSize: rem(semanticFontSizes.small.small),
|
|
521
|
+
letterSpacing: em(letterSpacings.normal, semanticFontSizes.small.small),
|
|
522
|
+
lineHeight: em(lineHeightsAbsolute.label.sm, semanticFontSizes.small.small),
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
const textCaption = {
|
|
526
|
+
fontFamily: fonts.sans,
|
|
527
|
+
fontWeight: fontWeights.normal,
|
|
528
|
+
fontSize: rem(semanticFontSizes.small.small),
|
|
529
|
+
letterSpacing: em(letterSpacings.normal, semanticFontSizes.small.small),
|
|
530
|
+
lineHeight: em(lineHeightsAbsolute.caption.sm, semanticFontSizes.small.small),
|
|
531
|
+
};
|
|
532
|
+
|
|
431
533
|
return {
|
|
432
534
|
textJumbo,
|
|
433
535
|
textH1,
|
|
@@ -441,6 +543,14 @@ export const textStyles = (() => {
|
|
|
441
543
|
textLink,
|
|
442
544
|
textPlaceholder,
|
|
443
545
|
textBlockquote,
|
|
546
|
+
textDisplay,
|
|
547
|
+
textHeadline,
|
|
548
|
+
textSubHeadline,
|
|
549
|
+
textTitle,
|
|
550
|
+
textButton,
|
|
551
|
+
textUpper,
|
|
552
|
+
textLabel,
|
|
553
|
+
textCaption,
|
|
444
554
|
};
|
|
445
555
|
})();
|
|
446
556
|
|
|
@@ -204,7 +204,7 @@ export default {
|
|
|
204
204
|
'-moz-osx-font-smoothing': 'grayscale',
|
|
205
205
|
'text-rendering': 'optimizeLegibility',
|
|
206
206
|
},
|
|
207
|
-
button: { fontWeight: 'inherit' },
|
|
207
|
+
button: { ...textStyles.textButton, fontWeight: 'inherit' },
|
|
208
208
|
h1: textStyles.textH1,
|
|
209
209
|
h2: textStyles.textH2,
|
|
210
210
|
h3: textStyles.textH3,
|
|
@@ -250,6 +250,14 @@ export default {
|
|
|
250
250
|
'.text-small': textStyles.textSmall,
|
|
251
251
|
'.text-link': textStyles.textLink,
|
|
252
252
|
'.text-blockquote': textStyles.textBlockquote,
|
|
253
|
+
// new (2026) semantic text styles
|
|
254
|
+
'.text-display': textStyles.textDisplay,
|
|
255
|
+
'.text-headline': textStyles.textHeadline,
|
|
256
|
+
'.text-subheadline': textStyles.textSubheadline,
|
|
257
|
+
'.text-title': textStyles.textTitle,
|
|
258
|
+
'.text-button': textStyles.textButton,
|
|
259
|
+
'.text-upper': textStyles.textUpper,
|
|
260
|
+
'.text-caption': textStyles.textCaption,
|
|
253
261
|
}, ['responsive']);
|
|
254
262
|
}),
|
|
255
263
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-tokens",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"@tailwindcss/typography": "^0.5.1",
|
|
24
24
|
"tailwindcss": "^3.4.3"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "cb5df34ff13efd0b41b531161b308dba6c43a7af"
|
|
27
27
|
}
|
package/primitives.js
CHANGED
|
@@ -476,6 +476,46 @@ export default {
|
|
|
476
476
|
lg: 24,
|
|
477
477
|
},
|
|
478
478
|
},
|
|
479
|
+
semanticFontSizes: {
|
|
480
|
+
jumbo: {
|
|
481
|
+
sm: 36,
|
|
482
|
+
md: 40,
|
|
483
|
+
lg: 44,
|
|
484
|
+
},
|
|
485
|
+
h1: {
|
|
486
|
+
sm: 22,
|
|
487
|
+
md: 22,
|
|
488
|
+
lg: 26,
|
|
489
|
+
},
|
|
490
|
+
h2: {
|
|
491
|
+
sm: 20,
|
|
492
|
+
md: 20,
|
|
493
|
+
lg: 22,
|
|
494
|
+
},
|
|
495
|
+
h3: {
|
|
496
|
+
sm: 18,
|
|
497
|
+
md: 18,
|
|
498
|
+
lg: 20,
|
|
499
|
+
},
|
|
500
|
+
base: {
|
|
501
|
+
base: 16,
|
|
502
|
+
},
|
|
503
|
+
button: {
|
|
504
|
+
button: 17,
|
|
505
|
+
},
|
|
506
|
+
caption: {
|
|
507
|
+
small: 14,
|
|
508
|
+
},
|
|
509
|
+
label: {
|
|
510
|
+
small: 14,
|
|
511
|
+
},
|
|
512
|
+
small: {
|
|
513
|
+
small: 14,
|
|
514
|
+
},
|
|
515
|
+
upper: {
|
|
516
|
+
small: 14,
|
|
517
|
+
},
|
|
518
|
+
},
|
|
479
519
|
fontWeights: {
|
|
480
520
|
light: 300,
|
|
481
521
|
normal: 400,
|
|
@@ -485,11 +525,33 @@ export default {
|
|
|
485
525
|
'nearly-none': 1.05,
|
|
486
526
|
tight: 1.25,
|
|
487
527
|
normal: 1.5,
|
|
528
|
+
100: 1,
|
|
529
|
+
125: 1.25,
|
|
530
|
+
130: 1.3,
|
|
531
|
+
140: 1.4,
|
|
532
|
+
150: 1.5,
|
|
533
|
+
},
|
|
534
|
+
lineHeightsAbsolute: {
|
|
535
|
+
jumbo: { sm: 47, md: 52, lg: 57 },
|
|
536
|
+
h1: { sm: 31, md: 31, lg: 36 },
|
|
537
|
+
h2: { sm: 26, md: 26, lg: 31 },
|
|
538
|
+
h3: { sm: 23, md: 23, lg: 26 },
|
|
539
|
+
base: { sm: 22, md: 22, lg: 22 },
|
|
540
|
+
button: { sm: 21, md: 21, lg: 21 },
|
|
541
|
+
upper: { sm: 18, md: 18, lg: 18 },
|
|
542
|
+
label: { sm: 18, md: 18, lg: 18 },
|
|
543
|
+
caption: { sm: 18, md: 18, lg: 18 },
|
|
488
544
|
},
|
|
489
545
|
letterSpacings: {
|
|
490
546
|
normal: 0,
|
|
547
|
+
'-100': -0.2,
|
|
548
|
+
'-200': -0.22,
|
|
491
549
|
'-0.3': -0.3,
|
|
492
550
|
'-0.5': -0.5,
|
|
551
|
+
'-300': -0.52,
|
|
552
|
+
'-400': -0.72,
|
|
553
|
+
'-500': -0.8,
|
|
554
|
+
'-600': -0.88,
|
|
493
555
|
'-1': -1,
|
|
494
556
|
'-2': -2,
|
|
495
557
|
},
|