widenarrow-ui 0.1.7 → 0.1.9

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 (177) hide show
  1. package/.eslintrc +8 -1
  2. package/.storybook/fonts.css +4 -0
  3. package/.storybook/main.js +14 -2
  4. package/.storybook/normalize.css +459 -0
  5. package/.storybook/preview.js +2 -0
  6. package/.storybook/storybook.css +209 -0
  7. package/README.md +69 -1
  8. package/lib/components/Box/Box.d.ts +1 -1
  9. package/lib/components/Box/Box.stories.d.ts +1 -1
  10. package/lib/components/Button/Button.d.ts +1 -1
  11. package/lib/components/Button/Button.stories.d.ts +5 -1
  12. package/lib/components/Checkbox/Checkbox.d.ts +2 -2
  13. package/lib/components/Checkbox/Checkbox.stories.d.ts +7 -3
  14. package/lib/components/Grid/Grid.d.ts +1 -1
  15. package/lib/components/Grid/Grid.stories.d.ts +1 -1
  16. package/lib/components/Icon/Icon.stories.d.ts +2 -2
  17. package/lib/components/Icon/Iconography.d.ts +3 -0
  18. package/lib/components/SolidSpinner/SolidSpinner.d.ts +1 -1
  19. package/lib/components/SolidSpinner/SolidSpinner.stories.d.ts +1 -1
  20. package/lib/components/Typography/Heading.stories.d.ts +3 -3
  21. package/lib/components/Typography/Label.stories.d.ts +6 -0
  22. package/lib/components/Typography/Paragraph.stories.d.ts +1 -1
  23. package/lib/components/Typography/Span.stories.d.ts +6 -0
  24. package/lib/components/Typography/Typography.d.ts +6 -6
  25. package/lib/constants.d.ts +0 -3
  26. package/lib/index.d.ts +7 -257
  27. package/lib/index.esm.js +520 -1014
  28. package/lib/index.esm.js.map +1 -1
  29. package/lib/index.js +520 -1014
  30. package/lib/index.js.map +1 -1
  31. package/lib/styles/baseline.scss +215 -0
  32. package/lib/styles/normalize.scss +459 -0
  33. package/package.json +7 -6
  34. package/rollup.config.mjs +23 -4
  35. package/src/assets/fonts/Assistant-VariableFont_wght.ttf +0 -0
  36. package/src/assets/svg/accountSettings.tsx +1 -1
  37. package/src/assets/svg/addPageBreak.tsx +1 -1
  38. package/src/assets/svg/addPost.tsx +1 -1
  39. package/src/assets/svg/addSectionAbove.tsx +1 -1
  40. package/src/assets/svg/addSectionBelow.tsx +1 -1
  41. package/src/assets/svg/addSolid.tsx +1 -1
  42. package/src/assets/svg/ai.tsx +1 -1
  43. package/src/assets/svg/arrowForkRight.tsx +1 -1
  44. package/src/assets/svg/benchmarks.tsx +1 -1
  45. package/src/assets/svg/block.tsx +1 -1
  46. package/src/assets/svg/cancelTrial.tsx +1 -1
  47. package/src/assets/svg/cardMode.tsx +1 -1
  48. package/src/assets/svg/changeOrder.tsx +1 -1
  49. package/src/assets/svg/checkCircleLarge.tsx +1 -1
  50. package/src/assets/svg/checkCircleSmall.tsx +1 -1
  51. package/src/assets/svg/checkIndeterminateWhite.tsx +2 -2
  52. package/src/assets/svg/checkboxCircle.tsx +1 -1
  53. package/src/assets/svg/checkboxCircleChecked.tsx +2 -2
  54. package/src/assets/svg/chevron.tsx +1 -1
  55. package/src/assets/svg/chevronUp.tsx +1 -1
  56. package/src/assets/svg/cogwheel.tsx +1 -1
  57. package/src/assets/svg/comment.tsx +1 -1
  58. package/src/assets/svg/commentAdd.tsx +1 -1
  59. package/src/assets/svg/compare.tsx +1 -1
  60. package/src/assets/svg/createNewsletter.tsx +1 -1
  61. package/src/assets/svg/cross.tsx +1 -1
  62. package/src/assets/svg/crossCircleLarge.tsx +1 -1
  63. package/src/assets/svg/crossCircleSmall.tsx +1 -1
  64. package/src/assets/svg/crossCircleSmallFilled.tsx +2 -2
  65. package/src/assets/svg/dashboard.tsx +1 -1
  66. package/src/assets/svg/dateRange.tsx +1 -1
  67. package/src/assets/svg/description.tsx +1 -1
  68. package/src/assets/svg/dotOutlined.tsx +1 -1
  69. package/src/assets/svg/dots.tsx +1 -1
  70. package/src/assets/svg/dotsBackground.tsx +1 -1
  71. package/src/assets/svg/down.tsx +1 -1
  72. package/src/assets/svg/download.tsx +1 -1
  73. package/src/assets/svg/edit.tsx +1 -1
  74. package/src/assets/svg/embed.tsx +1 -1
  75. package/src/assets/svg/expandArrows.tsx +2 -2
  76. package/src/assets/svg/feed.tsx +1 -1
  77. package/src/assets/svg/filter.tsx +1 -1
  78. package/src/assets/svg/filterSettings.tsx +1 -1
  79. package/src/assets/svg/formatImgBottom.tsx +2 -2
  80. package/src/assets/svg/formatImgCenterCenter.tsx +2 -2
  81. package/src/assets/svg/formatImgCrop.tsx +1 -1
  82. package/src/assets/svg/formatImgHero.tsx +2 -2
  83. package/src/assets/svg/formatImgLeft.tsx +2 -2
  84. package/src/assets/svg/formatImgLeftBottom.tsx +1 -1
  85. package/src/assets/svg/formatImgLeftCenter.tsx +2 -2
  86. package/src/assets/svg/formatImgRight.tsx +2 -2
  87. package/src/assets/svg/formatImgRightBottom.tsx +2 -2
  88. package/src/assets/svg/formatImgRightCenter.tsx +2 -2
  89. package/src/assets/svg/formatImgTop.tsx +2 -2
  90. package/src/assets/svg/gridMode.tsx +1 -1
  91. package/src/assets/svg/handlebar.tsx +1 -1
  92. package/src/assets/svg/keywords.tsx +6 -6
  93. package/src/assets/svg/lightBulb.tsx +1 -1
  94. package/src/assets/svg/like.tsx +1 -1
  95. package/src/assets/svg/likeSolid.tsx +1 -1
  96. package/src/assets/svg/list.tsx +1 -1
  97. package/src/assets/svg/listMode.tsx +1 -1
  98. package/src/assets/svg/mail.tsx +1 -1
  99. package/src/assets/svg/minimizeArrows.tsx +2 -2
  100. package/src/assets/svg/monitoringLogo.tsx +1 -1
  101. package/src/assets/svg/navigateDownLarge.tsx +1 -1
  102. package/src/assets/svg/navigateLeftLarge.tsx +1 -1
  103. package/src/assets/svg/navigateRightLarge.tsx +1 -1
  104. package/src/assets/svg/news.tsx +1 -1
  105. package/src/assets/svg/newsletterOpened.tsx +1 -1
  106. package/src/assets/svg/nochange.tsx +1 -1
  107. package/src/assets/svg/nodirection.tsx +1 -1
  108. package/src/assets/svg/pattern.tsx +1 -1
  109. package/src/assets/svg/pdf.tsx +1 -1
  110. package/src/assets/svg/pencil.tsx +1 -1
  111. package/src/assets/svg/pin.tsx +1 -1
  112. package/src/assets/svg/play.tsx +1 -1
  113. package/src/assets/svg/plus.tsx +1 -1
  114. package/src/assets/svg/portals.tsx +1 -1
  115. package/src/assets/svg/profile.tsx +1 -1
  116. package/src/assets/svg/purchaseInbox.tsx +1 -1
  117. package/src/assets/svg/questionmark.tsx +1 -1
  118. package/src/assets/svg/recurring.tsx +1 -1
  119. package/src/assets/svg/report.tsx +1 -1
  120. package/src/assets/svg/reportLibrary.tsx +1 -1
  121. package/src/assets/svg/searchPerson.tsx +1 -1
  122. package/src/assets/svg/sendList.tsx +1 -14
  123. package/src/assets/svg/settingsFilled.tsx +1 -1
  124. package/src/assets/svg/settingsOff.tsx +3 -3
  125. package/src/assets/svg/settingsOutlined.tsx +1 -1
  126. package/src/assets/svg/sliderHandle.tsx +2 -2
  127. package/src/assets/svg/sort.tsx +1 -1
  128. package/src/assets/svg/statistics.tsx +1 -1
  129. package/src/assets/svg/subscriptions.tsx +1 -1
  130. package/src/assets/svg/suggestion.tsx +1 -1
  131. package/src/assets/svg/sysAdmin.tsx +1 -1
  132. package/src/assets/svg/translate.tsx +1 -1
  133. package/src/assets/svg/trash.tsx +1 -1
  134. package/src/assets/svg/up.tsx +1 -1
  135. package/src/assets/svg/user.tsx +1 -1
  136. package/src/assets/svg/users.tsx +1 -1
  137. package/src/assets/svg/verified.tsx +1 -1
  138. package/src/assets/svg/warning.tsx +1 -1
  139. package/src/assets/svg/wide-narrow-logo.tsx +1 -1
  140. package/src/assets/svg/wide-narrow-w-logo.tsx +1 -1
  141. package/src/assets/svg/willBeDeleted.tsx +1 -1
  142. package/src/components/Box/Box.module.scss +1 -1
  143. package/src/components/Box/Box.stories.tsx +1 -1
  144. package/src/components/Box/Box.tsx +1 -1
  145. package/src/components/Button/Button.module.scss +1 -1
  146. package/src/components/Button/Button.stories.tsx +38 -3
  147. package/src/components/Button/Button.tsx +5 -4
  148. package/src/components/Checkbox/Checkbox.module.scss +3 -1
  149. package/src/components/Checkbox/Checkbox.stories.tsx +40 -6
  150. package/src/components/Checkbox/Checkbox.tsx +5 -5
  151. package/src/components/Grid/Grid.module.scss +1 -1
  152. package/src/components/Grid/Grid.stories.tsx +2 -2
  153. package/src/components/Grid/Grid.tsx +1 -1
  154. package/src/components/Icon/Icon.module.scss +1 -1
  155. package/src/components/Icon/Icon.stories.tsx +7 -6
  156. package/src/components/Icon/Icon.tsx +1 -1
  157. package/src/components/Icon/Iconography.mdx +11 -0
  158. package/src/components/Icon/Iconography.tsx +17 -0
  159. package/src/components/Icon/getIconFromConstant.tsx +175 -175
  160. package/src/components/SolidSpinner/SolidSpinner.module.scss +1 -1
  161. package/src/components/SolidSpinner/SolidSpinner.stories.tsx +2 -2
  162. package/src/components/SolidSpinner/SolidSpinner.tsx +4 -4
  163. package/src/components/Typography/Heading.stories.tsx +6 -8
  164. package/src/components/Typography/Label.stories.tsx +18 -0
  165. package/src/components/Typography/Paragraph.stories.tsx +2 -3
  166. package/src/components/Typography/Span.stories.tsx +18 -0
  167. package/src/components/Typography/Typography.mdx +54 -0
  168. package/src/components/Typography/Typography.module.scss +1 -1
  169. package/src/components/Typography/Typography.tsx +7 -6
  170. package/src/constants.ts +0 -3
  171. package/src/index.ts +7 -7
  172. package/src/styles/baseline.scss +215 -0
  173. package/src/styles/colors.scss +0 -15
  174. package/src/styles/fonts.scss +4 -0
  175. package/src/styles/mixins.scss +3 -62
  176. package/src/styles/normalize.scss +459 -0
  177. package/tsconfig.json +2 -1
