uikit-react-public 0.17.4 → 0.21.8
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/README.md +2 -4
- package/dist/components/Accordion/Accordion.Heading.d.ts +1 -0
- package/dist/components/AppHeader/AppHeader.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderBottom.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderNav.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderTop.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumb.d.ts +3 -4
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +7 -3
- package/dist/components/Button/Button.stories.d.ts +17 -7
- package/dist/components/Button/style/buttonAccentStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimaryDestructiveStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimaryStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimarySubtleStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimaryWarningStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonSecondaryDestructiveStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonSecondaryStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonSecondarySubtleStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonTertiaryDestructiveStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonTertiaryNoPaddingStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonTertiaryStyle.d.ts +4 -0
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/FooterNew/BackToTop.d.ts +8 -0
- package/dist/components/FooterNew/Footer.d.ts +23 -0
- package/dist/components/FooterNew/FooterColumn.d.ts +8 -0
- package/dist/components/FooterNew/FooterLinks.d.ts +7 -0
- package/dist/components/FooterNew/FooterNavLink.d.ts +8 -0
- package/dist/components/FooterNew/LegalAndCopyright.d.ts +14 -0
- package/dist/components/FooterNew/LogoAddressAndSocial.d.ts +10 -0
- package/dist/components/FooterNew/SocialLink.d.ts +8 -0
- package/dist/components/FooterNew/__tests__/Footer.test.d.ts +1 -0
- package/dist/components/FooterNew/index.d.ts +2 -0
- package/dist/components/HeaderNew/Header.d.ts +18 -0
- package/dist/components/HeaderNew/HeaderBorder.d.ts +7 -0
- package/dist/components/HeaderNew/HeaderLogo.d.ts +9 -0
- package/dist/components/HeaderNew/HeaderMenuContainer.d.ts +7 -0
- package/dist/components/HeaderNew/HeaderTitle.d.ts +9 -0
- package/dist/components/HeaderNew/__tests__/Header.test.d.ts +1 -0
- package/dist/components/HeaderNew/constants.d.ts +3 -0
- package/dist/components/HeaderNew/index.d.ts +3 -0
- package/dist/components/HeadingNew/Heading.d.ts +13 -0
- package/dist/components/HeadingNew/index.d.ts +2 -0
- package/dist/components/Icon/svgImports.d.ts +7 -881
- package/dist/components/Link/BaseLink.d.ts +14 -5
- package/dist/components/Link/Link.d.ts +8 -3
- package/dist/components/Link/Link.stories.d.ts +3 -1
- package/dist/components/MenuNew/Menu.context.d.ts +14 -0
- package/dist/components/MenuNew/Menu.d.ts +20 -0
- package/dist/components/MenuNew/MenuContent.d.ts +9 -0
- package/dist/components/MenuNew/MenuItem.d.ts +10 -0
- package/dist/components/MenuNew/MenuSection.d.ts +7 -0
- package/dist/components/MenuNew/index.d.ts +6 -0
- package/dist/components/MenuNew/trigger/ButtonMenuTrigger.d.ts +8 -0
- package/dist/components/MenuNew/trigger/IconMenuTrigger.d.ts +8 -0
- package/dist/components/Overlay/Overlay.stories.d.ts +12 -12
- package/dist/components/ParagraphNew/Paragraph.d.ts +13 -0
- package/dist/components/ParagraphNew/index.d.ts +4 -0
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/Select.stories.d.ts +13 -1
- package/dist/components/Select/Select.types.d.ts +40 -13
- package/dist/components/Select/subcomponents/CustomSelect.d.ts +3 -3
- package/dist/components/Select/subcomponents/FilterInput.d.ts +3 -1
- package/dist/components/Select/subcomponents/NativeSelect.d.ts +2 -2
- package/dist/components/Select/subcomponents/VisibleField.d.ts +4 -1
- package/dist/components/Spinner/Spinner.d.ts +2 -0
- package/dist/components/StandaloneLink/StandaloneLink.d.ts +8 -5
- package/dist/components/StandaloneLink/StandaloneLink.stories.d.ts +3 -1
- package/dist/components/Table/Table.d.ts +3 -3
- package/dist/components/Table/Table.stories.d.ts +3 -3
- package/dist/components/Table/Table.types.d.ts +1 -0
- package/dist/components/Table/subcomponents/Cell/Cell.d.ts +5 -1
- package/dist/components/Table/subcomponents/Cell/Cell.stories.d.ts +15 -13
- package/dist/components/Table/subcomponents/Cell/CellContent.d.ts +5 -1
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.d.ts +2 -1
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.stories.d.ts +14 -13
- package/dist/components/Table/subcomponents/HeadCell/HeadCellContent.d.ts +2 -1
- package/dist/components/Table/subcomponents/__tests__/Row.test.d.ts +1 -0
- package/dist/components/UclLogoNew/UclLogo.d.ts +8 -0
- package/dist/components/UclLogoNew/index.d.ts +2 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/index.js +20909 -16022
- package/dist/theme/__tests__/fonts.test.d.ts +1 -0
- package/dist/theme/common/themeCommon.d.ts +904 -0
- package/dist/theme/fonts.d.ts +18 -0
- package/dist/theme/index.d.ts +6 -3
- package/dist/theme/light/lightColour.d.ts +126 -0
- package/dist/theme/light/lightTheme.d.ts +3 -0
- package/dist/theme/original/color.d.ts +166 -0
- package/dist/theme/original/defaultTheme.d.ts +1340 -0
- package/dist/theme/original/originalColourNewStructure.d.ts +126 -0
- package/dist/theme/useTheme.d.ts +2174 -0
- package/dist/utils/addAlphaToHex.d.ts +5 -0
- package/dist/utils/scrollToTop.d.ts +2 -0
- package/lib/components/Accordion/Accordion.Heading.tsx +51 -39
- package/lib/components/Accordion/Accordion.Panel.tsx +0 -4
- package/lib/components/Accordion/Accordion.tsx +34 -28
- package/lib/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap +12 -10
- package/lib/components/Alert/Alert.tsx +12 -12
- package/lib/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +13 -39
- package/lib/components/AppHeader/AppHeader.tsx +6 -11
- package/lib/components/AppHeader/AppHeaderBottom.tsx +2 -3
- package/lib/components/AppHeader/AppHeaderNav.tsx +2 -3
- package/lib/components/AppHeader/AppHeaderTop.tsx +1 -1
- package/lib/components/AppHeader/__tests__/__snapshots__/AppHeader.test.tsx.snap +2 -2
- package/lib/components/AppMenu/__tests__/__snapshots__/AppMenu.test.tsx.snap +6 -19
- package/lib/components/Badge/Badge.stories.tsx +1 -1
- package/lib/components/Breadcrumbs/Breadcrumb.tsx +26 -12
- package/lib/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/lib/components/Breadcrumbs/__tests__/Breadcrumbs.test.tsx +9 -27
- package/lib/components/Breadcrumbs/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +24 -20
- package/lib/components/Button/Button.mdx +32 -279
- package/lib/components/Button/Button.stories.tsx +43 -50
- package/lib/components/Button/Button.tsx +165 -25
- package/lib/components/Button/__tests__/Button.test.tsx +49 -15
- package/lib/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +80 -73
- package/lib/components/Button/style/buttonAccentStyle.ts +53 -0
- package/lib/components/Button/style/buttonPrimaryDestructiveStyle.ts +55 -0
- package/lib/components/Button/style/buttonPrimaryStyle.ts +53 -0
- package/lib/components/Button/style/buttonPrimarySubtleStyle.ts +64 -0
- package/lib/components/Button/style/buttonPrimaryWarningStyle.ts +56 -0
- package/lib/components/Button/style/buttonSecondaryDestructiveStyle.ts +63 -0
- package/lib/components/Button/style/buttonSecondaryStyle.ts +62 -0
- package/lib/components/Button/style/buttonSecondarySubtleStyle.ts +72 -0
- package/lib/components/Button/style/buttonTertiaryDestructiveStyle.ts +65 -0
- package/lib/components/Button/style/buttonTertiaryNoPaddingStyle.ts +52 -0
- package/lib/components/Button/style/buttonTertiaryStyle.ts +62 -0
- package/lib/components/Calendar/Calendar.stories.tsx +33 -13
- package/lib/components/Calendar/Calendar.tsx +2 -2
- package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +99 -95
- package/lib/components/Calendar/subcomponents/AcademicWeek.tsx +2 -1
- package/lib/components/Calendar/subcomponents/AcademicWeeks.tsx +2 -3
- package/lib/components/Calendar/subcomponents/ColumnHeading.tsx +3 -7
- package/lib/components/Calendar/subcomponents/Controls.tsx +1 -1
- package/lib/components/Calendar/subcomponents/Day.stories.tsx +1 -1
- package/lib/components/Calendar/subcomponents/Day.tsx +7 -9
- package/lib/components/Calendar/subcomponents/EventDot.tsx +4 -8
- package/lib/components/Checkbox/Checkbox.stories.tsx +1 -1
- package/lib/components/Checkbox/Checkbox.tsx +12 -10
- package/lib/components/Checkbox/__tests__/Checkbox.test.tsx +29 -0
- package/lib/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +4 -4
- package/lib/components/Datepicker/__tests__/Datepicker.test.tsx +117 -0
- package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +16 -44
- package/lib/components/Datepicker/subcomponents/CustomDatepicker.tsx +10 -1
- package/lib/components/Datepicker/subcomponents/VisibleField.tsx +24 -23
- package/lib/components/Dialog/BaseDialog.tsx +2 -2
- package/lib/components/Dialog/Dialog.stories.tsx +1 -1
- package/lib/components/Divider/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +12 -12
- package/lib/components/FeedbackDialog/FeedbackDialog.stories.tsx +1 -1
- package/lib/components/FeedbackDialog/FeedbackDialog.tsx +4 -6
- package/lib/components/Field/CharacterCount.tsx +2 -2
- package/lib/components/Field/ErrorText.tsx +1 -1
- package/lib/components/Field/Field.tsx +1 -1
- package/lib/components/Field/HelperText.tsx +3 -1
- package/lib/components/FileInput/FileInput.stories.tsx +1 -1
- package/lib/components/FileInput/__tests__/__snapshots__/FileInput.test.tsx.snap +4 -20
- package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +70 -79
- package/lib/components/FooterNew/BackToTop.tsx +83 -0
- package/lib/components/FooterNew/Footer.tsx +110 -0
- package/lib/components/FooterNew/FooterColumn.tsx +79 -0
- package/lib/components/FooterNew/FooterLinks.tsx +44 -0
- package/lib/components/FooterNew/FooterNavLink.tsx +63 -0
- package/lib/components/FooterNew/LegalAndCopyright.tsx +150 -0
- package/lib/components/FooterNew/LogoAddressAndSocial.tsx +154 -0
- package/lib/components/FooterNew/SocialLink.tsx +108 -0
- package/lib/components/FooterNew/__tests__/Footer.test.tsx +51 -0
- package/lib/components/FooterNew/__tests__/__snapshots__/Footer.test.tsx.snap +1107 -0
- package/lib/components/FooterNew/index.ts +2 -0
- package/lib/components/HeaderDraft/__tests__/__snapshots__/Header.test.tsx.snap +3 -2
- package/lib/components/HeaderNew/Header.tsx +93 -0
- package/lib/components/HeaderNew/HeaderBorder.tsx +55 -0
- package/lib/components/HeaderNew/HeaderLogo.tsx +70 -0
- package/lib/components/HeaderNew/HeaderMenuContainer.tsx +35 -0
- package/lib/components/HeaderNew/HeaderTitle.tsx +53 -0
- package/lib/components/HeaderNew/__tests__/Header.test.tsx +42 -0
- package/lib/components/HeaderNew/__tests__/__snapshots__/Header.test.tsx.snap +79 -0
- package/lib/components/HeaderNew/constants.ts +3 -0
- package/lib/components/HeaderNew/index.ts +7 -0
- package/lib/components/HeadingNew/Heading.tsx +208 -0
- package/lib/components/HeadingNew/index.ts +2 -0
- package/lib/components/Icon/__tests__/__snapshots__/Icon.test.tsx.snap +16 -12
- package/lib/components/Icon/svgImports.ts +318 -296
- package/lib/components/IconButton/IconButton.tsx +3 -4
- package/lib/components/IconButton/__tests__/__snapshots__/IconButton.test.tsx.snap +12 -9
- package/lib/components/Link/BaseLink.tsx +114 -71
- package/lib/components/Link/Link.stories.tsx +1 -1
- package/lib/components/Link/Link.tsx +120 -109
- package/lib/components/Link/__tests__/__snapshots__/link.test.tsx.snap +2 -2
- package/lib/components/MenuNew/Menu.context.tsx +149 -0
- package/lib/components/MenuNew/Menu.tsx +75 -0
- package/lib/components/MenuNew/MenuContent.tsx +140 -0
- package/lib/components/MenuNew/MenuItem.tsx +101 -0
- package/lib/components/MenuNew/MenuSection.tsx +47 -0
- package/lib/components/MenuNew/index.ts +8 -0
- package/lib/components/MenuNew/trigger/ButtonMenuTrigger.tsx +42 -0
- package/lib/components/MenuNew/trigger/IconMenuTrigger.tsx +40 -0
- package/lib/components/Pagination/Pagination.stories.tsx +1 -1
- package/lib/components/Pagination/PaginationControls.tsx +4 -5
- package/lib/components/Pagination/PaginationInfo.tsx +2 -3
- package/lib/components/ParagraphNew/Paragraph.tsx +200 -0
- package/lib/components/ParagraphNew/index.ts +6 -0
- package/lib/components/Radio/Radio.stories.tsx +1 -1
- package/lib/components/Radio/Radio.tsx +8 -8
- package/lib/components/Radio/__tests__/__snapshots__/Radio.test.tsx.snap +4 -4
- package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +12 -32
- package/lib/components/Select/Select.mdx +23 -0
- package/lib/components/Select/Select.stories.tsx +43 -10
- package/lib/components/Select/Select.tsx +14 -3
- package/lib/components/Select/Select.types.ts +53 -16
- package/lib/components/Select/__tests__/Select.test.tsx +250 -1
- package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +5 -4
- package/lib/components/Select/subcomponents/CustomOption.tsx +10 -3
- package/lib/components/Select/subcomponents/CustomSelect.tsx +110 -10
- package/lib/components/Select/subcomponents/FilterInput.tsx +13 -3
- package/lib/components/Select/subcomponents/NativeSelect.tsx +10 -18
- package/lib/components/Select/subcomponents/Panel.tsx +2 -2
- package/lib/components/Select/subcomponents/VisibleField.tsx +48 -3
- package/lib/components/Snackbar/__tests__/__snapshots__/Snackbar.test.tsx.snap +9 -15
- package/lib/components/Spinner/Spinner.tsx +24 -5
- package/lib/components/Spinner/__tests__/Spinner.test.tsx +35 -5
- package/lib/components/Spinner/__tests__/__snapshots__/Spinner.test.tsx.snap +40 -16
- package/lib/components/StandaloneLink/StandaloneLink.stories.tsx +1 -1
- package/lib/components/StandaloneLink/StandaloneLink.tsx +180 -163
- package/lib/components/StandaloneLink/__tests__/__snapshots__/StandaloneLink.test.tsx.snap +2 -2
- package/lib/components/Table/Table.stories.tsx +1 -1
- package/lib/components/Table/Table.tsx +2 -0
- package/lib/components/Table/Table.types.ts +1 -0
- package/lib/components/Table/__tests__/Table.test.tsx +19 -0
- package/lib/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +7 -3
- package/lib/components/Table/subcomponents/Cell/Cell.stories.tsx +1 -1
- package/lib/components/Table/subcomponents/Cell/Cell.tsx +23 -2
- package/lib/components/Table/subcomponents/Cell/CellContent.tsx +12 -1
- package/lib/components/Table/subcomponents/Cell/__tests__/Cell.test.tsx +106 -0
- package/lib/components/Table/subcomponents/Cell/__tests__/__snapshots__/Cell.test.tsx.snap +4 -3
- package/lib/components/Table/subcomponents/HeadCell/HeadCell.stories.tsx +1 -1
- package/lib/components/Table/subcomponents/HeadCell/HeadCell.tsx +28 -6
- package/lib/components/Table/subcomponents/HeadCell/HeadCellContent.tsx +3 -0
- package/lib/components/Table/subcomponents/HeadCell/__tests__/HeadCell.test.tsx +221 -2
- package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap +6 -4
- package/lib/components/Table/subcomponents/Row.tsx +2 -2
- package/lib/components/Table/subcomponents/SortIcon.tsx +1 -0
- package/lib/components/Table/subcomponents/__tests__/Row.test.tsx +59 -0
- package/lib/components/Tabs/Tab.tsx +3 -3
- package/lib/components/Tabs/Tabs.stories.tsx +1 -1
- package/lib/components/Tabs/Tabs.tsx +5 -3
- package/lib/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +4 -4
- package/lib/components/Timepicker/Timepicker.stories.tsx +1 -1
- package/lib/components/Toggle/Toggle.tsx +5 -5
- package/lib/components/Toggle/ToggleHandle.tsx +2 -3
- package/lib/components/Tooltip/Tooltip.tsx +2 -2
- package/lib/components/Tooltip/__tests__/__snapshots__/tooltip.test.tsx.snap +2 -2
- package/lib/components/UclLogoNew/UclLogo.tsx +42 -0
- package/lib/components/UclLogoNew/index.ts +2 -0
- package/lib/components/WeekPicker/WeekPicker.stories.tsx +3 -5
- package/lib/components/common/Common.mdx +0 -1
- package/lib/components/index.ts +19 -1
- package/lib/theme/Colours.mdx +1 -1
- package/lib/theme/Theme.mdx +1 -1
- package/lib/theme/Typography.mdx +1 -1
- package/lib/theme/__tests__/fonts.test.ts +37 -0
- package/lib/theme/common/themeCommon.ts +515 -0
- package/lib/theme/fonts.ts +110 -0
- package/lib/theme/index.ts +6 -6
- package/lib/theme/light/lightColour.ts +232 -0
- package/lib/theme/light/lightTheme.ts +37 -0
- package/lib/theme/{defaultTheme.ts → original/color.ts} +17 -199
- package/lib/theme/original/defaultTheme.ts +207 -0
- package/lib/theme/original/originalColourNewStructure.ts +185 -0
- package/lib/theme/useTheme.tsx +72 -15
- package/lib/types/assets.d.ts +10 -0
- package/lib/utils/addAlphaToHex.ts +29 -0
- package/lib/utils/scrollToTop.ts +5 -0
- package/package.json +11 -6
- package/dist/components/Button/buttonPrimaryStyle.d.ts +0 -4
- package/dist/components/Button/buttonSecondaryStyle.d.ts +0 -4
- package/dist/components/Button/buttonTertiaryStyle.d.ts +0 -4
- package/dist/theme/defaultTheme.d.ts +0 -274
- package/lib/components/Button/buttonPrimaryStyle.ts +0 -62
- package/lib/components/Button/buttonSecondaryStyle.ts +0 -65
- package/lib/components/Button/buttonTertiaryStyle.ts +0 -54
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import { tokens } from 'design-system-foundations-public';
|
|
2
|
+
|
|
3
|
+
const { light: lightTokens, primitives: primitiveTokens } = tokens;
|
|
4
|
+
|
|
5
|
+
const { sans, mono } = primitiveTokens.font.family; // sans and mono
|
|
6
|
+
|
|
7
|
+
const fontFamiliesByRef = {
|
|
8
|
+
'#/font/family/sans': sans.$value.family,
|
|
9
|
+
'#/font/family/mono': mono.$value.family,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const fontSettingsByRef = {
|
|
13
|
+
'#/font/family/sans': sans.$value.featureSettings,
|
|
14
|
+
'#/font/family/mono': undefined,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type FontFamiliesByRef = typeof fontFamiliesByRef;
|
|
18
|
+
type FontSettingsByRef = typeof fontSettingsByRef;
|
|
19
|
+
type FeatureSettings = typeof sans.$value.featureSettings;
|
|
20
|
+
|
|
21
|
+
const featureSettings = (featureSettingsTokenValue?: FeatureSettings) => {
|
|
22
|
+
if (featureSettingsTokenValue) {
|
|
23
|
+
return Object.entries(featureSettingsTokenValue)
|
|
24
|
+
.map(([f, v]) => `"${f}" ${v}`)
|
|
25
|
+
.join(', ');
|
|
26
|
+
} else {
|
|
27
|
+
return '';
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const primitiveColour = {
|
|
32
|
+
grey: primitiveTokens.colour.grey,
|
|
33
|
+
whiteAlpha: primitiveTokens.colour['white-alpha'],
|
|
34
|
+
red: primitiveTokens.colour.red,
|
|
35
|
+
orange: primitiveTokens.colour.orange,
|
|
36
|
+
yellow: primitiveTokens.colour.yellow,
|
|
37
|
+
green: primitiveTokens.colour.green,
|
|
38
|
+
blue: primitiveTokens.colour.blue,
|
|
39
|
+
brandPurple: primitiveTokens.colour['brand-purple'],
|
|
40
|
+
brandBlur: primitiveTokens.colour['brand-blue'],
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const typography = {
|
|
44
|
+
heading: {
|
|
45
|
+
xxl: {
|
|
46
|
+
md: {
|
|
47
|
+
fontFamily:
|
|
48
|
+
fontFamiliesByRef[
|
|
49
|
+
lightTokens.typography['functional-heading'].xxl.$value.md
|
|
50
|
+
.fontFamily.$ref as keyof FontFamiliesByRef
|
|
51
|
+
],
|
|
52
|
+
fontSettings: featureSettings(
|
|
53
|
+
fontSettingsByRef[
|
|
54
|
+
lightTokens.typography['functional-heading'].xxl.$value.md
|
|
55
|
+
.fontFamily.$ref as keyof FontSettingsByRef
|
|
56
|
+
]
|
|
57
|
+
),
|
|
58
|
+
fontSize:
|
|
59
|
+
lightTokens.typography['functional-heading'].xxl.$value.md.fontSize,
|
|
60
|
+
fontWeight:
|
|
61
|
+
lightTokens.typography['functional-heading'].xxl.$value.md.fontWeight,
|
|
62
|
+
lineHeight:
|
|
63
|
+
lightTokens.typography['functional-heading'].xxl.$value.md.lineHeight,
|
|
64
|
+
},
|
|
65
|
+
sm: {
|
|
66
|
+
fontFamily:
|
|
67
|
+
fontFamiliesByRef[
|
|
68
|
+
lightTokens.typography['functional-heading'].xxl.$value.sm
|
|
69
|
+
.fontFamily.$ref as keyof FontFamiliesByRef
|
|
70
|
+
],
|
|
71
|
+
fontSettings: featureSettings(
|
|
72
|
+
fontSettingsByRef[
|
|
73
|
+
lightTokens.typography['functional-heading'].xxl.$value.sm
|
|
74
|
+
.fontFamily.$ref as keyof FontSettingsByRef
|
|
75
|
+
]
|
|
76
|
+
),
|
|
77
|
+
fontSize:
|
|
78
|
+
lightTokens.typography['functional-heading'].xxl.$value.sm.fontSize,
|
|
79
|
+
fontWeight:
|
|
80
|
+
lightTokens.typography['functional-heading'].xxl.$value.sm.fontWeight,
|
|
81
|
+
lineHeight:
|
|
82
|
+
lightTokens.typography['functional-heading'].xxl.$value.sm.lineHeight,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
xl: {
|
|
86
|
+
md: {
|
|
87
|
+
fontFamily:
|
|
88
|
+
fontFamiliesByRef[
|
|
89
|
+
lightTokens.typography['functional-heading'].xl.$value.md.fontFamily
|
|
90
|
+
.$ref as keyof FontFamiliesByRef
|
|
91
|
+
],
|
|
92
|
+
fontSettings: featureSettings(
|
|
93
|
+
fontSettingsByRef[
|
|
94
|
+
lightTokens.typography['functional-heading'].xl.$value.md.fontFamily
|
|
95
|
+
.$ref as keyof FontSettingsByRef
|
|
96
|
+
]
|
|
97
|
+
),
|
|
98
|
+
fontSize:
|
|
99
|
+
lightTokens.typography['functional-heading'].xl.$value.md.fontSize,
|
|
100
|
+
fontWeight:
|
|
101
|
+
lightTokens.typography['functional-heading'].xl.$value.md.fontWeight,
|
|
102
|
+
lineHeight:
|
|
103
|
+
lightTokens.typography['functional-heading'].xl.$value.md.lineHeight,
|
|
104
|
+
},
|
|
105
|
+
sm: {
|
|
106
|
+
fontFamily:
|
|
107
|
+
fontFamiliesByRef[
|
|
108
|
+
lightTokens.typography['functional-heading'].xl.$value.sm.fontFamily
|
|
109
|
+
.$ref as keyof FontFamiliesByRef
|
|
110
|
+
],
|
|
111
|
+
fontSettings: featureSettings(
|
|
112
|
+
fontSettingsByRef[
|
|
113
|
+
lightTokens.typography['functional-heading'].xl.$value.sm.fontFamily
|
|
114
|
+
.$ref as keyof FontSettingsByRef
|
|
115
|
+
]
|
|
116
|
+
),
|
|
117
|
+
fontSize:
|
|
118
|
+
lightTokens.typography['functional-heading'].xl.$value.sm.fontSize,
|
|
119
|
+
fontWeight:
|
|
120
|
+
lightTokens.typography['functional-heading'].xl.$value.sm.fontWeight,
|
|
121
|
+
lineHeight:
|
|
122
|
+
lightTokens.typography['functional-heading'].xl.$value.sm.lineHeight,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
lg: {
|
|
126
|
+
md: {
|
|
127
|
+
fontFamily:
|
|
128
|
+
fontFamiliesByRef[
|
|
129
|
+
lightTokens.typography['functional-heading'].lg.$value.md.fontFamily
|
|
130
|
+
.$ref as keyof FontFamiliesByRef
|
|
131
|
+
],
|
|
132
|
+
fontSettings: featureSettings(
|
|
133
|
+
fontSettingsByRef[
|
|
134
|
+
lightTokens.typography['functional-heading'].lg.$value.md.fontFamily
|
|
135
|
+
.$ref as keyof FontSettingsByRef
|
|
136
|
+
]
|
|
137
|
+
),
|
|
138
|
+
fontSize:
|
|
139
|
+
lightTokens.typography['functional-heading'].lg.$value.md.fontSize,
|
|
140
|
+
fontWeight:
|
|
141
|
+
lightTokens.typography['functional-heading'].lg.$value.md.fontWeight,
|
|
142
|
+
lineHeight:
|
|
143
|
+
lightTokens.typography['functional-heading'].lg.$value.md.lineHeight,
|
|
144
|
+
},
|
|
145
|
+
sm: {
|
|
146
|
+
fontFamily:
|
|
147
|
+
fontFamiliesByRef[
|
|
148
|
+
lightTokens.typography['functional-heading'].lg.$value.sm.fontFamily
|
|
149
|
+
.$ref as keyof FontFamiliesByRef
|
|
150
|
+
],
|
|
151
|
+
fontSettings: featureSettings(
|
|
152
|
+
fontSettingsByRef[
|
|
153
|
+
lightTokens.typography['functional-heading'].lg.$value.sm.fontFamily
|
|
154
|
+
.$ref as keyof FontSettingsByRef
|
|
155
|
+
]
|
|
156
|
+
),
|
|
157
|
+
fontSize:
|
|
158
|
+
lightTokens.typography['functional-heading'].lg.$value.sm.fontSize,
|
|
159
|
+
fontWeight:
|
|
160
|
+
lightTokens.typography['functional-heading'].lg.$value.sm.fontWeight,
|
|
161
|
+
lineHeight:
|
|
162
|
+
lightTokens.typography['functional-heading'].lg.$value.sm.lineHeight,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
md: {
|
|
166
|
+
md: {
|
|
167
|
+
fontFamily:
|
|
168
|
+
fontFamiliesByRef[
|
|
169
|
+
lightTokens.typography['functional-heading'].md.$value.md.fontFamily
|
|
170
|
+
.$ref as keyof FontFamiliesByRef
|
|
171
|
+
],
|
|
172
|
+
fontSettings: featureSettings(
|
|
173
|
+
fontSettingsByRef[
|
|
174
|
+
lightTokens.typography['functional-heading'].md.$value.md.fontFamily
|
|
175
|
+
.$ref as keyof FontSettingsByRef
|
|
176
|
+
]
|
|
177
|
+
),
|
|
178
|
+
fontSize:
|
|
179
|
+
lightTokens.typography['functional-heading'].md.$value.md.fontSize,
|
|
180
|
+
fontWeight:
|
|
181
|
+
lightTokens.typography['functional-heading'].md.$value.md.fontWeight,
|
|
182
|
+
lineHeight:
|
|
183
|
+
lightTokens.typography['functional-heading'].md.$value.md.lineHeight,
|
|
184
|
+
},
|
|
185
|
+
sm: {
|
|
186
|
+
fontFamily:
|
|
187
|
+
fontFamiliesByRef[
|
|
188
|
+
lightTokens.typography['functional-heading'].md.$value.sm.fontFamily
|
|
189
|
+
.$ref as keyof FontFamiliesByRef
|
|
190
|
+
],
|
|
191
|
+
fontSettings: featureSettings(
|
|
192
|
+
fontSettingsByRef[
|
|
193
|
+
lightTokens.typography['functional-heading'].md.$value.sm.fontFamily
|
|
194
|
+
.$ref as keyof FontSettingsByRef
|
|
195
|
+
]
|
|
196
|
+
),
|
|
197
|
+
fontSize:
|
|
198
|
+
lightTokens.typography['functional-heading'].md.$value.sm.fontSize,
|
|
199
|
+
fontWeight:
|
|
200
|
+
lightTokens.typography['functional-heading'].md.$value.sm.fontWeight,
|
|
201
|
+
lineHeight:
|
|
202
|
+
lightTokens.typography['functional-heading'].md.$value.sm.lineHeight,
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
sm: {
|
|
206
|
+
md: {
|
|
207
|
+
fontFamily:
|
|
208
|
+
fontFamiliesByRef[
|
|
209
|
+
lightTokens.typography['functional-heading'].sm.$value.md.fontFamily
|
|
210
|
+
.$ref as keyof FontFamiliesByRef
|
|
211
|
+
],
|
|
212
|
+
fontSettings: featureSettings(
|
|
213
|
+
fontSettingsByRef[
|
|
214
|
+
lightTokens.typography['functional-heading'].sm.$value.md.fontFamily
|
|
215
|
+
.$ref as keyof FontSettingsByRef
|
|
216
|
+
]
|
|
217
|
+
),
|
|
218
|
+
fontSize:
|
|
219
|
+
lightTokens.typography['functional-heading'].sm.$value.md.fontSize,
|
|
220
|
+
fontWeight:
|
|
221
|
+
lightTokens.typography['functional-heading'].sm.$value.md.fontWeight,
|
|
222
|
+
lineHeight:
|
|
223
|
+
lightTokens.typography['functional-heading'].sm.$value.md.lineHeight,
|
|
224
|
+
},
|
|
225
|
+
sm: {
|
|
226
|
+
fontFamily:
|
|
227
|
+
fontFamiliesByRef[
|
|
228
|
+
lightTokens.typography['functional-heading'].sm.$value.sm.fontFamily
|
|
229
|
+
.$ref as keyof FontFamiliesByRef
|
|
230
|
+
],
|
|
231
|
+
fontSettings: featureSettings(
|
|
232
|
+
fontSettingsByRef[
|
|
233
|
+
lightTokens.typography['functional-heading'].sm.$value.sm.fontFamily
|
|
234
|
+
.$ref as keyof FontSettingsByRef
|
|
235
|
+
]
|
|
236
|
+
),
|
|
237
|
+
fontSize:
|
|
238
|
+
lightTokens.typography['functional-heading'].sm.$value.sm.fontSize,
|
|
239
|
+
fontWeight:
|
|
240
|
+
lightTokens.typography['functional-heading'].sm.$value.sm.fontWeight,
|
|
241
|
+
lineHeight:
|
|
242
|
+
lightTokens.typography['functional-heading'].sm.$value.sm.lineHeight,
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
xs: {
|
|
246
|
+
md: {
|
|
247
|
+
fontFamily:
|
|
248
|
+
fontFamiliesByRef[
|
|
249
|
+
lightTokens.typography['functional-heading'].xs.$value.md.fontFamily
|
|
250
|
+
.$ref as keyof FontFamiliesByRef
|
|
251
|
+
],
|
|
252
|
+
fontSettings: featureSettings(
|
|
253
|
+
fontSettingsByRef[
|
|
254
|
+
lightTokens.typography['functional-heading'].xs.$value.md.fontFamily
|
|
255
|
+
.$ref as keyof FontSettingsByRef
|
|
256
|
+
]
|
|
257
|
+
),
|
|
258
|
+
fontSize:
|
|
259
|
+
lightTokens.typography['functional-heading'].xs.$value.md.fontSize,
|
|
260
|
+
fontWeight:
|
|
261
|
+
lightTokens.typography['functional-heading'].xs.$value.md.fontWeight,
|
|
262
|
+
lineHeight:
|
|
263
|
+
lightTokens.typography['functional-heading'].xs.$value.md.lineHeight,
|
|
264
|
+
},
|
|
265
|
+
sm: {
|
|
266
|
+
fontFamily:
|
|
267
|
+
fontFamiliesByRef[
|
|
268
|
+
lightTokens.typography['functional-heading'].xs.$value.sm.fontFamily
|
|
269
|
+
.$ref as keyof FontFamiliesByRef
|
|
270
|
+
],
|
|
271
|
+
fontSettings: featureSettings(
|
|
272
|
+
fontSettingsByRef[
|
|
273
|
+
lightTokens.typography['functional-heading'].xs.$value.sm.fontFamily
|
|
274
|
+
.$ref as keyof FontSettingsByRef
|
|
275
|
+
]
|
|
276
|
+
),
|
|
277
|
+
fontSize:
|
|
278
|
+
lightTokens.typography['functional-heading'].xs.$value.sm.fontSize,
|
|
279
|
+
fontWeight:
|
|
280
|
+
lightTokens.typography['functional-heading'].xs.$value.sm.fontWeight,
|
|
281
|
+
lineHeight:
|
|
282
|
+
lightTokens.typography['functional-heading'].xs.$value.sm.lineHeight,
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
body: {
|
|
287
|
+
lg: {
|
|
288
|
+
fontFamily:
|
|
289
|
+
fontFamiliesByRef[
|
|
290
|
+
lightTokens.typography.body.lg.$value.fontFamily
|
|
291
|
+
.$ref as keyof FontFamiliesByRef
|
|
292
|
+
],
|
|
293
|
+
fontSettings: featureSettings(
|
|
294
|
+
fontSettingsByRef[
|
|
295
|
+
lightTokens.typography.body.lg.$value.fontFamily
|
|
296
|
+
.$ref as keyof FontSettingsByRef
|
|
297
|
+
]
|
|
298
|
+
),
|
|
299
|
+
fontSize: lightTokens.typography.body.lg.$value.fontSize,
|
|
300
|
+
fontWeight: lightTokens.typography.body.lg.$value.fontWeight,
|
|
301
|
+
lineHeight: lightTokens.typography.body.lg.$value.lineHeight,
|
|
302
|
+
},
|
|
303
|
+
lgMedium: {
|
|
304
|
+
fontFamily:
|
|
305
|
+
fontFamiliesByRef[
|
|
306
|
+
lightTokens.typography.body['lg-medium'].$value.fontFamily
|
|
307
|
+
.$ref as keyof FontFamiliesByRef
|
|
308
|
+
],
|
|
309
|
+
fontSettings: featureSettings(
|
|
310
|
+
fontSettingsByRef[
|
|
311
|
+
lightTokens.typography.body['lg-medium'].$value.fontFamily
|
|
312
|
+
.$ref as keyof FontSettingsByRef
|
|
313
|
+
]
|
|
314
|
+
),
|
|
315
|
+
fontSize: lightTokens.typography.body['lg-medium'].$value.fontSize,
|
|
316
|
+
fontWeight: lightTokens.typography.body['lg-medium'].$value.fontWeight,
|
|
317
|
+
lineHeight: lightTokens.typography.body['lg-medium'].$value.lineHeight,
|
|
318
|
+
},
|
|
319
|
+
lgSemibold: {
|
|
320
|
+
fontFamily:
|
|
321
|
+
fontFamiliesByRef[
|
|
322
|
+
lightTokens.typography.body['lg-semibold'].$value.fontFamily
|
|
323
|
+
.$ref as keyof FontFamiliesByRef
|
|
324
|
+
],
|
|
325
|
+
fontSettings: featureSettings(
|
|
326
|
+
fontSettingsByRef[
|
|
327
|
+
lightTokens.typography.body['lg-semibold'].$value.fontFamily
|
|
328
|
+
.$ref as keyof FontSettingsByRef
|
|
329
|
+
]
|
|
330
|
+
),
|
|
331
|
+
fontSize: lightTokens.typography.body['lg-semibold'].$value.fontSize,
|
|
332
|
+
fontWeight: lightTokens.typography.body['lg-semibold'].$value.fontWeight,
|
|
333
|
+
lineHeight: lightTokens.typography.body['lg-semibold'].$value.lineHeight,
|
|
334
|
+
},
|
|
335
|
+
lgBold: {
|
|
336
|
+
fontFamily:
|
|
337
|
+
fontFamiliesByRef[
|
|
338
|
+
lightTokens.typography.body['lg-bold'].$value.fontFamily
|
|
339
|
+
.$ref as keyof FontFamiliesByRef
|
|
340
|
+
],
|
|
341
|
+
fontSettings: featureSettings(
|
|
342
|
+
fontSettingsByRef[
|
|
343
|
+
lightTokens.typography.body['lg-bold'].$value.fontFamily
|
|
344
|
+
.$ref as keyof FontSettingsByRef
|
|
345
|
+
]
|
|
346
|
+
),
|
|
347
|
+
fontSize: lightTokens.typography.body['lg-bold'].$value.fontSize,
|
|
348
|
+
fontWeight: lightTokens.typography.body['lg-bold'].$value.fontWeight,
|
|
349
|
+
lineHeight: lightTokens.typography.body['lg-bold'].$value.lineHeight,
|
|
350
|
+
},
|
|
351
|
+
md: {
|
|
352
|
+
fontFamily:
|
|
353
|
+
fontFamiliesByRef[
|
|
354
|
+
lightTokens.typography.body['md'].$value.fontFamily
|
|
355
|
+
.$ref as keyof FontFamiliesByRef
|
|
356
|
+
],
|
|
357
|
+
fontSettings: featureSettings(
|
|
358
|
+
fontSettingsByRef[
|
|
359
|
+
lightTokens.typography.body['md'].$value.fontFamily
|
|
360
|
+
.$ref as keyof FontSettingsByRef
|
|
361
|
+
]
|
|
362
|
+
),
|
|
363
|
+
fontSize: lightTokens.typography.body['md'].$value.fontSize,
|
|
364
|
+
fontWeight: lightTokens.typography.body['md'].$value.fontWeight,
|
|
365
|
+
lineHeight: lightTokens.typography.body['md'].$value.lineHeight,
|
|
366
|
+
},
|
|
367
|
+
mdMedium: {
|
|
368
|
+
fontFamily:
|
|
369
|
+
fontFamiliesByRef[
|
|
370
|
+
lightTokens.typography.body['md-medium'].$value.fontFamily
|
|
371
|
+
.$ref as keyof FontFamiliesByRef
|
|
372
|
+
],
|
|
373
|
+
fontSettings: featureSettings(
|
|
374
|
+
fontSettingsByRef[
|
|
375
|
+
lightTokens.typography.body['md-medium'].$value.fontFamily
|
|
376
|
+
.$ref as keyof FontSettingsByRef
|
|
377
|
+
]
|
|
378
|
+
),
|
|
379
|
+
fontSize: lightTokens.typography.body['md-medium'].$value.fontSize,
|
|
380
|
+
fontWeight: lightTokens.typography.body['md-medium'].$value.fontWeight,
|
|
381
|
+
lineHeight: lightTokens.typography.body['md-medium'].$value.lineHeight,
|
|
382
|
+
},
|
|
383
|
+
mdSemibold: {
|
|
384
|
+
fontFamily:
|
|
385
|
+
fontFamiliesByRef[
|
|
386
|
+
lightTokens.typography.body['md-semibold'].$value.fontFamily
|
|
387
|
+
.$ref as keyof FontFamiliesByRef
|
|
388
|
+
],
|
|
389
|
+
fontSettings: featureSettings(
|
|
390
|
+
fontSettingsByRef[
|
|
391
|
+
lightTokens.typography.body['md-semibold'].$value.fontFamily
|
|
392
|
+
.$ref as keyof FontSettingsByRef
|
|
393
|
+
]
|
|
394
|
+
),
|
|
395
|
+
fontSize: lightTokens.typography.body['md-semibold'].$value.fontSize,
|
|
396
|
+
fontWeight: lightTokens.typography.body['md-semibold'].$value.fontWeight,
|
|
397
|
+
lineHeight: lightTokens.typography.body['md-semibold'].$value.lineHeight,
|
|
398
|
+
},
|
|
399
|
+
mdNumeric: {
|
|
400
|
+
fontFamily:
|
|
401
|
+
fontFamiliesByRef[
|
|
402
|
+
lightTokens.typography.body['md-numeric'].$value.fontFamily
|
|
403
|
+
.$ref as keyof FontFamiliesByRef
|
|
404
|
+
],
|
|
405
|
+
fontSettings: featureSettings(
|
|
406
|
+
fontSettingsByRef[
|
|
407
|
+
lightTokens.typography.body['md-numeric'].$value.fontFamily
|
|
408
|
+
.$ref as keyof FontSettingsByRef
|
|
409
|
+
]
|
|
410
|
+
),
|
|
411
|
+
fontSize: lightTokens.typography.body['md-numeric'].$value.fontSize,
|
|
412
|
+
fontWeight: lightTokens.typography.body['md-numeric'].$value.fontWeight,
|
|
413
|
+
lineHeight: lightTokens.typography.body['md-numeric'].$value.lineHeight,
|
|
414
|
+
},
|
|
415
|
+
mdMediumNumeric: {
|
|
416
|
+
fontFamily:
|
|
417
|
+
fontFamiliesByRef[
|
|
418
|
+
lightTokens.typography.body['md-medium-numeric'].$value.fontFamily
|
|
419
|
+
.$ref as keyof FontFamiliesByRef
|
|
420
|
+
],
|
|
421
|
+
fontSettings: featureSettings(
|
|
422
|
+
fontSettingsByRef[
|
|
423
|
+
lightTokens.typography.body['md-medium-numeric'].$value.fontFamily
|
|
424
|
+
.$ref as keyof FontSettingsByRef
|
|
425
|
+
]
|
|
426
|
+
),
|
|
427
|
+
fontSize:
|
|
428
|
+
lightTokens.typography.body['md-medium-numeric'].$value.fontSize,
|
|
429
|
+
fontWeight:
|
|
430
|
+
lightTokens.typography.body['md-medium-numeric'].$value.fontWeight,
|
|
431
|
+
lineHeight:
|
|
432
|
+
lightTokens.typography.body['md-medium-numeric'].$value.lineHeight,
|
|
433
|
+
},
|
|
434
|
+
sm: {
|
|
435
|
+
fontFamily:
|
|
436
|
+
fontFamiliesByRef[
|
|
437
|
+
lightTokens.typography.body['sm'].$value.fontFamily
|
|
438
|
+
.$ref as keyof FontFamiliesByRef
|
|
439
|
+
],
|
|
440
|
+
fontSettings: featureSettings(
|
|
441
|
+
fontSettingsByRef[
|
|
442
|
+
lightTokens.typography.body['sm'].$value.fontFamily
|
|
443
|
+
.$ref as keyof FontSettingsByRef
|
|
444
|
+
]
|
|
445
|
+
),
|
|
446
|
+
fontSize: lightTokens.typography.body['sm'].$value.fontSize,
|
|
447
|
+
fontWeight: lightTokens.typography.body['sm'].$value.fontWeight,
|
|
448
|
+
lineHeight: lightTokens.typography.body['sm'].$value.lineHeight,
|
|
449
|
+
},
|
|
450
|
+
smMedium: {
|
|
451
|
+
fontFamily:
|
|
452
|
+
fontFamiliesByRef[
|
|
453
|
+
lightTokens.typography.body['sm-medium'].$value.fontFamily
|
|
454
|
+
.$ref as keyof FontFamiliesByRef
|
|
455
|
+
],
|
|
456
|
+
fontSettings: featureSettings(
|
|
457
|
+
fontSettingsByRef[
|
|
458
|
+
lightTokens.typography.body['sm-medium'].$value.fontFamily
|
|
459
|
+
.$ref as keyof FontSettingsByRef
|
|
460
|
+
]
|
|
461
|
+
),
|
|
462
|
+
fontSize: lightTokens.typography.body['sm-medium'].$value.fontSize,
|
|
463
|
+
fontWeight: lightTokens.typography.body['sm-medium'].$value.fontWeight,
|
|
464
|
+
lineHeight: lightTokens.typography.body['sm-medium'].$value.lineHeight,
|
|
465
|
+
},
|
|
466
|
+
smSemibold: {
|
|
467
|
+
fontFamily:
|
|
468
|
+
fontFamiliesByRef[
|
|
469
|
+
lightTokens.typography.body['sm-semibold'].$value.fontFamily
|
|
470
|
+
.$ref as keyof FontFamiliesByRef
|
|
471
|
+
],
|
|
472
|
+
fontSettings: featureSettings(
|
|
473
|
+
fontSettingsByRef[
|
|
474
|
+
lightTokens.typography.body['sm-semibold'].$value.fontFamily
|
|
475
|
+
.$ref as keyof FontSettingsByRef
|
|
476
|
+
]
|
|
477
|
+
),
|
|
478
|
+
fontSize: lightTokens.typography.body['sm-semibold'].$value.fontSize,
|
|
479
|
+
fontWeight: lightTokens.typography.body['sm-semibold'].$value.fontWeight,
|
|
480
|
+
lineHeight: lightTokens.typography.body['sm-semibold'].$value.lineHeight,
|
|
481
|
+
},
|
|
482
|
+
xs: {
|
|
483
|
+
fontFamily:
|
|
484
|
+
fontFamiliesByRef[
|
|
485
|
+
lightTokens.typography.body['xs'].$value.fontFamily
|
|
486
|
+
.$ref as keyof FontFamiliesByRef
|
|
487
|
+
],
|
|
488
|
+
fontSettings: featureSettings(
|
|
489
|
+
fontSettingsByRef[
|
|
490
|
+
lightTokens.typography.body['xs'].$value.fontFamily
|
|
491
|
+
.$ref as keyof FontSettingsByRef
|
|
492
|
+
]
|
|
493
|
+
),
|
|
494
|
+
fontSize: lightTokens.typography.body['xs'].$value.fontSize,
|
|
495
|
+
fontWeight: lightTokens.typography.body['xs'].$value.fontWeight,
|
|
496
|
+
lineHeight: lightTokens.typography.body['xs'].$value.lineHeight,
|
|
497
|
+
},
|
|
498
|
+
xsMedium: {
|
|
499
|
+
fontFamily:
|
|
500
|
+
fontFamiliesByRef[
|
|
501
|
+
lightTokens.typography.body['xs-medium'].$value.fontFamily
|
|
502
|
+
.$ref as keyof FontFamiliesByRef
|
|
503
|
+
],
|
|
504
|
+
fontSettings: featureSettings(
|
|
505
|
+
fontSettingsByRef[
|
|
506
|
+
lightTokens.typography.body['xs-medium'].$value.fontFamily
|
|
507
|
+
.$ref as keyof FontSettingsByRef
|
|
508
|
+
]
|
|
509
|
+
),
|
|
510
|
+
fontSize: lightTokens.typography.body['xs-medium'].$value.fontSize,
|
|
511
|
+
fontWeight: lightTokens.typography.body['xs-medium'].$value.fontWeight,
|
|
512
|
+
lineHeight: lightTokens.typography.body['xs-medium'].$value.lineHeight,
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { tokens } from 'design-system-foundations-public';
|
|
2
|
+
import DMSansNormal from 'design-system-foundations-public/dist/assets/fonts/DMSans[opsz,wght].woff2?url';
|
|
3
|
+
import DMSansItalic from 'design-system-foundations-public/dist/assets/fonts/DMSans-Italic[opsz,wght].woff2?url';
|
|
4
|
+
import DMMonoItalic from 'design-system-foundations-public/dist/assets/fonts/DMMono-Italic.woff2?url';
|
|
5
|
+
import DMMonoLight from 'design-system-foundations-public/dist/assets/fonts/DMMono-Light.woff2?url';
|
|
6
|
+
import DMMonoLightItalic from 'design-system-foundations-public/dist/assets/fonts/DMMono-LightItalic.woff2?url';
|
|
7
|
+
import DMMonoMedium from 'design-system-foundations-public/dist/assets/fonts/DMMono-Medium.woff2?url';
|
|
8
|
+
import DMMonoMediumItalic from 'design-system-foundations-public/dist/assets/fonts/DMMono-MediumItalic.woff2?url';
|
|
9
|
+
import DMMonoRegular from 'design-system-foundations-public/dist/assets/fonts/DMMono-Regular.woff2?url';
|
|
10
|
+
|
|
11
|
+
const { sans } = tokens.primitives.font.family;
|
|
12
|
+
|
|
13
|
+
export type FontStyle = 'normal' | 'italic';
|
|
14
|
+
|
|
15
|
+
export type FontSource = {
|
|
16
|
+
src: string;
|
|
17
|
+
fontStyle: FontStyle;
|
|
18
|
+
fontWeight: number;
|
|
19
|
+
fontFeatureSettings: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
Usage example:
|
|
24
|
+
|
|
25
|
+
import { Font } from '@react-pdf/renderer';
|
|
26
|
+
import { uikitFonts } from '@dev-and-test/uikit-react';
|
|
27
|
+
|
|
28
|
+
Object.entries(uikitFonts).forEach(([family, fonts]) => {
|
|
29
|
+
Font.register({ family, fonts });
|
|
30
|
+
});
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
const toFontFeatureSettings = (
|
|
34
|
+
featureSettingsTokenValue?: Record<string, number>
|
|
35
|
+
) => {
|
|
36
|
+
if (!featureSettingsTokenValue) return '';
|
|
37
|
+
return Object.entries(featureSettingsTokenValue)
|
|
38
|
+
.map(([feature, value]) => `"${feature}" ${value}`)
|
|
39
|
+
.join(', ');
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const sansFontFeatureSettings = toFontFeatureSettings(
|
|
43
|
+
sans.$value.featureSettings
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
export const uikitFontUrls = {
|
|
47
|
+
dmSansNormal: DMSansNormal,
|
|
48
|
+
dmSansItalic: DMSansItalic,
|
|
49
|
+
dmMonoItalic: DMMonoItalic,
|
|
50
|
+
dmMonoLight: DMMonoLight,
|
|
51
|
+
dmMonoLightItalic: DMMonoLightItalic,
|
|
52
|
+
dmMonoMedium: DMMonoMedium,
|
|
53
|
+
dmMonoMediumItalic: DMMonoMediumItalic,
|
|
54
|
+
dmMonoRegular: DMMonoRegular,
|
|
55
|
+
} as const;
|
|
56
|
+
|
|
57
|
+
export const uikitFonts: Record<string, FontSource[]> = {
|
|
58
|
+
'DM Sans': [
|
|
59
|
+
{
|
|
60
|
+
src: uikitFontUrls.dmSansNormal,
|
|
61
|
+
fontWeight: 400,
|
|
62
|
+
fontStyle: 'normal',
|
|
63
|
+
fontFeatureSettings: sansFontFeatureSettings,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
src: uikitFontUrls.dmSansItalic,
|
|
67
|
+
fontWeight: 400,
|
|
68
|
+
fontStyle: 'italic',
|
|
69
|
+
fontFeatureSettings: sansFontFeatureSettings,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
'DM Mono': [
|
|
73
|
+
{
|
|
74
|
+
src: uikitFontUrls.dmMonoLight,
|
|
75
|
+
fontWeight: 300,
|
|
76
|
+
fontStyle: 'normal',
|
|
77
|
+
fontFeatureSettings: '',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
src: uikitFontUrls.dmMonoLightItalic,
|
|
81
|
+
fontWeight: 300,
|
|
82
|
+
fontStyle: 'italic',
|
|
83
|
+
fontFeatureSettings: '',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
src: uikitFontUrls.dmMonoRegular,
|
|
87
|
+
fontWeight: 400,
|
|
88
|
+
fontStyle: 'normal',
|
|
89
|
+
fontFeatureSettings: '',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
src: uikitFontUrls.dmMonoItalic,
|
|
93
|
+
fontWeight: 400,
|
|
94
|
+
fontStyle: 'italic',
|
|
95
|
+
fontFeatureSettings: '',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
src: uikitFontUrls.dmMonoMedium,
|
|
99
|
+
fontWeight: 500,
|
|
100
|
+
fontStyle: 'normal',
|
|
101
|
+
fontFeatureSettings: '',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
src: uikitFontUrls.dmMonoMediumItalic,
|
|
105
|
+
fontWeight: 500,
|
|
106
|
+
fontStyle: 'italic',
|
|
107
|
+
fontFeatureSettings: '',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
};
|
package/lib/theme/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { default as theme } from './defaultTheme';
|
|
1
|
+
export { default as theme } from './original/defaultTheme';
|
|
2
|
+
export { default as lightTheme } from './light/lightTheme';
|
|
2
3
|
export type {
|
|
3
4
|
ThemeType,
|
|
4
5
|
DisplayColoursType,
|
|
5
6
|
BlackAndWhiteColoursType,
|
|
6
|
-
} from './defaultTheme';
|
|
7
|
-
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from './useTheme';
|
|
7
|
+
} from './original/defaultTheme';
|
|
8
|
+
export { default as useTheme, ThemeContextProvider } from './useTheme';
|
|
9
|
+
export { uikitFontUrls, uikitFonts } from './fonts';
|
|
10
|
+
export type { FontSource, FontStyle } from './fonts';
|