@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.
Files changed (170) hide show
  1. package/.eslintrc.js +1 -1
  2. package/lib/components/Accordion/Accordion.d.ts +9 -0
  3. package/lib/components/Accordion/Accordion.stories.d.ts +25 -0
  4. package/lib/components/Accordion/Accordion.styles.d.ts +276 -0
  5. package/lib/components/Accordion/index.d.ts +1 -0
  6. package/lib/components/Icon/Icon.d.ts +16 -0
  7. package/lib/components/Icon/Icon.stories.d.ts +41 -0
  8. package/lib/components/Icon/faIcons.d.ts +76 -0
  9. package/lib/components/Icon/index.d.ts +1 -0
  10. package/lib/components/Icon/indicons.d.ts +127 -0
  11. package/lib/components/Icon/storyHelpers.d.ts +822 -0
  12. package/lib/components/ListTable/Header/Header.d.ts +21 -0
  13. package/lib/components/ListTable/Header/Header.styles.d.ts +274 -0
  14. package/lib/components/ListTable/Header/index.d.ts +1 -0
  15. package/lib/components/ListTable/ListTable.d.ts +41 -0
  16. package/lib/components/ListTable/ListTable.stories.d.ts +54 -0
  17. package/lib/components/ListTable/ListTable.styles.d.ts +274 -0
  18. package/lib/components/ListTable/index.d.ts +1 -0
  19. package/lib/components/ListTable/mock-data/index.d.ts +1 -0
  20. package/lib/components/ListTable/mock-data/mock-data.d.ts +54 -0
  21. package/lib/components/Pagination/Pagination.d.ts +19 -0
  22. package/lib/components/Pagination/Pagination.stories.d.ts +18 -0
  23. package/lib/components/Pagination/Pagination.styles.d.ts +274 -0
  24. package/lib/components/Pagination/index.d.ts +1 -0
  25. package/lib/components/basic-section/Section/Section.d.ts +8 -0
  26. package/lib/components/basic-section/Section/Section.stories.d.ts +14 -0
  27. package/lib/components/basic-section/Section/Section.styles.d.ts +274 -0
  28. package/lib/components/basic-section/Section/index.d.ts +1 -0
  29. package/lib/components/basic-section/SectionBlock/SectionBlock.d.ts +9 -0
  30. package/lib/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +274 -0
  31. package/lib/components/basic-section/SectionBlock/index.d.ts +1 -0
  32. package/lib/components/basic-section/SectionBody/SectionBody.d.ts +7 -0
  33. package/lib/components/basic-section/SectionBody/SectionBody.stories.d.ts +11 -0
  34. package/lib/components/basic-section/SectionBody/SectionBody.styles.d.ts +274 -0
  35. package/lib/components/basic-section/SectionBody/index.d.ts +1 -0
  36. package/lib/components/basic-section/SectionHeader/SectionHeader.d.ts +14 -0
  37. package/lib/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +20 -0
  38. package/lib/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +274 -0
  39. package/lib/components/basic-section/SectionHeader/index.d.ts +1 -0
  40. package/lib/components/basic-section/SectionTable/SectionTable.d.ts +2 -0
  41. package/lib/components/basic-section/SectionTable/SectionTable.styles.d.ts +274 -0
  42. package/lib/components/basic-section/SectionTable/index.d.ts +1 -0
  43. package/lib/components/basic-section/index.d.ts +5 -0
  44. package/lib/components/buttons/Button/Button.d.ts +21 -0
  45. package/lib/components/buttons/Button/Button.stories.d.ts +25 -0
  46. package/lib/components/buttons/Button/Button.styles.d.ts +284 -0
  47. package/lib/components/buttons/Button/index.d.ts +1 -0
  48. package/lib/components/buttons/IconButton/IconButton.d.ts +33 -0
  49. package/lib/components/buttons/IconButton/IconButton.stories.d.ts +43 -0
  50. package/lib/components/buttons/IconButton/IconButton.styles.d.ts +571 -0
  51. package/lib/components/buttons/IconButton/index.d.ts +1 -0
  52. package/lib/components/buttons/commonStyles.d.ts +9 -0
  53. package/lib/components/buttons/index.d.ts +2 -0
  54. package/lib/components/buttons/types.d.ts +2 -0
  55. package/lib/components/dropdowns/BorderSelect/BorderSelect.d.ts +19 -0
  56. package/lib/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +32 -0
  57. package/lib/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +546 -0
  58. package/lib/components/dropdowns/BorderSelect/index.d.ts +1 -0
  59. package/lib/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +23 -0
  60. package/lib/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +46 -0
  61. package/lib/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +86 -0
  62. package/lib/components/dropdowns/MultiCombobox/index.d.ts +1 -0
  63. package/lib/components/dropdowns/Select/Select.d.ts +19 -0
  64. package/lib/components/dropdowns/Select/Select.stories.d.ts +35 -0
  65. package/lib/components/dropdowns/Select/Select.styles.d.ts +274 -0
  66. package/lib/components/dropdowns/Select/index.d.ts +1 -0
  67. package/lib/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +20 -0
  68. package/lib/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +32 -0
  69. package/lib/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +86 -0
  70. package/lib/components/dropdowns/SingleCombobox/index.d.ts +1 -0
  71. package/lib/components/dropdowns/commonStyles.d.ts +1 -0
  72. package/lib/components/dropdowns/index.d.ts +4 -0
  73. package/lib/components/dropdowns/types.d.ts +46 -0
  74. package/lib/components/dropdowns/useCombobox.d.ts +25 -0
  75. package/lib/components/dropdowns/utils.d.ts +21 -0
  76. package/lib/components/index.d.ts +10 -0
  77. package/lib/components/inputs/EditableInput/EditableInput.d.ts +13 -0
  78. package/lib/components/inputs/EditableInput/EditableInput.stories.d.ts +15 -0
  79. package/lib/components/inputs/EditableInput/EditableInput.styles.d.ts +274 -0
  80. package/lib/components/inputs/EditableInput/index.d.ts +1 -0
  81. package/lib/components/inputs/NumberInput/NumberInput.d.ts +23 -0
  82. package/lib/components/inputs/NumberInput/NumberInput.stories.d.ts +28 -0
  83. package/lib/components/inputs/NumberInput/NumberInput.styles.d.ts +274 -0
  84. package/lib/components/inputs/NumberInput/index.d.ts +1 -0
  85. package/lib/components/inputs/SearchInput/SearchInput.d.ts +18 -0
  86. package/lib/components/inputs/SearchInput/SearchInput.stories.d.ts +27 -0
  87. package/lib/components/inputs/SearchInput/SearchInput.styles.d.ts +274 -0
  88. package/lib/components/inputs/SearchInput/index.d.ts +1 -0
  89. package/lib/components/inputs/TextInput/TextInput.d.ts +24 -0
  90. package/lib/components/inputs/TextInput/TextInput.stories.d.ts +62 -0
  91. package/lib/components/inputs/TextInput/TextInput.styles.d.ts +546 -0
  92. package/lib/components/inputs/TextInput/index.d.ts +1 -0
  93. package/lib/components/inputs/index.d.ts +4 -0
  94. package/lib/components/inputs/inputsCommon.styles.d.ts +4 -0
  95. package/lib/components/loading-indicators/BarSpinner/BarSpinner.d.ts +7 -0
  96. package/lib/components/loading-indicators/BarSpinner/BarSpinner.stories.d.ts +10 -0
  97. package/lib/components/loading-indicators/BarSpinner/BarSpinner.styles.d.ts +274 -0
  98. package/lib/components/loading-indicators/BarSpinner/index.d.ts +1 -0
  99. package/lib/components/loading-indicators/CirclePulse/CirclePulse.d.ts +10 -0
  100. package/lib/components/loading-indicators/CirclePulse/CirclePulse.stories.d.ts +12 -0
  101. package/lib/components/loading-indicators/CirclePulse/CirclePulse.styles.d.ts +8 -0
  102. package/lib/components/loading-indicators/CirclePulse/index.d.ts +1 -0
  103. package/lib/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +12 -0
  104. package/lib/components/loading-indicators/CircleSpinner/CircleSpinner.stories.d.ts +10 -0
  105. package/lib/components/loading-indicators/CircleSpinner/index.d.ts +1 -0
  106. package/lib/components/loading-indicators/LoadingList/LoadingList.d.ts +2 -0
  107. package/lib/components/loading-indicators/LoadingList/LoadingList.stories.d.ts +11 -0
  108. package/lib/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +274 -0
  109. package/lib/components/loading-indicators/LoadingList/index.d.ts +1 -0
  110. package/lib/components/loading-indicators/PercentageRing/PercentageRing.d.ts +13 -0
  111. package/lib/components/loading-indicators/PercentageRing/PercentageRing.stories.d.ts +10 -0
  112. package/lib/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +274 -0
  113. package/lib/components/loading-indicators/PercentageRing/index.d.ts +1 -0
  114. package/lib/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.d.ts +2 -0
  115. package/lib/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.d.ts +11 -0
  116. package/lib/components/loading-indicators/RandomLoadingMessage/index.d.ts +1 -0
  117. package/lib/components/loading-indicators/RandomLoadingMessage/random-messages.d.ts +2 -0
  118. package/lib/components/loading-indicators/index.d.ts +6 -0
  119. package/lib/components/user-feedback/Shrug/Shrug.d.ts +14 -0
  120. package/lib/components/user-feedback/Shrug/Shrug.stories.d.ts +31 -0
  121. package/lib/components/user-feedback/Shrug/Shrug.styles.d.ts +274 -0
  122. package/lib/components/user-feedback/Shrug/index.d.ts +1 -0
  123. package/lib/components/user-feedback/index.d.ts +1 -0
  124. package/lib/index.d.ts +407 -0
  125. package/lib/index.esm.js +34337 -34165
  126. package/lib/index.esm.js.map +1 -1
  127. package/lib/index.js +34337 -34164
  128. package/lib/index.js.map +1 -1
  129. package/lib/styles/globals/buttons.d.ts +2 -0
  130. package/lib/styles/globals/forms.d.ts +2 -0
  131. package/lib/styles/globals/index.d.ts +2 -0
  132. package/lib/styles/globals/layout.d.ts +2 -0
  133. package/lib/styles/globals/lists.d.ts +2 -0
  134. package/lib/styles/globals/margin-padding.d.ts +2 -0
  135. package/lib/styles/globals/media.d.ts +2 -0
  136. package/lib/styles/globals/tables.d.ts +2 -0
  137. package/lib/styles/globals/typography.d.ts +2 -0
  138. package/lib/styles/globals/utility-classes.d.ts +2 -0
  139. package/lib/tokens/animation.d.ts +4 -0
  140. package/lib/tokens/breakpoints.d.ts +10 -0
  141. package/lib/tokens/colors.d.ts +130 -0
  142. package/lib/tokens/index.d.ts +8 -0
  143. package/lib/tokens/margin.d.ts +4 -0
  144. package/lib/tokens/numbers.d.ts +10 -0
  145. package/lib/tokens/padding.d.ts +4 -0
  146. package/lib/tokens/spacings.d.ts +5 -0
  147. package/lib/tokens/typography.d.ts +49 -0
  148. package/lib/types.d.ts +206 -0
  149. package/package.json +7 -1
  150. package/rollup.config.mjs +1 -1
  151. package/src/components/Accordion/Accordion.tsx +1 -1
  152. package/src/components/Icon/Icon.stories.tsx +2 -1
  153. package/src/components/Icon/Icon.tsx +1 -3
  154. package/src/components/Icon/index.ts +0 -1
  155. package/src/components/Icon/storyHelpers.tsx +2 -1
  156. package/src/components/ListTable/Header/Header.tsx +3 -1
  157. package/src/components/ListTable/ListTable.tsx +6 -1
  158. package/src/components/basic-section/SectionTable/SectionTable.tsx +3 -1
  159. package/src/components/buttons/Button/Button.tsx +1 -1
  160. package/src/components/buttons/IconButton/IconButton.tsx +4 -1
  161. package/src/components/dropdowns/Select/Select.tsx +1 -1
  162. package/src/components/dropdowns/SingleCombobox/SingleCombobox.tsx +1 -1
  163. package/src/components/index.ts +17 -9
  164. package/src/components/inputs/EditableInput/EditableInput.tsx +1 -1
  165. package/src/components/inputs/NumberInput/NumberInput.tsx +2 -1
  166. package/src/components/inputs/SearchInput/SearchInput.tsx +1 -1
  167. package/src/components/user-feedback/Shrug/Shrug.tsx +2 -1
  168. package/src/index.ts +28 -1
  169. package/src/types.ts +10 -0
  170. 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 { Icon, BorderSelect, IconName } from '@/components';
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 { Icon, IconName, CircleSpinner } from '@/components';
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>
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import { v4 as uuid } from 'uuid';
4
4
 
