@marigold/components 0.2.0 → 0.3.3

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 (201) hide show
  1. package/CHANGELOG.md +180 -0
  2. package/dist/ActionGroup/ActionGroup.d.ts +1 -2
  3. package/dist/ActionGroup/ActionGroup.stories.d.ts +5 -0
  4. package/dist/Alert/Alert.d.ts +7 -1
  5. package/dist/Alert/Alert.stories.d.ts +5 -0
  6. package/dist/Badge/Badge.d.ts +5 -0
  7. package/dist/Badge/Badge.stories.d.ts +5 -0
  8. package/dist/Box.d.ts +2 -0
  9. package/dist/Button/Button.d.ts +5 -0
  10. package/dist/Button/Button.stories.d.ts +5 -0
  11. package/dist/Card/Card.d.ts +5 -0
  12. package/dist/Card/Card.stories.d.ts +5 -0
  13. package/dist/Checkbox/Checkbox.d.ts +10 -5
  14. package/dist/Checkbox/Checkbox.stories.d.ts +5 -0
  15. package/dist/Checkbox/CheckboxIcons.d.ts +9 -9
  16. package/dist/Column/Column.stories.d.ts +5 -0
  17. package/dist/Columns/Columns.d.ts +2 -2
  18. package/dist/Columns/Columns.stories.d.ts +5 -0
  19. package/dist/Container/Container.stories.d.ts +5 -0
  20. package/dist/Dialog/Dialog.d.ts +5 -2
  21. package/dist/Dialog/Dialog.stories.d.ts +5 -0
  22. package/dist/Dialog/ModalDialog.d.ts +4 -1
  23. package/dist/Divider/Divider.d.ts +7 -3
  24. package/dist/Divider/Divider.stories.d.ts +5 -0
  25. package/dist/Field/Field.d.ts +2 -0
  26. package/dist/Field/Field.stories.d.ts +5 -0
  27. package/dist/Image/Image.d.ts +5 -0
  28. package/dist/Image/Image.stories.d.ts +5 -0
  29. package/dist/Inline/Inline.d.ts +7 -0
  30. package/dist/Inline/Inline.stories.d.ts +5 -0
  31. package/dist/Inline/index.d.ts +1 -0
  32. package/dist/Input/Input.d.ts +5 -0
  33. package/dist/Input/Input.stories.d.ts +5 -0
  34. package/dist/Label/Label.d.ts +12 -1
  35. package/dist/Label/Label.stories.d.ts +5 -0
  36. package/dist/Link/Link.d.ts +3 -0
  37. package/dist/Link/Link.stories.d.ts +5 -0
  38. package/dist/Menu/Menu.d.ts +3 -0
  39. package/dist/Menu/Menu.stories.d.ts +5 -0
  40. package/dist/MenuItem/MenuItem.d.ts +5 -0
  41. package/dist/MenuItem/MenuItem.stories.d.ts +5 -0
  42. package/dist/Message/Message.d.ts +5 -0
  43. package/dist/Message/Message.stories.d.ts +5 -0
  44. package/dist/Provider/MarigoldProvider.d.ts +11 -3
  45. package/dist/Provider/index.d.ts +1 -1
  46. package/dist/Radio/Radio.d.ts +9 -5
  47. package/dist/Radio/Radio.stories.d.ts +5 -0
  48. package/dist/Radio/RadioIcon.d.ts +9 -0
  49. package/dist/Select/ListBox.d.ts +1 -0
  50. package/dist/Select/ListBoxSection.d.ts +1 -0
  51. package/dist/Select/Option.d.ts +1 -0
  52. package/dist/Select/Select.d.ts +15 -1
  53. package/dist/Select/Select.stories.d.ts +5 -0
  54. package/dist/Slider/Slider.d.ts +5 -0
  55. package/dist/Slider/Slider.stories.d.ts +5 -0
  56. package/dist/Stack/Stack.stories.d.ts +5 -0
  57. package/dist/Text/Text.d.ts +5 -0
  58. package/dist/Text/Text.stories.d.ts +5 -0
  59. package/dist/Textarea/Textarea.d.ts +5 -0
  60. package/dist/Textarea/Textarea.stories.d.ts +5 -0
  61. package/dist/ValidationMessage/ValidationMessage.d.ts +5 -0
  62. package/dist/ValidationMessage/ValidationMessage.stories.d.ts +5 -0
  63. package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -0
  64. package/dist/VisuallyHidden/VisuallyHidden.stories.d.ts +5 -0
  65. package/dist/VisuallyHidden/index.d.ts +1 -0
  66. package/dist/components.cjs.development.js +536 -580
  67. package/dist/components.cjs.development.js.map +1 -1
  68. package/dist/components.cjs.production.min.js +1 -1
  69. package/dist/components.cjs.production.min.js.map +1 -1
  70. package/dist/components.esm.js +481 -535
  71. package/dist/components.esm.js.map +1 -1
  72. package/dist/index.d.ts +2 -2
  73. package/dist/theme.d.ts +23 -48
  74. package/package.json +8 -4
  75. package/src/ActionGroup/ActionGroup.stories.tsx +47 -0
  76. package/src/ActionGroup/ActionGroup.test.tsx +36 -36
  77. package/src/ActionGroup/ActionGroup.tsx +17 -28
  78. package/src/Alert/Alert.stories.tsx +32 -0
  79. package/src/Alert/Alert.test.tsx +4 -1
  80. package/src/Alert/Alert.tsx +18 -3
  81. package/src/Badge/Badge.stories.tsx +38 -0
  82. package/src/Badge/Badge.test.tsx +5 -1
  83. package/src/Badge/Badge.tsx +13 -1
  84. package/src/Box.ts +2 -0
  85. package/src/Button/{Button.stories.mdx → Button.stories.tsx} +10 -17
  86. package/src/Button/Button.test.tsx +34 -11
  87. package/src/Button/Button.tsx +17 -3
  88. package/src/Card/{Card.stories.mdx → Card.stories.tsx} +9 -17
  89. package/src/Card/Card.test.tsx +8 -3
  90. package/src/Card/Card.tsx +13 -1
  91. package/src/Checkbox/{Checkbox.stories.mdx → Checkbox.stories.tsx} +31 -39
  92. package/src/Checkbox/Checkbox.test.tsx +77 -8
  93. package/src/Checkbox/Checkbox.tsx +70 -90
  94. package/src/Checkbox/CheckboxIcons.tsx +51 -41
  95. package/src/Column/Column.stories.tsx +33 -0
  96. package/src/Column/Column.tsx +0 -0
  97. package/src/Columns/Columns.stories.tsx +75 -0
  98. package/src/Columns/Columns.test.tsx +34 -23
  99. package/src/Columns/Columns.tsx +30 -30
  100. package/src/Container/Container.stories.tsx +14 -0
  101. package/src/Container/Container.tsx +0 -0
  102. package/src/Dialog/{Dialog.stories.mdx → Dialog.stories.tsx} +33 -18
  103. package/src/Dialog/Dialog.test.tsx +91 -20
  104. package/src/Dialog/Dialog.tsx +63 -17
  105. package/src/Dialog/ModalDialog.tsx +33 -4
  106. package/src/Divider/Divider.stories.tsx +30 -0
  107. package/src/Divider/Divider.test.tsx +32 -23
  108. package/src/Divider/Divider.tsx +27 -7
  109. package/src/Field/{Field.stories.mdx → Field.stories.tsx} +33 -20
  110. package/src/Field/Field.test.tsx +55 -5
  111. package/src/Field/Field.tsx +10 -8
  112. package/src/Image/Image.stories.tsx +34 -0
  113. package/src/Image/Image.test.tsx +4 -1
  114. package/src/Image/Image.tsx +13 -1
  115. package/src/Inline/Inline.stories.tsx +39 -0
  116. package/src/Inline/Inline.test.tsx +99 -0
  117. package/src/Inline/Inline.tsx +38 -0
  118. package/src/Inline/index.ts +1 -0
  119. package/src/Input/{Input.stories.mdx → Input.stories.tsx} +10 -17
  120. package/src/Input/Input.test.tsx +7 -3
  121. package/src/Input/Input.tsx +13 -1
  122. package/src/Label/{Label.stories.mdx → Label.stories.tsx} +10 -21
  123. package/src/Label/Label.test.tsx +25 -4
  124. package/src/Label/Label.tsx +42 -9
  125. package/src/Link/Link.stories.tsx +35 -0
  126. package/src/Link/Link.test.tsx +6 -2
  127. package/src/Link/Link.tsx +12 -1
  128. package/src/Menu/{Menu.stories.mdx → Menu.stories.tsx} +13 -32
  129. package/src/Menu/Menu.test.tsx +7 -2
  130. package/src/Menu/Menu.tsx +10 -0
  131. package/src/MenuItem/MenuItem.stories.tsx +30 -0
  132. package/src/MenuItem/MenuItem.test.tsx +7 -2
  133. package/src/MenuItem/MenuItem.tsx +12 -0
  134. package/src/Message/Message.stories.tsx +30 -0
  135. package/src/Message/Message.test.tsx +4 -1
  136. package/src/Message/Message.tsx +17 -5
  137. package/src/Provider/MarigoldProvider.test.tsx +65 -55
  138. package/src/Provider/MarigoldProvider.tsx +37 -19
  139. package/src/Provider/index.ts +2 -1
  140. package/src/Radio/{Radio.stories.mdx → Radio.stories.tsx} +31 -39
  141. package/src/Radio/Radio.test.tsx +78 -9
  142. package/src/Radio/Radio.tsx +58 -87
  143. package/src/Radio/RadioIcon.tsx +49 -0
  144. package/src/Select/ListBox.tsx +1 -0
  145. package/src/Select/{Select.stories.mdx → Select.stories.tsx} +23 -20
  146. package/src/Select/Select.test.tsx +39 -1
  147. package/src/Select/Select.tsx +24 -13
  148. package/src/Slider/Slider.stories.tsx +24 -0
  149. package/src/Slider/Slider.test.tsx +10 -6
  150. package/src/Slider/Slider.tsx +25 -13
  151. package/src/Stack/Stack.stories.tsx +57 -0
  152. package/src/Stack/Stack.test.tsx +16 -7
  153. package/src/Stack/Stack.tsx +0 -0
  154. package/src/Text/{Text.stories.mdx → Text.stories.tsx} +20 -19
  155. package/src/Text/Text.test.tsx +2 -2
  156. package/src/Text/Text.tsx +12 -0
  157. package/src/Textarea/{Textarea.stories.mdx → Textarea.stories.tsx} +14 -24
  158. package/src/Textarea/Textarea.test.tsx +7 -3
  159. package/src/Textarea/Textarea.tsx +13 -1
  160. package/src/ValidationMessage/{ValidationMessage.stories.mdx → ValidationMessage.stories.tsx} +8 -17
  161. package/src/ValidationMessage/ValidationMessage.test.tsx +7 -2
  162. package/src/ValidationMessage/ValidationMessage.tsx +12 -0
  163. package/src/VisuallyHidden/VisuallyHidden.stories.tsx +19 -0
  164. package/src/VisuallyHidden/VisuallyHidden.test.tsx +10 -0
  165. package/src/VisuallyHidden/VisuallyHidden.tsx +1 -0
  166. package/src/VisuallyHidden/index.ts +1 -0
  167. package/src/index.ts +2 -2
  168. package/src/theme.ts +49 -48
  169. package/dist/Box/Box.d.ts +0 -47
  170. package/dist/Box/index.d.ts +0 -1
  171. package/dist/Heading/Heading.d.ts +0 -7
  172. package/dist/Heading/index.d.ts +0 -1
  173. package/dist/Hidden/Hidden.d.ts +0 -5
  174. package/dist/Hidden/index.d.ts +0 -1
  175. package/dist/Radio/RadioIcons.d.ts +0 -9
  176. package/src/ActionGroup/ActionGroup.stories.mdx +0 -62
  177. package/src/Alert/Alert.stories.mdx +0 -35
  178. package/src/Badge/Badge.stories.mdx +0 -57
  179. package/src/Box/Box.stories.mdx +0 -334
  180. package/src/Box/Box.test.tsx +0 -133
  181. package/src/Box/Box.tsx +0 -165
  182. package/src/Box/index.ts +0 -1
  183. package/src/Column/Column.stories.mdx +0 -49
  184. package/src/Columns/Columns.stories.mdx +0 -65
  185. package/src/Container/Container.stories.mdx +0 -19
  186. package/src/Divider/Divider.stories.mdx +0 -37
  187. package/src/Heading/Heading.stories.mdx +0 -39
  188. package/src/Heading/Heading.test.tsx +0 -77
  189. package/src/Heading/Heading.tsx +0 -19
  190. package/src/Heading/index.ts +0 -1
  191. package/src/Hidden/Hidden.stories.mdx +0 -39
  192. package/src/Hidden/Hidden.test.tsx +0 -24
  193. package/src/Hidden/Hidden.tsx +0 -16
  194. package/src/Hidden/index.ts +0 -1
  195. package/src/Image/Image.stories.mdx +0 -36
  196. package/src/Link/Link.stories.mdx +0 -45
  197. package/src/MenuItem/MenuItem.stories.mdx +0 -37
  198. package/src/Message/Message.stories.mdx +0 -44
  199. package/src/Radio/RadioIcons.tsx +0 -39
  200. package/src/Slider/Slider.stories.mdx +0 -31
  201. package/src/Stack/Stack.stories.mdx +0 -51
