oddsgate-ds 1.0.179 → 1.0.182

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.
@@ -1,4 +1,4 @@
1
1
  import { INewsCard } from './NewsCard.interface';
2
2
  import React from 'react';
3
- declare const NewsCard: ({ variant, date, category, title, imageElement, linkElement, description, ...props }: INewsCard) => React.JSX.Element;
3
+ declare const NewsCard: ({ variant, date, category, title, imageElement, linkElement, description, bgColor, ...props }: INewsCard) => React.JSX.Element;
4
4
  export default NewsCard;
@@ -6,4 +6,5 @@ export interface INewsCard extends ICard {
6
6
  title?: string;
7
7
  description?: string | React.ReactElement;
8
8
  linkElement?: React.ReactElement;
9
+ bgColor?: string;
9
10
  }
package/dist/types.d.ts CHANGED
@@ -593,9 +593,10 @@ interface INewsCard extends ICard {
593
593
  title?: string;
594
594
  description?: string | React.ReactElement;
595
595
  linkElement?: React.ReactElement;
596
+ bgColor?: string;
596
597
  }
597
598
 
598
- declare const NewsCard: ({ variant, date, category, title, imageElement, linkElement, description, ...props }: INewsCard) => React__default.JSX.Element;
599
+ declare const NewsCard: ({ variant, date, category, title, imageElement, linkElement, description, bgColor, ...props }: INewsCard) => React__default.JSX.Element;
599
600
 
