@up42/up-components 0.0.21 → 0.1.2

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 (149) hide show
  1. package/README.md +152 -2
  2. package/dist/cjs/index.js +1 -150
  3. package/dist/cjs/types/components/Avatar/Avatar.d.ts +9 -0
  4. package/dist/cjs/types/{global/overrides/avatar.d.ts → components/Avatar/Avatar.overrides.d.ts} +0 -0
  5. package/dist/cjs/types/components/Avatar/Avatar.stories.d.ts +7 -0
  6. package/dist/cjs/types/components/Avatar/Avatar.test.d.ts +1 -0
  7. package/dist/cjs/types/components/Box/Box.d.ts +5 -0
  8. package/dist/cjs/types/components/Box/Box.stories.d.ts +5 -0
  9. package/dist/cjs/types/components/Box/Box.test.d.ts +1 -0
  10. package/dist/cjs/types/components/Button/Button.d.ts +2 -3
  11. package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +5 -0
  12. package/dist/cjs/types/{global/overrides/form/checkbox.d.ts → components/Checkbox/Checkbox.overrides.d.ts} +0 -0
  13. package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +4 -0
  14. package/dist/cjs/types/components/Checkbox/Checkbox.test.d.ts +1 -0
  15. package/dist/cjs/types/components/Chip/Chip.d.ts +5 -0
  16. package/dist/cjs/types/components/Chip/Chip.overrides.d.ts +2 -0
  17. package/dist/cjs/types/components/Chip/Chip.stories.d.ts +5 -0
  18. package/dist/cjs/types/components/Chip/Chip.test.d.ts +1 -0
  19. package/dist/cjs/types/components/Container/Container.d.ts +27 -0
  20. package/dist/cjs/types/components/Container/Container.overrides.d.ts +2 -0
  21. package/dist/cjs/types/components/Container/Container.stories.d.ts +5 -0
  22. package/dist/cjs/types/components/Container/Container.test.d.ts +1 -0
  23. package/dist/cjs/types/components/FormCheckbox/FormCheckbox.d.ts +13 -0
  24. package/dist/cjs/types/components/FormCheckbox/FormCheckbox.stories.d.ts +8 -0
  25. package/dist/cjs/types/components/FormCheckbox/FormCheckbox.test.d.ts +1 -0
  26. package/dist/cjs/types/components/FormInput/FormInput.d.ts +9 -0
  27. package/dist/cjs/types/components/FormInput/FormInput.stories.d.ts +7 -0
  28. package/dist/cjs/types/components/FormInput/FormInput.test.d.ts +1 -0
  29. package/dist/cjs/types/components/FormRadio/FormRadio.d.ts +14 -0
  30. package/dist/cjs/types/components/FormRadio/FormRadio.stories.d.ts +8 -0
  31. package/dist/cjs/types/components/FormRadio/FormRadio.test.d.ts +1 -0
  32. package/dist/cjs/types/components/FormSelect/FormSelect.d.ts +13 -0
  33. package/dist/cjs/types/components/FormSelect/FormSelect.stories.d.ts +7 -0
  34. package/dist/cjs/types/components/FormSelect/FormSelect.test.d.ts +1 -0
  35. package/dist/cjs/types/components/FormSwitch/FormSwitch.d.ts +8 -0
  36. package/dist/cjs/types/components/FormSwitch/FormSwitch.stories.d.ts +6 -0
  37. package/dist/cjs/types/components/FormSwitch/FormSwitch.test.d.ts +1 -0
  38. package/dist/cjs/types/components/Input/Input.d.ts +7 -0
  39. package/dist/{esm/types/global/overrides/form/input.d.ts → cjs/types/components/Input/Input.overrides.d.ts} +1 -0
  40. package/dist/cjs/types/components/Input/Input.stories.d.ts +6 -0
  41. package/dist/cjs/types/components/Input/Input.test.d.ts +1 -0
  42. package/dist/cjs/types/components/Radio/Radio.d.ts +5 -0
  43. package/dist/cjs/types/{global/overrides/form/radio.d.ts → components/Radio/Radio.overrides.d.ts} +0 -0
  44. package/dist/cjs/types/components/Radio/Radio.stories.d.ts +4 -0
  45. package/dist/cjs/types/components/Radio/Radio.test.d.ts +1 -0
  46. package/dist/cjs/types/components/Select/Select.d.ts +5 -0
  47. package/dist/cjs/types/components/Select/Select.overrides.d.ts +2 -0
  48. package/dist/cjs/types/components/Select/Select.stories.d.ts +6 -0
  49. package/dist/cjs/types/components/Select/Select.test.d.ts +1 -0
  50. package/dist/cjs/types/components/Switch/Switch.d.ts +7 -0
  51. package/dist/cjs/types/{global/overrides/form/switch.d.ts → components/Switch/Switch.overrides.d.ts} +0 -0
  52. package/dist/cjs/types/components/Switch/Switch.stories.d.ts +5 -0
  53. package/dist/cjs/types/components/Switch/Switch.test.d.ts +1 -0
  54. package/dist/cjs/types/components/Typography/Typography.d.ts +2 -3
  55. package/dist/cjs/types/components/index.d.ts +16 -4
  56. package/dist/cjs/types/global/UpComponentsProvider/UpComponentsProvider.d.ts +3 -0
  57. package/dist/cjs/types/global/overrides/index.d.ts +0 -6
  58. package/dist/cjs/types/global/theme.d.ts +1 -2
  59. package/dist/cjs/types/global/tokens/colors/colors.components.d.ts +5 -0
  60. package/dist/cjs/types/global/tokens/components/CodeSnippet.d.ts +6 -0
  61. package/dist/cjs/types/global/tokens/components/CopyToClipboard.d.ts +4 -0
  62. package/dist/cjs/types/global/tokens/components/Header.d.ts +5 -0
  63. package/dist/cjs/types/global/tokens/components/Table.d.ts +9 -0
  64. package/dist/cjs/types/global/tokens/spacing/spacing.components.d.ts +5 -0
  65. package/dist/cjs/types/global/tokens/typogrpahy/typography.components.d.ts +4 -0
  66. package/dist/cjs/types/index.d.ts +6 -4
  67. package/dist/esm/index.js +2 -137
  68. package/dist/esm/types/components/Avatar/Avatar.d.ts +9 -0
  69. package/dist/esm/types/{global/overrides/avatar.d.ts → components/Avatar/Avatar.overrides.d.ts} +0 -0
  70. package/dist/esm/types/components/Avatar/Avatar.stories.d.ts +7 -0
  71. package/dist/esm/types/components/Avatar/Avatar.test.d.ts +1 -0
  72. package/dist/esm/types/components/Box/Box.d.ts +5 -0
  73. package/dist/esm/types/components/Box/Box.stories.d.ts +5 -0
  74. package/dist/esm/types/components/Box/Box.test.d.ts +1 -0
  75. package/dist/esm/types/components/Button/Button.d.ts +2 -3
  76. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +5 -0
  77. package/dist/esm/types/{global/overrides/form/checkbox.d.ts → components/Checkbox/Checkbox.overrides.d.ts} +0 -0
  78. package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +4 -0
  79. package/dist/esm/types/components/Checkbox/Checkbox.test.d.ts +1 -0
  80. package/dist/esm/types/components/Chip/Chip.d.ts +5 -0
  81. package/dist/esm/types/components/Chip/Chip.overrides.d.ts +2 -0
  82. package/dist/esm/types/components/Chip/Chip.stories.d.ts +5 -0
  83. package/dist/esm/types/components/Chip/Chip.test.d.ts +1 -0
  84. package/dist/esm/types/components/Container/Container.d.ts +27 -0
  85. package/dist/esm/types/components/Container/Container.overrides.d.ts +2 -0
  86. package/dist/esm/types/components/Container/Container.stories.d.ts +5 -0
  87. package/dist/esm/types/components/Container/Container.test.d.ts +1 -0
  88. package/dist/esm/types/components/FormCheckbox/FormCheckbox.d.ts +13 -0
  89. package/dist/esm/types/components/FormCheckbox/FormCheckbox.stories.d.ts +8 -0
  90. package/dist/esm/types/components/FormCheckbox/FormCheckbox.test.d.ts +1 -0
  91. package/dist/esm/types/components/FormInput/FormInput.d.ts +9 -0
  92. package/dist/esm/types/components/FormInput/FormInput.stories.d.ts +7 -0
  93. package/dist/esm/types/components/FormInput/FormInput.test.d.ts +1 -0
  94. package/dist/esm/types/components/FormRadio/FormRadio.d.ts +14 -0
  95. package/dist/esm/types/components/FormRadio/FormRadio.stories.d.ts +8 -0
  96. package/dist/esm/types/components/FormRadio/FormRadio.test.d.ts +1 -0
  97. package/dist/esm/types/components/FormSelect/FormSelect.d.ts +13 -0
  98. package/dist/esm/types/components/FormSelect/FormSelect.stories.d.ts +7 -0
  99. package/dist/esm/types/components/FormSelect/FormSelect.test.d.ts +1 -0
  100. package/dist/esm/types/components/FormSwitch/FormSwitch.d.ts +8 -0
  101. package/dist/esm/types/components/FormSwitch/FormSwitch.stories.d.ts +6 -0
  102. package/dist/esm/types/components/FormSwitch/FormSwitch.test.d.ts +1 -0
  103. package/dist/esm/types/components/Input/Input.d.ts +7 -0
  104. package/dist/{cjs/types/global/overrides/form/input.d.ts → esm/types/components/Input/Input.overrides.d.ts} +1 -0
  105. package/dist/esm/types/components/Input/Input.stories.d.ts +6 -0
  106. package/dist/esm/types/components/Input/Input.test.d.ts +1 -0
  107. package/dist/esm/types/components/Radio/Radio.d.ts +5 -0
  108. package/dist/esm/types/{global/overrides/form/radio.d.ts → components/Radio/Radio.overrides.d.ts} +0 -0
  109. package/dist/esm/types/components/Radio/Radio.stories.d.ts +4 -0
  110. package/dist/esm/types/components/Radio/Radio.test.d.ts +1 -0
  111. package/dist/esm/types/components/Select/Select.d.ts +5 -0
  112. package/dist/esm/types/components/Select/Select.overrides.d.ts +2 -0
  113. package/dist/esm/types/components/Select/Select.stories.d.ts +6 -0
  114. package/dist/esm/types/components/Select/Select.test.d.ts +1 -0
  115. package/dist/esm/types/components/Switch/Switch.d.ts +7 -0
  116. package/dist/esm/types/{global/overrides/form/switch.d.ts → components/Switch/Switch.overrides.d.ts} +0 -0
  117. package/dist/esm/types/components/Switch/Switch.stories.d.ts +5 -0
  118. package/dist/esm/types/components/Switch/Switch.test.d.ts +1 -0
  119. package/dist/esm/types/components/Typography/Typography.d.ts +2 -3
  120. package/dist/esm/types/components/index.d.ts +16 -4
  121. package/dist/esm/types/global/UpComponentsProvider/UpComponentsProvider.d.ts +3 -0
  122. package/dist/esm/types/global/overrides/index.d.ts +0 -6
  123. package/dist/esm/types/global/theme.d.ts +1 -2
  124. package/dist/esm/types/global/tokens/colors/colors.components.d.ts +5 -0
  125. package/dist/esm/types/global/tokens/components/CodeSnippet.d.ts +6 -0
  126. package/dist/esm/types/global/tokens/components/CopyToClipboard.d.ts +4 -0
  127. package/dist/esm/types/global/tokens/components/Header.d.ts +5 -0
  128. package/dist/esm/types/global/tokens/components/Table.d.ts +9 -0
  129. package/dist/esm/types/global/tokens/spacing/spacing.components.d.ts +5 -0
  130. package/dist/esm/types/global/tokens/typogrpahy/typography.components.d.ts +4 -0
  131. package/dist/esm/types/index.d.ts +6 -4
  132. package/dist/index.d.ts +114 -27
  133. package/package.json +21 -2
  134. package/dist/cjs/index.js.map +0 -1
  135. package/dist/cjs/types/global/UpComponentsProvider/index.d.ts +0 -4
  136. package/dist/cjs/types/global/overrides/container.d.ts +0 -2
  137. package/dist/cjs/types/tokens/colors.stories.d.ts +0 -5
  138. package/dist/cjs/types/tokens/elevation.stories.d.ts +0 -5
  139. package/dist/cjs/types/tokens/grid.stories.d.ts +0 -5
  140. package/dist/cjs/types/tokens/spacing.stories.d.ts +0 -5
  141. package/dist/cjs/types/tokens/typography.stories.d.ts +0 -5
  142. package/dist/esm/index.js.map +0 -1
  143. package/dist/esm/types/global/UpComponentsProvider/index.d.ts +0 -4
  144. package/dist/esm/types/global/overrides/container.d.ts +0 -2
  145. package/dist/esm/types/tokens/colors.stories.d.ts +0 -5
  146. package/dist/esm/types/tokens/elevation.stories.d.ts +0 -5
  147. package/dist/esm/types/tokens/grid.stories.d.ts +0 -5
  148. package/dist/esm/types/tokens/spacing.stories.d.ts +0 -5
  149. package/dist/esm/types/tokens/typography.stories.d.ts +0 -5
