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
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
declare const displayColours: {
|
|
2
|
-
purpleDark: string;
|
|
3
|
-
purpleVibrant: string;
|
|
4
|
-
purpleMuted: string;
|
|
5
|
-
greenDark: string;
|
|
6
|
-
greenVibrant: string;
|
|
7
|
-
greenMuted: string;
|
|
8
|
-
yellowDark: string;
|
|
9
|
-
yellowVibrant: string;
|
|
10
|
-
yellowMuted: string;
|
|
11
|
-
pinkDark: string;
|
|
12
|
-
pinkVibrant: string;
|
|
13
|
-
pinkMuted: string;
|
|
14
|
-
blueDark: string;
|
|
15
|
-
blueVibrant: string;
|
|
16
|
-
blueMuted: string;
|
|
17
|
-
};
|
|
18
|
-
declare const blackAndWhite: {
|
|
19
|
-
black: string;
|
|
20
|
-
white: string;
|
|
21
|
-
};
|
|
22
|
-
declare const theme: {
|
|
23
|
-
p0: number;
|
|
24
|
-
p2: string;
|
|
25
|
-
p4: string;
|
|
26
|
-
p6: string;
|
|
27
|
-
p8: string;
|
|
28
|
-
p12: string;
|
|
29
|
-
p16: string;
|
|
30
|
-
p20: string;
|
|
31
|
-
p24: string;
|
|
32
|
-
p32: string;
|
|
33
|
-
p40: string;
|
|
34
|
-
p48: string;
|
|
35
|
-
p56: string;
|
|
36
|
-
p64: string;
|
|
37
|
-
p72: string;
|
|
38
|
-
p80: string;
|
|
39
|
-
m0: number;
|
|
40
|
-
m2: string;
|
|
41
|
-
m4: string;
|
|
42
|
-
m6: string;
|
|
43
|
-
m8: string;
|
|
44
|
-
m12: string;
|
|
45
|
-
m16: string;
|
|
46
|
-
m20: string;
|
|
47
|
-
m24: string;
|
|
48
|
-
m32: string;
|
|
49
|
-
m40: string;
|
|
50
|
-
m48: string;
|
|
51
|
-
m56: string;
|
|
52
|
-
m64: string;
|
|
53
|
-
m72: string;
|
|
54
|
-
m80: string;
|
|
55
|
-
color: {
|
|
56
|
-
text: {
|
|
57
|
-
primary: string;
|
|
58
|
-
secondary: string;
|
|
59
|
-
muted: string;
|
|
60
|
-
inverted: string;
|
|
61
|
-
interactive: string;
|
|
62
|
-
default: string;
|
|
63
|
-
disabledOnBg: string;
|
|
64
|
-
disabled: string;
|
|
65
|
-
active: string;
|
|
66
|
-
hover: string;
|
|
67
|
-
visited: string;
|
|
68
|
-
error: string;
|
|
69
|
-
errorHover: string;
|
|
70
|
-
errorDisabled: string;
|
|
71
|
-
};
|
|
72
|
-
interaction: {
|
|
73
|
-
blue100: string;
|
|
74
|
-
blue80: string;
|
|
75
|
-
blue70: string;
|
|
76
|
-
blue40: string;
|
|
77
|
-
blue10: string;
|
|
78
|
-
blue5: string;
|
|
79
|
-
};
|
|
80
|
-
display: {
|
|
81
|
-
purpleDark: string;
|
|
82
|
-
purpleVibrant: string;
|
|
83
|
-
purpleMuted: string;
|
|
84
|
-
greenDark: string;
|
|
85
|
-
greenVibrant: string;
|
|
86
|
-
greenMuted: string;
|
|
87
|
-
yellowDark: string;
|
|
88
|
-
yellowVibrant: string;
|
|
89
|
-
yellowMuted: string;
|
|
90
|
-
pinkDark: string;
|
|
91
|
-
pinkVibrant: string;
|
|
92
|
-
pinkMuted: string;
|
|
93
|
-
blueDark: string;
|
|
94
|
-
blueVibrant: string;
|
|
95
|
-
blueMuted: string;
|
|
96
|
-
};
|
|
97
|
-
system: {
|
|
98
|
-
red100: string;
|
|
99
|
-
red70: string;
|
|
100
|
-
red40: string;
|
|
101
|
-
red10: string;
|
|
102
|
-
orange100: string;
|
|
103
|
-
orange70: string;
|
|
104
|
-
orange40: string;
|
|
105
|
-
orange10: string;
|
|
106
|
-
green100: string;
|
|
107
|
-
green70: string;
|
|
108
|
-
green40: string;
|
|
109
|
-
green10: string;
|
|
110
|
-
blue100: string;
|
|
111
|
-
blue80: string;
|
|
112
|
-
blue70: string;
|
|
113
|
-
blue40: string;
|
|
114
|
-
blue10: string;
|
|
115
|
-
blue5: string;
|
|
116
|
-
};
|
|
117
|
-
link: {
|
|
118
|
-
default: string;
|
|
119
|
-
secondaryDefault: string;
|
|
120
|
-
hover: string;
|
|
121
|
-
secondaryHover: string;
|
|
122
|
-
visited: string;
|
|
123
|
-
disabled: string;
|
|
124
|
-
};
|
|
125
|
-
neutral: {
|
|
126
|
-
black: string;
|
|
127
|
-
grey90: string;
|
|
128
|
-
grey80: string;
|
|
129
|
-
grey70: string;
|
|
130
|
-
grey60: string;
|
|
131
|
-
grey40: string;
|
|
132
|
-
grey20: string;
|
|
133
|
-
grey15: string;
|
|
134
|
-
grey10: string;
|
|
135
|
-
grey5: string;
|
|
136
|
-
white: string;
|
|
137
|
-
};
|
|
138
|
-
overlay: {
|
|
139
|
-
blanket: string;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
thickness: {
|
|
143
|
-
t1: string;
|
|
144
|
-
t2: string;
|
|
145
|
-
};
|
|
146
|
-
width: {
|
|
147
|
-
h16: string;
|
|
148
|
-
h20: string;
|
|
149
|
-
h24: string;
|
|
150
|
-
};
|
|
151
|
-
height: {
|
|
152
|
-
h16: string;
|
|
153
|
-
h20: string;
|
|
154
|
-
h24: string;
|
|
155
|
-
h32: string;
|
|
156
|
-
h36: string;
|
|
157
|
-
h40: string;
|
|
158
|
-
h80: string;
|
|
159
|
-
};
|
|
160
|
-
margin: {
|
|
161
|
-
m0: number;
|
|
162
|
-
m2: string;
|
|
163
|
-
m4: string;
|
|
164
|
-
m6: string;
|
|
165
|
-
m8: string;
|
|
166
|
-
m12: string;
|
|
167
|
-
m16: string;
|
|
168
|
-
m20: string;
|
|
169
|
-
m24: string;
|
|
170
|
-
m32: string;
|
|
171
|
-
m40: string;
|
|
172
|
-
m48: string;
|
|
173
|
-
m56: string;
|
|
174
|
-
m64: string;
|
|
175
|
-
m72: string;
|
|
176
|
-
m80: string;
|
|
177
|
-
};
|
|
178
|
-
padding: {
|
|
179
|
-
p0: number;
|
|
180
|
-
p2: string;
|
|
181
|
-
p4: string;
|
|
182
|
-
p6: string;
|
|
183
|
-
p8: string;
|
|
184
|
-
p12: string;
|
|
185
|
-
p16: string;
|
|
186
|
-
p20: string;
|
|
187
|
-
p24: string;
|
|
188
|
-
p32: string;
|
|
189
|
-
p40: string;
|
|
190
|
-
p48: string;
|
|
191
|
-
p56: string;
|
|
192
|
-
p64: string;
|
|
193
|
-
p72: string;
|
|
194
|
-
p80: string;
|
|
195
|
-
};
|
|
196
|
-
radius: {
|
|
197
|
-
r2: string;
|
|
198
|
-
r4: string;
|
|
199
|
-
r8: string;
|
|
200
|
-
r12: string;
|
|
201
|
-
r16: string;
|
|
202
|
-
};
|
|
203
|
-
border: {
|
|
204
|
-
b1: string;
|
|
205
|
-
b2: string;
|
|
206
|
-
};
|
|
207
|
-
outline: {
|
|
208
|
-
o2: string;
|
|
209
|
-
o4: string;
|
|
210
|
-
};
|
|
211
|
-
font: {
|
|
212
|
-
family: {
|
|
213
|
-
primary: string;
|
|
214
|
-
secondary: string;
|
|
215
|
-
fixed: string;
|
|
216
|
-
};
|
|
217
|
-
size: {
|
|
218
|
-
f12: string;
|
|
219
|
-
f14: string;
|
|
220
|
-
f16: string;
|
|
221
|
-
f18: string;
|
|
222
|
-
f20: string;
|
|
223
|
-
f22: string;
|
|
224
|
-
f24: string;
|
|
225
|
-
f26: string;
|
|
226
|
-
f28: string;
|
|
227
|
-
f30: string;
|
|
228
|
-
f32: string;
|
|
229
|
-
f36: string;
|
|
230
|
-
f40: string;
|
|
231
|
-
};
|
|
232
|
-
weight: {
|
|
233
|
-
light: number;
|
|
234
|
-
regular: number;
|
|
235
|
-
medium: number;
|
|
236
|
-
semiBold: number;
|
|
237
|
-
bold: number;
|
|
238
|
-
extraBold: number;
|
|
239
|
-
};
|
|
240
|
-
lineHeight: {
|
|
241
|
-
h100: string;
|
|
242
|
-
h110: string;
|
|
243
|
-
h120: string;
|
|
244
|
-
h130: string;
|
|
245
|
-
h140: string;
|
|
246
|
-
h150: string;
|
|
247
|
-
};
|
|
248
|
-
};
|
|
249
|
-
boxShadow: {
|
|
250
|
-
y1: string;
|
|
251
|
-
y2: string;
|
|
252
|
-
x2y4: string;
|
|
253
|
-
focus: string;
|
|
254
|
-
active: string;
|
|
255
|
-
destructiveActive: string;
|
|
256
|
-
};
|
|
257
|
-
breakpoints: {
|
|
258
|
-
mobile: number;
|
|
259
|
-
tablet: number;
|
|
260
|
-
desktop: number;
|
|
261
|
-
desktopLarge: number;
|
|
262
|
-
};
|
|
263
|
-
mq: {
|
|
264
|
-
mobile: string;
|
|
265
|
-
tablet: string;
|
|
266
|
-
desktop: string;
|
|
267
|
-
desktopLarge: string;
|
|
268
|
-
custom: (breakpoint: number) => string;
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
export type ThemeType = typeof theme;
|
|
272
|
-
export type DisplayColoursType = typeof displayColours;
|
|
273
|
-
export type BlackAndWhiteColoursType = typeof blackAndWhite;
|
|
274
|
-
export default theme;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { css, cx } from '@emotion/css';
|
|
2
|
-
import { ThemeType } from '../../theme';
|
|
3
|
-
import { ButtonBaseProps } from './Button';
|
|
4
|
-
|
|
5
|
-
const buttonPrimaryStyle = (
|
|
6
|
-
theme: ThemeType,
|
|
7
|
-
destructive: ButtonBaseProps['destructive'],
|
|
8
|
-
disabled: ButtonBaseProps['disabled'],
|
|
9
|
-
loading: ButtonBaseProps['loading']
|
|
10
|
-
) => {
|
|
11
|
-
const {
|
|
12
|
-
color: { system, interaction },
|
|
13
|
-
boxShadow,
|
|
14
|
-
} = theme;
|
|
15
|
-
|
|
16
|
-
const bgColour = destructive ? system.red70 : interaction.blue70;
|
|
17
|
-
const bgHoverColour = destructive ? system.red100 : interaction.blue80;
|
|
18
|
-
const bgActiveColour = destructive ? system.red70 : interaction.blue70;
|
|
19
|
-
const boxShadowActive = destructive
|
|
20
|
-
? boxShadow.destructiveActive
|
|
21
|
-
: boxShadow.active;
|
|
22
|
-
|
|
23
|
-
const primaryBaseStyle = css`
|
|
24
|
-
border: none;
|
|
25
|
-
background-color: ${bgColour};
|
|
26
|
-
color: ${theme.color.neutral.white};
|
|
27
|
-
font-weight: ${theme.font.weight.bold};
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
const interactiveStyle = css`
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
|
|
33
|
-
&:hover {
|
|
34
|
-
background-color: ${bgHoverColour};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&:active {
|
|
38
|
-
background-color: ${bgActiveColour};
|
|
39
|
-
box-shadow: ${boxShadowActive};
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
|
-
|
|
43
|
-
const disabledStyle = css`
|
|
44
|
-
border-color: ${theme.color.text.disabled};
|
|
45
|
-
background-color: ${theme.color.link.disabled};
|
|
46
|
-
color: ${theme.color.text.disabledOnBg};
|
|
47
|
-
cursor: not-allowed;
|
|
48
|
-
`;
|
|
49
|
-
|
|
50
|
-
const loadingStyle = css`
|
|
51
|
-
cursor: wait;
|
|
52
|
-
`;
|
|
53
|
-
|
|
54
|
-
return cx(
|
|
55
|
-
primaryBaseStyle,
|
|
56
|
-
!disabled && !loading && interactiveStyle,
|
|
57
|
-
disabled && disabledStyle,
|
|
58
|
-
loading && loadingStyle
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export default buttonPrimaryStyle;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { css, cx } from '@emotion/css';
|
|
2
|
-
import { ThemeType } from '../../theme';
|
|
3
|
-
import { ButtonBaseProps } from './Button';
|
|
4
|
-
|
|
5
|
-
const buttonSecondaryStyle = (
|
|
6
|
-
theme: ThemeType,
|
|
7
|
-
destructive: ButtonBaseProps['destructive'],
|
|
8
|
-
disabled: ButtonBaseProps['disabled'],
|
|
9
|
-
loading: ButtonBaseProps['loading']
|
|
10
|
-
) => {
|
|
11
|
-
const {
|
|
12
|
-
color: { system, interaction },
|
|
13
|
-
boxShadow,
|
|
14
|
-
} = theme;
|
|
15
|
-
|
|
16
|
-
const colour = destructive ? system.red70 : interaction.blue70;
|
|
17
|
-
const hoverColour = destructive ? system.red100 : interaction.blue80;
|
|
18
|
-
const activeColour = destructive ? system.red70 : interaction.blue70;
|
|
19
|
-
const boxShadowActive = destructive
|
|
20
|
-
? boxShadow.destructiveActive
|
|
21
|
-
: boxShadow.active;
|
|
22
|
-
|
|
23
|
-
const secondaryBaseStyle = css`
|
|
24
|
-
background-color: ${theme.color.neutral.white};
|
|
25
|
-
color: ${colour};
|
|
26
|
-
border: ${theme.border.b1} solid ${colour};
|
|
27
|
-
font-weight: ${theme.font.weight.regular};
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
const interactiveStyle = css`
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
|
|
33
|
-
&:hover {
|
|
34
|
-
background-color: ${theme.color.neutral.white};
|
|
35
|
-
border-color: ${hoverColour};
|
|
36
|
-
color: ${hoverColour};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&:active {
|
|
40
|
-
background-color: ${theme.color.neutral.white};
|
|
41
|
-
color: ${activeColour};
|
|
42
|
-
border-color: ${activeColour};
|
|
43
|
-
box-shadow: ${boxShadowActive};
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
const disabledStyle = css`
|
|
48
|
-
border-color: ${theme.color.text.disabled};
|
|
49
|
-
color: ${theme.color.text.disabled};
|
|
50
|
-
cursor: not-allowed;
|
|
51
|
-
`;
|
|
52
|
-
|
|
53
|
-
const loadingStyle = css`
|
|
54
|
-
cursor: wait;
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
return cx(
|
|
58
|
-
secondaryBaseStyle,
|
|
59
|
-
!disabled && !loading && interactiveStyle,
|
|
60
|
-
disabled && disabledStyle,
|
|
61
|
-
loading && loadingStyle
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export default buttonSecondaryStyle;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { css, cx } from '@emotion/css';
|
|
2
|
-
import { ThemeType } from '../../theme';
|
|
3
|
-
import { ButtonBaseProps } from './Button';
|
|
4
|
-
|
|
5
|
-
const buttonTertiaryStyle = (
|
|
6
|
-
theme: ThemeType,
|
|
7
|
-
disabled: ButtonBaseProps['disabled'],
|
|
8
|
-
loading: ButtonBaseProps['loading']
|
|
9
|
-
) => {
|
|
10
|
-
const {
|
|
11
|
-
color: { interaction },
|
|
12
|
-
} = theme;
|
|
13
|
-
|
|
14
|
-
const colour = interaction.blue70;
|
|
15
|
-
const hoverColour = interaction.blue80;
|
|
16
|
-
const activeColour = interaction.blue70;
|
|
17
|
-
|
|
18
|
-
const tertiaryBaseStyle = css`
|
|
19
|
-
border: none;
|
|
20
|
-
background-color: transparent;
|
|
21
|
-
color: ${colour};
|
|
22
|
-
font-weight: ${theme.font.weight.bold};
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
const interactiveStyle = css`
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
|
|
28
|
-
&:hover {
|
|
29
|
-
color: ${hoverColour};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&:active {
|
|
33
|
-
color: ${activeColour};
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
|
|
37
|
-
const disabledStyle = css`
|
|
38
|
-
color: ${theme.color.text.disabled};
|
|
39
|
-
cursor: not-allowed;
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
const loadingStyle = css`
|
|
43
|
-
cursor: wait;
|
|
44
|
-
`;
|
|
45
|
-
|
|
46
|
-
return cx(
|
|
47
|
-
tertiaryBaseStyle,
|
|
48
|
-
!disabled && !loading && interactiveStyle,
|
|
49
|
-
disabled && disabledStyle,
|
|
50
|
-
loading && loadingStyle
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default buttonTertiaryStyle;
|