@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.
- package/CHANGELOG.md +180 -0
- package/dist/ActionGroup/ActionGroup.d.ts +1 -2
- package/dist/ActionGroup/ActionGroup.stories.d.ts +5 -0
- package/dist/Alert/Alert.d.ts +7 -1
- package/dist/Alert/Alert.stories.d.ts +5 -0
- package/dist/Badge/Badge.d.ts +5 -0
- package/dist/Badge/Badge.stories.d.ts +5 -0
- package/dist/Box.d.ts +2 -0
- package/dist/Button/Button.d.ts +5 -0
- package/dist/Button/Button.stories.d.ts +5 -0
- package/dist/Card/Card.d.ts +5 -0
- package/dist/Card/Card.stories.d.ts +5 -0
- package/dist/Checkbox/Checkbox.d.ts +10 -5
- package/dist/Checkbox/Checkbox.stories.d.ts +5 -0
- package/dist/Checkbox/CheckboxIcons.d.ts +9 -9
- package/dist/Column/Column.stories.d.ts +5 -0
- package/dist/Columns/Columns.d.ts +2 -2
- package/dist/Columns/Columns.stories.d.ts +5 -0
- package/dist/Container/Container.stories.d.ts +5 -0
- package/dist/Dialog/Dialog.d.ts +5 -2
- package/dist/Dialog/Dialog.stories.d.ts +5 -0
- package/dist/Dialog/ModalDialog.d.ts +4 -1
- package/dist/Divider/Divider.d.ts +7 -3
- package/dist/Divider/Divider.stories.d.ts +5 -0
- package/dist/Field/Field.d.ts +2 -0
- package/dist/Field/Field.stories.d.ts +5 -0
- package/dist/Image/Image.d.ts +5 -0
- package/dist/Image/Image.stories.d.ts +5 -0
- package/dist/Inline/Inline.d.ts +7 -0
- package/dist/Inline/Inline.stories.d.ts +5 -0
- package/dist/Inline/index.d.ts +1 -0
- package/dist/Input/Input.d.ts +5 -0
- package/dist/Input/Input.stories.d.ts +5 -0
- package/dist/Label/Label.d.ts +12 -1
- package/dist/Label/Label.stories.d.ts +5 -0
- package/dist/Link/Link.d.ts +3 -0
- package/dist/Link/Link.stories.d.ts +5 -0
- package/dist/Menu/Menu.d.ts +3 -0
- package/dist/Menu/Menu.stories.d.ts +5 -0
- package/dist/MenuItem/MenuItem.d.ts +5 -0
- package/dist/MenuItem/MenuItem.stories.d.ts +5 -0
- package/dist/Message/Message.d.ts +5 -0
- package/dist/Message/Message.stories.d.ts +5 -0
- package/dist/Provider/MarigoldProvider.d.ts +11 -3
- package/dist/Provider/index.d.ts +1 -1
- package/dist/Radio/Radio.d.ts +9 -5
- package/dist/Radio/Radio.stories.d.ts +5 -0
- package/dist/Radio/RadioIcon.d.ts +9 -0
- package/dist/Select/ListBox.d.ts +1 -0
- package/dist/Select/ListBoxSection.d.ts +1 -0
- package/dist/Select/Option.d.ts +1 -0
- package/dist/Select/Select.d.ts +15 -1
- package/dist/Select/Select.stories.d.ts +5 -0
- package/dist/Slider/Slider.d.ts +5 -0
- package/dist/Slider/Slider.stories.d.ts +5 -0
- package/dist/Stack/Stack.stories.d.ts +5 -0
- package/dist/Text/Text.d.ts +5 -0
- package/dist/Text/Text.stories.d.ts +5 -0
- package/dist/Textarea/Textarea.d.ts +5 -0
- package/dist/Textarea/Textarea.stories.d.ts +5 -0
- package/dist/ValidationMessage/ValidationMessage.d.ts +5 -0
- package/dist/ValidationMessage/ValidationMessage.stories.d.ts +5 -0
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -0
- package/dist/VisuallyHidden/VisuallyHidden.stories.d.ts +5 -0
- package/dist/VisuallyHidden/index.d.ts +1 -0
- package/dist/components.cjs.development.js +536 -580
- package/dist/components.cjs.development.js.map +1 -1
- package/dist/components.cjs.production.min.js +1 -1
- package/dist/components.cjs.production.min.js.map +1 -1
- package/dist/components.esm.js +481 -535
- package/dist/components.esm.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/theme.d.ts +23 -48
- package/package.json +8 -4
- package/src/ActionGroup/ActionGroup.stories.tsx +47 -0
- package/src/ActionGroup/ActionGroup.test.tsx +36 -36
- package/src/ActionGroup/ActionGroup.tsx +17 -28
- package/src/Alert/Alert.stories.tsx +32 -0
- package/src/Alert/Alert.test.tsx +4 -1
- package/src/Alert/Alert.tsx +18 -3
- package/src/Badge/Badge.stories.tsx +38 -0
- package/src/Badge/Badge.test.tsx +5 -1
- package/src/Badge/Badge.tsx +13 -1
- package/src/Box.ts +2 -0
- package/src/Button/{Button.stories.mdx → Button.stories.tsx} +10 -17
- package/src/Button/Button.test.tsx +34 -11
- package/src/Button/Button.tsx +17 -3
- package/src/Card/{Card.stories.mdx → Card.stories.tsx} +9 -17
- package/src/Card/Card.test.tsx +8 -3
- package/src/Card/Card.tsx +13 -1
- package/src/Checkbox/{Checkbox.stories.mdx → Checkbox.stories.tsx} +31 -39
- package/src/Checkbox/Checkbox.test.tsx +77 -8
- package/src/Checkbox/Checkbox.tsx +70 -90
- package/src/Checkbox/CheckboxIcons.tsx +51 -41
- package/src/Column/Column.stories.tsx +33 -0
- package/src/Column/Column.tsx +0 -0
- package/src/Columns/Columns.stories.tsx +75 -0
- package/src/Columns/Columns.test.tsx +34 -23
- package/src/Columns/Columns.tsx +30 -30
- package/src/Container/Container.stories.tsx +14 -0
- package/src/Container/Container.tsx +0 -0
- package/src/Dialog/{Dialog.stories.mdx → Dialog.stories.tsx} +33 -18
- package/src/Dialog/Dialog.test.tsx +91 -20
- package/src/Dialog/Dialog.tsx +63 -17
- package/src/Dialog/ModalDialog.tsx +33 -4
- package/src/Divider/Divider.stories.tsx +30 -0
- package/src/Divider/Divider.test.tsx +32 -23
- package/src/Divider/Divider.tsx +27 -7
- package/src/Field/{Field.stories.mdx → Field.stories.tsx} +33 -20
- package/src/Field/Field.test.tsx +55 -5
- package/src/Field/Field.tsx +10 -8
- package/src/Image/Image.stories.tsx +34 -0
- package/src/Image/Image.test.tsx +4 -1
- package/src/Image/Image.tsx +13 -1
- package/src/Inline/Inline.stories.tsx +39 -0
- package/src/Inline/Inline.test.tsx +99 -0
- package/src/Inline/Inline.tsx +38 -0
- package/src/Inline/index.ts +1 -0
- package/src/Input/{Input.stories.mdx → Input.stories.tsx} +10 -17
- package/src/Input/Input.test.tsx +7 -3
- package/src/Input/Input.tsx +13 -1
- package/src/Label/{Label.stories.mdx → Label.stories.tsx} +10 -21
- package/src/Label/Label.test.tsx +25 -4
- package/src/Label/Label.tsx +42 -9
- package/src/Link/Link.stories.tsx +35 -0
- package/src/Link/Link.test.tsx +6 -2
- package/src/Link/Link.tsx +12 -1
- package/src/Menu/{Menu.stories.mdx → Menu.stories.tsx} +13 -32
- package/src/Menu/Menu.test.tsx +7 -2
- package/src/Menu/Menu.tsx +10 -0
- package/src/MenuItem/MenuItem.stories.tsx +30 -0
- package/src/MenuItem/MenuItem.test.tsx +7 -2
- package/src/MenuItem/MenuItem.tsx +12 -0
- package/src/Message/Message.stories.tsx +30 -0
- package/src/Message/Message.test.tsx +4 -1
- package/src/Message/Message.tsx +17 -5
- package/src/Provider/MarigoldProvider.test.tsx +65 -55
- package/src/Provider/MarigoldProvider.tsx +37 -19
- package/src/Provider/index.ts +2 -1
- package/src/Radio/{Radio.stories.mdx → Radio.stories.tsx} +31 -39
- package/src/Radio/Radio.test.tsx +78 -9
- package/src/Radio/Radio.tsx +58 -87
- package/src/Radio/RadioIcon.tsx +49 -0
- package/src/Select/ListBox.tsx +1 -0
- package/src/Select/{Select.stories.mdx → Select.stories.tsx} +23 -20
- package/src/Select/Select.test.tsx +39 -1
- package/src/Select/Select.tsx +24 -13
- package/src/Slider/Slider.stories.tsx +24 -0
- package/src/Slider/Slider.test.tsx +10 -6
- package/src/Slider/Slider.tsx +25 -13
- package/src/Stack/Stack.stories.tsx +57 -0
- package/src/Stack/Stack.test.tsx +16 -7
- package/src/Stack/Stack.tsx +0 -0
- package/src/Text/{Text.stories.mdx → Text.stories.tsx} +20 -19
- package/src/Text/Text.test.tsx +2 -2
- package/src/Text/Text.tsx +12 -0
- package/src/Textarea/{Textarea.stories.mdx → Textarea.stories.tsx} +14 -24
- package/src/Textarea/Textarea.test.tsx +7 -3
- package/src/Textarea/Textarea.tsx +13 -1
- package/src/ValidationMessage/{ValidationMessage.stories.mdx → ValidationMessage.stories.tsx} +8 -17
- package/src/ValidationMessage/ValidationMessage.test.tsx +7 -2
- package/src/ValidationMessage/ValidationMessage.tsx +12 -0
- package/src/VisuallyHidden/VisuallyHidden.stories.tsx +19 -0
- package/src/VisuallyHidden/VisuallyHidden.test.tsx +10 -0
- package/src/VisuallyHidden/VisuallyHidden.tsx +1 -0
- package/src/VisuallyHidden/index.ts +1 -0
- package/src/index.ts +2 -2
- package/src/theme.ts +49 -48
- package/dist/Box/Box.d.ts +0 -47
- package/dist/Box/index.d.ts +0 -1
- package/dist/Heading/Heading.d.ts +0 -7
- package/dist/Heading/index.d.ts +0 -1
- package/dist/Hidden/Hidden.d.ts +0 -5
- package/dist/Hidden/index.d.ts +0 -1
- package/dist/Radio/RadioIcons.d.ts +0 -9
- package/src/ActionGroup/ActionGroup.stories.mdx +0 -62
- package/src/Alert/Alert.stories.mdx +0 -35
- package/src/Badge/Badge.stories.mdx +0 -57
- package/src/Box/Box.stories.mdx +0 -334
- package/src/Box/Box.test.tsx +0 -133
- package/src/Box/Box.tsx +0 -165
- package/src/Box/index.ts +0 -1
- package/src/Column/Column.stories.mdx +0 -49
- package/src/Columns/Columns.stories.mdx +0 -65
- package/src/Container/Container.stories.mdx +0 -19
- package/src/Divider/Divider.stories.mdx +0 -37
- package/src/Heading/Heading.stories.mdx +0 -39
- package/src/Heading/Heading.test.tsx +0 -77
- package/src/Heading/Heading.tsx +0 -19
- package/src/Heading/index.ts +0 -1
- package/src/Hidden/Hidden.stories.mdx +0 -39
- package/src/Hidden/Hidden.test.tsx +0 -24
- package/src/Hidden/Hidden.tsx +0 -16
- package/src/Hidden/index.ts +0 -1
- package/src/Image/Image.stories.mdx +0 -36
- package/src/Link/Link.stories.mdx +0 -45
- package/src/MenuItem/MenuItem.stories.mdx +0 -37
- package/src/Message/Message.stories.mdx +0 -44
- package/src/Radio/RadioIcons.tsx +0 -39
- package/src/Slider/Slider.stories.mdx +0 -31
- 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 = '
|
|
31
|
+
variant = '',
|
|
20
32
|
htmlFor = 'textarea',
|
|
21
33
|
label,
|
|
22
34
|
error,
|
package/src/ValidationMessage/{ValidationMessage.stories.mdx → ValidationMessage.stories.tsx}
RENAMED
|
@@ -1,36 +1,27 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
6
|
-
title
|
|
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
|
-
|
|
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: '
|
|
14
|
+
p: 'medium',
|
|
10
15
|
},
|
|
11
16
|
warning: {
|
|
12
|
-
p: '
|
|
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 './
|
|
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
|
-
|
|
1
|
+
import { type CSSObject, type Theme as Scales } from '@marigold/system';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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'>;
|
package/dist/Box/index.d.ts
DELETED
|
@@ -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>;
|
package/dist/Heading/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Heading';
|
package/dist/Hidden/Hidden.d.ts
DELETED
package/dist/Hidden/index.d.ts
DELETED
|
@@ -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" />
|