beem-component 2.1.8 → 2.1.29

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 (50) hide show
  1. package/Dockerfile +1 -1
  2. package/Jenkinsfile +5 -20
  3. package/dist/components/BmSelector/BmSelector.js +2 -15
  4. package/dist/components/BmSelector/BmSelector.stories.js +1 -14
  5. package/dist/components/Card_v2/Card.js +1 -1
  6. package/dist/components/InfoPanel/InfoPanel.js +17 -54
  7. package/dist/components/InfoPanel/InfoPanel.stories.js +4 -56
  8. package/dist/components/globalStyles.js +1 -1
  9. package/dist/components/index.js +0 -14
  10. package/dist/components/text.js +10 -11
  11. package/dist/components/typography.js +2 -3
  12. package/package.json +1 -1
  13. package/public/index.html +0 -1
  14. package/src/App.js +65 -128
  15. package/src/fonts.scss +0 -6
  16. package/src/lib/components/BmSelector/BmSelector.js +1 -14
  17. package/src/lib/components/BmSelector/BmSelector.stories.jsx +0 -10
  18. package/src/lib/components/Card_v2/Card.js +0 -20
  19. package/src/lib/components/InfoPanel/InfoPanel.js +11 -35
  20. package/src/lib/components/InfoPanel/InfoPanel.stories.jsx +2 -42
  21. package/src/lib/components/globalStyles.js +1 -2
  22. package/src/lib/components/index.js +0 -4
  23. package/src/lib/components/text.js +11 -17
  24. package/src/lib/components/typography.js +0 -1
  25. package/dist/components/Alert/Alert.js +0 -83
  26. package/dist/components/Alert/Alert.stories.js +0 -66
  27. package/dist/components/BmCustomCardTitle/CustomCardTitle.js +0 -174
  28. package/dist/components/BmCustomCardTitle/CustomCardTitle.stories.js +0 -85
  29. package/src/fonts/Inter-Black.woff2 +0 -0
  30. package/src/fonts/Inter-Bold.woff2 +0 -0
  31. package/src/fonts/Inter-ExtraBold.woff2 +0 -0
  32. package/src/fonts/Inter-ExtraLight.woff2 +0 -0
  33. package/src/fonts/Inter-Light.woff2 +0 -0
  34. package/src/fonts/Inter-Medium.woff2 +0 -0
  35. package/src/fonts/Inter-Regular.woff2 +0 -0
  36. package/src/fonts/Inter-SemiBold.woff2 +0 -0
  37. package/src/fonts/Inter-Thin.woff2 +0 -0
  38. package/src/fonts/Inter-VariableFont_opsz,wght.ttf +0 -0
  39. package/src/fonts/InterDisplay-Black.woff2 +0 -0
  40. package/src/fonts/InterDisplay-Bold.woff2 +0 -0
  41. package/src/fonts/InterDisplay-ExtraBold.woff2 +0 -0
  42. package/src/fonts/InterDisplay-ExtraLight.woff2 +0 -0
  43. package/src/fonts/InterDisplay-Light.woff2 +0 -0
  44. package/src/fonts/InterDisplay-Medium.woff2 +0 -0
  45. package/src/fonts/InterDisplay-SemiBold.woff2 +0 -0
  46. package/src/fonts/InterDisplay-Thin.woff2 +0 -0
  47. package/src/lib/components/Alert/Alert.js +0 -111
  48. package/src/lib/components/Alert/Alert.stories.jsx +0 -66
  49. package/src/lib/components/BmCustomCardTitle/CustomCardTitle.js +0 -142
  50. package/src/lib/components/BmCustomCardTitle/CustomCardTitle.stories.jsx +0 -83
