oddsgate-ds 1.0.15 → 1.0.17

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.
@@ -4,4 +4,5 @@ declare const _default: import("@storybook/types").ComponentAnnotations<import("
4
4
  export default _default;
5
5
  export declare const Primary: StoryObj<IButton>;
6
6
  export declare const Secondary: StoryObj<IButton>;
7
+ export declare const Link: StoryObj<IButton>;
7
8
  export declare const Disabled: StoryObj<IButton>;
@@ -2,5 +2,6 @@ import type { StoryObj } from '@storybook/react';
2
2
  import { ISocialLinks } from './SocialLinks.interface';
3
3
  declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
4
4
  export default _default;
5
+ export declare const Example: StoryObj<ISocialLinks>;
5
6
  export declare const Light: StoryObj<ISocialLinks>;
6
7
  export declare const Dark: StoryObj<ISocialLinks>;
@@ -19,6 +19,7 @@ export { default as Loader } from './components/atoms/Loader';
19
19
  export { default as EmptyState } from './components/atoms/EmptyState';
20
20
  export { default as CloseButton } from './components/atoms/CloseButton';
21
21
  export { default as ScrollingNav } from './components/atoms/ScrollingNav';
22
+ export { default as SocialLinks } from './components/atoms/SocialLinks';
22
23
  export { default as Marquee } from './components/atoms/Marquee';
23
24
  export { default as PortalComponent } from './components/common/PortalComponent';
24
25
  export { Accordion as Accordion } from './components/molecules/Accordion';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -50,6 +50,12 @@ export const Secondary: StoryObj<IButton> = {
50
50
  variant: 'secondary'
51
51
  }
52
52
  }
