oddsgate-ds 1.0.30 → 1.0.32

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 (28) hide show
  1. package/dist/cjs/index.js +5 -5
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/atoms/Chip/Chip.component.d.ts +1 -1
  4. package/dist/cjs/types/components/atoms/Chip/Chip.interface.d.ts +4 -0
  5. package/dist/cjs/types/components/atoms/Flex/Flex.component.d.ts +2 -2
  6. package/dist/cjs/types/components/atoms/Flex/Flex.interface.d.ts +2 -0
  7. package/dist/esm/index.js +5 -5
  8. package/dist/esm/index.js.map +1 -1
  9. package/dist/esm/types/components/atoms/Chip/Chip.component.d.ts +1 -1
  10. package/dist/esm/types/components/atoms/Chip/Chip.interface.d.ts +4 -0
  11. package/dist/esm/types/components/atoms/Flex/Flex.component.d.ts +2 -2
  12. package/dist/esm/types/components/atoms/Flex/Flex.interface.d.ts +2 -0
  13. package/dist/types.d.ts +7 -2
  14. package/package.json +1 -1
  15. package/src/components/atoms/Button/Button.component.tsx +13 -3
  16. package/src/components/atoms/Button/Button.theme.ts +23 -10
  17. package/src/components/atoms/Chip/Chip.component.tsx +5 -1
  18. package/src/components/atoms/Chip/Chip.interface.ts +4 -0
  19. package/src/components/atoms/Chip/Chip.theme.ts +4 -4
  20. package/src/components/atoms/Flex/Flex.component.tsx +3 -3
  21. package/src/components/atoms/Flex/Flex.interface.ts +2 -0
  22. package/src/components/atoms/Flex/Flex.theme.ts +1 -0
  23. package/src/components/atoms/SocialLinks/SocialLinks.theme.ts +1 -0
  24. package/src/components/molecules/Accordion/Accordion.component.tsx +1 -1
  25. package/src/components/molecules/Accordion/Accordion.theme.ts +1 -1
  26. package/src/components/organisms/CircularSlider/CircularSlider.component.tsx +0 -1
  27. package/src/components/organisms/Tabs/Tabs.component.tsx +3 -1
  28. package/src/components/organisms/Tabs/Tabs.theme.ts +21 -1
@@ -1,4 +1,4 @@
1
1
  import { IChip } from './Chip.interface';
2
2
  import React from 'react';
3
- declare const Chip: ({ variant, hover, className, style, children, ...props }: IChip) => React.JSX.Element;
3
+ declare const Chip: ({ variant, hover, active, className, style, children, onClick, ...props }: IChip) => React.JSX.Element;
4
4
  export default Chip;