@@ -1,142 +0,0 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
3
-
4
- const hexToRgba = (hex, opacity = 0.6) => {
5
- try {
6
- const normalizedHex = hex?.replace('#', '');
7
- if (
8
- !normalizedHex ||
9
- normalizedHex.length !== 6 ||
10
- !/^[0-9a-fA-F]{6}$/.test(normalizedHex)
11
- ) {
12
- throw new Error('Invalid hex');
13
- }
14
-
15
- const r = parseInt(normalizedHex.slice(0, 2), 16);
16
- const g = parseInt(normalizedHex.slice(2, 4), 16);
17
- const b = parseInt(normalizedHex.slice(4, 6), 16);
18
- return `rgba(${r}, ${g}, ${b}, ${opacity})`;
19
- } catch (e) {
20
- return `rgba(0, 0, 0, ${opacity})`;
21
- }
22
- };
23
-
24
- const BackgroundStripe = styled.div`
25
- background-color: ${({ themeColor }) => hexToRgba(themeColor, 0.1)};
26
- padding-top: ${({ variant }) =>
27
- variant === 'confirmation' ? '1rem' : '1.5rem'};
28
- padding-bottom: ${({ variant }) =>
29
- variant === 'confirmation' ? '1rem' : '2rem'};
30
- padding-left: 1rem;
31
- padding-right: 1rem;
32
-
33
- @media (min-width: 640px) {
34
- padding-top: ${({ variant }) =>
35
- variant === 'confirmation' ? '1.5rem' : '2rem'};
36
- padding-bottom: ${({ variant }) =>
37
- variant === 'confirmation' ? '1.5rem' : '2.5rem'};
38
- padding-left: 1.5rem;
39
- padding-right: 1.5rem;
40
- }
41
- `;
42
-
43
- const CardContainer = styled.div`
44
- background-color: ${hexToRgba('#ffffff', 0.7)};
45
- padding: 1rem;
46
- border-radius: 0.75rem;
47
-
48
- @media (min-width: 640px) {
49
- padding: 1.5rem;
50
- }
51
- `;
52
-
53
- const IconWrapper = styled.div`
54
- background-color: ${({ themeColor }) => hexToRgba(themeColor, 0.1)};
55
- height: ${({ variant }) => (variant === 'confirmation' ? '3.5rem' : '4rem')};
56
- width: ${({ variant }) => (variant === 'confirmation' ? '3.5rem' : '4rem')};
57
- border-radius: 9999px;
58
- display: flex;
59
- align-items: center;
60
- justify-content: center;
61
- margin: 0 auto
62
- ${({ variant }) => (variant === 'confirmation' ? '0.75rem' : '1rem')};
63
-
64
- @media (min-width: 640px) {
65
- height: ${({ variant }) => (variant === 'confirmation' ? '4rem' : '5rem')};
66
- width: ${({ variant }) => (variant === 'confirmation' ? '4rem' : '5rem')};
67
- margin-bottom: ${({ variant }) =>
68
- variant === 'confirmation' ? '1rem' : '1.25rem'};
69
- }
70
-
71
- svg {
72
- height: ${({ variant }) =>
73
- variant === 'confirmation' ? '1.75rem' : '2rem'};
74
- width: ${({ variant }) =>
75
- variant === 'confirmation' ? '1.75rem' : '2rem'};
76
- color: ${({ themeColor }) => themeColor};
77
-
78
- @media (min-width: 640px) {
79
- height: ${({ variant }) =>
80
- variant === 'confirmation' ? '2rem' : '2.5rem'};
81
- width: ${({ variant }) =>
82
- variant === 'confirmation' ? '2rem' : '2.5rem'};
83
- }
84
- }
85
- `;
86
-
87
- const Title = styled.h2`
88
- text-align: center;
89
- font-size: 1.125rem;
90
- color: ${({ themeColor }) => themeColor};
91
- margin-bottom: ${({ variant }) =>
92
- variant === 'confirmation' ? '0.25rem' : '0.5rem'};
93
-
94
- @media (min-width: 640px) {
95
- font-size: 1.25rem;
96
- margin-bottom: ${({ variant }) =>
97
- variant === 'confirmation' ? '0.5rem' : '0.75rem'};
98
- }
99
- `;
100
-
101
- const Description = styled.p`
102
- text-align: center;
103
- font-size: ${({ variant }) =>
104
- variant === 'confirmation' ? '0.75rem' : '0.875rem'};
105
- color: #6b7280;
106
-
107
- @media (min-width: 640px) {
108
- font-size: ${({ variant }) =>
109
- variant === 'confirmation' ? '0.875rem' : '1rem'};
110
- }
111
- `;
112
-
113
- const BmCustomCardTitle = ({
114
- icon: Icon,
115
- themeColor = '#33B1BA',
116
- title,
117
- description,
118
- variant = 'booking',
119
- withStripe = false,
120
- }) => {
121
- const content = (
122
- <CardContainer variant={variant}>
123
- <IconWrapper themeColor={themeColor} variant={variant}>
124
- {Icon && <Icon />}
125
- </IconWrapper>
126
- {title && <Title variant={variant}>{title}</Title>}
127
- {description && (
128
- <Description variant={variant}>{description}</Description>
129
- )}
130
- </CardContainer>
131
- );
132
-
133
- return withStripe ? (
134
- <BackgroundStripe themeColor={themeColor} variant={variant}>
135
- {content}
136
- </BackgroundStripe>
137
- ) : (
138
- content
139
- );
140
- };
141
-
142
- export default BmCustomCardTitle;
@@ -1,83 +0,0 @@
1
- import React from 'react';
2
-
3
- // MUI icons
4
- import CalendarTodayOutlinedIcon from '@mui/icons-material/CalendarTodayOutlined';
5
- import CheckIcon from '@mui/icons-material/Check';
6
- import AccessTimeIcon from '@mui/icons-material/AccessTime';
7
- import FavoriteIcon from '@mui/icons-material/Favorite';
8
- import BmCustomCardTitle from './CustomCardTitle';
9
-
10
- // Icon options mapped by name
11
- const iconOptions = {
12
- Calendar: CalendarTodayOutlinedIcon,
13
- Check: CheckIcon,
14
- Clock: AccessTimeIcon,
15
- Heart: FavoriteIcon,
16
- };
17
-
18
- const Template = (args) => {
19
- return (
20
- <div style={{ maxWidth: 500, margin: '2rem auto' }}>
21
- <BmCustomCardTitle {...args} />
22
- </div>
23
- );
24
- };
25
-
26
- export const Default = Template.bind({});
27
- Default.args = {
28
- icon: CalendarTodayOutlinedIcon,
29
- themeColor: '#33B1BA',
30
- title: 'Book Your Medical Appointment',
31
- description:
32
- 'Schedule a 30-minute consultation with our healthcare specialists',
33
- variant: 'booking',
34
- withStripe: true,
35
- };
36
-
37
- Default.argTypes = {
38
- icon: {
39
- control: {
40
- type: 'select',
41
- labels: Object.keys(iconOptions),
42
- },
43
- options: Object.keys(iconOptions),
44
- mapping: iconOptions,
45
- },
46
- themeColor: {
47
- control: 'color',
48
- },
49
- title: {
50
- control: 'text',
51
- },
52
- description: {
53
- control: 'text',
54
- },
55
- variant: {
56
- control: {
57
- type: 'radio',
58
- },
59
- options: ['booking', 'confirmation'],
60
- },
61
- withStripe: {
62
- control: {
63
- type: 'boolean',
64
- },
65
- },
66
- };
67
-
68
- export default {
69
- title: 'Components/BmCustomCardTitle',
70
- component: BmCustomCardTitle,
71
- argTypes: Default.argTypes,
72
- };
73
-
74
- export const Example = () => {
75
- <BmCustomCardTitle
76
- icon={CalendarTodayOutlinedIcon}
77
- themeColor="#33B1BA"
78
- title="Book Your Medical Appointment"
79
- description="Schedule a 30-minute consultation with our healthcare specialists"
80
- variant="booking"
81
- withStripe
82
- />;
83
- };