@latte-macchiat-io/latte-vanilla-components 0.0.511 → 0.0.513

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latte-macchiat-io/latte-vanilla-components",
3
- "version": "0.0.511",
3
+ "version": "0.0.513",
4
4
  "description": "Beautiful components for amazing projects, with a touch of Vanilla 🥤",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -13,10 +13,9 @@ export type AlertBoxProps = React.HTMLAttributes<HTMLDivElement> &
13
13
  AlertBoxVariants & {
14
14
  noIcon?: boolean;
15
15
  icon?: string | React.ReactNode;
16
- title?: string | null;
17
16
  };
18
17
 
19
- export const AlertBox = ({ noIcon = false, variant = 'info', className, icon = undefined, children }: AlertBoxProps) => (
18
+ export const AlertBox = ({ noIcon = false, variant = 'info', className, icon = icons.info, children }: AlertBoxProps) => (
20
19
  <Box direction="row" className={cn(alertBox({ variant }), className)}>
21
20
  {!noIcon &&
22
21
  (typeof icon === 'string' ? (
@@ -1,5 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
 
3
+ import { Heading } from '../../Heading';
4
+ import { Paragraph } from '../../Paragraph';
3
5
  import { AlertBox } from '.';
4
6
 
5
7
  // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
@@ -27,7 +29,17 @@ type Story = StoryObj<typeof meta>;
27
29
  // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
28
30
  export const Default: Story = {
29
31
  args: {
30
- title: 'Lorem ipsum',
31
- children: <>This is an alert box example.</>,
32
+ children: (
33
+ <>
34
+ <Heading as="h3">Lorem ipsum</Heading>
35
+ <Paragraph>
36
+ <p>
37
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
38
+ minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
39
+ voluptate velit esse cillum dolore eu fugiat nulla pariatur.
40
+ </p>
41
+ </Paragraph>
42
+ </>
43
+ ),
32
44
  },
33
45
  };
@@ -39,7 +39,13 @@ globalStyle(`${alertBoxBase} > div `, {
39
39
 
40
40
  export const alertBoxContent = style({
41
41
  width: '100%',
42
+ display: 'flex',
42
43
  alignSelf: 'center',
44
+ flexDirection: 'column',
45
+
46
+ '@media': generateResponsiveMedia({
47
+ gap: themeContract.box.gap,
48
+ }),
43
49
  });
44
50
 
45
51
  export type AlertBoxVariants = RecipeVariants<typeof alertBox>;
@@ -1,3 +1,5 @@
1
+ import { alertColorDanger, alertColorInfo, alertColorSuccess, alertColorWarning } from '../../../styles/colors';
2
+
1
3
  const themeBoxBase = {
2
4
  boxAlert: {},
3
5
  };
@@ -5,14 +7,12 @@ const themeBoxBase = {
5
7
  export const themeBoxAlertLight = {
6
8
  boxAlert: {
7
9
  ...themeBoxBase.boxAlert,
10
+
8
11
  variant: {
9
- warning: {
10
- iconColor: '',
11
- backgroundColor: '',
12
- },
13
- info: { iconColor: '', backgroundColor: '#FF0000' },
14
- success: { iconColor: '', backgroundColor: '' },
15
- danger: { iconColor: '', backgroundColor: '' },
12
+ warning: { iconColor: '', backgroundColor: alertColorWarning },
13
+ info: { iconColor: '', backgroundColor: alertColorInfo },
14
+ success: { iconColor: '', backgroundColor: alertColorSuccess },
15
+ danger: { iconColor: '', backgroundColor: alertColorDanger },
16
16
  },
17
17
  },
18
18
  };
@@ -20,11 +20,12 @@ export const themeBoxAlertLight = {
20
20
  export const themeBoxAlertDark = {
21
21
  boxAlert: {
22
22
  ...themeBoxBase.boxAlert,
23
+
23
24
  variant: {
24
- warning: { iconColor: '', backgroundColor: '' },
25
- info: { iconColor: '', backgroundColor: '' },
26
- success: { iconColor: '', backgroundColor: '' },
27
- danger: { iconColor: '', backgroundColor: '' },
25
+ warning: { iconColor: '', backgroundColor: alertColorWarning },
26
+ info: { iconColor: '', backgroundColor: alertColorInfo },
27
+ success: { iconColor: '', backgroundColor: alertColorSuccess },
28
+ danger: { iconColor: '', backgroundColor: alertColorDanger },
28
29
  },
29
30
  },
30
31
  };
@@ -72,7 +72,7 @@ export const box = recipe({
72
72
 
73
73
  defaultVariants: {
74
74
  paddingTop: 'small',
75
- variant: 'primary',
75
+ // variant: 'primary',
76
76
  },
77
77
  });
78
78