5
- import { Icon } from '@/components';
5
+ import { Icon } from '@/components/Icon';
6
6
  import { PermafrostComponent } from '@/types';
7
7
 
8
8
  import { StyledSelect } from './Select.styles';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import { components } from 'react-select';
4
4
 
5
- import { Icon } from '@/components';
5
+ import { Icon } from '@/components/Icon';
6
6
  import { PermafrostComponent } from '@/types';
7
7
  import { addCustomProps } from '../utils';
8
8
 
@@ -1,9 +1,17 @@
1
- export * from './buttons';
2
- export * from './dropdowns';
3
- export * from './inputs';
4
- export * from './Icon';
5
- export * from './loading-indicators';
6
- export * from './basic-section';
7
- export * from './user-feedback';
8
- export * from './Accordion';
9
- export * from './Pagination';
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, Icon } from '@/components';
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,7 @@
3
3
  import React from 'react';
4
4
  import { v4 as uuid } from 'uuid';
5
5
 
6
- import { Icon } from '@/components';
6
+ import { Icon } from '@/components/Icon';
7
7
  import { PermafrostComponent } from '@/types';
8
8
 
9
9
  import { StyledSearchField } from './SearchInput.styles';
@@ -3,7 +3,8 @@
3
3
  import React from 'react';
4
4
  import { Link } from 'react-router-dom';
5
5
 
6
- import { Button, Icon } from '@/components';
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 * from './components';
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
- "jsx": "react",
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
  }