oddsgate-ds 1.0.73 → 1.0.74

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,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ITabs, ITabsItem } from './Tabs.interface';
3
- export declare const StyledTabsMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, ITabs>> & string;
3
+ export declare const StyledTabsMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../../atoms/ScrollingNav/ScrollingNav.interface").IScrollingNav, ITabs>> & string & Omit<({ align, children, className, ...props }: import("../../atoms/ScrollingNav/ScrollingNav.interface").IScrollingNav) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
4
4
  export declare const StyledTabsLinks: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, ITabsItem>> & string;
5
5
  export declare const StyledTabsContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ITabsItem>> & string;
6
6
  export declare const StyledTabs: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ITabs>> & string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -40,6 +40,9 @@ export const StyledScrollingNav = styled.div<IScrollingNav>`
40
40
  &:first-child {
41
41
  margin-left: 0 !important;
42
42
  }
43
+ &:last-child {
44
+ margin-right: 0 !important;
45
+ }
43
46
  }
44
47
  `;
45
48
  case "right":
@@ -1,5 +1,5 @@
1
1
  import { IAccordion, IAccordionItem } from './Accordion.interface';
2
- import { colors, easeOutExpo } from '@/styles/variables';
2
+ import { colors, easeOutExpo, responsiveMedia } from '@/styles/variables';
3
3
  import styled, { css } from 'styled-components';
4
4
 
5
5
  export const StyledAccordionTitle = styled.span<IAccordionItem>`
@@ -34,6 +34,7 @@ export const StyledAccordionTitle = styled.span<IAccordionItem>`
34
34
 
35
35
  transition: all 0.6s ${easeOutExpo};
36
36
  }
37
+
37
38
  `
38
39
 
39
40
  export const StyledAccordionContent = styled.div<IAccordionItem>`
@@ -41,12 +42,15 @@ export const StyledAccordionContent = styled.div<IAccordionItem>`
41
42
  display: grid;
42
43
  grid-template-rows: 0fr;
43
44
  overflow: hidden;
44
- padding-right: 6rem;
45
45
  transition: all 0.5s linear;
46
46
 
47
47
  ${({ active }) => active && `
48
48
  grid-template-rows: 1fr;
49
49
  `}
50
+
51
+ @media only screen and (max-width: ${responsiveMedia}) {
52
+ padding-right: 6rem;
53
+ }
50
54
  `
51
55
 
52
56
  export const StyledAccordionItem = styled.li<IAccordionItem>`
@@ -15,18 +15,22 @@ const Tabs = ({ id, title, menu, vertical, className, style }: ITabs) => {
15
15
  const setActiveEl = (item, index) => {
16
16
  if (item?.onClick) item?.onClick()
17
17
 
18
- setActive(index)
18
+ setActive(index);
19
+
20
+ // setTimeout(() => {
21
+ // document.querySelector(`.tabs-menu`).style.height = "auto";
22
+ // }, 350)
19
23
  }
20
24
 
21
25
  return (
22
26
  <StyledTabs id={id} vertical={vertical} className={className} style={style}>
23
27
  <div>
24
28
  {title && <Heading tag="h3" size="h1" className='text-uppercase mb-4'>{title}</Heading>}
25
- <StyledTabsMenu>
29
+ <StyledTabsMenu align='left'>
26
30
  {menu &&
27
31
  menu.map((item, index) => {
28
32
  return (
29
- <li key={`tab-${item.id}`}>
33
+ <div key={`tab-${item.id}`}>
30
34
  <StyledTabsLinks
31
35
  $active={index === active}
32
36
  className='h3 fw-bold'
@@ -36,13 +40,13 @@ const Tabs = ({ id, title, menu, vertical, className, style }: ITabs) => {
36
40
  >
37
41
  <span>{item.label}</span>
38
42
  </StyledTabsLinks>
39
- </li>
43
+ </div>
40
44
  )
41
45
  })}
42
46
  </StyledTabsMenu>
43
47
  </div>
44
48
  {menu && (
45
- <div>
49
+ <div className="tabs-menu">
46
50
  {menu.map((item, index) => {
47
51
  return (
48
52
  <StyledTabsContent
@@ -2,16 +2,10 @@ import { ITabs, ITabsItem } from './Tabs.interface';
2
2
  import { colors, responsiveMedia } from '@/styles/variables';
3
3
  import styled, { css, keyframes } from 'styled-components';
4
4
 
5
- export const StyledTabsMenu = styled.ul<ITabs>`
6
- display: inline-flex;
7
- flex-flow: column;
8
-
9
- gap: 16px;
10
- list-style: none;
11
- padding: 0;
5
+ import ScrollingNav from '@/components/atoms/ScrollingNav/ScrollingNav.component';
12
6
 
7
+ export const StyledTabsMenu = styled(ScrollingNav) <ITabs>`
13
8
  @media only screen and (min-width: ${responsiveMedia}) {
14
- flex-flow: row wrap;
15
9
  align-items: center;
16
10
  justify-content: center;
17
11
  }
@@ -47,9 +41,6 @@ export const StyledTabsContent = styled.div<ITabsItem>`
47
41
  border-radius: 48px 0;
48
42
  padding: 36px;
49
43
 
50
- opacity: 0;
51
- transform: translateY(40px);
52
-
53
44
  @media only screen and (min-width: ${responsiveMedia}) {
54
45
  min-height: 40rem;
55
46
  }
@@ -71,14 +62,8 @@ export const StyledTabsContent = styled.div<ITabsItem>`
71
62
  }
72
63
  }
73
64
 
74
- @keyframes fadeIn{
75
- from { display: none; }
76
- to { transform: translateY(0px); opacity: 1;}
77
- }
78
-
79
65
  ${({ $active }) => $active && `
80
- animation: 0.8s fadeIn forwards;
81
- display: flex;
66
+ display:flex;
82
67
  `}
83
68
 
84
69
  `
@@ -90,6 +75,10 @@ export const StyledTabs = styled.div<ITabs>`
90
75
  flex-flow: column;
91
76
  gap: 16px;
92
77
 
78
+ & > div{
79
+ width: 100%;
80
+ }
81
+
93
82
  ${({ vertical }) => vertical && `
94
83
  @media only screen and (min-width: ${responsiveMedia}) {
95
84
  flex-flow: row;
@@ -106,6 +95,7 @@ export const StyledTabs = styled.div<ITabs>`
106
95
  }
107
96
 
108
97
  ${StyledTabsMenu}{
98
+ display: inline-flex;
109
99
  flex-flow: column;
110
100
  align-items: stretch;
111
101
  justify-content: flex-start;