@automattic/vip-design-system 2.18.1 → 2.20.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/.storybook/preview-head.html +1 -0
- package/build/system/Badge/Badge.js +2 -1
- package/build/system/DescriptionList/DescriptionList.js +0 -1
- package/build/system/Form/Label.d.ts +1 -3
- package/build/system/Form/Label.js +1 -3
- package/build/system/Form/RadioBoxGroup.jsx +12 -1
- package/build/system/Form/RadioBoxGroup.stories.jsx +6 -1
- package/build/system/Heading/Heading.js +2 -3
- package/build/system/Heading/Heading.stories.js +15 -2
- package/build/system/Nav/styles/variants/menu.js +1 -2
- package/build/system/NewForm/FormAutocompleteMultiselect.jsx +143 -12
- package/build/system/NewForm/FormAutocompleteMultiselect.stories.d.ts +22 -2
- package/build/system/NewForm/FormAutocompleteMultiselect.stories.jsx +21 -0
- package/build/system/NewForm/FormAutocompleteMultiselect.test.jsx +67 -1
- package/build/system/NewForm/FormAutocompleteMultiselectInlineChip.d.ts +7 -0
- package/build/system/NewForm/FormAutocompleteMultiselectInlineChip.js +62 -0
- package/build/system/Notice/Notice.js +1 -1
- package/build/system/Pagination/styles.js +1 -4
- package/build/system/Table/TableCell.js +1 -1
- package/build/system/Text/Text.js +0 -1
- package/build/system/Text/Text.stories.js +16 -13
- package/build/system/Toolbar/Logo.js +22 -6
- package/build/system/Wizard/Wizard.stories.js +11 -11
- package/build/system/Wizard/WizardStep.js +0 -2
- package/build/system/theme/generated/valet-theme-dark.json +224 -227
- package/build/system/theme/generated/valet-theme-light.json +224 -227
- package/build/system/theme/getPropValue.js +3 -7
- package/build/system/theme/index.d.ts +20 -12
- package/build/system/theme/index.js +27 -20
- package/docs/SETUP.md +1 -1
- package/package.json +1 -1
- package/src/system/Badge/Badge.tsx +2 -1
- package/src/system/DescriptionList/DescriptionList.tsx +0 -1
- package/src/system/Form/Label.tsx +1 -3
- package/src/system/Form/RadioBoxGroup.jsx +12 -1
- package/src/system/Form/RadioBoxGroup.stories.jsx +6 -1
- package/src/system/Heading/Heading.stories.tsx +10 -1
- package/src/system/Heading/Heading.tsx +1 -2
- package/src/system/Nav/styles/variants/menu.ts +1 -2
- package/src/system/NewForm/FormAutocompleteMultiselect.jsx +143 -12
- package/src/system/NewForm/FormAutocompleteMultiselect.stories.jsx +21 -0
- package/src/system/NewForm/FormAutocompleteMultiselect.test.jsx +67 -1
- package/src/system/NewForm/FormAutocompleteMultiselectInlineChip.tsx +72 -0
- package/src/system/Notice/Notice.tsx +1 -1
- package/src/system/Pagination/styles.ts +1 -4
- package/src/system/Table/TableCell.tsx +1 -1
- package/src/system/Text/Text.stories.tsx +7 -4
- package/src/system/Text/Text.tsx +0 -1
- package/src/system/Toolbar/Logo.tsx +19 -2
- package/src/system/Wizard/Wizard.stories.tsx +11 -11
- package/src/system/Wizard/WizardStep.tsx +0 -2
- package/src/system/theme/generated/valet-theme-dark.json +224 -227
- package/src/system/theme/generated/valet-theme-light.json +224 -227
- package/src/system/theme/getPropValue.ts +1 -8
- package/src/system/theme/index.ts +33 -18
- package/tokens/valet-core/valet-core.json +39 -9
- package/tokens/valet-core/wpvip-product-core.json +88 -125
|
@@ -1081,55 +1081,61 @@
|
|
|
1081
1081
|
},
|
|
1082
1082
|
"helper-text": {
|
|
1083
1083
|
"value": {
|
|
1084
|
-
"fontFamily": "
|
|
1084
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1085
1085
|
"fontWeight": 400,
|
|
1086
1086
|
"fontSize": 12,
|
|
1087
|
-
"lineHeight": "150%"
|
|
1087
|
+
"lineHeight": "150%",
|
|
1088
|
+
"letterSpacing": "0.01em"
|
|
1088
1089
|
},
|
|
1089
1090
|
"type": "typography"
|
|
1090
1091
|
},
|
|
1091
1092
|
"label-xs": {
|
|
1092
1093
|
"value": {
|
|
1093
|
-
"fontFamily": "
|
|
1094
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1094
1095
|
"fontWeight": 400,
|
|
1095
1096
|
"lineHeight": "100%",
|
|
1096
|
-
"fontSize": 11
|
|
1097
|
+
"fontSize": 11,
|
|
1098
|
+
"letterSpacing": "0.02em"
|
|
1097
1099
|
},
|
|
1098
1100
|
"type": "typography"
|
|
1099
1101
|
},
|
|
1100
1102
|
"label-small": {
|
|
1101
1103
|
"value": {
|
|
1102
|
-
"fontFamily": "
|
|
1103
|
-
"fontWeight":
|
|
1104
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1105
|
+
"fontWeight": 600,
|
|
1104
1106
|
"lineHeight": "100%",
|
|
1105
|
-
"fontSize": 12
|
|
1107
|
+
"fontSize": 12,
|
|
1108
|
+
"letterSpacing": "0.005em"
|
|
1106
1109
|
},
|
|
1107
1110
|
"type": "typography"
|
|
1108
1111
|
},
|
|
1109
1112
|
"label-default": {
|
|
1110
1113
|
"value": {
|
|
1111
|
-
"fontFamily": "
|
|
1112
|
-
"fontWeight":
|
|
1114
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1115
|
+
"fontWeight": 600,
|
|
1113
1116
|
"lineHeight": "100%",
|
|
1114
|
-
"fontSize": 14
|
|
1117
|
+
"fontSize": 14,
|
|
1118
|
+
"letterSpacing": "0.005em"
|
|
1115
1119
|
},
|
|
1116
1120
|
"type": "typography"
|
|
1117
1121
|
},
|
|
1118
1122
|
"label-default-quiet": {
|
|
1119
1123
|
"value": {
|
|
1120
|
-
"fontFamily": "
|
|
1124
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1121
1125
|
"fontWeight": 400,
|
|
1122
1126
|
"lineHeight": "100%",
|
|
1123
|
-
"fontSize": 14
|
|
1127
|
+
"fontSize": 14,
|
|
1128
|
+
"letterSpacing": "0.005em"
|
|
1124
1129
|
},
|
|
1125
1130
|
"type": "typography"
|
|
1126
1131
|
},
|
|
1127
1132
|
"label-default-loud": {
|
|
1128
1133
|
"value": {
|
|
1129
|
-
"fontFamily": "
|
|
1134
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1130
1135
|
"fontWeight": 700,
|
|
1131
1136
|
"lineHeight": "100%",
|
|
1132
|
-
"fontSize": 14
|
|
1137
|
+
"fontSize": 14,
|
|
1138
|
+
"letterSpacing": "0.005em"
|
|
1133
1139
|
},
|
|
1134
1140
|
"type": "typography"
|
|
1135
1141
|
}
|
|
@@ -1681,53 +1687,145 @@
|
|
|
1681
1687
|
}
|
|
1682
1688
|
},
|
|
1683
1689
|
"fontFamily": {
|
|
1684
|
-
"
|
|
1685
|
-
"value": "
|
|
1686
|
-
"type": "fontFamilies"
|
|
1687
|
-
},
|
|
1688
|
-
"serif": {
|
|
1689
|
-
"value": "Recoleta",
|
|
1690
|
+
"default": {
|
|
1691
|
+
"value": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1690
1692
|
"type": "fontFamilies"
|
|
1691
1693
|
},
|
|
1692
1694
|
"monospace": {
|
|
1693
|
-
"value": "SF Mono",
|
|
1695
|
+
"value": "SF Mono, monospace",
|
|
1694
1696
|
"type": "fontFamilies"
|
|
1695
1697
|
}
|
|
1696
1698
|
},
|
|
1697
|
-
"
|
|
1698
|
-
"0": {
|
|
1699
|
-
"value": 10,
|
|
1700
|
-
"type": "fontSizes"
|
|
1701
|
-
},
|
|
1699
|
+
"heading": {
|
|
1702
1700
|
"1": {
|
|
1703
|
-
"value":
|
|
1704
|
-
|
|
1701
|
+
"value": {
|
|
1702
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1703
|
+
"fontWeight": 700,
|
|
1704
|
+
"lineHeight": "115%",
|
|
1705
|
+
"fontSize": 40,
|
|
1706
|
+
"letterSpacing": "-0.02em"
|
|
1707
|
+
},
|
|
1708
|
+
"type": "typography"
|
|
1705
1709
|
},
|
|
1706
1710
|
"2": {
|
|
1707
|
-
"value":
|
|
1708
|
-
|
|
1711
|
+
"value": {
|
|
1712
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1713
|
+
"fontWeight": 600,
|
|
1714
|
+
"lineHeight": "125%",
|
|
1715
|
+
"fontSize": 28,
|
|
1716
|
+
"letterSpacing": "-0.015em"
|
|
1717
|
+
},
|
|
1718
|
+
"type": "typography"
|
|
1709
1719
|
},
|
|
1710
1720
|
"3": {
|
|
1711
|
-
"value":
|
|
1712
|
-
|
|
1721
|
+
"value": {
|
|
1722
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1723
|
+
"fontWeight": 600,
|
|
1724
|
+
"lineHeight": "130%",
|
|
1725
|
+
"fontSize": 18,
|
|
1726
|
+
"letterSpacing": "-0.015em"
|
|
1727
|
+
},
|
|
1728
|
+
"type": "typography"
|
|
1713
1729
|
},
|
|
1714
1730
|
"4": {
|
|
1715
|
-
"value":
|
|
1716
|
-
|
|
1731
|
+
"value": {
|
|
1732
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1733
|
+
"fontWeight": 700,
|
|
1734
|
+
"lineHeight": "140%",
|
|
1735
|
+
"fontSize": 14,
|
|
1736
|
+
"letterSpacing": "0em"
|
|
1737
|
+
},
|
|
1738
|
+
"type": "typography"
|
|
1717
1739
|
},
|
|
1718
1740
|
"5": {
|
|
1719
|
-
"value":
|
|
1720
|
-
|
|
1741
|
+
"value": {
|
|
1742
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1743
|
+
"fontWeight": 700,
|
|
1744
|
+
"lineHeight": "140%",
|
|
1745
|
+
"fontSize": 12,
|
|
1746
|
+
"letterSpacing": "0em"
|
|
1747
|
+
},
|
|
1748
|
+
"type": "typography"
|
|
1749
|
+
},
|
|
1750
|
+
"caps": {
|
|
1751
|
+
"value": {
|
|
1752
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1753
|
+
"fontWeight": 600,
|
|
1754
|
+
"lineHeight": "150%",
|
|
1755
|
+
"fontSize": 12,
|
|
1756
|
+
"letterSpacing": "0.02em",
|
|
1757
|
+
"textTransform": "uppercase"
|
|
1758
|
+
},
|
|
1759
|
+
"type": "typography"
|
|
1760
|
+
}
|
|
1761
|
+
},
|
|
1762
|
+
"body": {
|
|
1763
|
+
"small": {
|
|
1764
|
+
"value": {
|
|
1765
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1766
|
+
"fontWeight": 400,
|
|
1767
|
+
"lineHeight": "150%",
|
|
1768
|
+
"fontSize": 12,
|
|
1769
|
+
"letterSpacing": "0.01em"
|
|
1770
|
+
},
|
|
1771
|
+
"type": "typography"
|
|
1772
|
+
},
|
|
1773
|
+
"default": {
|
|
1774
|
+
"value": {
|
|
1775
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1776
|
+
"fontWeight": 400,
|
|
1777
|
+
"lineHeight": "150%",
|
|
1778
|
+
"fontSize": 14,
|
|
1779
|
+
"letterSpacing": "0.01em"
|
|
1780
|
+
},
|
|
1781
|
+
"type": "typography"
|
|
1782
|
+
},
|
|
1783
|
+
"large": {
|
|
1784
|
+
"value": {
|
|
1785
|
+
"fontFamily": "aktiv-grotesk, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
1786
|
+
"fontWeight": 400,
|
|
1787
|
+
"lineHeight": "150%",
|
|
1788
|
+
"fontSize": 18,
|
|
1789
|
+
"letterSpacing": "0.01em"
|
|
1790
|
+
},
|
|
1791
|
+
"type": "typography"
|
|
1792
|
+
},
|
|
1793
|
+
"mono": {
|
|
1794
|
+
"value": {
|
|
1795
|
+
"fontFamily": "SF Mono, monospace",
|
|
1796
|
+
"fontWeight": 400,
|
|
1797
|
+
"lineHeight": "150%",
|
|
1798
|
+
"fontSize": 14,
|
|
1799
|
+
"letterSpacing": "0em"
|
|
1800
|
+
},
|
|
1801
|
+
"type": "typography"
|
|
1721
1802
|
},
|
|
1803
|
+
"mono-bold": {
|
|
1804
|
+
"value": {
|
|
1805
|
+
"fontFamily": "SF Mono, monospace",
|
|
1806
|
+
"lineHeight": "150%",
|
|
1807
|
+
"fontSize": 14,
|
|
1808
|
+
"fontWeight": 700,
|
|
1809
|
+
"letterSpacing": "0em"
|
|
1810
|
+
},
|
|
1811
|
+
"type": "typography"
|
|
1812
|
+
}
|
|
1813
|
+
},
|
|
1814
|
+
"rem": {
|
|
1815
|
+
"value": 16,
|
|
1816
|
+
"type": "other",
|
|
1817
|
+
"description": "Use as the base rem value for calculations in Figma Tokens. In production all size values should be in rems, which is modifiable by the user. Since Figma Tokens doesn't support different units, we use this variable to do rem calculations. For our purposes, we're setting the rem value to 16px."
|
|
1818
|
+
},
|
|
1819
|
+
"fontSize": {
|
|
1722
1820
|
"static": {
|
|
1723
1821
|
"0": {
|
|
1724
|
-
"value":
|
|
1822
|
+
"value": 11,
|
|
1725
1823
|
"type": "fontSizes"
|
|
1726
1824
|
},
|
|
1727
1825
|
"1": {
|
|
1728
1826
|
"value": 12,
|
|
1729
1827
|
"type": "fontSizes",
|
|
1730
|
-
"description": "
|
|
1828
|
+
"description": "These static font sizes are non-responsive and are used for body copy, helper text, and other UI text that should not scale with viewport width."
|
|
1731
1829
|
},
|
|
1732
1830
|
"2": {
|
|
1733
1831
|
"value": 14,
|
|
@@ -1742,7 +1840,11 @@
|
|
|
1742
1840
|
"type": "fontSizes"
|
|
1743
1841
|
},
|
|
1744
1842
|
"5": {
|
|
1745
|
-
"value":
|
|
1843
|
+
"value": 28,
|
|
1844
|
+
"type": "fontSizes"
|
|
1845
|
+
},
|
|
1846
|
+
"6": {
|
|
1847
|
+
"value": 40,
|
|
1746
1848
|
"type": "fontSizes"
|
|
1747
1849
|
}
|
|
1748
1850
|
},
|
|
@@ -2233,190 +2335,6 @@
|
|
|
2233
2335
|
}
|
|
2234
2336
|
}
|
|
2235
2337
|
},
|
|
2236
|
-
"lineHeight": {
|
|
2237
|
-
"1": {
|
|
2238
|
-
"value": "110%",
|
|
2239
|
-
"type": "lineHeights",
|
|
2240
|
-
"description": "Use only for display."
|
|
2241
|
-
},
|
|
2242
|
-
"2": {
|
|
2243
|
-
"value": "120%",
|
|
2244
|
-
"type": "lineHeights",
|
|
2245
|
-
"description": "Use for larger headings."
|
|
2246
|
-
},
|
|
2247
|
-
"3": {
|
|
2248
|
-
"value": "130%",
|
|
2249
|
-
"type": "lineHeights",
|
|
2250
|
-
"description": "Use for small and medium sized headings."
|
|
2251
|
-
},
|
|
2252
|
-
"4": {
|
|
2253
|
-
"value": "140%",
|
|
2254
|
-
"type": "lineHeights",
|
|
2255
|
-
"description": "Use for body-sized text"
|
|
2256
|
-
},
|
|
2257
|
-
"5": {
|
|
2258
|
-
"value": "150%",
|
|
2259
|
-
"type": "lineHeights",
|
|
2260
|
-
"description": "Use for body-sized text in long-form reading applications."
|
|
2261
|
-
},
|
|
2262
|
-
"body": {
|
|
2263
|
-
"value": "150%",
|
|
2264
|
-
"type": "lineHeights"
|
|
2265
|
-
},
|
|
2266
|
-
"heading": {
|
|
2267
|
-
"value": "113%",
|
|
2268
|
-
"type": "lineHeights"
|
|
2269
|
-
},
|
|
2270
|
-
"description": {
|
|
2271
|
-
"value": "In production, all units are in %.",
|
|
2272
|
-
"type": "other"
|
|
2273
|
-
},
|
|
2274
|
-
"responsive": {
|
|
2275
|
-
"value": "clamp(1.1em, calc(1.25em + -0.4vw), 1.2em)",
|
|
2276
|
-
"type": "lineHeights",
|
|
2277
|
-
"description": "This is the responsive line height for the responsive type sizes."
|
|
2278
|
-
}
|
|
2279
|
-
},
|
|
2280
|
-
"heading": {
|
|
2281
|
-
"1": {
|
|
2282
|
-
"value": {
|
|
2283
|
-
"fontFamily": "Recoleta",
|
|
2284
|
-
"fontWeight": 400,
|
|
2285
|
-
"lineHeight": "135%",
|
|
2286
|
-
"fontSize": 40,
|
|
2287
|
-
"letterSpacing": "-1%"
|
|
2288
|
-
},
|
|
2289
|
-
"type": "typography"
|
|
2290
|
-
},
|
|
2291
|
-
"2": {
|
|
2292
|
-
"value": {
|
|
2293
|
-
"fontFamily": "SF Pro Text",
|
|
2294
|
-
"fontWeight": 500,
|
|
2295
|
-
"lineHeight": "120%",
|
|
2296
|
-
"fontSize": 32,
|
|
2297
|
-
"letterSpacing": "0%"
|
|
2298
|
-
},
|
|
2299
|
-
"type": "typography"
|
|
2300
|
-
},
|
|
2301
|
-
"3": {
|
|
2302
|
-
"value": {
|
|
2303
|
-
"fontFamily": "SF Pro Text",
|
|
2304
|
-
"fontWeight": 500,
|
|
2305
|
-
"lineHeight": "150%",
|
|
2306
|
-
"fontSize": 19,
|
|
2307
|
-
"letterSpacing": "0%"
|
|
2308
|
-
},
|
|
2309
|
-
"type": "typography"
|
|
2310
|
-
},
|
|
2311
|
-
"4": {
|
|
2312
|
-
"value": {
|
|
2313
|
-
"fontFamily": "SF Pro Text",
|
|
2314
|
-
"fontWeight": 500,
|
|
2315
|
-
"lineHeight": "160%",
|
|
2316
|
-
"fontSize": 14,
|
|
2317
|
-
"letterSpacing": "0%"
|
|
2318
|
-
},
|
|
2319
|
-
"type": "typography"
|
|
2320
|
-
},
|
|
2321
|
-
"5": {
|
|
2322
|
-
"value": {
|
|
2323
|
-
"fontFamily": "SF Pro Text",
|
|
2324
|
-
"fontWeight": 500,
|
|
2325
|
-
"lineHeight": "150%",
|
|
2326
|
-
"fontSize": 12
|
|
2327
|
-
},
|
|
2328
|
-
"type": "typography"
|
|
2329
|
-
},
|
|
2330
|
-
"caps": {
|
|
2331
|
-
"value": {
|
|
2332
|
-
"fontFamily": "SF Pro Text",
|
|
2333
|
-
"fontWeight": 700,
|
|
2334
|
-
"lineHeight": "150%",
|
|
2335
|
-
"fontSize": 12,
|
|
2336
|
-
"letterSpacing": "5%",
|
|
2337
|
-
"textCase": "uppercase"
|
|
2338
|
-
},
|
|
2339
|
-
"type": "typography"
|
|
2340
|
-
}
|
|
2341
|
-
},
|
|
2342
|
-
"fontWeight": {
|
|
2343
|
-
"body": {
|
|
2344
|
-
"value": 400,
|
|
2345
|
-
"type": "fontWeights"
|
|
2346
|
-
},
|
|
2347
|
-
"heading": {
|
|
2348
|
-
"value": 500,
|
|
2349
|
-
"type": "fontWeights"
|
|
2350
|
-
},
|
|
2351
|
-
"regular": {
|
|
2352
|
-
"value": 400,
|
|
2353
|
-
"type": "fontWeights"
|
|
2354
|
-
},
|
|
2355
|
-
"medium": {
|
|
2356
|
-
"value": 500,
|
|
2357
|
-
"type": "fontWeights"
|
|
2358
|
-
},
|
|
2359
|
-
"bold": {
|
|
2360
|
-
"value": 700,
|
|
2361
|
-
"type": "fontWeights"
|
|
2362
|
-
},
|
|
2363
|
-
"light": {
|
|
2364
|
-
"value": 200,
|
|
2365
|
-
"type": "fontWeights"
|
|
2366
|
-
}
|
|
2367
|
-
},
|
|
2368
|
-
"body": {
|
|
2369
|
-
"small": {
|
|
2370
|
-
"value": {
|
|
2371
|
-
"fontFamily": "SF Pro Text",
|
|
2372
|
-
"fontWeight": 400,
|
|
2373
|
-
"lineHeight": "150%",
|
|
2374
|
-
"fontSize": 12
|
|
2375
|
-
},
|
|
2376
|
-
"type": "typography"
|
|
2377
|
-
},
|
|
2378
|
-
"default": {
|
|
2379
|
-
"value": {
|
|
2380
|
-
"fontFamily": "SF Pro Text",
|
|
2381
|
-
"fontWeight": 400,
|
|
2382
|
-
"lineHeight": "150%",
|
|
2383
|
-
"fontSize": 14
|
|
2384
|
-
},
|
|
2385
|
-
"type": "typography"
|
|
2386
|
-
},
|
|
2387
|
-
"large": {
|
|
2388
|
-
"value": {
|
|
2389
|
-
"fontFamily": "SF Pro Text",
|
|
2390
|
-
"fontWeight": 400,
|
|
2391
|
-
"lineHeight": "150%",
|
|
2392
|
-
"fontSize": 20
|
|
2393
|
-
},
|
|
2394
|
-
"type": "typography"
|
|
2395
|
-
},
|
|
2396
|
-
"mono": {
|
|
2397
|
-
"value": {
|
|
2398
|
-
"fontFamily": "SF Mono",
|
|
2399
|
-
"fontWeight": 400,
|
|
2400
|
-
"lineHeight": "150%",
|
|
2401
|
-
"fontSize": 14
|
|
2402
|
-
},
|
|
2403
|
-
"type": "typography"
|
|
2404
|
-
},
|
|
2405
|
-
"mono-bold": {
|
|
2406
|
-
"value": {
|
|
2407
|
-
"fontFamily": "SF Mono",
|
|
2408
|
-
"lineHeight": "150%",
|
|
2409
|
-
"fontSize": 14,
|
|
2410
|
-
"fontWeight": 700
|
|
2411
|
-
},
|
|
2412
|
-
"type": "typography"
|
|
2413
|
-
}
|
|
2414
|
-
},
|
|
2415
|
-
"rem": {
|
|
2416
|
-
"value": 16,
|
|
2417
|
-
"type": "other",
|
|
2418
|
-
"description": "Use as the base rem value for calculations in Figma Tokens. In production all size values should be in rems, which is modifiable by the user. Since Figma Tokens doesn't support different units, we use this variable to do rem calculations. For our purposes, we're setting the rem value to 16px."
|
|
2419
|
-
},
|
|
2420
2338
|
"shadow": {
|
|
2421
2339
|
"1": {
|
|
2422
2340
|
"value": [
|
|
@@ -2514,18 +2432,97 @@
|
|
|
2514
2432
|
"type": "boxShadow"
|
|
2515
2433
|
}
|
|
2516
2434
|
},
|
|
2435
|
+
"lineHeight": {
|
|
2436
|
+
"0": {
|
|
2437
|
+
"value": "100%",
|
|
2438
|
+
"type": "lineHeights",
|
|
2439
|
+
"description": "Use for short text labels"
|
|
2440
|
+
},
|
|
2441
|
+
"1": {
|
|
2442
|
+
"value": "115%",
|
|
2443
|
+
"type": "lineHeights",
|
|
2444
|
+
"description": "Use only for display."
|
|
2445
|
+
},
|
|
2446
|
+
"2": {
|
|
2447
|
+
"value": "125%",
|
|
2448
|
+
"type": "lineHeights",
|
|
2449
|
+
"description": "Use for larger headings."
|
|
2450
|
+
},
|
|
2451
|
+
"3": {
|
|
2452
|
+
"value": "130%",
|
|
2453
|
+
"type": "lineHeights",
|
|
2454
|
+
"description": "Use for small and medium sized headings."
|
|
2455
|
+
},
|
|
2456
|
+
"4": {
|
|
2457
|
+
"value": "140%",
|
|
2458
|
+
"type": "lineHeights",
|
|
2459
|
+
"description": "Use for body-sized text"
|
|
2460
|
+
},
|
|
2461
|
+
"5": {
|
|
2462
|
+
"value": "150%",
|
|
2463
|
+
"type": "lineHeights",
|
|
2464
|
+
"description": "Use for body-sized text in long-form reading applications."
|
|
2465
|
+
},
|
|
2466
|
+
"description": {
|
|
2467
|
+
"value": "In production, all units are in %.",
|
|
2468
|
+
"type": "other"
|
|
2469
|
+
},
|
|
2470
|
+
"responsive": {
|
|
2471
|
+
"value": "clamp(1.1em, calc(1.25em + -0.4vw), 1.2em)",
|
|
2472
|
+
"type": "lineHeights",
|
|
2473
|
+
"description": "This is the responsive line height for the responsive type sizes."
|
|
2474
|
+
}
|
|
2475
|
+
},
|
|
2476
|
+
"fontWeight": {
|
|
2477
|
+
"regular": {
|
|
2478
|
+
"value": 400,
|
|
2479
|
+
"type": "fontWeights"
|
|
2480
|
+
},
|
|
2481
|
+
"medium": {
|
|
2482
|
+
"value": 500,
|
|
2483
|
+
"type": "fontWeights"
|
|
2484
|
+
},
|
|
2485
|
+
"semibold": {
|
|
2486
|
+
"value": 600,
|
|
2487
|
+
"type": "fontWeights"
|
|
2488
|
+
},
|
|
2489
|
+
"bold": {
|
|
2490
|
+
"value": 700,
|
|
2491
|
+
"type": "fontWeights"
|
|
2492
|
+
},
|
|
2493
|
+
"light": {
|
|
2494
|
+
"value": 200,
|
|
2495
|
+
"type": "fontWeights"
|
|
2496
|
+
}
|
|
2497
|
+
},
|
|
2517
2498
|
"letterSpacing": {
|
|
2499
|
+
"tight-3": {
|
|
2500
|
+
"value": "-0.02em",
|
|
2501
|
+
"type": "letterSpacing"
|
|
2502
|
+
},
|
|
2503
|
+
"tight-2": {
|
|
2504
|
+
"value": "-0.015em",
|
|
2505
|
+
"type": "letterSpacing"
|
|
2506
|
+
},
|
|
2507
|
+
"tight-1": {
|
|
2508
|
+
"value": "-0.01em",
|
|
2509
|
+
"type": "letterSpacing"
|
|
2510
|
+
},
|
|
2518
2511
|
"none": {
|
|
2519
2512
|
"value": "0em",
|
|
2520
2513
|
"type": "letterSpacing",
|
|
2521
2514
|
"description": "in Figma, letter spacing values need to be % but in production they need to be expressed in em to work with varable fonts"
|
|
2522
2515
|
},
|
|
2523
|
-
"
|
|
2524
|
-
"value": "
|
|
2516
|
+
"loose-1": {
|
|
2517
|
+
"value": "0.005em",
|
|
2518
|
+
"type": "letterSpacing"
|
|
2519
|
+
},
|
|
2520
|
+
"loose-2": {
|
|
2521
|
+
"value": "0.01em",
|
|
2525
2522
|
"type": "letterSpacing"
|
|
2526
2523
|
},
|
|
2527
|
-
"loose": {
|
|
2528
|
-
"value": "0.
|
|
2524
|
+
"loose-3": {
|
|
2525
|
+
"value": "0.02em",
|
|
2529
2526
|
"type": "letterSpacing"
|
|
2530
2527
|
}
|
|
2531
2528
|
},
|
|
@@ -48,26 +48,19 @@ export default theme => {
|
|
|
48
48
|
// We need to build h1: {}, h2: {}, h3: {}, caps: {}.
|
|
49
49
|
const getHeadingStyles = () => {
|
|
50
50
|
const variantValues = getVariants( 'heading' );
|
|
51
|
-
|
|
52
51
|
const headingStyles: Record< string, unknown > = {};
|
|
53
|
-
const baseProps = {
|
|
54
|
-
fontWeight: 'heading',
|
|
55
|
-
color: 'heading',
|
|
56
|
-
};
|
|
57
52
|
|
|
58
53
|
Object.keys( variantValues ).forEach( variant => {
|
|
59
54
|
if ( variant === 'caps' ) {
|
|
60
55
|
headingStyles.caps = {
|
|
61
56
|
...variantValues[ variant ],
|
|
62
|
-
...baseProps,
|
|
63
57
|
};
|
|
64
58
|
}
|
|
65
59
|
|
|
66
60
|
if ( parseInt( variant, 10 ) > 0 ) {
|
|
67
61
|
headingStyles[ `h${ variant }` ] = {
|
|
68
62
|
...variantValues[ variant ],
|
|
69
|
-
|
|
70
|
-
fontFamily: variant.toString() === '1' ? 'serif' : 'body',
|
|
63
|
+
fontFamily: 'default',
|
|
71
64
|
};
|
|
72
65
|
}
|
|
73
66
|
} );
|
|
@@ -11,6 +11,10 @@ import { linkUnderlineProperties } from '../Link/Link';
|
|
|
11
11
|
// Light
|
|
12
12
|
const { getPropValue, getVariants, ValetTheme, getHeadingStyles } = ThemeBuilder( Valet );
|
|
13
13
|
const light = ColorBuilder( ValetTheme );
|
|
14
|
+
const supportLabelDefaultTypography = getPropValue( 'support', 'label-default' ) as Record<
|
|
15
|
+
string,
|
|
16
|
+
unknown
|
|
17
|
+
>;
|
|
14
18
|
|
|
15
19
|
// Dark
|
|
16
20
|
const {
|
|
@@ -30,13 +34,6 @@ const outline = {
|
|
|
30
34
|
) }`,
|
|
31
35
|
};
|
|
32
36
|
|
|
33
|
-
const fonts = {
|
|
34
|
-
body: '-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',
|
|
35
|
-
heading: 'inherit',
|
|
36
|
-
monospace: '"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace',
|
|
37
|
-
serif: 'recoletaregular, Georgia, serif',
|
|
38
|
-
};
|
|
39
|
-
|
|
40
37
|
const getComponentColors = ( theme, gColor, gVariants ) => ( {
|
|
41
38
|
// Valet Theme Colors
|
|
42
39
|
|
|
@@ -222,13 +219,15 @@ const getComponentColors = ( theme, gColor, gVariants ) => ( {
|
|
|
222
219
|
export default {
|
|
223
220
|
outline,
|
|
224
221
|
space: getVariants( 'space' ),
|
|
225
|
-
fonts
|
|
222
|
+
fonts: {
|
|
223
|
+
monospace: getPropValue( 'fontFamily', 'monospace' ),
|
|
224
|
+
default: getPropValue( 'fontFamily', 'default' ),
|
|
225
|
+
},
|
|
226
226
|
fontSizes: getVariants( 'fontSize.static' ),
|
|
227
227
|
breakpoints: generateBreakpoints( getVariants( 'breakpoint' ) ),
|
|
228
228
|
fontWeights: {
|
|
229
|
-
body: getPropValue( 'fontWeight', 'body' ),
|
|
230
|
-
heading: getPropValue( 'fontWeight', 'heading' ),
|
|
231
229
|
regular: getPropValue( 'fontWeight', 'regular' ),
|
|
230
|
+
semibold: getPropValue( 'fontWeight', 'semibold' ),
|
|
232
231
|
bold: getPropValue( 'fontWeight', 'bold' ),
|
|
233
232
|
medium: getPropValue( 'fontWeight', 'medium' ),
|
|
234
233
|
light: getPropValue( 'fontWeight', 'light' ),
|
|
@@ -332,10 +331,19 @@ export default {
|
|
|
332
331
|
},
|
|
333
332
|
},
|
|
334
333
|
},
|
|
334
|
+
forms: {
|
|
335
|
+
label: {
|
|
336
|
+
...supportLabelDefaultTypography,
|
|
337
|
+
},
|
|
338
|
+
},
|
|
335
339
|
|
|
336
340
|
buttons: {
|
|
337
341
|
primary: {
|
|
338
|
-
|
|
342
|
+
// Typography for all button variants (many inherit `buttons.primary`).
|
|
343
|
+
// Pulled from the `support.label-default` design token.
|
|
344
|
+
...supportLabelDefaultTypography,
|
|
345
|
+
// Button label weight: theme `medium` (500).
|
|
346
|
+
fontWeight: 'medium',
|
|
339
347
|
color: 'button.primary.label.default',
|
|
340
348
|
bg: 'button.primary.background.default',
|
|
341
349
|
border: '1px solid transparent',
|
|
@@ -344,7 +352,6 @@ export default {
|
|
|
344
352
|
minHeight: '38px',
|
|
345
353
|
display: 'inline-flex',
|
|
346
354
|
cursor: 'pointer',
|
|
347
|
-
fontWeight: 'medium',
|
|
348
355
|
boxShadow: 'none',
|
|
349
356
|
borderRadius: 1,
|
|
350
357
|
'&:hover': {
|
|
@@ -577,7 +584,16 @@ export default {
|
|
|
577
584
|
},
|
|
578
585
|
},
|
|
579
586
|
|
|
580
|
-
text:
|
|
587
|
+
text: {
|
|
588
|
+
...getHeadingStyles(),
|
|
589
|
+
...getVariants( 'body' ),
|
|
590
|
+
'support-helper-text': getPropValue( 'support', 'helper-text' ),
|
|
591
|
+
'support-label-xs': getPropValue( 'support', 'label-xs' ),
|
|
592
|
+
'support-label-small': getPropValue( 'support', 'label-small' ),
|
|
593
|
+
'support-label-default': getPropValue( 'support', 'label-default' ),
|
|
594
|
+
'support-label-default-quiet': getPropValue( 'support', 'label-default-quiet' ),
|
|
595
|
+
'support-label-default-loud': getPropValue( 'support', 'label-default-loud' ),
|
|
596
|
+
},
|
|
581
597
|
|
|
582
598
|
dialog: {
|
|
583
599
|
modal: {
|
|
@@ -660,9 +676,9 @@ export default {
|
|
|
660
676
|
|
|
661
677
|
styles: {
|
|
662
678
|
root: {
|
|
663
|
-
fontFamily: 'body',
|
|
664
|
-
lineHeight: 'body',
|
|
665
|
-
fontWeight: 'body',
|
|
679
|
+
fontFamily: ( getPropValue( 'body', 'default' ) as Record< string, unknown > ).fontFamily,
|
|
680
|
+
lineHeight: ( getPropValue( 'body', 'default' ) as Record< string, unknown > ).lineHeight,
|
|
681
|
+
fontWeight: ( getPropValue( 'body', 'default' ) as Record< string, unknown > ).fontWeight,
|
|
666
682
|
color: 'text',
|
|
667
683
|
backgroundColor: 'backgrounds.primary',
|
|
668
684
|
webkitFontSmoothing: 'antialiased',
|
|
@@ -679,12 +695,11 @@ export default {
|
|
|
679
695
|
display: 'block',
|
|
680
696
|
},
|
|
681
697
|
pre: {
|
|
682
|
-
fontFamily: '
|
|
698
|
+
fontFamily: 'default',
|
|
683
699
|
},
|
|
684
700
|
p: {
|
|
685
701
|
color: 'text',
|
|
686
702
|
},
|
|
687
|
-
...getHeadingStyles(),
|
|
688
703
|
},
|
|
689
704
|
},
|
|
690
705
|
};
|