@indico-data/design-system 1.0.4 → 1.0.6
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/.eslintrc.js +1 -1
- package/lib/components/Accordion/Accordion.d.ts +9 -0
- package/lib/components/Accordion/Accordion.stories.d.ts +25 -0
- package/lib/components/Accordion/Accordion.styles.d.ts +276 -0
- package/lib/components/Accordion/index.d.ts +1 -0
- package/lib/components/Icon/Icon.d.ts +16 -0
- package/lib/components/Icon/Icon.stories.d.ts +41 -0
- package/lib/components/Icon/faIcons.d.ts +76 -0
- package/lib/components/Icon/index.d.ts +1 -0
- package/lib/components/Icon/indicons.d.ts +127 -0
- package/lib/components/Icon/storyHelpers.d.ts +822 -0
- package/lib/components/ListTable/Header/Header.d.ts +21 -0
- package/lib/components/ListTable/Header/Header.styles.d.ts +274 -0
- package/lib/components/ListTable/Header/index.d.ts +1 -0
- package/lib/components/ListTable/ListTable.d.ts +41 -0
- package/lib/components/ListTable/ListTable.stories.d.ts +54 -0
- package/lib/components/ListTable/ListTable.styles.d.ts +274 -0
- package/lib/components/ListTable/index.d.ts +1 -0
- package/lib/components/ListTable/mock-data/index.d.ts +1 -0
- package/lib/components/ListTable/mock-data/mock-data.d.ts +54 -0
- package/lib/components/Pagination/Pagination.d.ts +19 -0
- package/lib/components/Pagination/Pagination.stories.d.ts +18 -0
- package/lib/components/Pagination/Pagination.styles.d.ts +274 -0
- package/lib/components/Pagination/index.d.ts +1 -0
- package/lib/components/basic-section/Section/Section.d.ts +8 -0
- package/lib/components/basic-section/Section/Section.stories.d.ts +14 -0
- package/lib/components/basic-section/Section/Section.styles.d.ts +274 -0
- package/lib/components/basic-section/Section/index.d.ts +1 -0
- package/lib/components/basic-section/SectionBlock/SectionBlock.d.ts +9 -0
- package/lib/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +274 -0
- package/lib/components/basic-section/SectionBlock/index.d.ts +1 -0
- package/lib/components/basic-section/SectionBody/SectionBody.d.ts +7 -0
- package/lib/components/basic-section/SectionBody/SectionBody.stories.d.ts +11 -0
- package/lib/components/basic-section/SectionBody/SectionBody.styles.d.ts +274 -0
- package/lib/components/basic-section/SectionBody/index.d.ts +1 -0
- package/lib/components/basic-section/SectionHeader/SectionHeader.d.ts +14 -0
- package/lib/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +20 -0
- package/lib/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +274 -0
- package/lib/components/basic-section/SectionHeader/index.d.ts +1 -0
- package/lib/components/basic-section/SectionTable/SectionTable.d.ts +2 -0
- package/lib/components/basic-section/SectionTable/SectionTable.styles.d.ts +274 -0
- package/lib/components/basic-section/SectionTable/index.d.ts +1 -0
- package/lib/components/basic-section/index.d.ts +5 -0
- package/lib/components/buttons/Button/Button.d.ts +21 -0
- package/lib/components/buttons/Button/Button.stories.d.ts +25 -0
- package/lib/components/buttons/Button/Button.styles.d.ts +284 -0
- package/lib/components/buttons/Button/index.d.ts +1 -0
- package/lib/components/buttons/IconButton/IconButton.d.ts +33 -0
- package/lib/components/buttons/IconButton/IconButton.stories.d.ts +43 -0
- package/lib/components/buttons/IconButton/IconButton.styles.d.ts +571 -0
- package/lib/components/buttons/IconButton/index.d.ts +1 -0
- package/lib/components/buttons/commonStyles.d.ts +9 -0
- package/lib/components/buttons/index.d.ts +2 -0
- package/lib/components/buttons/types.d.ts +2 -0
- package/lib/components/dropdowns/BorderSelect/BorderSelect.d.ts +19 -0
- package/lib/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +32 -0
- package/lib/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +546 -0
- package/lib/components/dropdowns/BorderSelect/index.d.ts +1 -0
- package/lib/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +23 -0
- package/lib/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +46 -0
- package/lib/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +86 -0
- package/lib/components/dropdowns/MultiCombobox/index.d.ts +1 -0
- package/lib/components/dropdowns/Select/Select.d.ts +19 -0
- package/lib/components/dropdowns/Select/Select.stories.d.ts +35 -0
- package/lib/components/dropdowns/Select/Select.styles.d.ts +274 -0
- package/lib/components/dropdowns/Select/index.d.ts +1 -0
- package/lib/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +20 -0
- package/lib/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +32 -0
- package/lib/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +86 -0
- package/lib/components/dropdowns/SingleCombobox/index.d.ts +1 -0
- package/lib/components/dropdowns/commonStyles.d.ts +1 -0
- package/lib/components/dropdowns/index.d.ts +4 -0
- package/lib/components/dropdowns/types.d.ts +46 -0
- package/lib/components/dropdowns/useCombobox.d.ts +25 -0
- package/lib/components/dropdowns/utils.d.ts +21 -0
- package/lib/components/index.d.ts +10 -0
- package/lib/components/inputs/EditableInput/EditableInput.d.ts +13 -0
- package/lib/components/inputs/EditableInput/EditableInput.stories.d.ts +15 -0
- package/lib/components/inputs/EditableInput/EditableInput.styles.d.ts +274 -0
- package/lib/components/inputs/EditableInput/index.d.ts +1 -0
- package/lib/components/inputs/NumberInput/NumberInput.d.ts +23 -0
- package/lib/components/inputs/NumberInput/NumberInput.stories.d.ts +28 -0
- package/lib/components/inputs/NumberInput/NumberInput.styles.d.ts +274 -0
- package/lib/components/inputs/NumberInput/index.d.ts +1 -0
- package/lib/components/inputs/SearchInput/SearchInput.d.ts +18 -0
- package/lib/components/inputs/SearchInput/SearchInput.stories.d.ts +27 -0
- package/lib/components/inputs/SearchInput/SearchInput.styles.d.ts +274 -0
- package/lib/components/inputs/SearchInput/index.d.ts +1 -0
- package/lib/components/inputs/TextInput/TextInput.d.ts +24 -0
- package/lib/components/inputs/TextInput/TextInput.stories.d.ts +62 -0
- package/lib/components/inputs/TextInput/TextInput.styles.d.ts +546 -0
- package/lib/components/inputs/TextInput/index.d.ts +1 -0
- package/lib/components/inputs/index.d.ts +4 -0
- package/lib/components/inputs/inputsCommon.styles.d.ts +4 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.d.ts +7 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.stories.d.ts +10 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.styles.d.ts +274 -0
- package/lib/components/loading-indicators/BarSpinner/index.d.ts +1 -0
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.d.ts +10 -0
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.stories.d.ts +12 -0
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.styles.d.ts +8 -0
- package/lib/components/loading-indicators/CirclePulse/index.d.ts +1 -0
- package/lib/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +12 -0
- package/lib/components/loading-indicators/CircleSpinner/CircleSpinner.stories.d.ts +10 -0
- package/lib/components/loading-indicators/CircleSpinner/index.d.ts +1 -0
- package/lib/components/loading-indicators/LoadingList/LoadingList.d.ts +2 -0
- package/lib/components/loading-indicators/LoadingList/LoadingList.stories.d.ts +11 -0
- package/lib/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +274 -0
- package/lib/components/loading-indicators/LoadingList/index.d.ts +1 -0
- package/lib/components/loading-indicators/PercentageRing/PercentageRing.d.ts +13 -0
- package/lib/components/loading-indicators/PercentageRing/PercentageRing.stories.d.ts +10 -0
- package/lib/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +274 -0
- package/lib/components/loading-indicators/PercentageRing/index.d.ts +1 -0
- package/lib/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.d.ts +2 -0
- package/lib/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.d.ts +11 -0
- package/lib/components/loading-indicators/RandomLoadingMessage/index.d.ts +1 -0
- package/lib/components/loading-indicators/RandomLoadingMessage/random-messages.d.ts +2 -0
- package/lib/components/loading-indicators/index.d.ts +6 -0
- package/lib/components/user-feedback/Shrug/Shrug.d.ts +14 -0
- package/lib/components/user-feedback/Shrug/Shrug.stories.d.ts +31 -0
- package/lib/components/user-feedback/Shrug/Shrug.styles.d.ts +274 -0
- package/lib/components/user-feedback/Shrug/index.d.ts +1 -0
- package/lib/components/user-feedback/index.d.ts +1 -0
- package/lib/index.d.ts +407 -0
- package/lib/index.esm.js +34337 -34165
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +34337 -34164
- package/lib/index.js.map +1 -1
- package/lib/styles/globals/buttons.d.ts +2 -0
- package/lib/styles/globals/forms.d.ts +2 -0
- package/lib/styles/globals/index.d.ts +2 -0
- package/lib/styles/globals/layout.d.ts +2 -0
- package/lib/styles/globals/lists.d.ts +2 -0
- package/lib/styles/globals/margin-padding.d.ts +2 -0
- package/lib/styles/globals/media.d.ts +2 -0
- package/lib/styles/globals/tables.d.ts +2 -0
- package/lib/styles/globals/typography.d.ts +2 -0
- package/lib/styles/globals/utility-classes.d.ts +2 -0
- package/lib/tokens/animation.d.ts +4 -0
- package/lib/tokens/breakpoints.d.ts +10 -0
- package/lib/tokens/colors.d.ts +130 -0
- package/lib/tokens/index.d.ts +8 -0
- package/lib/tokens/margin.d.ts +4 -0
- package/lib/tokens/numbers.d.ts +10 -0
- package/lib/tokens/padding.d.ts +4 -0
- package/lib/tokens/spacings.d.ts +5 -0
- package/lib/tokens/typography.d.ts +49 -0
- package/lib/types.d.ts +206 -0
- package/package.json +7 -1
- package/rollup.config.mjs +1 -1
- package/src/components/Accordion/Accordion.tsx +1 -1
- package/src/components/Icon/Icon.stories.tsx +2 -1
- package/src/components/Icon/Icon.tsx +1 -3
- package/src/components/Icon/index.ts +0 -1
- package/src/components/Icon/storyHelpers.tsx +2 -1
- package/src/components/ListTable/Header/Header.tsx +3 -1
- package/src/components/ListTable/ListTable.tsx +6 -1
- package/src/components/basic-section/SectionTable/SectionTable.tsx +3 -1
- package/src/components/buttons/Button/Button.tsx +1 -1
- package/src/components/buttons/IconButton/IconButton.tsx +4 -1
- package/src/components/dropdowns/Select/Select.tsx +1 -1
- package/src/components/dropdowns/SingleCombobox/SingleCombobox.tsx +1 -1
- package/src/components/index.ts +17 -9
- package/src/components/inputs/EditableInput/EditableInput.tsx +1 -1
- package/src/components/inputs/NumberInput/NumberInput.tsx +2 -1
- package/src/components/inputs/SearchInput/SearchInput.tsx +1 -1
- package/src/components/user-feedback/Shrug/Shrug.tsx +2 -1
- package/src/index.ts +28 -1
- package/src/types.ts +10 -0
- package/tsconfig.json +16 -4
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { IconName } from '@/types';
|
|
7
|
+
import { Icon } from '@/components/Icon';
|
|
8
|
+
import { BorderSelect } from '@/components/dropdowns';
|
|
7
9
|
|
|
8
10
|
import { StyledSectionTable } from './SectionTable.styles';
|
|
9
11
|
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
|
|
7
|
-
import { CircleSpinner } from '@/components';
|
|
7
|
+
import { CircleSpinner } from '@/components/loading-indicators';
|
|
8
8
|
import { PermafrostComponent } from '@/types';
|
|
9
9
|
import { StyledButton } from './Button.styles';
|
|
10
10
|
|
|
@@ -6,7 +6,9 @@ import { useButton } from '@react-aria/button';
|
|
|
6
6
|
import { useFocusRing } from '@react-aria/focus';
|
|
7
7
|
import { AriaButtonProps } from '@react-types/button';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { IconName } from '@/types';
|
|
10
|
+
import { Icon } from '@/components/Icon';
|
|
11
|
+
import { CircleSpinner } from '@/components/loading-indicators';
|
|
10
12
|
import { PermafrostComponent } from '@/types';
|
|
11
13
|
import { ButtonSize, ButtonVariant } from '../types';
|
|
12
14
|
|
|
@@ -95,6 +97,7 @@ export function IconButton(props: Props) {
|
|
|
95
97
|
|
|
96
98
|
if (isLink && !isDisabled) {
|
|
97
99
|
return (
|
|
100
|
+
//@ts-ignore
|
|
98
101
|
<StyledIconButtonLink {...commonProps} to={isLink}>
|
|
99
102
|
{iconElement} {labelElement}
|
|
100
103
|
</StyledIconButtonLink>
|
package/src/components/index.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export { Accordion } from './Accordion';
|
|
2
|
+
export { Section, SectionBlock, SectionBody, SectionHeader, SectionTable } from './basic-section';
|
|
3
|
+
export { Button, IconButton } from './buttons';
|
|
4
|
+
export { BorderSelect, MultiCombobox, Select, SingleCombobox } from './dropdowns';
|
|
5
|
+
export { Icon } from './Icon';
|
|
6
|
+
export { EditableInput, NumberInput, SearchInput, TextInput } from './inputs';
|
|
7
|
+
export {
|
|
8
|
+
BarSpinner,
|
|
9
|
+
CirclePulse,
|
|
10
|
+
CircleSpinner,
|
|
11
|
+
LoadingList,
|
|
12
|
+
PercentageRing,
|
|
13
|
+
RandomLoadingMessage,
|
|
14
|
+
} from './loading-indicators';
|
|
15
|
+
export { ListTable } from './ListTable';
|
|
16
|
+
export { Pagination } from './Pagination';
|
|
17
|
+
export { Shrug } from './user-feedback';
|
|
@@ -8,7 +8,7 @@ import classNames from 'classnames';
|
|
|
8
8
|
|
|
9
9
|
import { stringUtils } from '@indico-data/utils';
|
|
10
10
|
|
|
11
|
-
import { Icon } from '@/components';
|
|
11
|
+
import { Icon } from '@/components/Icon';
|
|
12
12
|
import { PermafrostComponent } from '@/types';
|
|
13
13
|
|
|
14
14
|
import { StyledEditableInput } from './EditableInput.styles';
|
|
@@ -4,7 +4,8 @@ import React, { ChangeEvent, useEffect, useRef, useState } from 'react';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import { v4 as uuid } from 'uuid';
|
|
6
6
|
|
|
7
|
-
import { Button
|
|
7
|
+
import { Button } from '@/components/buttons';
|
|
8
|
+
import { Icon } from '@/components/Icon';
|
|
8
9
|
import { PermafrostComponent } from '@/types';
|
|
9
10
|
|
|
10
11
|
import { StyledNumberField } from './NumberInput.styles';
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Link } from 'react-router-dom';
|
|
5
5
|
|
|
6
|
-
import { Button
|
|
6
|
+
import { Button } from '@/components/buttons';
|
|
7
|
+
import { Icon } from '@/components/Icon';
|
|
7
8
|
import { PermafrostComponent } from '@/types';
|
|
8
9
|
|
|
9
10
|
import { StyledShrug } from './Shrug.styles';
|
package/src/index.ts
CHANGED
|
@@ -1 +1,28 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {
|
|
2
|
+
Accordion,
|
|
3
|
+
BarSpinner,
|
|
4
|
+
BorderSelect,
|
|
5
|
+
Button,
|
|
6
|
+
CirclePulse,
|
|
7
|
+
CircleSpinner,
|
|
8
|
+
EditableInput,
|
|
9
|
+
Icon,
|
|
10
|
+
IconButton,
|
|
11
|
+
ListTable,
|
|
12
|
+
LoadingList,
|
|
13
|
+
MultiCombobox,
|
|
14
|
+
NumberInput,
|
|
15
|
+
Pagination,
|
|
16
|
+
PercentageRing,
|
|
17
|
+
RandomLoadingMessage,
|
|
18
|
+
SearchInput,
|
|
19
|
+
Section,
|
|
20
|
+
SectionBlock,
|
|
21
|
+
SectionBody,
|
|
22
|
+
SectionHeader,
|
|
23
|
+
SectionTable,
|
|
24
|
+
Select,
|
|
25
|
+
Shrug,
|
|
26
|
+
SingleCombobox,
|
|
27
|
+
TextInput,
|
|
28
|
+
} from './components';
|
package/src/types.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import { faIcons } from '../src/components/Icon/faIcons';
|
|
2
|
+
import { indicons } from '../src/components/Icon/indicons';
|
|
3
|
+
|
|
4
|
+
const allIcons = {
|
|
5
|
+
...faIcons,
|
|
6
|
+
...indicons,
|
|
7
|
+
} as const;
|
|
8
|
+
|
|
9
|
+
export type IconName = keyof typeof allIcons;
|
|
10
|
+
|
|
1
11
|
export type PermafrostComponent = {
|
|
2
12
|
id?: string;
|
|
3
13
|
className?: string;
|
package/tsconfig.json
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"outDir": "dist",
|
|
4
|
-
"rootDir": "src",
|
|
5
3
|
"target": "es6",
|
|
6
|
-
"
|
|
4
|
+
"outDir": "lib",
|
|
5
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationDir": "lib",
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
7
11
|
"allowSyntheticDefaultImports": true,
|
|
12
|
+
"strict": true,
|
|
13
|
+
"forceConsistentCasingInFileNames": true,
|
|
14
|
+
"module": "esnext",
|
|
8
15
|
"moduleResolution": "node",
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"noEmit": true,
|
|
19
|
+
"jsx": "react",
|
|
9
20
|
"baseUrl": "./",
|
|
10
21
|
"paths": {
|
|
11
22
|
"@/*": ["src/*"]
|
|
12
23
|
}
|
|
13
24
|
},
|
|
14
|
-
"include": ["./src/**/*"]
|
|
25
|
+
"include": ["./src/**/*"],
|
|
26
|
+
"exclude": ["node_modules", "lib"]
|
|
15
27
|
}
|