@@ -3,7 +3,11 @@ export interface IChip {
3
3
  variant?: string;
4
4
  $variant?: string;
5
5
  hover?: boolean;
6
+ $hover?: boolean;
7
+ $active?: boolean;
8
+ active?: boolean;
6
9
  className?: string;
7
10
  style?: CSSProperties;
8
11
  children?: React.ReactNode;
12
+ onClick?: (event?: React.MouseEvent<HTMLElement>) => void;
9
13
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
1
  import { IFlex } from './Flex.interface';
3
- declare const Flex: ({ direction, align, justify, wrap, children, className, ...props }: IFlex) => React.JSX.Element;
2
+ import React from 'react';
3
+ declare const Flex: ({ direction, align, justify, wrap, gap, children, className, ...props }: IFlex) => React.JSX.Element;
4
4
  export default Flex;
@@ -11,11 +11,13 @@ export interface IFlex extends IFlexBase {
11
11
  align?: flexAlign;
12
12
  justify?: flexJustify;
13
13
  wrap?: 'wrap' | 'nowrap';
14
+ gap?: string;
14
15
  }
15
16
  export interface IFlexSC extends IFlexBase {
16
17
  $direction?: 'row' | 'column';
17
18
  $align?: flexAlign;
18
19
  $justify?: flexJustify;
19
20
  $wrap?: 'wrap' | 'nowrap';
21
+ $gap?: string;
20
22
  }
21
23
  export {};
package/dist/types.d.ts CHANGED
@@ -186,9 +186,10 @@ interface IFlex extends IFlexBase {
186
186
  align?: flexAlign;
187
187
  justify?: flexJustify;
188
188
  wrap?: 'wrap' | 'nowrap';
189
+ gap?: string;
189
190
  }
190
191
 
191
- declare const Flex: ({ direction, align, justify, wrap, children, className, ...props }: IFlex) => React__default.JSX.Element;
192
+ declare const Flex: ({ direction, align, justify, wrap, gap, children, className, ...props }: IFlex) => React__default.JSX.Element;
192
193
 
193
194
  type IIcon = {
194
195
  icon?: string;
@@ -203,12 +204,16 @@ interface IChip {
203
204
  variant?: string;
204
205
  $variant?: string;
205
206
  hover?: boolean;
207
+ $hover?: boolean;
208
+ $active?: boolean;
209
+ active?: boolean;
206
210
  className?: string;
207
211
  style?: CSSProperties;
208
212
  children?: React.ReactNode;
213
+ onClick?: (event?: React.MouseEvent<HTMLElement>) => void;
209
214
  }
210
215
 
211
- declare const Chip: ({ variant, hover, className, style, children, ...props }: IChip) => React__default.JSX.Element;
216
+ declare const Chip: ({ variant, hover, active, className, style, children, onClick, ...props }: IChip) => React__default.JSX.Element;
212
217
 
213
218
  type IQuote = {
214
219
  id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1,4 +1,5 @@
1
1
  import { IButton } from './Button.interface'
2
+ import Icon from '../Icon/Icon.component'
2
3
  import React from 'react'
3
4
  import { StyledButton } from './Button.theme'
4
5
 
@@ -38,9 +39,18 @@ const Button = ({
38
39
  className={className}
39
40
  {...props}
40
41
  >
41
- {leftIcon}
42
- {children && <span>{children}</span>}
43
- {rightIcon}
42
+ {variant === "primary" ? (
43
+ <>
44
+ {children && <span>{children}</span>}
45
+ <Icon icon={"icon-arrow-right"} />
46
+ </>
47
+ ) : (
48
+ <>
49
+ {leftIcon}
50
+ {children && <span>{children}</span>}
51
+ {rightIcon}
52
+ </>
53
+ )}
44
54
  </StyledButton>
45
55
  )
46
56
  }
@@ -5,6 +5,7 @@ import { IButtonSC } from './Button.interface';
5
5
  import { fontSize } from '@/styles/utilities';
6
6
 
7
7
  export const StyledButton = styled.a<IButtonSC>`
8
+ position: relative;
8
9
  display: inline-flex;
9
10
  vertical-align: middle;
10
11
  justify-content: center;
@@ -36,7 +37,7 @@ export const StyledButton = styled.a<IButtonSC>`
36
37
  case "primary": default:
37
38
  return css`
38
39
  ${fontSize('h4')};
39
- padding: 28px 36px;
40
+ padding: 2rem 2.8rem;
40
41
  border-radius: 50px;
41
42
  text-transform:uppercase;
42
43
 
@@ -44,26 +45,38 @@ export const StyledButton = styled.a<IButtonSC>`
44
45
  color: ${colors.primary50};
45
46
  background-color: ${colors.secondary50};
46
47
 
47
- &:hover{
48
- color: ${colors.secondary50};
49
- background-color: ${colors.primary50};
50
- }
51
48
  ` : `
52
49
  color: ${colors.secondary50};
53
50
  background-color: ${colors.primary50};
51
+ `}
52
+
53
+ & span{
54
+ transition: all 0.3s ease;
55
+ }
56
+ & i{
57
+ position: absolute;
58
+ top: 50%;
59
+ right: 1.8rem;
60
+ opacity: 0;
61
+ transform: scale(0) translateX(-4px) translateY(-50%);
62
+ }
54
63
 
55
- &:hover{
56
- color: ${colors.primary50};
57
- background-color: ${colors.secondary50};
64
+ &:hover{
65
+ & span{
66
+ transform: translateX(-1rem);
58
67
  }
59
- `}
68
+ & i{
69
+ opacity: 1;
70
+ transform: scale(1) translateX(0) translateY(-50%);
71
+ }
72
+ }
60
73
  `;
61
74
  case "secondary":
62
75
  return css`
63
76
  ${fontSize('h5')};
64
77
  font-weight: 700;
65
78
  text-transform:uppercase;
66
- padding: 10px 20px;
79
+ padding: 0.8rem 1.6rem;
67
80
  border-radius: 50px;
68
81
 
69
82
  ${props.$mode === "light" ? `
@@ -6,17 +6,21 @@ import cn from 'classnames'
6
6
  const Chip = ({
7
7
  variant,
8
8
  hover,
9
+ active,
9
10
  className,
10
11
  style,
11
12
  children,
13
+ onClick,
12
14
  ...props
13
15
  }: IChip) => {
14
16
  return (
15
17
  <StyledChip
16
18
  $variant={variant}
17
- hover={hover}
19
+ $hover={hover}
20
+ $active={active}
18
21
  className={cn('captions', className)}
19
22
  style={style}
23
+ onClick={onClick}
20
24
  >
21
25
  {children}
22
26
  </StyledChip>
@@ -4,7 +4,11 @@ export interface IChip {
4
4
  variant?: string;
5
5
  $variant?: string;
6
6
  hover?: boolean,
7
+ $hover?: boolean,
8
+ $active?: boolean,
9
+ active?: boolean,
7
10
  className?: string,
8
11
  style?: CSSProperties
9
12
  children?: React.ReactNode
13
+ onClick?: (event?: React.MouseEvent<HTMLElement>) => void
10
14
  }
@@ -15,10 +15,10 @@ export const StyledChip = styled.div<IChip>`
15
15
  switch (props.$variant) {
16
16
  case "dark": default:
17
17
  return css`
18
- color: ${colors.white};
18
+ color: ${props.$active ? colors.white : colors.black};
19
19
  border: 1px solid ${colors.white};
20
20
 
21
- ${props.hover && `
21
+ ${props.$hover && !props.$active && `
22
22
  &:hover{
23
23
  color: ${colors.black};
24
24
  background-color: ${colors.white};
@@ -30,7 +30,7 @@ export const StyledChip = styled.div<IChip>`
30
30
  color: ${colors.black};
31
31
  border: 1px solid ${colors.black};
32
32
 
33
- ${props.hover && `
33
+ ${props.$hover && !props.$active && `
34
34
  &:hover{
35
35
  color: ${colors.white};
36
36
  background-color: ${colors.black};
@@ -40,7 +40,7 @@ export const StyledChip = styled.div<IChip>`
40
40
  }
41
41
  }}
42
42
 
43
- ${({ hover }) => hover && `
43
+ ${({ $hover }) => $hover && `
44
44
  transition: all 0.3s linear;
45
45
  cursor:pointer;
46
46
  `}
@@ -1,14 +1,13 @@
1
+ import { IFlex } from './Flex.interface';
1
2
  import React from 'react';
2
-
3
3
  import { StyledFlex } from '@/components/atoms/Flex/Flex.theme';
4
4
 
5
- import { IFlex } from './Flex.interface';
6
-
7
5
  const Flex = ({
8
6
  direction,
9
7
  align,
10
8
  justify,
11
9
  wrap,
10
+ gap,
12
11
  children,
13
12
  className,
14
13
  ...props
@@ -19,6 +18,7 @@ const Flex = ({
19
18
  $align={align}
20
19
  $justify={justify}
21
20
  $wrap={wrap}
21
+ $gap={gap}
22
22
  className={className}
23
23
  {...props}
24
24
  >
@@ -13,10 +13,12 @@ export interface IFlex extends IFlexBase{
13
13
  align?: flexAlign,
14
14
  justify?: flexJustify,
15
15
  wrap?: 'wrap' | 'nowrap',
16
+ gap?: string,
16
17
  }
17
18
  export interface IFlexSC extends IFlexBase {
18
19
  $direction?: 'row' | 'column',
19
20
  $align?: flexAlign,
20
21
  $justify?: flexJustify,
21
22
  $wrap?: 'wrap' | 'nowrap',
23
+ $gap?: string,
22
24
  }
@@ -8,4 +8,5 @@ export const StyledFlex = styled.div<IFlexSC>`
8
8
  align-items: ${props => props.$align ? props.$align : "center"};
9
9
  justify-content: ${props => props.$justify ? props.$justify : "start"};
10
10
  flex-wrap: ${props => props.$wrap ? props.$wrap : "wrap"};
11
+ gap: ${props => props.$gap ? props.$gap : ""};
11
12
  `;
@@ -6,6 +6,7 @@ import { colors } from '@/styles/variables';
6
6
  export const StyledSocialLinks = styled.ul<ISocialLinks>`
7
7
  display: inline-flex;
8
8
  align-items: center;
9
+ flex-flow: row wrap;
9
10
  gap: 12px;
10
11
 
11
12
  & li{
@@ -40,7 +40,7 @@ export const AccordionItem = ({
40
40
  }}
41
41
  >
42
42
  <span>{title}</span>
43
- <Icon className={active ? 'icon-arrowUp' : 'icon-arrowDown'} />
43
+ <Icon className={active ? 'icon-arrowDown' : 'icon-arrowUp'} />
44
44
  </StyledAccordionTitle>
45
45
  <StyledAccordionContent
46
46
  ref={contentEl}
@@ -52,7 +52,7 @@ export const StyledAccordionContent = styled.div<IAccordionItem>`
52
52
  export const StyledAccordionItem = styled.li<IAccordionItem>`
53
53
  position: relative;
54
54
  width: 100%;
55
- padding: 1rem 2.4rem;
55
+ padding: 2rem 2.4rem;
56
56
  border-radius: 50px;
57
57
  color: ${colors.third50};
58
58
  background-color: ${colors.secondary50};
@@ -87,7 +87,6 @@ const CircularSlider = ({
87
87
  }
88
88
 
89
89
  const sliderResize = () => {
90
- console.log(slider?.current?.getBoundingClientRect().width);
91
90
  let radius,
92
91
  w = slider?.current ? slider?.current?.getBoundingClientRect().width : 0,
93
92
  h = slider?.current ? slider?.current.getBoundingClientRect().height : 0;
@@ -50,7 +50,9 @@ const Tabs = ({ id, title, menu, vertical, className, style }: ITabs) => {
50
50
  $active={index === active}
51
51
  className='h4'
52
52
  >
53
- {item.content}
53
+
54
+ <div>{item.content}</div>
55
+ <Heading tag='span' size='h3' className='color-secondary50 fw-bold mt-5'>{item.label}</Heading>
54
56
  </StyledTabsContent>
55
57
  )
56
58
  })}
@@ -41,14 +41,34 @@ export const StyledTabsLinks = styled.a<ITabsItem>`
41
41
 
42
42
  export const StyledTabsContent = styled.div<ITabsItem>`
43
43
  display: none;
44
+ flex-flow: row wrap;
44
45
 
45
46
  background-color: ${colors.primary50};
46
47
  border-radius: 48px 0;
47
48
  padding: 36px;
48
49
 
50
+ min-height: 40rem;
51
+
49
52
  opacity: 0;
50
53
  transform: translateY(40px);
51
54
 
55
+ & > span{
56
+ display: flex;
57
+ align-items:center;
58
+ align-self: flex-end;
59
+ gap: 1rem;
60
+
61
+ width: 100%;
62
+
63
+ &:before{
64
+ content:'';
65
+ width: 3rem;
66
+ height: 3rem;
67
+ border-radius: 100%;
68
+ background-color: ${colors.third50};
69
+ }
70
+ }
71
+
52
72
  @keyframes fadeIn{
53
73
  from { display: none; }
54
74
  to { transform: translateY(0px); opacity: 1;}
@@ -56,7 +76,7 @@ export const StyledTabsContent = styled.div<ITabsItem>`
56
76
 
57
77
  ${({ $active }) => $active && `
58
78
  animation: 0.8s fadeIn forwards;
59
- display: block;
79
+ display: flex;
60
80
  `}
61
81
 
62
82
  `