600
601
  interface IEventsCard extends ICard {
601
602
  date?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.179",
3
+ "version": "1.0.182",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1,9 +1,7 @@
1
- import Chip from '@/components/atoms/Chip/Chip.component'
2
1
  import Heading from '@/components/atoms/Heading'
3
2
  import { INewsCard } from './NewsCard.interface'
4
3
  import ImageWrapper from '@/components/atoms/ImageWrapper'
5
4
  import React from 'react'
6
-
7
5
  import { StyledNewsCard } from './NewsCard.theme'
8
6
 
9
7
  const NewsCard = ({
@@ -14,6 +12,7 @@ const NewsCard = ({
14
12
  imageElement,
15
13
  linkElement,
16
14
  description,
15
+ bgColor,
17
16
  ...props
18
17
  }: INewsCard) => {
19
18
  return (
@@ -24,6 +23,12 @@ const NewsCard = ({
24
23
  <ImageWrapper aspectRatioHeight={63}>{imageElement}</ImageWrapper>
25
24
  </>
26
25
  }
26
+ style={
27
+ bgColor
28
+ ? { backgroundColor: bgColor, ...(props.style || {}) }
29
+ : props.style
30
+ }
31
+ {...props}
27
32
  >
28
33
  <div>
29
34
  <Heading
@@ -6,4 +6,5 @@ export interface INewsCard extends ICard {
6
6
  title?: string
7
7
  description?: string | React.ReactElement
8
8
  linkElement?: React.ReactElement
9
+ bgColor?: string
9
10
  }
@@ -23,22 +23,19 @@ const image = (
23
23
  )
24
24
 
25
25
  export const Simple: StoryObj<INewsCard> = {
26
- render: args => <NewsCard {...args} style={{ maxWidth: '320px' }}></NewsCard>,
27
26
  args: {
28
27
  date: '24 nov 23',
29
28
  category: 'Category name',
30
29
  title: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
31
30
  imageElement: image,
32
- linkElement: <a href="#" className="linker"></a>
31
+ linkElement: <a href="#" className="linker"></a>,
33
32
  }
34
33
  }
35
34
 
36
35
  export const Featured: StoryObj<INewsCard> = {
37
- render: args => (
38
- <NewsCard {...args} style={{ maxWidth: '620px' }}></NewsCard>
39
- ),
40
36
  args: {
41
37
  ...Simple.args,
42
- variant: "featured"
38
+ variant: 'featured',
39
+ bgColor: '#FF4552',
43
40
  }
44
41
  }
@@ -2,34 +2,34 @@ export const pxToRem = (size: number) => {
2
2
  return (size / 16) * 1 + 'rem'
3
3
  }
4
4
 
5
- export const fontName = "MD Nichrome"
6
- export const alternativeFont = "Epilogue";
5
+ export const fontName = 'MD Nichrome'
6
+ export const alternativeFont = 'Epilogue'
7
7
 
8
- export const gutter = pxToRem(8); //needs to be in this file
8
+ export const gutter = pxToRem(8) //needs to be in this file
9
9
 
10
- export const desktop_width: number = 1620; //container size of design on desktop
11
- export const tablet_width: number = 768; //container size of design on tablet
12
- export const mobile_width: number = 375; //container size of design on mobile
13
- export const responsiveMedia = "769px"; //container size of design on mobile
14
- export const responsiveMediaMax = "768px"; //mobile media value for bootstrap -> use this for max-width media queries
15
- export const mobileMedia = "360px"; //mobile media value
10
+ export const desktop_width: number = 1620 //container size of design on desktop
11
+ export const tablet_width: number = 768 //container size of design on tablet
12
+ export const mobile_width: number = 375 //container size of design on mobile
13
+ export const responsiveMedia = '769px' //container size of design on mobile
14
+ export const responsiveMediaMax = '768px' //mobile media value for bootstrap -> use this for max-width media queries
15
+ export const mobileMedia = '360px' //mobile media value
16
16
 
17
- export const easeOutExpo = "cubic-bezier(.32,.94,.6,1);";
17
+ export const easeOutExpo = 'cubic-bezier(.32,.94,.6,1);'
18
18
 
19
19
  export type IBreakpoints = {
20
- $xs?: string,
21
- $sm?: string,
22
- $md?: string,
23
- $lg?: string,
24
- $xl?: string,
25
- $xxl?: string,
20
+ $xs?: string
21
+ $sm?: string
22
+ $md?: string
23
+ $lg?: string
24
+ $xl?: string
25
+ $xxl?: string
26
26
  }
27
27
 
28
28
  export const colors = <Record<string, string>>{
29
29
  // Defaults
30
30
  white: '#fff',
31
31
  black: '#000',
32
- transparent: "transparent",
32
+ transparent: 'transparent',
33
33
 
34
34
  // Gray
35
35
  gray10: '#FDFDF1',
@@ -42,6 +42,7 @@ export const colors = <Record<string, string>>{
42
42
 
43
43
  secondary10: '#FDFDF1',
44
44
  secondary50: '#FFFECC',
45
+ secondary300: '#440E3F',
45
46
 
46
47
  third10: '#440E3F',
47
48
  third50: '#33052F',
@@ -51,14 +52,14 @@ export const colors = <Record<string, string>>{
51
52
  // Feedback
52
53
  warning: '#ea9a1a',
53
54
  success: '#00FFD2',
54
- error: '#E91101',
55
- };
55
+ error: '#E91101'
56
+ }
56
57
 
57
58
  export const gradients = <Record<string, string>>{
58
59
  // Defaults
59
- primary: 'linear-gradient(to bottom, var(--color-secondary50) 0%, var(--color-secondary50) 50%, var(--color-third50) 50%, var(--color-third50) 100%)',
60
- };
61
-
60
+ primary:
61
+ 'linear-gradient(to bottom, var(--color-secondary50) 0%, var(--color-secondary50) 50%, var(--color-third50) 50%, var(--color-third50) 100%)'
62
+ }
62
63
 
63
64
  export const spaces = <Record<string, string>>{
64
65
  0: '0',
@@ -72,7 +73,7 @@ export const spaces = <Record<string, string>>{
72
73
  8: pxToRem(48),
73
74
  9: pxToRem(64),
74
75
  10: pxToRem(88),
75
- 11: pxToRem(120),
76
+ 11: pxToRem(120)
76
77
  }
77
78
  export const spacesNegative = <Record<string, string>>{
78
79
  0: '0',
@@ -85,68 +86,68 @@ export const spacesNegative = <Record<string, string>>{
85
86
  7: pxToRem(-48),
86
87
  8: pxToRem(-64),
87
88
  9: pxToRem(-88),
88
- 10: pxToRem(-120),
89
+ 10: pxToRem(-120)
89
90
  }
90
91
 
91
92
  //if responsive is not needed for a size just set the size as px instead of rem
92
93
  export const typography = <Record<string, Record<string, unknown>>>{
93
94
  display: {
94
- size: "250px",
95
- sizeMob: "64px",
96
- height: 0.9,
95
+ size: '250px',
96
+ sizeMob: '64px',
97
+ height: 0.9
97
98
  },
98
99
  h1: {
99
- size: "120px",
100
- sizeMob: "48px",
101
- height: 0.9,
100
+ size: '120px',
101
+ sizeMob: '48px',
102
+ height: 0.9
102
103
  },
103
104
  h2: {
104
- size: "80px",
105
- sizeMob: "36px",
106
- height: 1.2,
105
+ size: '80px',
106
+ sizeMob: '36px',
107
+ height: 1.2
107
108
  },
108
109
  h3: {
109
- size: "48px",
110
- sizeMob: "24px",
111
- height: 1.2,
110
+ size: '48px',
111
+ sizeMob: '24px',
112
+ height: 1.2
112
113
  },
113
114
  h4: {
114
- size: "36px",
115
- sizeMob: "20px",
116
- height: 1.4,
115
+ size: '36px',
116
+ sizeMob: '20px',
117
+ height: 1.4
117
118
  },
118
119
  h5: {
119
- size: "24px",
120
- sizeMob: "18px",
121
- height: 1.4,
120
+ size: '24px',
121
+ sizeMob: '18px',
122
+ height: 1.4
122
123
  },
123
124
  h6: {
124
- size: "18px",
125
- sizeMob: "16px",
126
- height: 1.4,
125
+ size: '18px',
126
+ sizeMob: '16px',
127
+ height: 1.4
127
128
  },
128
129
  texts: {
129
- size: "18px",
130
- sizeMob: "16px",
131
- height: 1.6,
130
+ size: '18px',
131
+ sizeMob: '16px',
132
+ height: 1.6
132
133
  },
133
134
  captions: {
134
- size: "16px",
135
- sizeMob: "13px",
136
- height: 1.2,
137
- },
138
- };
135
+ size: '16px',
136
+ sizeMob: '13px',
137
+ height: 1.2
138
+ }
139
+ }
139
140
 
140
141
  export const radius = <Record<string, string>>{
141
142
  sm: '12px',
142
143
  md: '24px',
143
144
  lg: '48px',
144
- rounded: '100px',
145
+ rounded: '100px'
145
146
  }
146
147
  export const shadows = <Record<string, string>>{
147
148
  sm: '10px 20px 20px rgba(0, 78, 210, 0.03)',
148
149
  md: '10px 30px 30px rgba(0, 78, 210, 0.05)',
149
- lg: '10px 40px 40px rgba(0, 78, 210, 0.07)',
150
+ lg: '10px 40px 40px rgba(0, 78, 210, 0.07)'
150
151
  }
151
152
  export const zIndexes = <Record<number, number>>{
152
153
  1: 1,
@@ -156,27 +157,27 @@ export const zIndexes = <Record<number, number>>{
156
157
  5: 5
157
158
  }
158
159
  export const grid_conf: {
159
- gridSize: number,
160
- gutter: number,
161
- mediaQuery: string,
162
- container: IBreakpoints,
160
+ gridSize: number
161
+ gutter: number
162
+ mediaQuery: string
163
+ container: IBreakpoints
163
164
  breakpoints: IBreakpoints
164
165
  } = {
165
166
  gridSize: 12,
166
167
  gutter: 16,
167
168
  mediaQuery: 'only screen',
168
169
  container: {
169
- $sm: "960px",
170
- $md: "1140px",
171
- $lg: "1320px",
172
- $xl: "1560px",
173
- $xxl: "1720px"
170
+ $sm: '960px',
171
+ $md: '1140px',
172
+ $lg: '1320px',
173
+ $xl: '1560px',
174
+ $xxl: '1720px'
174
175
  },
175
176
  breakpoints: {
176
- $xs: "",
177
- $sm: "576px",
178
- $md: "769px",
179
- $lg: "980px",
180
- $xl: "1280px"
177
+ $xs: '',
178
+ $sm: '576px',
179
+ $md: '769px',
180
+ $lg: '980px',
181
+ $xl: '1280px'
181
182
  }
182
183
  }