@indico-data/design-system 1.0.47 → 1.0.49
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 +5 -0
- package/jest.config.js +15 -0
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/Accordion.stories.d.ts +2 -2
- package/lib/components/Accordion/Accordion.styles.d.ts +1 -275
- package/lib/components/Icon/Icon.stories.d.ts +3 -4
- package/lib/components/Icon/indicons.d.ts +143 -125
- package/lib/components/Icon/storyHelpers.d.ts +3 -813
- package/lib/components/ListTable/Header/Header.d.ts +1 -1
- package/lib/components/ListTable/Header/Header.styles.d.ts +1 -272
- package/lib/components/ListTable/ListTable.d.ts +1 -1
- package/lib/components/ListTable/ListTable.stories.d.ts +1 -1
- package/lib/components/ListTable/ListTable.styles.d.ts +1 -272
- package/lib/components/LoadingAwareContainer/LoadingAwareContainer.d.ts +15 -0
- package/lib/components/LoadingAwareContainer/LoadingAwareContainer.stories.d.ts +22 -0
- package/lib/components/LoadingAwareContainer/LoadingAwareContainer.styles.d.ts +3 -0
- package/lib/components/LoadingAwareContainer/index.d.ts +1 -0
- package/lib/components/Navigation/Drawer/Drawer.d.ts +15 -0
- package/lib/components/Navigation/Drawer/Drawer.stories.d.ts +6 -0
- package/lib/components/Navigation/Drawer/Drawer.styles.d.ts +7 -0
- package/lib/components/Navigation/Drawer/DrawerLinkList.d.ts +9 -0
- package/lib/components/Navigation/Drawer/DrawerLinkList.styles.d.ts +2 -0
- package/lib/components/Navigation/Drawer/__mocks__/mocks.d.ts +3 -0
- package/lib/components/Navigation/Drawer/__tests__/Drawer.test.d.ts +1 -0
- package/lib/components/Navigation/Drawer/__tests__/DrawerLinkList.test.d.ts +1 -0
- package/lib/components/Navigation/Drawer/index.d.ts +1 -0
- package/lib/components/Navigation/Drawer/types.d.ts +7 -0
- package/lib/components/Navigation/index.d.ts +1 -0
- package/lib/components/Pagination/Pagination.d.ts +1 -2
- package/lib/components/Pagination/Pagination.styles.d.ts +1 -272
- package/lib/components/Wizard/Wizard.d.ts +48 -0
- package/lib/components/Wizard/Wizard.stories.d.ts +29 -0
- package/lib/components/Wizard/Wizard.styles.d.ts +4 -0
- package/lib/components/Wizard/index.d.ts +2 -0
- package/lib/components/WizardWithSidebar/WizardWithSidebar.d.ts +58 -0
- package/lib/components/WizardWithSidebar/WizardWithSidebar.stories.d.ts +46 -0
- package/lib/components/WizardWithSidebar/WizardWithSidebar.styles.d.ts +9 -0
- package/lib/components/WizardWithSidebar/index.d.ts +2 -0
- package/lib/components/basic-section/Section/Section.d.ts +1 -1
- package/lib/components/basic-section/Section/Section.stories.d.ts +1 -1
- package/lib/components/basic-section/Section/Section.styles.d.ts +1 -272
- package/lib/components/basic-section/SectionBlock/SectionBlock.d.ts +1 -1
- package/lib/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +1 -272
- package/lib/components/basic-section/SectionBody/SectionBody.d.ts +1 -1
- package/lib/components/basic-section/SectionBody/SectionBody.stories.d.ts +1 -2
- package/lib/components/basic-section/SectionBody/SectionBody.styles.d.ts +1 -272
- package/lib/components/basic-section/SectionHeader/SectionHeader.d.ts +1 -1
- package/lib/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +1 -1
- package/lib/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +1 -272
- package/lib/components/basic-section/SectionTable/SectionTable.d.ts +1 -2
- package/lib/components/basic-section/SectionTable/SectionTable.styles.d.ts +1 -272
- package/lib/components/buttons/Button/Button.styles.d.ts +1 -282
- package/lib/components/buttons/IconButton/IconButton.d.ts +4 -5
- package/lib/components/buttons/IconButton/IconButton.stories.d.ts +3 -3
- package/lib/components/buttons/IconButton/IconButton.styles.d.ts +2 -567
- package/lib/components/buttons/types.d.ts +2 -1
- package/lib/components/dropdowns/BorderSelect/BorderSelect.d.ts +1 -1
- package/lib/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +1 -1
- package/lib/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +2 -543
- package/lib/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +1 -84
- package/lib/components/dropdowns/Select/Select.d.ts +1 -1
- package/lib/components/dropdowns/Select/Select.stories.d.ts +1 -1
- package/lib/components/dropdowns/Select/Select.styles.d.ts +1 -272
- package/lib/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +1 -84
- package/lib/components/dropdowns/utils.d.ts +1 -2
- package/lib/components/index.d.ts +7 -2
- package/lib/components/inputs/EditableInput/EditableInput.d.ts +1 -1
- package/lib/components/inputs/EditableInput/EditableInput.stories.d.ts +1 -2
- package/lib/components/inputs/EditableInput/EditableInput.styles.d.ts +1 -272
- package/lib/components/inputs/NumberInput/NumberInput.styles.d.ts +1 -272
- package/lib/components/inputs/RadioButtons/RadioButtons.d.ts +24 -0
- package/lib/components/inputs/RadioButtons/RadioButtons.stories.d.ts +15 -0
- package/lib/components/inputs/RadioButtons/RadioButtons.styles.d.ts +14 -0
- package/lib/components/inputs/RadioButtons/index.d.ts +1 -0
- package/lib/components/inputs/RadioGroup/RadioGroup.d.ts +27 -0
- package/lib/components/inputs/RadioGroup/RadioGroup.stories.d.ts +16 -0
- package/lib/components/inputs/RadioGroup/RadioGroup.styles.d.ts +2 -0
- package/lib/components/inputs/RadioGroup/index.d.ts +1 -0
- package/lib/components/inputs/SearchInput/SearchInput.d.ts +1 -1
- package/lib/components/inputs/SearchInput/SearchInput.stories.d.ts +1 -1
- package/lib/components/inputs/SearchInput/SearchInput.styles.d.ts +1 -5
- package/lib/components/inputs/TextInput/TextInput.styles.d.ts +2 -543
- package/lib/components/inputs/index.d.ts +2 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.styles.d.ts +1 -272
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.styles.d.ts +3 -3
- package/lib/components/loading-indicators/LoadingIndicator/LoadingIndicator.d.ts +10 -0
- package/lib/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.d.ts +11 -0
- package/lib/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.d.ts +8 -0
- package/lib/components/loading-indicators/LoadingIndicator/index.d.ts +1 -0
- package/lib/components/loading-indicators/LoadingList/LoadingList.d.ts +1 -2
- package/lib/components/loading-indicators/LoadingList/LoadingList.stories.d.ts +1 -2
- package/lib/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +1 -272
- package/lib/components/loading-indicators/PercentageRing/PercentageRing.d.ts +1 -2
- package/lib/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +1 -272
- package/lib/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.d.ts +1 -2
- package/lib/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.d.ts +1 -2
- package/lib/components/loading-indicators/index.d.ts +1 -0
- package/lib/components/modals/ConfirmModal/ConfirmModal.d.ts +17 -0
- package/lib/components/modals/ConfirmModal/ConfirmModal.stories.d.ts +44 -0
- package/lib/components/modals/ConfirmModal/ConfirmModal.styles.d.ts +2 -0
- package/lib/components/modals/ConfirmModal/index.d.ts +1 -0
- package/lib/components/modals/ModalBase/ModalBase.d.ts +27 -0
- package/lib/components/modals/ModalBase/ModalBase.stories.d.ts +9 -0
- package/lib/components/modals/ModalBase/ModalBase.styles.d.ts +4 -0
- package/lib/components/modals/ModalBase/index.d.ts +2 -0
- package/lib/components/modals/index.d.ts +2 -0
- package/lib/components/user-feedback/Shrug/Shrug.stories.d.ts +1 -1
- package/lib/components/user-feedback/Shrug/Shrug.styles.d.ts +1 -272
- package/lib/index.d.ts +531 -270
- package/lib/index.esm.js +5722 -824
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +5779 -867
- package/lib/index.js.map +1 -1
- package/lib/setupTests.d.ts +1 -0
- package/lib/styles/globals/index.d.ts +1 -2
- package/lib/tokens/colors.d.ts +9 -0
- package/lib/tokens/typography.d.ts +12 -0
- package/lib/types.d.ts +147 -125
- package/package.json +60 -42
- package/src/components/Icon/Icon.tsx +1 -0
- package/src/components/Icon/indicons.tsx +138 -15
- package/src/components/ListTable/ListTable.stories.tsx +1 -1
- package/src/components/LoadingAwareContainer/LoadingAwareContainer.stories.tsx +45 -0
- package/src/components/LoadingAwareContainer/LoadingAwareContainer.styles.ts +16 -0
- package/src/components/LoadingAwareContainer/LoadingAwareContainer.tsx +36 -0
- package/src/components/LoadingAwareContainer/index.ts +1 -0
- package/src/components/Navigation/Drawer/Drawer.stories.tsx +44 -0
- package/src/components/Navigation/Drawer/Drawer.styles.ts +75 -0
- package/src/components/Navigation/Drawer/Drawer.tsx +108 -0
- package/src/components/Navigation/Drawer/DrawerLinkList.styles.ts +66 -0
- package/src/components/Navigation/Drawer/DrawerLinkList.tsx +64 -0
- package/src/components/Navigation/Drawer/__mocks__/mocks.ts +49 -0
- package/src/components/Navigation/Drawer/__tests__/Drawer.test.tsx +175 -0
- package/src/components/Navigation/Drawer/__tests__/DrawerLinkList.test.tsx +66 -0
- package/src/components/Navigation/Drawer/index.ts +1 -0
- package/src/components/Navigation/Drawer/types.ts +8 -0
- package/src/components/Navigation/index.ts +1 -0
- package/src/components/Wizard/Wizard.stories.tsx +180 -0
- package/src/components/Wizard/Wizard.styles.ts +72 -0
- package/src/components/Wizard/Wizard.tsx +211 -0
- package/src/components/Wizard/index.ts +2 -0
- package/src/components/WizardWithSidebar/WizardWithSidebar.stories.tsx +143 -0
- package/src/components/WizardWithSidebar/WizardWithSidebar.styles.ts +123 -0
- package/src/components/WizardWithSidebar/WizardWithSidebar.tsx +262 -0
- package/src/components/WizardWithSidebar/index.ts +2 -0
- package/src/components/buttons/IconButton/IconButton.styles.ts +31 -0
- package/src/components/buttons/IconButton/IconButton.tsx +8 -6
- package/src/components/buttons/types.ts +2 -1
- package/src/components/index.ts +16 -1
- package/src/components/inputs/RadioButtons/RadioButtons.stories.tsx +84 -0
- package/src/components/inputs/RadioButtons/RadioButtons.styles.ts +82 -0
- package/src/components/inputs/RadioButtons/RadioButtons.tsx +61 -0
- package/src/components/inputs/RadioButtons/index.tsx +1 -0
- package/src/components/inputs/RadioGroup/RadioGroup.stories.tsx +66 -0
- package/src/components/inputs/RadioGroup/RadioGroup.styles.ts +11 -0
- package/src/components/inputs/RadioGroup/RadioGroup.tsx +120 -0
- package/src/components/inputs/RadioGroup/index.ts +1 -0
- package/src/components/inputs/SearchInput/SearchInput.styles.ts +28 -42
- package/src/components/inputs/SearchInput/SearchInput.tsx +6 -4
- package/src/components/inputs/index.ts +2 -0
- package/src/components/loading-indicators/CirclePulse/CirclePulse.styles.ts +7 -7
- package/src/components/loading-indicators/CirclePulse/CirclePulse.tsx +3 -3
- package/src/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.tsx +22 -0
- package/src/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.ts +81 -0
- package/src/components/loading-indicators/LoadingIndicator/LoadingIndicator.tsx +61 -0
- package/src/components/loading-indicators/LoadingIndicator/index.ts +1 -0
- package/src/components/loading-indicators/index.ts +1 -0
- package/src/components/modals/ConfirmModal/ConfirmModal.stories.tsx +76 -0
- package/src/components/modals/ConfirmModal/ConfirmModal.styles.ts +30 -0
- package/src/components/modals/ConfirmModal/ConfirmModal.tsx +84 -0
- package/src/components/modals/ConfirmModal/index.ts +1 -0
- package/src/components/modals/ModalBase/ModalBase.stories.tsx +47 -0
- package/src/components/modals/ModalBase/ModalBase.styles.tsx +73 -0
- package/src/components/modals/ModalBase/ModalBase.tsx +72 -0
- package/src/components/modals/ModalBase/index.ts +2 -0
- package/src/components/modals/index.ts +2 -0
- package/src/index.ts +13 -0
- package/src/setupTests.ts +4 -0
- package/src/tokens/colors.ts +9 -0
- package/src/tokens/typography.ts +7 -1
- package/src/types.ts +8 -0
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import { ModalBase } from './ModalBase';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: ModalBase,
|
|
8
|
+
title: 'Modals/ModalBase',
|
|
9
|
+
} satisfies Meta<typeof ModalBase>;
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof ModalBase>;
|
|
13
|
+
|
|
14
|
+
function StoryRender(props: any) {
|
|
15
|
+
const [isOpen, setIsOpen] = useState<boolean>(props.isOpen);
|
|
16
|
+
|
|
17
|
+
const handleOpen = () => {
|
|
18
|
+
setIsOpen(true);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const handleClose = () => {
|
|
22
|
+
setIsOpen(false);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<>
|
|
27
|
+
<button type="button" onClick={handleOpen}>
|
|
28
|
+
open modal
|
|
29
|
+
</button>
|
|
30
|
+
|
|
31
|
+
<ModalBase {...props} open={isOpen} clickToDismiss={handleClose}>
|
|
32
|
+
<p>
|
|
33
|
+
There is nothing to this modal at all. It is completely up to you to style its contents.
|
|
34
|
+
</p>
|
|
35
|
+
</ModalBase>
|
|
36
|
+
</>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const Base: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
labelText: 'my modal',
|
|
43
|
+
},
|
|
44
|
+
render: (args) => {
|
|
45
|
+
return <StoryRender {...args} />;
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactModal from 'react-modal';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
|
|
5
|
+
import { COLORS } from '@/tokens';
|
|
6
|
+
import { colorUtils } from '@indico-data/utils';
|
|
7
|
+
|
|
8
|
+
// see: https://github.com/reactjs/react-modal/issues/603
|
|
9
|
+
function ModalAdapter(props: any): React.ReactElement {
|
|
10
|
+
const { className } = props;
|
|
11
|
+
const contentClassName = `${className}__content`;
|
|
12
|
+
const overlayClassName = `${className}__overlay`;
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<ReactModal
|
|
16
|
+
{...props}
|
|
17
|
+
portalClassName={className}
|
|
18
|
+
className={contentClassName}
|
|
19
|
+
overlayClassName={overlayClassName}
|
|
20
|
+
closeTimeoutMS={120}
|
|
21
|
+
appElement={document.getElementById(props.node || 'root')}
|
|
22
|
+
>
|
|
23
|
+
{props.children}
|
|
24
|
+
</ReactModal>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const StyledModalBase = styled(ModalAdapter)`
|
|
29
|
+
.${(props) => props.className}__content {
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 70px;
|
|
32
|
+
left: 50%;
|
|
33
|
+
transform: translateX(-50%);
|
|
34
|
+
|
|
35
|
+
overflow: visible;
|
|
36
|
+
padding: 0;
|
|
37
|
+
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
background-color: ${COLORS.clay};
|
|
40
|
+
border: solid 1px ${COLORS.oxfordBlue};
|
|
41
|
+
outline: none;
|
|
42
|
+
|
|
43
|
+
width: ${(props) => (props.maxWidth ? '100%' : 'auto')};
|
|
44
|
+
max-width: ${(props) => props.maxWidth || 'none'};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.${(props) => props.className}__overlay {
|
|
48
|
+
z-index: 900;
|
|
49
|
+
position: absolute;
|
|
50
|
+
top: 0;
|
|
51
|
+
left: 0;
|
|
52
|
+
|
|
53
|
+
width: 100%;
|
|
54
|
+
height: 100%;
|
|
55
|
+
|
|
56
|
+
background-color: ${colorUtils.hexToRgb(COLORS.mirage, 0.95)};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ReactModal__Overlay {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
|
|
62
|
+
transition: opacity 120ms ease-in-out;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ReactModal__Overlay--after-open {
|
|
66
|
+
opacity: 1;
|
|
67
|
+
position: fixed;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ReactModal__Overlay--before-close {
|
|
71
|
+
opacity: 0;
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import { PermafrostComponent } from '@/types';
|
|
6
|
+
|
|
7
|
+
import { StyledModalBase } from './ModalBase.styles';
|
|
8
|
+
|
|
9
|
+
export type ModalBaseProps = PermafrostComponent & {
|
|
10
|
+
children: React.ReactNode | React.ReactNode[];
|
|
11
|
+
clickToDismiss?(): void;
|
|
12
|
+
describedBy?: string;
|
|
13
|
+
/** a selector representing the desired parent; defaults to `#root` */
|
|
14
|
+
node?: string;
|
|
15
|
+
open: boolean;
|
|
16
|
+
preventEscDismiss?: boolean;
|
|
17
|
+
preventReturnFocus?: boolean;
|
|
18
|
+
maxWidth?: string;
|
|
19
|
+
} & ({ labelElement: string } | { labelText: string });
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Base modal component, powered by [react-modal](http://reactcommunity.org/react-modal/#usage)
|
|
23
|
+
*
|
|
24
|
+
* (Also see `ModalAdapter` in the styles file)
|
|
25
|
+
*
|
|
26
|
+
* Accessible element label must be included either as a string passed to `labelText`, or
|
|
27
|
+
* the id of one of the children passed to `labelElement`. If a description is available,
|
|
28
|
+
* pass that element’s id to the `describedBy` prop.
|
|
29
|
+
*/
|
|
30
|
+
export function ModalBase(props: ModalBaseProps) {
|
|
31
|
+
const {
|
|
32
|
+
children,
|
|
33
|
+
className,
|
|
34
|
+
clickToDismiss,
|
|
35
|
+
describedBy,
|
|
36
|
+
id,
|
|
37
|
+
node,
|
|
38
|
+
open,
|
|
39
|
+
preventEscDismiss,
|
|
40
|
+
preventReturnFocus,
|
|
41
|
+
maxWidth,
|
|
42
|
+
} = props;
|
|
43
|
+
|
|
44
|
+
const ariaProps = {} as { labelledby?: string; describedby?: string };
|
|
45
|
+
|
|
46
|
+
if ('labelElement' in props) {
|
|
47
|
+
ariaProps['labelledby'] = props.labelElement;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (describedBy) {
|
|
51
|
+
ariaProps['describedby'] = describedBy;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<StyledModalBase
|
|
56
|
+
ariaHideApp={false}
|
|
57
|
+
data-cy={props['data-cy']}
|
|
58
|
+
aria={ariaProps}
|
|
59
|
+
className={className || 'baseModal'}
|
|
60
|
+
contentLabel={'labelText' in props ? props.labelText : null}
|
|
61
|
+
id={id}
|
|
62
|
+
isOpen={open}
|
|
63
|
+
node={node}
|
|
64
|
+
onRequestClose={clickToDismiss}
|
|
65
|
+
shouldCloseOnEsc={!preventEscDismiss}
|
|
66
|
+
shouldReturnFocusAfterClose={!preventReturnFocus}
|
|
67
|
+
maxWidth={maxWidth}
|
|
68
|
+
>
|
|
69
|
+
{children}
|
|
70
|
+
</StyledModalBase>
|
|
71
|
+
);
|
|
72
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -16,21 +16,29 @@ export {
|
|
|
16
16
|
} from './tokens';
|
|
17
17
|
|
|
18
18
|
export {
|
|
19
|
+
AbstractRadio,
|
|
20
|
+
AbstractRadioGroup,
|
|
19
21
|
Accordion,
|
|
20
22
|
BarSpinner,
|
|
21
23
|
BorderSelect,
|
|
22
24
|
Button,
|
|
23
25
|
CirclePulse,
|
|
24
26
|
CircleSpinner,
|
|
27
|
+
ConfirmModal,
|
|
28
|
+
Drawer,
|
|
25
29
|
EditableInput,
|
|
26
30
|
Icon,
|
|
27
31
|
IconButton,
|
|
28
32
|
ListTable,
|
|
33
|
+
LoadingAwareContainer,
|
|
29
34
|
LoadingList,
|
|
35
|
+
ModalBase,
|
|
30
36
|
MultiCombobox,
|
|
31
37
|
NumberInput,
|
|
32
38
|
Pagination,
|
|
33
39
|
PercentageRing,
|
|
40
|
+
Radio,
|
|
41
|
+
RadioGroup,
|
|
34
42
|
RandomLoadingMessage,
|
|
35
43
|
SearchInput,
|
|
36
44
|
Section,
|
|
@@ -42,4 +50,9 @@ export {
|
|
|
42
50
|
Shrug,
|
|
43
51
|
SingleCombobox,
|
|
44
52
|
TextInput,
|
|
53
|
+
Wizard,
|
|
54
|
+
WizardCard,
|
|
55
|
+
WizardSection,
|
|
56
|
+
StyledWizard,
|
|
57
|
+
WizardWithSidebar,
|
|
45
58
|
} from './components';
|
package/src/tokens/colors.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const allColors = {
|
|
2
2
|
akaroa: '#cbc98f',
|
|
3
|
+
alizarin: '#E72326',
|
|
3
4
|
amber: '#f4c401',
|
|
4
5
|
amethyst: '#8e57b3',
|
|
5
6
|
aqua: '#10e4fe',
|
|
@@ -17,6 +18,7 @@ export const allColors = {
|
|
|
17
18
|
bouqet: '#a35c9a',
|
|
18
19
|
brick: '#c62828',
|
|
19
20
|
brightDusk: '#efebf7',
|
|
21
|
+
britishShorthair: '#4b94eb',
|
|
20
22
|
brown: '#785349',
|
|
21
23
|
candyCorn: '#fcef4d',
|
|
22
24
|
carnation: '#ff8adf',
|
|
@@ -27,23 +29,27 @@ export const allColors = {
|
|
|
27
29
|
charcoal: '#474b4b',
|
|
28
30
|
chartreuse: '#34ff01',
|
|
29
31
|
clay: '#283243',
|
|
32
|
+
clementine: '#F16E00',
|
|
30
33
|
cocoaBean: '#5c1200',
|
|
31
34
|
comet: '#5a6982',
|
|
32
35
|
cornflower: '#2060ff',
|
|
33
36
|
crimson: '#e53126',
|
|
34
37
|
curiousBlue: '#178ee0',
|
|
35
38
|
cyan: '#0cf',
|
|
39
|
+
daisyBush: '#431B92',
|
|
36
40
|
darkFontColor: '#0d151d',
|
|
37
41
|
darkGray: '#333',
|
|
38
42
|
darkPurple: '#6f3eae',
|
|
39
43
|
darkRed: '#b30000',
|
|
40
44
|
defaultFontColor: '#bbbfc5',
|
|
41
45
|
dodgerBlue: '#1774ff',
|
|
46
|
+
dusty: '#999999',
|
|
42
47
|
eagleGreen: '#005557',
|
|
43
48
|
ebony: '#101a26',
|
|
44
49
|
eggplant: '#7a0074',
|
|
45
50
|
electricGreen: '#00ff0a',
|
|
46
51
|
emerald: '#09c199',
|
|
52
|
+
endeavor: '#0055B9',
|
|
47
53
|
espresso: '#5a3627',
|
|
48
54
|
fieldPromptError: '#fd9693',
|
|
49
55
|
fieldPromptInfo: '#00bfff',
|
|
@@ -55,6 +61,7 @@ export const allColors = {
|
|
|
55
61
|
green: '#4caf50',
|
|
56
62
|
harlequin: '#20cb00',
|
|
57
63
|
harvestGold: '#e6c079',
|
|
64
|
+
hawkes: '#DCEAFD',
|
|
58
65
|
hemlock: '#626740',
|
|
59
66
|
imperial: '#4b0134',
|
|
60
67
|
iron: '#d9dee0',
|
|
@@ -100,12 +107,14 @@ export const allColors = {
|
|
|
100
107
|
seaGreen: '#0b8a51',
|
|
101
108
|
seance: '#7f1f82',
|
|
102
109
|
shiraz: '#c61021',
|
|
110
|
+
silverChalice: '#aaaaaa',
|
|
103
111
|
sinopia: '#D14200',
|
|
104
112
|
slaaneshGrey: '#dbd5e6',
|
|
105
113
|
tangerine: '#ff9900',
|
|
106
114
|
teal: '#008285',
|
|
107
115
|
toast: '#997862',
|
|
108
116
|
trueBlue: '#066CC6',
|
|
117
|
+
tundora: '#444444',
|
|
109
118
|
turquoise: '#00b5b6',
|
|
110
119
|
vermilion: '#b95555',
|
|
111
120
|
viking: '#59cfe0',
|
package/src/tokens/typography.ts
CHANGED
|
@@ -28,10 +28,16 @@ export const spacing = {
|
|
|
28
28
|
third: `${lineHeight.base / 3}em`,
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
export const weight = {
|
|
32
|
+
light: 300,
|
|
33
|
+
regular: 400,
|
|
34
|
+
semibold: 500,
|
|
35
|
+
bold: 600,
|
|
36
|
+
};
|
|
31
37
|
export const ellipsis = css`
|
|
32
38
|
overflow: hidden;
|
|
33
39
|
white-space: nowrap;
|
|
34
40
|
text-overflow: ellipsis;
|
|
35
41
|
`;
|
|
36
42
|
|
|
37
|
-
export const typography = { fontFamily, fontSize, lineHeight, spacing, ellipsis };
|
|
43
|
+
export const typography = { fontFamily, fontSize, lineHeight, spacing, ellipsis, weight };
|
package/src/types.ts
CHANGED
|
@@ -14,3 +14,11 @@ export type PermafrostComponent = {
|
|
|
14
14
|
'data-cy'?: string;
|
|
15
15
|
'data-testid'?: string;
|
|
16
16
|
};
|
|
17
|
+
|
|
18
|
+
export type ButtonVariant = 'default' | 'primary' | 'destructive';
|
|
19
|
+
export type ButtonSize = 'normal' | 'large';
|
|
20
|
+
|
|
21
|
+
// Component types -- TODO -- move to their own files
|
|
22
|
+
import { ListItem } from './components/Navigation/Drawer/types';
|
|
23
|
+
|
|
24
|
+
export type { ListItem };
|