@@ -6,6 +6,16 @@ import { ValidationMessage } from '../ValidationMessage';
6
6
  import { Label } from '../Label';
7
7
  import { Box } from '../Box';
8
8
 
9
+ // Theme Extension
10
+ // ---------------
11
+ export interface TextareaThemeExtension<Value> {
12
+ textarea?: {
13
+ [key: string]: Value;
14
+ };
15
+ }
16
+
17
+ // Props
18
+ // ---------------
9
19
  export type TextareaProps = {
10
20
  variant?: string;
11
21
  label?: string;
@@ -15,8 +25,10 @@ export type TextareaProps = {
15
25
  errorMessage?: string;
16
26
  } & ComponentProps<'textarea'>;
17
27
 
28
+ // Component
29
+ // ---------------
18
30
  export const Textarea: React.FC<TextareaProps> = ({
19
- variant = 'default',
31
+ variant = '',
20
32
  htmlFor = 'textarea',
21
33
  label,
22
34
  error,
@@ -1,36 +1,27 @@
1
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs';
1
+ import React from 'react';
2
+ import type { Meta, ComponentStory } from '@storybook/react';
2
3
  import { ValidationMessage } from './ValidationMessage';
3
4
  import { Exclamation } from '@marigold/icons';
4
5
 
5
- <Meta
6
- title="Components/ValidationMessage"
7
- argTypes={{
6
+ export default {
7
+ title: 'Components/ValidationMessage',
8
+ argTypes: {
8
9
  variant: {
9
10
  control: {
10
11
  type: 'text',
11
12
  },
12
- description: '?',
13
13
  table: {
14
14
  defaultValue: {
15
15
  summary: 'error',
16
16
  },
17
17
  },
18
18
  },
19
- }}
20
- />
19
+ },
20
+ } as Meta;
21
21
 
22
- # ValidationMessage
23
-
24
-
25
- export const Template = args => (
22
+ export const Basic: ComponentStory<typeof ValidationMessage> = args => (
26
23
  <ValidationMessage {...args}>
27
24
  <Exclamation />
28
25
  Validation message
29
26
  </ValidationMessage>
30
27
  );
31
-
32
- <Canvas>
33
- <Story name="Default">{Template.bind({})}</Story>
34
- </Canvas>
35
-
36
- <ArgsTable story="Default" />
@@ -4,12 +4,17 @@ import { ThemeProvider } from '@marigold/system';
4
4
  import { ValidationMessage } from './ValidationMessage';
5
5
 
6
6
  const theme = {
7
+ space: {
8
+ none: 0,
9
+ small: 4,
10
+ medium: 8,
11
+ },
7
12
  validation: {
8
13
  error: {
9
- p: '8px',
14
+ p: 'medium',
10
15
  },
11
16
  warning: {
12
- p: '4px',
17
+ p: 'small',
13
18
  },
14
19
  },
15
20
  };
@@ -3,10 +3,22 @@ import { ComponentProps } from '@marigold/types';
3
3
 
4
4
  import { Box } from '../Box';
5
5
 
6
+ // Theme Extension
7
+ // ---------------
8
+ export interface ValidationMessageThemeExtension<Value> {
9
+ validation?: {
10
+ [key: string]: Value;
11
+ };
12
+ }
13
+
14
+ // Props
15
+ // ---------------
6
16
  export type ValidationMessageProps = {
7
17
  variant?: string;
8
18
  } & ComponentProps<'span'>;
9
19
 
20
+ // Component
21
+ // ---------------
10
22
  export const ValidationMessage: React.FC<ValidationMessageProps> = ({
11
23
  variant = 'error',
12
24
  children,
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { Meta, ComponentStory } from '@storybook/react';
3
+
4
+ import { VisuallyHidden } from './VisuallyHidden';
5
+ import { Text } from '../Text';
6
+
7
+ export default {
8
+ title: 'Components/Hidden',
9
+ } as Meta;
10
+
11
+ export const Basic: ComponentStory<typeof VisuallyHidden> = ({
12
+ children,
13
+ ...args
14
+ }) => (
15
+ <>
16
+ <Text>The Text below is visually hidden</Text>
17
+ <VisuallyHidden {...args}>Invisible!</VisuallyHidden>
18
+ </>
19
+ );
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
+ import { VisuallyHidden } from './VisuallyHidden';
4
+
5
+ test('is visually hidden', () => {
6
+ render(<VisuallyHidden>Default</VisuallyHidden>);
7
+ const hidden = screen.getByText('Default');
8
+
9
+ expect(hidden).toHaveStyle(`overflow: hidden`);
10
+ });
@@ -0,0 +1 @@
1
+ export { VisuallyHidden } from '@react-aria/visually-hidden';
@@ -0,0 +1 @@
1
+ export * from './VisuallyHidden';
package/src/index.ts CHANGED
@@ -12,9 +12,9 @@ export * from './Columns';
12
12
  export * from './Dialog';
13
13
  export * from './Divider';
14
14
  export * from './Field';
15
- export * from './Heading';
16
- export * from './Hidden';
15
+ export * from './VisuallyHidden';
17
16
  export * from './Image';
17
+ export * from './Inline';
18
18
  export * from './Label';
19
19
  export * from './Link';
20
20
  export * from './Menu';
package/src/theme.ts CHANGED
@@ -1,49 +1,50 @@
1
- export type CSSObject = object;
1
+ import { type CSSObject, type Theme as Scales } from '@marigold/system';
2
2
 
3
- export type BaseTheme = {
4
- breakpoints: string[];
5
- space: {
6
- none: number;
7
- xxsmall: number;
8
- xsmall: number;
9
- small: number;
10
- medium: number;
11
- large: number;
12
- xlarge: number;
13
- xxlarge: number;
14
- };
15
- fonts: {
16
- body: string;
17
- heading: string;
18
- };
19
- fontSizes: {
20
- xxsmall: string;
21
- xsmall: string;
22
- small: string;
23
- medium: string;
24
- large: string;
25
- xlarge: string;
26
- };
27
- fontWeights: {
28
- body: number;
29
- heading: number;
30
- bold: number;
31
- };
32
- lineHeights: {
33
- body: number;
34
- heading: number;
35
- };
36
- colors: {
37
- text: string;
38
- background: string;
39
- primary: string;
40
- secondary: string;
41
- disabled: string;
42
- error: string;
43
- warning: string;
44
- info: string;
45
- success: string;
46
- [key: string]: string;
47
- };
48
- [key: string]: CSSObject;
49
- };
3
+ // Provider
4
+ // ---------------
5
+ import { type RootThemeExtension } from './Provider';
6
+
7
+ // Components
8
+ // ---------------
9
+ import { type AlertThemeExtension } from './Alert';
10
+ import { type BadgeThemeExtension } from './Badge';
11
+ import { type ButtonThemeExtension } from './Button';
12
+ import { type CardThemeExtension } from './Card';
13
+ import { type CheckboxThemeExtension } from './Checkbox';
14
+ import { type DividerThemeExtension } from './Divider';
15
+ import { type ImageThemeExtension } from './Image';
16
+ import { type InputThemeExtension } from './Input';
17
+ import { type LabelThemeExtension } from './Label';
18
+ import { type LinkThemeExtension } from './Link';
19
+ import { type MenuThemeExtension } from './Menu';
20
+ import { type MenuItemThemeExtension } from './MenuItem';
21
+ import { type MessageThemeExtension } from './Message';
22
+ import { type RadioThemeExtension } from './Radio';
23
+ import { type SelectThemeExtension } from './Select';
24
+ import { type SliderThemeExtension } from './Slider';
25
+ import { type TextThemeExtension } from './Text';
26
+ import { type TextareaThemeExtension } from './Textarea';
27
+ import { type ValidationMessageThemeExtension } from './ValidationMessage';
28
+
29
+ export interface Theme
30
+ extends Scales,
31
+ RootThemeExtension<CSSObject>,
32
+ AlertThemeExtension<CSSObject>,
33
+ BadgeThemeExtension<CSSObject>,
34
+ ButtonThemeExtension<CSSObject>,
35
+ CardThemeExtension<CSSObject>,
36
+ CheckboxThemeExtension<CSSObject>,
37
+ DividerThemeExtension<CSSObject>,
38
+ ImageThemeExtension<CSSObject>,
39
+ InputThemeExtension<CSSObject>,
40
+ LabelThemeExtension<CSSObject>,
41
+ LinkThemeExtension<CSSObject>,
42
+ MenuThemeExtension<CSSObject>,
43
+ MenuItemThemeExtension<CSSObject>,
44
+ MessageThemeExtension<CSSObject>,
45
+ RadioThemeExtension<CSSObject>,
46
+ SelectThemeExtension<CSSObject>,
47
+ SliderThemeExtension<CSSObject>,
48
+ TextThemeExtension<CSSObject>,
49
+ TextareaThemeExtension<CSSObject>,
50
+ ValidationMessageThemeExtension<CSSObject> {}
package/dist/Box/Box.d.ts DELETED
@@ -1,47 +0,0 @@
1
- import { CSSObject, ResponsiveStyleValue } from '@marigold/system';
2
- import { PolymorphicPropsWithRef, PolymorphicComponentWithRef } from '@marigold/types';
3
- export declare type BoxOwnProps = {
4
- className?: string;
5
- variant?: string | string[];
6
- css?: CSSObject;
7
- display?: ResponsiveStyleValue<string>;
8
- height?: ResponsiveStyleValue<number | string>;
9
- width?: ResponsiveStyleValue<number | string>;
10
- minWidth?: ResponsiveStyleValue<number | string>;
11
- maxWidth?: ResponsiveStyleValue<number | string>;
12
- position?: ResponsiveStyleValue<string>;
13
- top?: ResponsiveStyleValue<number | string>;
14
- bottom?: ResponsiveStyleValue<number | string>;
15
- right?: ResponsiveStyleValue<number | string>;
16
- left?: ResponsiveStyleValue<number | string>;
17
- zIndex?: ResponsiveStyleValue<number | string>;
18
- p?: ResponsiveStyleValue<number | string>;
19
- px?: ResponsiveStyleValue<number | string>;
20
- py?: ResponsiveStyleValue<number | string>;
21
- pt?: ResponsiveStyleValue<number | string>;
22
- pb?: ResponsiveStyleValue<number | string>;
23
- pl?: ResponsiveStyleValue<number | string>;
24
- pr?: ResponsiveStyleValue<number | string>;
25
- m?: ResponsiveStyleValue<number | string>;
26
- mx?: ResponsiveStyleValue<number | string>;
27
- my?: ResponsiveStyleValue<number | string>;
28
- mt?: ResponsiveStyleValue<number | string>;
29
- mb?: ResponsiveStyleValue<number | string>;
30
- ml?: ResponsiveStyleValue<number | string>;
31
- mr?: ResponsiveStyleValue<number | string>;
32
- flexDirection?: ResponsiveStyleValue<string>;
33
- flexWrap?: ResponsiveStyleValue<string>;
34
- flexShrink?: ResponsiveStyleValue<number | string>;
35
- flexGrow?: ResponsiveStyleValue<number | string>;
36
- alignItems?: ResponsiveStyleValue<string>;
37
- justifyContent?: ResponsiveStyleValue<string>;
38
- bg?: ResponsiveStyleValue<number | string>;
39
- border?: ResponsiveStyleValue<number | string>;
40
- borderRadius?: ResponsiveStyleValue<number | string>;
41
- boxShadow?: ResponsiveStyleValue<number | string>;
42
- opacity?: ResponsiveStyleValue<number | string>;
43
- overflow?: ResponsiveStyleValue<string>;
44
- transition?: ResponsiveStyleValue<number | string>;
45
- };
46
- export declare type BoxProps = PolymorphicPropsWithRef<BoxOwnProps, 'div'>;
47
- export declare const Box: PolymorphicComponentWithRef<BoxOwnProps, 'div'>;
@@ -1 +0,0 @@
1
- export * from './Box';
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { ComponentProps } from '@marigold/types';
3
- export declare type HeadingProps = {
4
- as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
5
- variant?: string;
6
- } & ComponentProps<'h1'>;
7
- export declare const Heading: React.FC<HeadingProps>;
@@ -1 +0,0 @@
1
- export * from './Heading';
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export declare type HiddenProps = {
3
- show?: boolean;
4
- };
5
- export declare const Hidden: React.FC<HiddenProps>;
@@ -1 +0,0 @@
1
- export * from './Hidden';
@@ -1,9 +0,0 @@
1
- export declare const RadioChecked: ({ disabled, ...props }: {
2
- [x: string]: any;
3
- disabled?: boolean | undefined;
4
- }) => JSX.Element;
5
- export declare const RadioUnchecked: ({ disabled, error, ...props }: {
6
- [x: string]: any;
7
- disabled?: boolean | undefined;
8
- error?: boolean | undefined;
9
- }) => JSX.Element;
@@ -1,62 +0,0 @@
1
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs';
2
- import { ActionGroup } from './ActionGroup';
3
- import { Button } from '../Button';
4
-
5
- <Meta
6
- title="Components/ActionGroup"
7
- argTypes={{
8
- variant: {
9
- control: {
10
- type: 'select',
11
- },
12
- options: ['default'],
13
- description: 'ActionGroup style',
14
- table: {
15
- defaultValue: {
16
- summary: 'default',
17
- },
18
- },
19
- },
20
- space: {
21
- control: {
22
- type: 'text',
23
- },
24
- description: 'space between the children',
25
- table: {
26
- defaultValue: {
27
- summary: 'none',
28
- },
29
- },
30
- },
31
- verticalAlignment: {
32
- control: {
33
- type: 'boolean',
34
- },
35
- description: 'alignment vertical',
36
- table: {
37
- defaultValue: {
38
- summary: false,
39
- },
40
- },
41
- },
42
- }}
43
- />
44
-
45
- # ActionGroup
46
-
47
- export const Template = args => (
48
- <ActionGroup {...args}>
49
- <Button variant="text" size="small">
50
- Cancel
51
- </Button>
52
- <Button variant="primary" size="small">
53
- Confirm
54
- </Button>
55
- </ActionGroup>
56
- );
57
-
58
- <Canvas>
59
- <Story name="Default">{Template.bind({})}</Story>
60
- </Canvas>
61
-
62
- <ArgsTable story="Default" />
@@ -1,35 +0,0 @@
1
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs';
2
- import { Alert } from './Alert';
3
- import { Text } from '../Text';
4
-
5
- <Meta
6
- title="Components/Alert"
7
- argTypes={{
8
- variant: {
9
- control: {
10
- type: 'select',
11
- },
12
- options: ['success', 'warning', 'error'],
13
- description: 'Alerting in different colors and icons',
14
- table: {
15
- defaultValue: {
16
- summary: 'success',
17
- },
18
- },
19
- },
20
- }}
21
- />
22
-
23
- # Alert
24
-
25
- export const Template = args => (
26
- <Alert {...args}>
27
- <Text>Alert</Text>
28
- </Alert>
29
- );
30
-
31
- <Canvas>
32
- <Story name="Default">{Template.bind({})}</Story>
33
- </Canvas>
34
-
35
- <ArgsTable story="Default" />
@@ -1,57 +0,0 @@
1
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs';
2
- import { Badge } from './Badge';
3
- import { Check } from '@marigold/icons';
4
-
5
- <Meta
6
- title="Components/Badge"
7
- argTypes={{
8
- variant: {
9
- control: {
10
- type: 'select',
11
- },
12
- options: ['default'],
13
- description: 'Badge style',
14
- table: {
15
- defaultValue: {
16
- summary: 'default',
17
- },
18
- },
19
- },
20
- bgColor: {
21
- control: {
22
- type: 'text',
23
- },
24
- description: 'background',
25
- table: {
26
- defaultValue: {
27
- summary: 'inherit',
28
- },
29
- },
30
- },
31
- borderColor: {
32
- control: {
33
- type: 'text',
34
- },
35
- description: 'Outline color',
36
- table: {
37
- defaultValue: {
38
- summary: 'transparent',
39
- },
40
- },
41
- },
42
- }}
43
- />
44
-
45
- # Badge
46
-
47
- export const Template = args => (
48
- <Badge {...args}>
49
- <Check /> Check
50
- </Badge>
51
- );
52
-
53
- <Canvas>
54
- <Story name="Default">{Template.bind({})}</Story>
55
- </Canvas>
56
-
57
- <ArgsTable story="Default" />