53
+ export const Link: StoryObj<IButton> = {
54
+ args: {
55
+ ...Primary.args,
56
+ variant: 'link'
57
+ }
58
+ }
53
59
  export const Disabled: StoryObj<IButton> = {
54
60
  args: {
55
61
  ...Primary.args,
@@ -9,10 +9,10 @@ export const StyledButton = styled.a<IButtonSC>`
9
9
  vertical-align: middle;
10
10
  justify-content: center;
11
11
  align-items: center;
12
+ gap: ${spaces[2]};
12
13
  border: 0;
13
14
  outline: 0;
14
15
  background-color: transparent;
15
- font-weight: 300;
16
16
 
17
17
  margin-right: ${spaces[3]};
18
18
 
@@ -25,77 +25,80 @@ export const StyledButton = styled.a<IButtonSC>`
25
25
  margin-right: 0;
26
26
  }
27
27
 
28
- &>span,
29
- &>i {
30
- display: inline-block;
31
- vertical-align: middle;
32
- }
33
-
34
28
  &>i {
35
29
  color: currentColor;
36
30
  transition: all 0.3s ease;
37
31
  }
38
32
 
39
- & *~span,
40
- & span~* {
41
- margin-left: ${spaces[2]};
42
- }
43
-
44
33
  ${(props) => {
45
34
  switch (props.$variant) {
46
35
  case "primary": default:
47
36
  return css`
48
- ${fontSize('h6')};
49
-
50
- & i{
51
- width: 3rem;
52
- height: 3rem;
53
- line-height: 3rem;
54
- font-size: 2.6rem;
55
-
56
- color: currentColor;
57
- border: 1px solid currentColor;
58
- border-radius: 50px;
59
-
60
- transition: all 0.3s linear;
61
- transform: rotateZ(-45deg);
62
- transform-origin: center center;
63
- text-align: center;
64
-
65
- &::before{
66
- line-height: inherit;
37
+ ${fontSize('h4')};
38
+ padding: 28px 36px;
39
+ border-radius: 50px;
40
+ text-transform:uppercase;
41
+
42
+ ${props.$mode === "light" ? `
43
+ color: ${colors.primary50};
44
+ background-color: ${colors.secondary50};
45
+
46
+ &:hover{
47
+ color: ${colors.secondary50};
48
+ background-color: ${colors.primary50};
67
49
  }
68
- }
50
+ ` : `
51
+ color: ${colors.secondary50};
52
+ background-color: ${colors.primary50};
69
53
 
70
- &:hover {
71
- & i{
72
- transform: rotateZ(0);
54
+ &:hover{
55
+ color: ${colors.primary50};
56
+ background-color: ${colors.secondary50};
73
57
  }
74
- }
75
-
76
- ${props.$mode === "dark" ? `
77
- color: ${colors.deepblue};
78
- ` : `
79
- color: ${colors.white};
80
58
  `}
81
59
  `;
82
60
  case "secondary":
83
61
  return css`
84
- ${fontSize('h6')};
85
-
86
- & span{
87
- text-decoration: underline;
88
- }
62
+ ${fontSize('h5')};
63
+ padding: 18px 26px;
64
+ border-radius: 50px;
65
+ text-transform:uppercase;
66
+
67
+ ${props.$mode === "light" ? `
68
+ color: ${colors.primary50};
69
+ background-color: ${colors.secondary50};
70
+
71
+ &:hover{
72
+ color: ${colors.secondary50};
73
+ background-color: ${colors.primary50};
74
+ }
75
+ ` : `
76
+ color: ${colors.secondary50};
77
+ background-color: ${colors.primary50};
89
78
 
90
- &:hover{
91
- opacity: 0.6;
92
- }
79
+ &:hover{
80
+ color: ${colors.primary50};
81
+ background-color: ${colors.secondary50};
82
+ }
83
+ `}
84
+ `;
85
+ case "link":
86
+ return css`
87
+ ${fontSize('h5')};
88
+ text-transform:uppercase;
93
89
 
90
+ ${props.$mode === "light" ? `
91
+ color: ${colors.third50};
94
92
 
95
- ${props.$mode === "dark" ? `
96
- color: ${colors.deepblue};
93
+ &:hover{
94
+ color: ${colors.secondary50};
95
+ }
97
96
  ` : `
98
- color: ${colors.white};
97
+ color: ${colors.secondary50};
98
+
99
+ &:hover{
100
+ color: ${colors.third50};
101
+ }
99
102
  `}
100
103
  `;
101
104
  }
@@ -20,7 +20,7 @@ export const FormField = ({
20
20
  {label && (
21
21
  <label
22
22
  htmlFor={itemID}
23
- className="d-blocks captions text-uppercase mb-2"
23
+ className="d-blocks h4 color-secondary90 text-uppercase mb-2"
24
24
  >
25
25
  {label}
26
26
  </label>
@@ -60,13 +60,15 @@ export const StyledFieldContainer = styled.div<IFormField>`
60
60
  textarea,
61
61
  select {
62
62
  font-family: inherit;
63
- ${fontSize('texts')};
63
+ ${fontSize('h4')};
64
+ font-weight: 700;
65
+ text-transform:uppercase;
64
66
 
65
- border-radius: 8px;
67
+ border-radius: 50px;
66
68
  border: 0;
67
69
 
68
70
  padding: 12px;
69
- background: transparent;
71
+ background: ${colors.secondary50};
70
72
  outline: none;
71
73
  width: 100%;
72
74
 
@@ -77,6 +79,11 @@ export const StyledFieldContainer = styled.div<IFormField>`
77
79
  }
78
80
  }
79
81
 
82
+ textarea{
83
+ border-radius: 46px;
84
+ height: 11.5rem;
85
+ }
86
+
80
87
  select{
81
88
  option{
82
89
  color: ${colors.primary70};
@@ -14,9 +14,11 @@ const SocialLinks = ({
14
14
 
15
15
  return (
16
16
  <StyledSocialLinks variant={variant} className={className} style={style}>
17
- {Object.keys(socials).map((social: string) => {
17
+ {Object.keys(socials).map((social: string, index:number) => {
18
+ if (!social) return <></>
19
+
18
20
  return (
19
- <li>
21
+ <li key={`social-${index}`}>
20
22
  <a
21
23
  href={socials[social]}
22
24
  target="_blank"
@@ -12,6 +12,20 @@ export default {
12
12
  argTypes: {}
13
13
  } as Meta
14
14
 
15
+
16
+ export const Example: StoryObj<ISocialLinks> = {
17
+ args: {
18
+ variant: 'light',
19
+ socials: {
20
+ facebook: 'https://www.facebook.com/wearemiew',
21
+ instagram: 'https://www.instagram.com/wearemiew/',
22
+ youtube: 'https://www.youtube.com/user/miewshapes',
23
+ linkedIn: 'https://www.linkedin.com/company/2470068/admin/'
24
+ }
25
+ }
26
+ }
27
+
28
+
15
29
  export const Light: StoryObj<ISocialLinks> = {
16
30
  render: args => <SocialLinks {...args} />,
17
31
  args: {
@@ -36,15 +36,15 @@ export const StyledSocialLinks = styled.ul<ISocialLinks>`
36
36
  case "light": default:
37
37
  return css`
38
38
  & li a{
39
- color: ${colors.white};
40
- background-color: ${colors.primary70};
39
+ color: ${colors.secondary50};
40
+ background-color: ${colors.primary50};
41
41
  }
42
42
  `;
43
43
  case "dark":
44
44
  return css`
45
45
  & li a{
46
- color: ${colors.primary70};
47
- background-color: ${colors.white};
46
+ color: ${colors.primary50};
47
+ background-color: ${colors.secondary50};
48
48
  }
49
49
  `;
50
50
  }
package/src/index.ts CHANGED
@@ -21,6 +21,7 @@ export { default as Loader } from './components/atoms/Loader'
21
21
  export { default as EmptyState } from './components/atoms/EmptyState'
22
22
  export { default as CloseButton } from './components/atoms/CloseButton'
23
23
  export { default as ScrollingNav } from './components/atoms/ScrollingNav'
24
+ export { default as SocialLinks } from './components/atoms/SocialLinks'
24
25
  export { default as Marquee } from './components/atoms/Marquee'
25
26
 
26
27
  //common
@@ -31,19 +31,18 @@ export const colors = <Record<string, string>>{
31
31
  transparent: "transparent",
32
32
 
33
33
  // Gray
34
- gray10: '#F5F3F1',
35
- gray20: '#C0BFBE',
36
- gray50: '#A0A0A0',
37
- gray70: '#6E6D6C',
38
- gray90: '#3C3B39',
34
+ gray10: '#FDFDF1',
35
+ gray20: '#FFFECC',
36
+ gray50: '#FFFECC',
37
+ gray70: '#82816C',
38
+ gray90: '#82816C',
39
39
 
40
- primary10: '#FC647C',
41
40
  primary50: '#FC3151',
42
- primary90: '#FC3151',
43
-
41
+
44
42
  secondary10: '#FDFDF1',
45
43
  secondary50: '#FFFECC',
46
-
44
+ secondary90: '#82816C',
45
+
47
46
  third10: '#440D3F',
48
47
  third50: '#2C0929',
49
48