@@ -0,0 +1,5 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const Default: Story<Omit<Omit<import("@mui/material").ChipProps<"div", {}>, "size">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
5
+ export declare const ColorVariants: Story;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { ContainerProps as MUIContainerProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type ContainerProps = MUIGlobalOmit<Omit<MUIContainerProps, 'maxWidth'>, {
5
+ /**
6
+ * Determine the max-width of the container.
7
+ */
8
+ size?: 'small' | 'medium' | 'large' | 'fluid';
9
+ /**
10
+ * The component used for the root node.
11
+ * Either a string to use a HTML element or a component.
12
+ */
13
+ component?: React.ElementType;
14
+ }>;
15
+ /**
16
+ * In order to maximize the available horizontal space of the UI we use a central column system layout.
17
+ *
18
+ * The header of a page is always `fluid`. The content section will use one of the following layouts:
19
+ *
20
+ * - `small`: 6 columns.
21
+ * - `medium`: 8 columns.
22
+ * - `large`: 12 columns.
23
+ * - `fluid`: full width (maps).
24
+ *
25
+ * To now more about the requirements please check here: https://up42.atlassian.net/browse/B2B-215.
26
+ */
27
+ export declare const Container: ({ component, size, children, ...props }: ContainerProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
+ export declare const MuiContainer: OverridesStyleRules;
@@ -0,0 +1,5 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ import { ContainerProps } from './Container';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<ContainerProps>;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { MUIGlobalOmit } from '../../global/utils/types';
3
+ import { CheckboxProps } from '../Checkbox/Checkbox';
4
+ export declare type FormCheckboxProps = MUIGlobalOmit<CheckboxProps, {
5
+ data: {
6
+ value: string | number;
7
+ label?: string;
8
+ }[];
9
+ label?: string;
10
+ error?: boolean;
11
+ helperText?: string;
12
+ }>;
13
+ export declare const FormCheckbox: ({ id, required, data, label, error, helperText }: FormCheckboxProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { FormCheckboxProps } from './FormCheckbox';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ export declare const Primary: Story<React.PropsWithChildren<FormCheckboxProps>>;
7
+ export declare const Required: Story<React.PropsWithChildren<FormCheckboxProps>>;
8
+ export declare const withError: Story<React.PropsWithChildren<FormCheckboxProps>>;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { InputProps } from '../Input/Input';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type FormInputProps = MUIGlobalOmit<InputProps, {
5
+ label?: string;
6
+ error?: boolean;
7
+ helperText?: string;
8
+ }>;
9
+ export declare const FormInput: ({ id, required, label, error, helperText, ...props }: FormInputProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { FormInputProps } from './FormInput';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<FormInputProps>;
6
+ export declare const Required: Story<FormInputProps>;
7
+ export declare const withError: Story<FormInputProps>;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { RadioGroupProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type FormRadioProps = MUIGlobalOmit<RadioGroupProps, {
5
+ data: {
6
+ value: string | number;
7
+ label?: string;
8
+ }[];
9
+ helperText?: string;
10
+ label?: string;
11
+ error?: boolean;
12
+ required?: boolean;
13
+ }>;
14
+ export declare const FormRadio: ({ id, helperText, label, error, required, name, data }: FormRadioProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { FormRadioProps } from './FormRadio';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ export declare const Primary: Story<React.PropsWithChildren<FormRadioProps>>;
7
+ export declare const Required: Story<React.PropsWithChildren<FormRadioProps>>;
8
+ export declare const withError: Story<React.PropsWithChildren<FormRadioProps>>;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { MUIGlobalOmit } from '../../global/utils/types';
3
+ import { SelectProps } from '../Select/Select';
4
+ export declare type FormSelectProps = MUIGlobalOmit<SelectProps, {
5
+ options: {
6
+ value: string | number;
7
+ text: string;
8
+ }[];
9
+ label?: string;
10
+ error?: boolean;
11
+ helperText?: string;
12
+ }>;
13
+ export declare const FormSelect: ({ id, required, options, label, error, placeholder, helperText, }: FormSelectProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { FormSelectProps } from './FormSelect';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<FormSelectProps>;
6
+ export declare const Required: Story<FormSelectProps>;
7
+ export declare const withError: Story<FormSelectProps>;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { SwitchProps } from '../Switch/Switch';
3
+ export interface FormSwitchProps extends SwitchProps {
4
+ label?: string;
5
+ id?: string;
6
+ checked?: boolean;
7
+ }
8
+ export declare const FormSwitch: ({ id, label, checked }: FormSwitchProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { FormSwitchProps } from './FormSwitch';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ export declare const Primary: Story<React.PropsWithChildren<FormSwitchProps>>;
@@ -0,0 +1,7 @@
1
+ import { HTMLInputTypeAttribute } from 'react';
2
+ import { TextFieldProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type InputProps = MUIGlobalOmit<TextFieldProps> & {
5
+ type?: HTMLInputTypeAttribute;
6
+ };
7
+ export declare const Input: ({ type, ...otherProps }: InputProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
+ export declare const MuiTextField: OverridesStyleRules;
2
3
  export declare const MuiInput: OverridesStyleRules;
@@ -0,0 +1,6 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ import { InputProps } from './Input';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Default: Story<InputProps>;
6
+ export declare const Password: Story<InputProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { RadioProps as MUIRadioProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type RadioProps = MUIGlobalOmit<MUIRadioProps>;
5
+ export declare const Radio: (props: RadioProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const Default: Story<Omit<import("@mui/material").RadioProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { SelectProps as MUISelectProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type SelectProps = MUIGlobalOmit<Omit<MUISelectProps, 'variant' | 'label'>>;
5
+ export declare const Select: (props: SelectProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
+ export declare const MuiSelect: OverridesStyleRules;
@@ -0,0 +1,6 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const Default: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
5
+ export declare const Disabled: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
6
+ export declare const Error: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { SwitchProps as MUISwitchProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type SwitchProps = MUIGlobalOmit<MUISwitchProps, {
5
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
6
+ }>;
7
+ export declare const Switch: (props: SwitchProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ import { SwitchProps } from './Switch';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Default: Story<SwitchProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
2
  import { TypographyProps as MUITypographyProps } from '@mui/material/Typography';
3
- import { MUIGlobalOmit } from 'global/utils/types';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
4
  export declare type TypographyProps = MUIGlobalOmit<MUITypographyProps, {
5
5
  component?: React.ElementType;
6
6
  }>;
7
- declare const Typography: React.FC<TypographyProps>;
8
- export default Typography;
7
+ export declare const Typography: ({ children, ...props }: TypographyProps) => JSX.Element;
@@ -1,4 +1,16 @@
1
- export { default as Button } from './Button/Button';
2
- export * from './Button/Button.overrides';
3
- export { default as Typography } from './Typography/Typography';
4
- export * from './Typography/Typography.overrides';
1
+ export { Button } from './Button/Button';
2
+ export { Typography } from './Typography/Typography';
3
+ export { Chip } from './Chip/Chip';
4
+ export { Avatar } from './Avatar/Avatar';
5
+ export { Container } from './Container/Container';
6
+ export { Box } from './Box/Box';
7
+ export { Checkbox } from './Checkbox/Checkbox';
8
+ export { FormCheckbox } from './FormCheckbox/FormCheckbox';
9
+ export { Radio } from './Radio/Radio';
10
+ export { FormRadio } from './FormRadio/FormRadio';
11
+ export { Switch } from './Switch/Switch';
12
+ export { FormSwitch } from './FormSwitch/FormSwitch';
13
+ export { Select } from './Select/Select';
14
+ export { FormSelect } from './FormSelect/FormSelect';
15
+ export { Input } from './Input/Input';
16
+ export { FormInput } from './FormInput/FormInput';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
3
+ export declare const UpComponentsProvider: (props: Omit<ThemeProviderProps, 'theme'>) => JSX.Element;
@@ -1,11 +1,5 @@
1
- export * from './avatar';
2
- export * from './container';
3
1
  export * from './menuItem';
4
2
  export * from './tab';
5
3
  export * from './tablePagination';
6
4
  export * from './tabs';
7
- export * from './form/checkbox';
8
- export * from './form/input';
9
5
  export * from './form/label';
10
- export * from './form/radio';
11
- export * from './form/switch';
@@ -1,2 +1 @@
1
- declare const theme: import("@mui/material").Theme;
2
- export default theme;
1
+ export declare const theme: import("@mui/material").Theme;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { Box } from '../../..';
3
+ export { Box };
4
+ export declare const SemanticColors: () => JSX.Element;
5
+ export declare const Palette: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const CodeSnippet: ({ dark, language, code, }: {
3
+ dark?: boolean | undefined;
4
+ language?: string | undefined;
5
+ code: string;
6
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const CopyToClipboard: ({ label }: {
3
+ label: string;
4
+ }) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const Header: ({ title, subtitle }: {
3
+ title: string;
4
+ subtitle: string;
5
+ }) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare const Table: {
3
+ Wrapper: ({ rows, columns }: {
4
+ rows: React.ReactNode;
5
+ columns: string[];
6
+ }) => JSX.Element;
7
+ Cell: import("@emotion/styled").StyledComponent<import("@mui/material/TableCell/TableCell").TableCellProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
8
+ Row: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material/TableRow/TableRow").TableRowTypeMap<{}, "tr">>;
9
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { Box } from '../../..';
3
+ export { Box };
4
+ export declare const SemanticSpacing: () => JSX.Element;
5
+ export declare const SpacingTokens: () => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const SemanticTypography: () => JSX.Element;
3
+ export declare const FontSizes: () => JSX.Element;
4
+ export declare const FontTokens: () => JSX.Element;
@@ -1,4 +1,6 @@
1
- import UpComponentsProvider from './global/UpComponentsProvider';
2
- export { default as theme } from './global/theme';
3
- export * from './components';
4
- export default UpComponentsProvider;
1
+ import tokens from '@up42/design-system-tokens/dist/json/tokens.json';
2
+ export * from '@mui/material';
3
+ export { tokens };
4
+ export { UpComponentsProvider } from './global/UpComponentsProvider/UpComponentsProvider';
5
+ export { theme } from './global/theme';
6
+ export { Button, Typography, Chip, Avatar, Container, Box, Switch, FormSwitch, Checkbox, FormCheckbox, Radio, FormRadio, Select, FormSelect, Input, FormInput, } from './components';
package/dist/index.d.ts CHANGED
@@ -1,45 +1,132 @@
1
1
  /// <reference types="react" />
2
- import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
2
+ export { default as tokens } from '@up42/design-system-tokens/dist/json/tokens.json';
3
3
  import * as _mui_material from '@mui/material';
4
+ import { ChipProps as ChipProps$1, AvatarProps as AvatarProps$1, ContainerProps as ContainerProps$1, BoxProps as BoxProps$1, CheckboxProps as CheckboxProps$1, RadioProps as RadioProps$1, RadioGroupProps, SwitchProps as SwitchProps$1, SelectProps as SelectProps$1, TextFieldProps } from '@mui/material';
5
+ export * from '@mui/material';
6
+ import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
4
7
  import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
5
- import { MUIGlobalOmit } from 'global/utils/types';
6
- import { OverridesStyleRules } from '@mui/material/styles/overrides';
7
- import React from 'react';
8
+ import React, { HTMLInputTypeAttribute } from 'react';
8
9
  import { TypographyProps as TypographyProps$1 } from '@mui/material/Typography';
9
10
 
10
- declare const UpComponentsProvider: (props: ThemeProviderProps) => JSX.Element;
11
+ declare const UpComponentsProvider: (props: Omit<ThemeProviderProps, 'theme'>) => JSX.Element;
11
12
 
12
13
  declare const theme: _mui_material.Theme;
13
14
 
15
+ declare type MUIGlobalOmit<MuiProps, ComponentProps = unknown> = ComponentProps & Omit<MuiProps, 'classes' | 'disableElevation' | 'disableFocusRipple' | 'disableRipple' | 'focusRipple' | 'tabIndex' | 'action' | 'centerRipple' | 'disableTouchRipple' | 'focusVisibleClassName' | 'LinkComponent' | 'TouchRippleProps'>;
16
+
14
17
  declare type ButtonProps = MUIGlobalOmit<ButtonProps$1, {
15
18
  loading?: boolean;
16
19
  }>;
17
20
  declare const Button: ({ color, variant, size, loading, children, ...props }: ButtonProps) => JSX.Element;
18
21
 
19
- declare const MuiButton: OverridesStyleRules;
20
- declare const MuiButtonBase: {
21
- defaultProps: {
22
- disableRipple: boolean;
23
- disableTouchRipple: boolean;
24
- };
25
- };
26
- declare const MuiIconButton: {
27
- styleOverrides: {
28
- root: {
29
- color: string;
30
- backgroundColor: string;
31
- };
32
- sizeSmall: {
33
- padding: string;
34
- };
35
- };
36
- };
37
-
38
22
  declare type TypographyProps = MUIGlobalOmit<TypographyProps$1, {
39
23
  component?: React.ElementType;
40
24
  }>;
41
- declare const Typography: React.FC<TypographyProps>;
25
+ declare const Typography: ({ children, ...props }: TypographyProps) => JSX.Element;
26
+
27
+ declare type ChipProps = MUIGlobalOmit<Omit<ChipProps$1, 'size'>>;
28
+ declare const Chip: ({ label, ...props }: ChipProps) => JSX.Element;
29
+
30
+ declare type AvatarProps = MUIGlobalOmit<Omit<AvatarProps$1, 'children' | 'alt' | 'imgProps' | 'sizes' | 'src' | 'srcSet' | 'variant'>, {
31
+ firstName?: string;
32
+ lastName?: string;
33
+ icon?: React.ReactNode;
34
+ }>;
35
+ declare const Avatar: ({ icon, firstName, lastName, ...props }: AvatarProps) => JSX.Element;
36
+
37
+ declare type ContainerProps = MUIGlobalOmit<Omit<ContainerProps$1, 'maxWidth'>, {
38
+ /**
39
+ * Determine the max-width of the container.
40
+ */
41
+ size?: 'small' | 'medium' | 'large' | 'fluid';
42
+ /**
43
+ * The component used for the root node.
44
+ * Either a string to use a HTML element or a component.
45
+ */
46
+ component?: React.ElementType;
47
+ }>;
48
+ /**
49
+ * In order to maximize the available horizontal space of the UI we use a central column system layout.
50
+ *
51
+ * The header of a page is always `fluid`. The content section will use one of the following layouts:
52
+ *
53
+ * - `small`: 6 columns.
54
+ * - `medium`: 8 columns.
55
+ * - `large`: 12 columns.
56
+ * - `fluid`: full width (maps).
57
+ *
58
+ * To now more about the requirements please check here: https://up42.atlassian.net/browse/B2B-215.
59
+ */
60
+ declare const Container: ({ component, size, children, ...props }: ContainerProps) => JSX.Element;
61
+
62
+ declare type BoxProps = MUIGlobalOmit<BoxProps$1>;
63
+ declare const Box: ({ children, ...props }: BoxProps) => JSX.Element;
64
+
65
+ declare type CheckboxProps = MUIGlobalOmit<CheckboxProps$1>;
66
+ declare const Checkbox: ({ ...props }: CheckboxProps) => JSX.Element;
67
+
68
+ declare type FormCheckboxProps = MUIGlobalOmit<CheckboxProps, {
69
+ data: {
70
+ value: string | number;
71
+ label?: string;
72
+ }[];
73
+ label?: string;
74
+ error?: boolean;
75
+ helperText?: string;
76
+ }>;
77
+ declare const FormCheckbox: ({ id, required, data, label, error, helperText }: FormCheckboxProps) => JSX.Element;
78
+
79
+ declare type RadioProps = MUIGlobalOmit<RadioProps$1>;
80
+ declare const Radio: (props: RadioProps) => JSX.Element;
81
+
82
+ declare type FormRadioProps = MUIGlobalOmit<RadioGroupProps, {
83
+ data: {
84
+ value: string | number;
85
+ label?: string;
86
+ }[];
87
+ helperText?: string;
88
+ label?: string;
89
+ error?: boolean;
90
+ required?: boolean;
91
+ }>;
92
+ declare const FormRadio: ({ id, helperText, label, error, required, name, data }: FormRadioProps) => JSX.Element;
93
+
94
+ declare type SwitchProps = MUIGlobalOmit<SwitchProps$1, {
95
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
96
+ }>;
97
+ declare const Switch: (props: SwitchProps) => JSX.Element;
42
98
 
43
- declare const typographyOverrides: OverridesStyleRules;
99
+ interface FormSwitchProps extends SwitchProps {
100
+ label?: string;
101
+ id?: string;
102
+ checked?: boolean;
103
+ }
104
+ declare const FormSwitch: ({ id, label, checked }: FormSwitchProps) => JSX.Element;
105
+
106
+ declare type SelectProps = MUIGlobalOmit<Omit<SelectProps$1, 'variant' | 'label'>>;
107
+ declare const Select: (props: SelectProps) => JSX.Element;
108
+
109
+ declare type FormSelectProps = MUIGlobalOmit<SelectProps, {
110
+ options: {
111
+ value: string | number;
112
+ text: string;
113
+ }[];
114
+ label?: string;
115
+ error?: boolean;
116
+ helperText?: string;
117
+ }>;
118
+ declare const FormSelect: ({ id, required, options, label, error, placeholder, helperText, }: FormSelectProps) => JSX.Element;
119
+
120
+ declare type InputProps = MUIGlobalOmit<TextFieldProps> & {
121
+ type?: HTMLInputTypeAttribute;
122
+ };
123
+ declare const Input: ({ type, ...otherProps }: InputProps) => JSX.Element;
124
+
125
+ declare type FormInputProps = MUIGlobalOmit<InputProps, {
126
+ label?: string;
127
+ error?: boolean;
128
+ helperText?: string;
129
+ }>;
130
+ declare const FormInput: ({ id, required, label, error, helperText, ...props }: FormInputProps) => JSX.Element;
44
131
 
45
- export { Button, MuiButton, MuiButtonBase, MuiIconButton, Typography, UpComponentsProvider as default, theme, typographyOverrides };
132
+ export { Avatar, Box, Button, Checkbox, Chip, Container, FormCheckbox, FormInput, FormRadio, FormSelect, FormSwitch, Input, Radio, Select, Switch, Typography, UpComponentsProvider, theme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@up42/up-components",
3
- "version": "0.0.21",
3
+ "version": "0.1.2",
4
4
  "description": "UP42 Component Library",
5
5
  "author": "Axel Fuhrmann axel.fuhrmann@up42.com",
6
6
  "license": "ISC",
@@ -19,6 +19,7 @@
19
19
  "storybook": "start-storybook -p 6006",
20
20
  "storybook:build": "build-storybook",
21
21
  "lint": "eslint src/. --fix",
22
+ "release": "standard-version",
22
23
  "prepare": "husky install"
23
24
  },
24
25
  "devDependencies": {
@@ -26,6 +27,8 @@
26
27
  "@babel/preset-env": "^7.16.10",
27
28
  "@babel/preset-react": "^7.16.7",
28
29
  "@babel/preset-typescript": "^7.16.7",
30
+ "@commitlint/cli": "^16.2.1",
31
+ "@commitlint/config-conventional": "^16.2.1",
29
32
  "@emotion/jest": "^11.7.1",
30
33
  "@emotion/react": "^11.7.1",
31
34
  "@emotion/styled": "^11.6.0",
@@ -47,7 +50,7 @@
47
50
  "@types/react": "^17.0.38",
48
51
  "@typescript-eslint/eslint-plugin": "^5.10.0",
49
52
  "@typescript-eslint/parser": "^5.10.0",
50
- "@up42/constellation-tokens": "^0.3.2",
53
+ "@up42/design-system-tokens": "^1.0.1",
51
54
  "babel-jest": "^27.4.6",
52
55
  "babel-loader": "^8.2.3",
53
56
  "eslint": "^8.7.0",
@@ -68,12 +71,28 @@
68
71
  "rollup-plugin-dts": "^4.1.0",
69
72
  "rollup-plugin-peer-deps-external": "^2.2.4",
70
73
  "rollup-plugin-terser": "^7.0.2",
74
+ "standard-version": "^9.3.2",
71
75
  "typescript": "^4.5.4"
72
76
  },
73
77
  "peerDependencies": {
78
+ "@emotion/react": "^11.7.1",
79
+ "@emotion/styled": "^11.6.0",
80
+ "@mui/material": "^5.3.0",
81
+ "@mui/icons-material": "^5.3.0",
82
+ "@up42/design-system-tokens": "^1.0.1",
74
83
  "react": "^17.0.2"
75
84
  },
76
85
  "lint-staged": {
77
86
  "*.{js,tsx,ts}": "eslint --cache --fix"
87
+ },
88
+ "homepage": "https://github.com/up42/up-components#readme",
89
+ "access": "private",
90
+ "engines": {
91
+ "node": ">= 16"
92
+ },
93
+ "standard-version": {
94
+ "skip": {
95
+ "tag": true
96
+ }
78
97
  }
79
98
  }