package/README.md CHANGED
@@ -1,3 +1,71 @@
1
1
  # WIDENARROW UI
2
2
 
3
- https://betterprogramming.pub/how-to-publish-a-react-component-library-c89a07566770
3
+ Welcome to WideNarrowUI, a component library for use in InfoDesk's products.
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ npm install widenarrow-ui
9
+ ```
10
+
11
+ ## Setup in your project
12
+
13
+ Import the `baseline.scss` at the top of you stylesheets to
14
+ a) properly normalize and reset css and
15
+ b) apply the WNUI baseline to your project, making sure every component is rendered as intended
16
+ c) and get the required fonts.
17
+
18
+ ```
19
+ @import "widenarrow-ui/styles/baseline.scss"
20
+ ```
21
+
22
+ ## Start building!
23
+
24
+ Import the component(s) you wish to use!
25
+
26
+ ```
27
+ import { Box, Grid, Heading, Paragraph } from 'widenarrow-ui';
28
+
29
+ (...)
30
+
31
+ return (
32
+ <Grid container>
33
+ <Grid xs={12} md={4}>
34
+ <Box displayFlex>
35
+ <Heading type="h1">WideNarrow UI is great!</Heading>
36
+ <Paragraph>And just look at how easy it is to use.</Paragraph>
37
+ </Box>
38
+ <Grid>
39
+ </Grid>
40
+ )
41
+ ```
42
+
43
+ ## Development
44
+
45
+ ### Storybook
46
+ Components are documented, viewed and developed in [Storybook](https://storybook.js.org/)
47
+ Running storybook for development
48
+ ```
49
+ npm run start
50
+ ```
51
+
52
+ ### Build
53
+ The project is built and bundled using [rollup.js](https://rollupjs.org/)
54
+ Building the project
55
+ ```
56
+ npm run build
57
+ ```
58
+
59
+ ### Publish to npm
60
+ Make sure the version in `package.json` is bumped.
61
+ Publishing should always be made from `master` branch.
62
+
63
+ ```
64
+ npm login
65
+ ```
66
+ You need login information for npm (contact a collaborator).
67
+ Type in these credentials now.
68
+
69
+ ```
70
+ npm publish
71
+ ```
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { MarginInterface, PaddingInterface, FlexStylingInterface } from '../../types/styling';
2
+ import { MarginInterface, PaddingInterface, FlexStylingInterface } from 'src/types/styling';
3
3
  interface Props extends MarginInterface, PaddingInterface, FlexStylingInterface {
4
4
  children: React.ReactNode;
5
5
  className?: string;
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import Box from './Box';
2
+ import Box from 'src/components/Box';
3
3
  declare const meta: Meta<typeof Box>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Box>;
@@ -1,5 +1,5 @@
1
1
  import { FC, ReactNode, MouseEvent } from 'react';
2
- import { ButtonTypes } from '../../constants';
2
+ import { ButtonTypes } from 'src/constants';
3
3
  interface Props {
4
4
  text?: string;
5
5
  onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
@@ -1,7 +1,11 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import Button from './Button';
2
+ import Button from 'src/components/Button';
3
3
  declare const meta: Meta<typeof Button>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Button>;
6
6
  export declare const Primary: Story;
7
7
  export declare const Secondary: Story;
8
+ export declare const Tertiary: Story;
9
+ export declare const WithIcon: Story;
10
+ export declare const LoadingState: Story;
11
+ export declare const Disabled: Story;
@@ -2,8 +2,8 @@ import { FC, ChangeEvent, MouseEvent } from 'react';
2
2
  interface Props {
3
3
  name: string;
4
4
  label: string;
5
- onChange: (event: ChangeEvent<HTMLInputElement>) => void;
6
- onChangeFake: (event: MouseEvent<HTMLDivElement>) => void;
5
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
6
+ onChangeFake?: (event: MouseEvent<HTMLDivElement>) => void;
7
7
  className?: string;
8
8
  ariaLabel?: string;
9
9
  helperText?: string;
@@ -1,7 +1,11 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import Checkbox from './Checkbox';
2
+ import Checkbox from 'src/components/Checkbox';
3
3
  declare const meta: Meta<typeof Checkbox>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Checkbox>;
6
- export declare const Primary: Story;
7
- export declare const Secondary: Story;
6
+ export declare const Checked: Story;
7
+ export declare const Indeterminate: Story;
8
+ export declare const Unchecked: Story;
9
+ export declare const WithLabelAndHelperText: Story;
10
+ export declare const Disabled: Story;
11
+ export declare const Blocked: Story;
@@ -1,5 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
- import { MarginInterface, PaddingInterface, FlexStylingInterface } from '../../types/styling';
2
+ import { MarginInterface, PaddingInterface, FlexStylingInterface } from 'src/types/styling';
3
3
  interface Props extends MarginInterface, PaddingInterface, FlexStylingInterface {
4
4
  /**
5
5
  * Number of columns on viewports < 576px
@@ -1,5 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
- import Grid from './Grid';
2
+ import Grid from 'src/components/Grid';
3
3
  declare const meta: Meta<typeof Grid>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Grid>;
@@ -1,7 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import Icon from './Icon';
2
+ import Icon from 'src/components/Icon';
3
3
  declare const meta: Meta<typeof Icon>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Icon>;
6
+ export declare const Default: Story;
6
7
  export declare const Primary: Story;
7
- export declare const Secondary: Story;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const Iconography: () => JSX.Element;
3
+ export default Iconography;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { SpinnerTypes } from '../../constants';
2
+ import { SpinnerTypes } from 'src/constants';
3
3
  interface Props {
4
4
  color?: SpinnerTypes.BLUE | SpinnerTypes.WHITE;
5
5
  size?: SpinnerTypes.SMALL | SpinnerTypes.MEDIUM | SpinnerTypes.LARGE;
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import SolidSpinner from './SolidSpinner';
2
+ import SolidSpinner from 'src/components/SolidSpinner';
3
3
  declare const meta: Meta<typeof SolidSpinner>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof SolidSpinner>;
@@ -1,7 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import { Heading } from './Typography';
2
+ import { Heading } from 'src/components/Typography/Typography';
3
3
  declare const meta: Meta<typeof Heading>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Heading>;
6
- export declare const Primary: Story;
7
- export declare const Secondary: Story;
6
+ export declare const H1: Story;
7
+ export declare const H2: Story;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Label } from './Typography';
3
+ declare const meta: Meta<typeof Label>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Label>;
6
+ export declare const Default: Story;
@@ -3,4 +3,4 @@ import { Paragraph } from './Typography';
3
3
  declare const meta: Meta<typeof Paragraph>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Paragraph>;
6
- export declare const Primary: Story;
6
+ export declare const Default: Story;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Span } from './Typography';
3
+ declare const meta: Meta<typeof Span>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Span>;
6
+ export declare const Default: Story;
@@ -1,5 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
- import { MarginInterface, PaddingInterface } from '../../types/styling';
2
+ import { MarginInterface, PaddingInterface } from 'src/types/styling';
3
3
  interface BaseProps extends MarginInterface, PaddingInterface {
4
4
  className?: string;
5
5
  textAlign?: string;
@@ -17,16 +17,16 @@ interface BaseProps extends MarginInterface, PaddingInterface {
17
17
  withWordBreak?: boolean;
18
18
  disabled?: boolean;
19
19
  }
20
+ /**
21
+ |--------------------------------------------------
22
+ | @component <Heading />
23
+ |--------------------------------------------------
24
+ */
20
25
  interface HeadingProps extends BaseProps {
21
26
  children: ReactNode;
22
27
  type: string;
23
28
  style?: Record<string, unknown>;
24
29
  }
25
- /**
26
- |--------------------------------------------------
27
- | @component <Heading />
28
- |--------------------------------------------------
29
- */
30
30
  export declare const Heading: FC<HeadingProps>;
31
31
  /**
32
32
  |--------------------------------------------------
@@ -3,7 +3,6 @@ export declare enum IconTypes {
3
3
  ADD_CHART = "iconAddChart",
4
4
  ADD_FILLED = "iconAddFilled",
5
5
  ADD_FOLDER = "iconAddFolder",
6
- ADD_OUTLINED = "iconAddOutlined",
7
6
  ADD_PAGE_BREAK = "iconAddPageBreak",
8
7
  ADD_POST = "iconAddPost",
9
8
  ADD_SECTION_ABOVE = "iconAddSectionAbove",
@@ -120,7 +119,6 @@ export declare enum IconTypes {
120
119
  PAUSE = "iconPause",
121
120
  PAUSE_CIRCLE = "iconPauseCircle",
122
121
  PDF = "iconPdf",
123
- PENCIL = "iconPencil",
124
122
  PHONE = "iconPhone",
125
123
  PHOTO = "iconPhoto",
126
124
  PHOTOS = "iconPhotos",
@@ -134,7 +132,6 @@ export declare enum IconTypes {
134
132
  PRESENT = "iconPresent",
135
133
  PREVIEW = "iconPreview",
136
134
  PREVIEW_OFF = "iconPreviewOff",
137
- PROFILE = "iconProfile",
138
135
  PURCHASE_INBOX = "iconPurchaseInbox",
139
136
  RECURRING = "iconRecurring",
140
137
  RENEW = "iconRenew",
package/lib/index.d.ts CHANGED
@@ -1,257 +1,7 @@
1
- import React, { FC, MouseEvent, ReactNode, ChangeEvent } from 'react';
2
-
3
- declare enum SpinnerTypes {
4
- BLUE = "colorBlue",
5
- LIGHT_BLUE = "colorLightBlue",
6
- WHITE = "colorWhite",
7
- GREY = "colorGrey",
8
- SMALL = "small",
9
- MEDIUM = "medium",
10
- LARGE = "large"
11
- }
12
- declare enum ButtonTypes {
13
- CURRENT_COLOR = "currentColor",
14
- PRIMARY = "colorPrimary",
15
- SECONDARY = "colorSecondary",
16
- TERTIARY = "colorTertiary",
17
- DARK = "colorDark",
18
- WHITE = "colorWhite",
19
- SMALL = "buttonSmall",
20
- MEDIUM = "buttonMedium",
21
- LARGE = "buttonLarge",
22
- EXTRA_LARGE = "buttonExtraLarge"
23
- }
24
-
25
- interface Props$5 {
26
- text?: string;
27
- onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
28
- color?: ButtonTypes.PRIMARY | ButtonTypes.SECONDARY | ButtonTypes.TERTIARY | ButtonTypes.WHITE;
29
- size?: ButtonTypes.SMALL | ButtonTypes.MEDIUM | ButtonTypes.LARGE | ButtonTypes.EXTRA_LARGE;
30
- disabled?: boolean;
31
- className?: string;
32
- style?: Record<string, string>;
33
- withoutTextOnSmall?: boolean;
34
- withSpaceBetween?: boolean;
35
- withSeparatorRight?: boolean;
36
- withSeparatorLeft?: boolean;
37
- withCounterbar?: boolean;
38
- withIconLeft?: boolean;
39
- inverted?: boolean;
40
- truncateText?: boolean;
41
- rotateIcon?: boolean;
42
- icon?: string;
43
- id?: string | number;
44
- loading?: boolean;
45
- autoFocus?: boolean;
46
- counterbarPercent?: number;
47
- children?: ReactNode;
48
- ariaLabel?: string;
49
- tabIndex?: number;
50
- }
51
- declare const Button: FC<Props$5>;
52
-
53
- interface Props$4 {
54
- icon: string | null;
55
- fixedIconColor?: boolean;
56
- rotateIcon?: boolean;
57
- rotateIconByDeg?: number;
58
- color?: string;
59
- size?: string;
60
- disabled?: boolean;
61
- active?: boolean;
62
- className?: string;
63
- }
64
- declare const Icon: FC<Props$4>;
65
-
66
- interface Props$3 {
67
- name: string;
68
- label: string;
69
- onChange: (event: ChangeEvent<HTMLInputElement>) => void;
70
- onChangeFake: (event: MouseEvent<HTMLDivElement>) => void;
71
- className?: string;
72
- ariaLabel?: string;
73
- helperText?: string;
74
- checked: boolean;
75
- blocked?: boolean;
76
- indeterminate?: boolean;
77
- withSeparator?: boolean;
78
- wordWrap?: boolean;
79
- disabled?: boolean;
80
- isFake?: boolean;
81
- }
82
- declare const Checkbox: FC<Props$3>;
83
-
84
- interface Props$2 {
85
- color?: SpinnerTypes.BLUE | SpinnerTypes.WHITE;
86
- size?: SpinnerTypes.SMALL | SpinnerTypes.MEDIUM | SpinnerTypes.LARGE;
87
- disabled?: boolean;
88
- className?: string;
89
- label?: string;
90
- labelClassName?: string;
91
- absoluteCenter?: boolean;
92
- }
93
- declare const SolidSpinner: FC<Props$2>;
94
-
95
- type baseSizes = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8';
96
- type baseSizesExtended = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '025' | '05' | '15' | '25' | 'auto';
97
- interface MarginInterface {
98
- margin?: baseSizes;
99
- marginX?: baseSizes;
100
- marginY?: baseSizes;
101
- marginTop?: baseSizesExtended;
102
- marginBottom?: baseSizesExtended;
103
- marginRight?: baseSizesExtended;
104
- marginLeft?: baseSizesExtended;
105
- }
106
- interface PaddingInterface {
107
- padding?: baseSizes;
108
- paddingX?: baseSizes;
109
- paddingY?: baseSizes;
110
- paddingTop?: baseSizesExtended;
111
- paddingBottom?: baseSizesExtended;
112
- paddingRight?: baseSizesExtended;
113
- paddingLeft?: baseSizesExtended;
114
- }
115
- interface FlexStylingInterface {
116
- alignItems?: 'center' | 'flexStart' | 'flexEnd' | 'spaceAround' | 'spaceBetween';
117
- alignSelf?: 'center' | 'flexStart' | 'flexEnd';
118
- displayFlex?: boolean;
119
- displayFlexCenter?: boolean;
120
- displayFlexCenterSpaceBetween?: boolean;
121
- flexDirection?: 'row' | 'rowReverse' | 'column' | 'columnReverse';
122
- flexGrow?: '0' | '1' | 'auto';
123
- flexWrap?: 'wrap' | 'noWrap' | 'wrapReverse';
124
- justifyContent?: 'center' | 'flexStart' | 'flexEnd' | 'spaceAround' | 'spaceBetween';
125
- }
126
-
127
- interface Props$1 extends MarginInterface, PaddingInterface, FlexStylingInterface {
128
- children: React.ReactNode;
129
- className?: string;
130
- position?: string;
131
- border?: string;
132
- borderTop?: string;
133
- borderBottom?: string;
134
- borderRight?: string;
135
- backgroundColor?: string;
136
- showOnBreakpoint?: string;
137
- borderLeft?: string;
138
- withBorderRadius?: boolean;
139
- width?: string;
140
- minWidth?: string;
141
- /**
142
- * Max width in percentage e.g 50 = 50%
143
- */
144
- maxWidth?: string;
145
- withSeparatorRight?: boolean;
146
- withSeparatorLeft?: boolean;
147
- style?: Record<string, unknown>;
148
- onClickCallback?: () => void;
149
- }
150
- declare const Box: React.ForwardRefExoticComponent<Props$1 & React.RefAttributes<HTMLDivElement>>;
151
-
152
- interface Props extends MarginInterface, PaddingInterface, FlexStylingInterface {
153
- /**
154
- * Number of columns on viewports < 576px
155
- */
156
- xs?: number;
157
- /**
158
- * Number of columns on viewports < 768px
159
- */
160
- sm?: number;
161
- /**
162
- * Number of columns on viewports < 1024px
163
- */
164
- md?: number;
165
- /**
166
- * Number of columns on viewports < 1200px
167
- */
168
- lg?: number;
169
- /**
170
- * Number of columns on viewports < 1646px
171
- */
172
- xl?: number;
173
- /**
174
- * Number of columns on viewports < 2000px
175
- */
176
- xxl?: number;
177
- /**
178
- * Optionally provide the number of columns in the grid.
179
- * @default 12
180
- */
181
- /**
182
- * If the component is a grid container
183
- */
184
- container?: boolean;
185
- /**
186
- * Optionally provide the spacing as a multiple of $half-base-size (4px) for each grid item.
187
- * Takes either a single string for x and y,
188
- * or an array for [y, x],
189
- * or an object for different breakpoints, i.e { xs: '4', md: ['4', '6'], lg: '8' }
190
- * @default '4'
191
- */
192
- spacing?: string | Array<string> | Record<never, string | string[]>;
193
- columns?: number;
194
- className?: string;
195
- children?: ReactNode;
196
- }
197
- declare const Grid: FC<Props>;
198
-
199
- interface BaseProps extends MarginInterface, PaddingInterface {
200
- className?: string;
201
- textAlign?: string;
202
- fontWeight?: string;
203
- fontSize?: string;
204
- fontStyle?: string;
205
- color?: string;
206
- withSeparator?: boolean;
207
- meta?: boolean;
208
- error?: boolean;
209
- withBorderBottom?: boolean;
210
- withEllipsis?: boolean;
211
- withAnimation?: boolean;
212
- withNoWordBreak?: boolean;
213
- withWordBreak?: boolean;
214
- disabled?: boolean;
215
- }
216
- interface HeadingProps extends BaseProps {
217
- children: ReactNode;
218
- type: string;
219
- style?: Record<string, unknown>;
220
- }
221
- /**
222
- |--------------------------------------------------
223
- | @component <Heading />
224
- |--------------------------------------------------
225
- */
226
- declare const Heading: FC<HeadingProps>;
227
- /**
228
- |--------------------------------------------------
229
- | @component <Label />
230
- |--------------------------------------------------
231
- */
232
- interface LabelProps extends BaseProps {
233
- children: ReactNode | string;
234
- htmlFor?: string;
235
- style?: Record<string, unknown>;
236
- }
237
- declare const Label: FC<LabelProps>;
238
- /**
239
- |--------------------------------------------------
240
- | @component <Paragraph />
241
- |--------------------------------------------------
242
- */
243
- interface ParagraphProps extends BaseProps {
244
- children: ReactNode;
245
- }
246
- declare const Paragraph: FC<ParagraphProps>;
247
- /**
248
- |--------------------------------------------------
249
- | @component <Span />
250
- |--------------------------------------------------
251
- */
252
- interface SpanProps extends BaseProps {
253
- children: ReactNode;
254
- }
255
- declare const Span: FC<SpanProps>;
256
-
257
- export { Box, Button, Checkbox, Grid, Heading, Icon, Label, Paragraph, SolidSpinner, Span };
1
+ export { default as Button } from 'src/components/Button/Button';
2
+ export { default as Icon } from 'src/components/Icon/Icon';
3
+ export { default as Checkbox } from 'src/components/Checkbox/Checkbox';
4
+ export { default as SolidSpinner } from 'src/components/SolidSpinner/SolidSpinner';
5
+ export { default as Box } from 'src/components/Box/Box';
6
+ export { default as Grid } from 'src/components/Grid/Grid';
7
+ export { Heading, Label, Paragraph, Span } from 'src/components/Typography/Typography';