@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
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ComponentProps } from '@marigold/types';
3
+ export interface MessageThemeExtension<Value> {
4
+ message?: {
5
+ [key: string]: Value;
6
+ };
7
+ }
3
8
  export declare type MessageProps = {
4
9
  messageTitle: string;
5
10
  variant?: string;
@@ -0,0 +1,5 @@
1
+ import type { ComponentStory } from '@storybook/react';
2
+ import { Message } from './Message';
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof Message>;
@@ -1,3 +1,11 @@
1
- import React from 'react';
2
- import { ThemeProviderProps } from '@marigold/system';
3
- export declare const MarigoldProvider: React.FC<ThemeProviderProps>;
1
+ /// <reference types="react" />
2
+ import { Theme, ThemeProviderProps } from '@marigold/system';
3
+ export interface RootThemeExtension<Value> {
4
+ root?: {
5
+ body?: Value;
6
+ html?: Value;
7
+ };
8
+ }
9
+ export interface MarigoldProviderProps<T extends Theme> extends ThemeProviderProps<T> {
10
+ }
11
+ export declare function MarigoldProvider<T extends Theme>({ theme, children, }: MarigoldProviderProps<T>): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  export { useTheme, ThemeProvider } from '@marigold/system';
2
- export * from './MarigoldProvider';
3
2
  export { SSRProvider } from '@react-aria/ssr';
3
+ export * from './MarigoldProvider';
@@ -1,13 +1,17 @@
1
1
  import React from 'react';
2
2
  import { ComponentProps } from '@marigold/types';
3
- declare type RadioInputProps = {
4
- variant?: string;
5
- error?: boolean;
6
- } & ComponentProps<'input'>;
3
+ import { RadioIconProps } from './RadioIcon';
4
+ export interface RadioThemeExtension<Value> {
5
+ radio?: {
6
+ [key: string]: Value;
7
+ };
8
+ }
9
+ declare type RadioInputProps = RadioIconProps & ComponentProps<'input'>;
7
10
  export declare type RadioProps = {
8
11
  id: string;
9
- label?: string;
12
+ label: string;
10
13
  required?: boolean;
14
+ labelVariant?: string;
11
15
  error?: boolean;
12
16
  errorMessage?: string;
13
17
  } & RadioInputProps;
@@ -0,0 +1,5 @@
1
+ import type { ComponentStory } from '@storybook/react';
2
+ import { Radio } from './Radio';
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof Radio>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare type RadioIconProps = {
3
+ variant?: string;
4
+ checked?: boolean;
5
+ disabled?: boolean;
6
+ error?: boolean;
7
+ children?: never;
8
+ };
9
+ export declare const RadioIcon: React.FC<RadioIconProps>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { AriaListBoxOptions } from '@react-aria/listbox';
2
3
  import type { ListState } from '@react-stately/list';
3
4
  interface ListBoxProps extends AriaListBoxOptions<unknown> {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { ListState } from '@react-stately/list';
2
3
  import type { Node } from '@react-types/shared';
3
4
  interface SectionProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { ListState } from '@react-stately/list';
2
3
  import type { Node } from '@react-types/shared';
3
4
  interface OptionProps {
@@ -1,8 +1,22 @@
1
+ /// <reference types="react" />
1
2
  import type { AriaSelectProps } from '@react-types/select';
2
3
  import { SingleSelection } from '@react-types/shared';
3
4
  import { ComponentProps } from '@marigold/types';
4
5
  import { ResponsiveStyleValue } from '@marigold/system';
6
+ export interface SelectThemeExtension<Value> {
7
+ select?: {
8
+ __default: Value;
9
+ disabled?: Value;
10
+ listbox?: {
11
+ __default: Value;
12
+ error?: Value;
13
+ };
14
+ section?: Value;
15
+ option?: Value;
16
+ };
17
+ }
5
18
  export declare type SelectProps = {
19
+ labelVariant?: string;
6
20
  placeholder?: string;
7
21
  disabled?: boolean;
8
22
  required?: boolean;
@@ -10,4 +24,4 @@ export declare type SelectProps = {
10
24
  error?: boolean;
11
25
  errorMessage?: string;
12
26
  } & ComponentProps<'select'> & AriaSelectProps<object> & SingleSelection;
13
- export declare const Select: ({ placeholder, disabled, required, error, errorMessage, width, className, ...props }: SelectProps) => JSX.Element;
27
+ export declare const Select: ({ labelVariant, placeholder, disabled, required, error, errorMessage, width, className, ...props }: SelectProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { ComponentStory } from '@storybook/react';
2
+ import { Select } from './Select';
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof Select>;
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ComponentProps } from '@marigold/types';
3
+ export interface SliderThemeExtension<Value> {
4
+ slider?: {
5
+ [key: string]: Value;
6
+ };
7
+ }
3
8
  export declare type SliderProps = {
4
9
  variant?: string;
5
10
  } & ComponentProps<'input'>;
@@ -0,0 +1,5 @@
1
+ import type { ComponentStory } from '@storybook/react';
2
+ import { Slider } from './Slider';
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof Slider>;
@@ -0,0 +1,5 @@
1
+ import type { ComponentStory } from '@storybook/react';
2
+ import { Stack } from './Stack';
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof Stack>;
@@ -1,6 +1,11 @@
1
1
  import { ResponsiveStyleValue } from '@marigold/system';
2
2
  import { PolymorphicComponentWithRef, PolymorphicPropsWithRef } from '@marigold/types';
3
3
  import { BoxOwnProps } from '../Box';
4
+ export interface TextThemeExtension<Value> {
5
+ text?: {
6
+ [key: string]: Value;
7
+ };
8
+ }
4
9
  export declare type TextOwnProps = {
5
10
  align?: ResponsiveStyleValue<string>;
6
11
  color?: ResponsiveStyleValue<string>;
@@ -0,0 +1,5 @@
1
+ import type { ComponentStory } from '@storybook/react';
2
+ import { Text } from './Text';
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof Text>;
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ComponentProps } from '@marigold/types';
3
+ export interface TextareaThemeExtension<Value> {
4
+ textarea?: {
5
+ [key: string]: Value;
6
+ };
7
+ }
3
8
  export declare type TextareaProps = {
4
9
  variant?: string;
5
10
  label?: string;
@@ -0,0 +1,5 @@
1
+ import type { ComponentStory } from '@storybook/react';
2
+ import { Textarea } from '.';
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof Textarea>;
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ComponentProps } from '@marigold/types';
3
+ export interface ValidationMessageThemeExtension<Value> {
4
+ validation?: {
5
+ [key: string]: Value;
6
+ };
7
+ }
3
8
  export declare type ValidationMessageProps = {
4
9
  variant?: string;
5
10
  } & ComponentProps<'span'>;
@@ -0,0 +1,5 @@
1
+ import type { ComponentStory } from '@storybook/react';
2
+ import { ValidationMessage } from './ValidationMessage';
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof ValidationMessage>;
@@ -0,0 +1 @@
1
+ export { VisuallyHidden } from '@react-aria/visually-hidden';
@@ -0,0 +1,5 @@
1
+ import type { ComponentStory } from '@storybook/react';
2
+ import { VisuallyHidden } from './VisuallyHidden';
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof VisuallyHidden>;
@@ -0,0 +1 @@
1
+ export * from './VisuallyHidden';