oddsgate-ds 1.0.20 → 1.0.22
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.
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/Counter/Counter.component.d.ts +4 -0
- package/dist/cjs/types/components/atoms/Counter/Counter.interface.d.ts +9 -0
- package/dist/cjs/types/components/atoms/Counter/Counter.stories.d.ts +5 -0
- package/dist/cjs/types/components/atoms/Counter/Counter.theme.d.ts +3 -0
- package/dist/cjs/types/components/atoms/Counter/index.d.ts +1 -0
- package/dist/cjs/types/components/molecules/LogosCard/LogosCard.component.d.ts +4 -0
- package/dist/cjs/types/components/molecules/LogosCard/LogosCard.interface.d.ts +7 -0
- package/dist/cjs/types/components/molecules/LogosCard/LogosCard.stories.d.ts +5 -0
- package/dist/cjs/types/components/molecules/LogosCard/LogosCard.theme.d.ts +3 -0
- package/dist/cjs/types/components/molecules/LogosCard/index.d.ts +1 -0
- package/dist/cjs/types/components/organisms/Tabs/Tabs.component.d.ts +4 -0
- package/dist/cjs/types/components/organisms/Tabs/Tabs.interface.d.ts +16 -0
- package/dist/cjs/types/components/organisms/Tabs/Tabs.stories.d.ts +5 -0
- package/dist/cjs/types/components/organisms/Tabs/Tabs.theme.d.ts +6 -0
- package/dist/cjs/types/components/organisms/Tabs/index.d.ts +1 -0
- package/dist/cjs/types/helpers/useInterval.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/cjs/types/styles/variables.d.ts +2 -2
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/Counter/Counter.component.d.ts +4 -0
- package/dist/esm/types/components/atoms/Counter/Counter.interface.d.ts +9 -0
- package/dist/esm/types/components/atoms/Counter/Counter.stories.d.ts +5 -0
- package/dist/esm/types/components/atoms/Counter/Counter.theme.d.ts +3 -0
- package/dist/esm/types/components/atoms/Counter/index.d.ts +1 -0
- package/dist/esm/types/components/molecules/LogosCard/LogosCard.component.d.ts +4 -0
- package/dist/esm/types/components/molecules/LogosCard/LogosCard.interface.d.ts +7 -0
- package/dist/esm/types/components/molecules/LogosCard/LogosCard.stories.d.ts +5 -0
- package/dist/esm/types/components/molecules/LogosCard/LogosCard.theme.d.ts +3 -0
- package/dist/esm/types/components/molecules/LogosCard/index.d.ts +1 -0
- package/dist/esm/types/components/organisms/Tabs/Tabs.component.d.ts +4 -0
- package/dist/esm/types/components/organisms/Tabs/Tabs.interface.d.ts +16 -0
- package/dist/esm/types/components/organisms/Tabs/Tabs.stories.d.ts +5 -0
- package/dist/esm/types/components/organisms/Tabs/Tabs.theme.d.ts +6 -0
- package/dist/esm/types/components/organisms/Tabs/index.d.ts +1 -0
- package/dist/esm/types/helpers/useInterval.d.ts +1 -0
- package/dist/esm/types/index.d.ts +3 -0
- package/dist/esm/types/styles/variables.d.ts +2 -2
- package/dist/types.d.ts +41 -3
- package/package.json +1 -1
- package/src/components/atoms/Button/Button.theme.ts +1 -1
- package/src/components/atoms/Counter/Counter.component.tsx +50 -0
- package/src/components/atoms/Counter/Counter.interface.ts +10 -0
- package/src/components/atoms/Counter/Counter.stories.tsx +26 -0
- package/src/components/atoms/Counter/Counter.theme.ts +21 -0
- package/src/components/atoms/Counter/index.ts +1 -0
- package/src/components/atoms/FormField/CheckRadioField/CheckRadioField.theme.ts +8 -0
- package/src/components/atoms/FormField/FormField.theme.tsx +1 -23
- package/src/components/atoms/SocialLinks/SocialLinks.theme.ts +14 -0
- package/src/components/molecules/LogosCard/LogosCard.component.tsx +14 -0
- package/src/components/molecules/LogosCard/LogosCard.interface.ts +8 -0
- package/src/components/molecules/LogosCard/LogosCard.stories.tsx +38 -0
- package/src/components/molecules/LogosCard/LogosCard.theme.ts +19 -0
- package/src/components/molecules/LogosCard/index.ts +1 -0
- package/src/components/organisms/Tabs/Tabs.component.tsx +62 -0
- package/src/components/organisms/Tabs/Tabs.interface.ts +17 -0
- package/src/components/organisms/Tabs/Tabs.stories.tsx +115 -0
- package/src/components/organisms/Tabs/Tabs.theme.ts +70 -0
- package/src/components/organisms/Tabs/index.ts +1 -0
- package/src/helpers/useInterval.ts +25 -0
- package/src/index.ts +3 -0
- package/src/styles/variables.ts +13 -13
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ICounter } from './Counter.interface';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Example: StoryObj<ICounter>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ICounter } from './Counter.interface';
|
|
3
|
+
export declare const StyledCounter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ICounter>> & string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Counter.component';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ILogosCard } from './LogosCard.interface';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Simple: StoryObj<ILogosCard>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ILogosCard } from './LogosCard.interface';
|
|
3
|
+
export declare const StyledLogosCard: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ILogosCard>> & string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./LogosCard.component";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface ITabs {
|
|
3
|
+
id?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
menu?: ITabsItem[];
|
|
6
|
+
vertical?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export interface ITabsItem {
|
|
11
|
+
id?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
$active?: boolean;
|
|
14
|
+
content?: React.ReactNode;
|
|
15
|
+
onClick?: (event?: React.MouseEvent<HTMLElement>) => void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ITabs } from './Tabs.interface';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Simple: StoryObj<ITabs>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
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;
|
|
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
|
+
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>, ITabs>> & string;
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Tabs.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useInterval: (callback: any, delay: any) => void;
|
|
@@ -18,6 +18,7 @@ export { default as CheckRadioField } from './components/atoms/FormField/CheckRa
|
|
|
18
18
|
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
|
+
export { default as Counter } from './components/atoms/Counter';
|
|
21
22
|
export { default as ScrollingNav } from './components/atoms/ScrollingNav';
|
|
22
23
|
export { default as SocialLinks } from './components/atoms/SocialLinks';
|
|
23
24
|
export { default as Marquee } from './components/atoms/Marquee';
|
|
@@ -33,9 +34,11 @@ export { default as IconBox } from './components/molecules/IconBox';
|
|
|
33
34
|
export { default as IconTitle } from './components/molecules/IconTitle';
|
|
34
35
|
export { default as BlogCard } from './components/molecules/BlogCard';
|
|
35
36
|
export { default as TeamCard } from './components/molecules/TeamCard';
|
|
37
|
+
export { default as LogosCard } from './components/molecules/LogosCard';
|
|
36
38
|
export { default as ProjectCard } from './components/molecules/ProjectCard';
|
|
37
39
|
export { default as Slider } from './components/organisms/Slider';
|
|
38
40
|
export { default as Cover } from './components/organisms/Cover';
|
|
41
|
+
export { default as Tabs } from './components/organisms/Tabs';
|
|
39
42
|
export { default as CircularSlider } from './components/organisms/CircularSlider';
|
|
40
43
|
export { iconsList } from './helpers/getIcons';
|
|
41
44
|
export { default as GlobalStyles } from './styles/Global';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const pxToRem: (size: number) => string;
|
|
2
|
-
export declare const fontName = "
|
|
3
|
-
export declare const alternativeFont = "
|
|
2
|
+
export declare const fontName = "MD Nichrome";
|
|
3
|
+
export declare const alternativeFont = "Red Hat Display";
|
|
4
4
|
export declare const gutter: string;
|
|
5
5
|
export declare const desktop_width = "1360";
|
|
6
6
|
export declare const tablet_width = "768";
|
package/dist/types.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { spaces as spaces$1 } from '@/styles/variables';
|
|
|
4
4
|
import * as styled_components from 'styled-components';
|
|
5
5
|
|
|
6
6
|
declare const pxToRem: (size: number) => string;
|
|
7
|
-
declare const fontName = "
|
|
8
|
-
declare const alternativeFont = "
|
|
7
|
+
declare const fontName = "MD Nichrome";
|
|
8
|
+
declare const alternativeFont = "Red Hat Display";
|
|
9
9
|
declare const gutter: string;
|
|
10
10
|
declare const desktop_width = "1360";
|
|
11
11
|
declare const tablet_width = "768";
|
|
@@ -333,6 +333,17 @@ type ICloseButton = {
|
|
|
333
333
|
|
|
334
334
|
declare const CloseButton: ({ variant, className, onClick, ...props }: ICloseButton) => React__default.JSX.Element;
|
|
335
335
|
|
|
336
|
+
interface ICounter {
|
|
337
|
+
title?: string;
|
|
338
|
+
number?: number;
|
|
339
|
+
prefix?: string;
|
|
340
|
+
suffix?: string;
|
|
341
|
+
className?: string;
|
|
342
|
+
style?: CSSProperties;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
declare const Counter: ({ title, number, prefix, suffix, className, style, }: ICounter) => React__default.JSX.Element;
|
|
346
|
+
|
|
336
347
|
interface IScrollingNav {
|
|
337
348
|
align?: string;
|
|
338
349
|
className?: string;
|
|
@@ -491,6 +502,15 @@ interface ITeamCard extends ICard {
|
|
|
491
502
|
|
|
492
503
|
declare const TeamCard: ({ title, imageElement, role, description, ...props }: ITeamCard) => React__default.JSX.Element;
|
|
493
504
|
|
|
505
|
+
interface ILogosCard {
|
|
506
|
+
imageElement?: React.ReactElement;
|
|
507
|
+
title?: string;
|
|
508
|
+
className?: string;
|
|
509
|
+
style?: CSSProperties;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
declare const LogosCard: ({ imageElement, title, className, style, ...props }: ILogosCard) => React__default.JSX.Element;
|
|
513
|
+
|
|
494
514
|
interface IProjectCard extends ICard {
|
|
495
515
|
category?: string;
|
|
496
516
|
title?: string;
|
|
@@ -533,6 +553,24 @@ type ICover = {
|
|
|
533
553
|
|
|
534
554
|
declare const Cover: ({ minHeight, contentPosition, imageElement, overlayOpacity, overlayColor, style, className, children }: ICover) => React__default.JSX.Element;
|
|
535
555
|
|
|
556
|
+
interface ITabs {
|
|
557
|
+
id?: string;
|
|
558
|
+
title?: string;
|
|
559
|
+
menu?: ITabsItem[];
|
|
560
|
+
vertical?: boolean;
|
|
561
|
+
className?: string;
|
|
562
|
+
style?: CSSProperties;
|
|
563
|
+
}
|
|
564
|
+
interface ITabsItem {
|
|
565
|
+
id?: string;
|
|
566
|
+
label?: string;
|
|
567
|
+
$active?: boolean;
|
|
568
|
+
content?: React.ReactNode;
|
|
569
|
+
onClick?: (event?: React.MouseEvent<HTMLElement>) => void;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
declare const Tabs: ({ id, title, menu, vertical, className, style }: ITabs) => React__default.JSX.Element;
|
|
573
|
+
|
|
536
574
|
type ICircularSlider = {
|
|
537
575
|
id?: string;
|
|
538
576
|
className?: string;
|
|
@@ -552,4 +590,4 @@ declare const GlobalStyles: React$1.NamedExoticComponent<styled_components.Execu
|
|
|
552
590
|
|
|
553
591
|
declare function clickOutSideToClose(ref: React.RefObject<HTMLDivElement>, closeFunction: () => void): void;
|
|
554
592
|
|
|
555
|
-
export { Accordion, AccordionItem, BlogCard, Button, CheckRadioField, Chip, CircularSlider, CloseButton, Column, Cover, Dropdown, DropdownItem, EmptyState, Flex, FormField, GlobalStyles, Heading, Icon, IconBox, IconTitle, ImageWrapper, Loader, Marquee, Modal, OffCanvas, PortalComponent, ProjectCard, Quote, RichText, Row, ScrollingNav, Separator, ShareModal, Slider, SocialLinks, Spacer, TeamCard, Video, VideoEmbed, clickOutSideToClose, iconsList, variables };
|
|
593
|
+
export { Accordion, AccordionItem, BlogCard, Button, CheckRadioField, Chip, CircularSlider, CloseButton, Column, Counter, Cover, Dropdown, DropdownItem, EmptyState, Flex, FormField, GlobalStyles, Heading, Icon, IconBox, IconTitle, ImageWrapper, Loader, LogosCard, Marquee, Modal, OffCanvas, PortalComponent, ProjectCard, Quote, RichText, Row, ScrollingNav, Separator, ShareModal, Slider, SocialLinks, Spacer, Tabs, TeamCard, Video, VideoEmbed, clickOutSideToClose, iconsList, variables };
|
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ import { IButtonSC } from './Button.interface';
|
|
|
5
5
|
import { fontSize } from '@/styles/utilities';
|
|
6
6
|
|
|
7
7
|
export const StyledButton = styled.a<IButtonSC>`
|
|
8
|
-
font-family: var(--font-nichrome) !important;
|
|
9
8
|
display: inline-flex;
|
|
10
9
|
vertical-align: middle;
|
|
11
10
|
justify-content: center;
|
|
@@ -14,6 +13,7 @@ export const StyledButton = styled.a<IButtonSC>`
|
|
|
14
13
|
border: 0;
|
|
15
14
|
outline: 0;
|
|
16
15
|
background-color: transparent;
|
|
16
|
+
font-weight: 700;
|
|
17
17
|
|
|
18
18
|
margin-right: ${spaces[3]};
|
|
19
19
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import Heading from '../Heading/Heading.component'
|
|
4
|
+
import { ICounter } from './Counter.interface'
|
|
5
|
+
import { StyledCounter } from '@/components/atoms/Counter/Counter.theme'
|
|
6
|
+
import { useInterval } from '@/helpers/useInterval'
|
|
7
|
+
|
|
8
|
+
const Counter = ({
|
|
9
|
+
title,
|
|
10
|
+
number,
|
|
11
|
+
prefix,
|
|
12
|
+
suffix,
|
|
13
|
+
className,
|
|
14
|
+
style,
|
|
15
|
+
}: ICounter) => {
|
|
16
|
+
if (!number) return <></>;
|
|
17
|
+
|
|
18
|
+
const [counterValue, setCounterValue] = useState<number>(0);
|
|
19
|
+
|
|
20
|
+
const speed = 50;
|
|
21
|
+
const increment = Math.trunc(number / speed) < 1 ? 1 : Math.trunc(number / speed);
|
|
22
|
+
|
|
23
|
+
useInterval(() => {
|
|
24
|
+
if (counterValue != number) {
|
|
25
|
+
if (counterValue > number) {
|
|
26
|
+
setCounterValue(number)
|
|
27
|
+
} else {
|
|
28
|
+
setCounterValue(counterValue + increment);
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}, speed);
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<StyledCounter
|
|
37
|
+
className={className}
|
|
38
|
+
style={style}
|
|
39
|
+
>
|
|
40
|
+
<Heading tag="span" size="h1" className='d-flex align-items-center color-primary50 fw-bold'>
|
|
41
|
+
{prefix && prefix}
|
|
42
|
+
<span>{counterValue}</span>
|
|
43
|
+
{suffix && suffix}
|
|
44
|
+
</Heading>
|
|
45
|
+
{title && <Heading tag="span" size="h5" className='color-secondary50 fw-bold'>{title}</Heading>}
|
|
46
|
+
</StyledCounter>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default Counter
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import Counter from './Counter.component'
|
|
4
|
+
import { ICounter } from './Counter.interface'
|
|
5
|
+
import React from 'react'
|
|
6
|
+
|
|
7
|
+
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Components/Counter',
|
|
10
|
+
component: Counter,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
13
|
+
argTypes: {}
|
|
14
|
+
} as Meta
|
|
15
|
+
|
|
16
|
+
export const Example: StoryObj<ICounter> = {
|
|
17
|
+
render: args => (
|
|
18
|
+
<Counter {...args}></Counter>
|
|
19
|
+
),
|
|
20
|
+
args: {
|
|
21
|
+
title: "lorem ipsum",
|
|
22
|
+
number: 30,
|
|
23
|
+
prefix: "+",
|
|
24
|
+
suffix: "%",
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
import { ICounter } from './Counter.interface';
|
|
4
|
+
import { colors } from '@/styles/variables';
|
|
5
|
+
|
|
6
|
+
export const StyledCounter = styled.div<ICounter>`
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
vertical-align: top;
|
|
9
|
+
flex-flow: column;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
|
|
13
|
+
min-width: 20rem;
|
|
14
|
+
min-height: 20rem;
|
|
15
|
+
|
|
16
|
+
padding: 8px 22px;
|
|
17
|
+
border-radius: 100%;
|
|
18
|
+
text-align: center;
|
|
19
|
+
|
|
20
|
+
background-color: ${colors.third10};
|
|
21
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Counter.component'
|
|
@@ -33,7 +33,6 @@ export const StyledFieldContainer = styled.div<IFormField>`
|
|
|
33
33
|
|
|
34
34
|
label {
|
|
35
35
|
display: block;
|
|
36
|
-
font-family: var(--font-nichrome) !important;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
&:has(select) {
|
|
@@ -60,7 +59,6 @@ export const StyledFieldContainer = styled.div<IFormField>`
|
|
|
60
59
|
input,
|
|
61
60
|
textarea,
|
|
62
61
|
select {
|
|
63
|
-
font-family: var(--font-nichrome) !important;
|
|
64
62
|
${fontSize('h4')};
|
|
65
63
|
font-weight: 700;
|
|
66
64
|
text-transform:uppercase;
|
|
@@ -69,6 +67,7 @@ export const StyledFieldContainer = styled.div<IFormField>`
|
|
|
69
67
|
border: 0;
|
|
70
68
|
|
|
71
69
|
padding: 12px;
|
|
70
|
+
color: ${colors.secondary90};
|
|
72
71
|
background: ${colors.secondary50};
|
|
73
72
|
outline: none;
|
|
74
73
|
width: 100%;
|
|
@@ -98,27 +97,6 @@ export const StyledFieldContainer = styled.div<IFormField>`
|
|
|
98
97
|
input[type="search"]::-webkit-search-results-decoration {
|
|
99
98
|
-webkit-appearance: none;
|
|
100
99
|
}
|
|
101
|
-
|
|
102
|
-
.style-dark & {
|
|
103
|
-
&:has(select) {
|
|
104
|
-
& > div {
|
|
105
|
-
&::after {
|
|
106
|
-
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.33333 9.24435L11.016 5.33398L12 6.3788L7.33333 11.334L2.66667 6.3788L3.65065 5.33398L7.33333 9.24435Z' fill='%23fff'/%3E%3C/svg%3E%0A");
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
i {
|
|
112
|
-
color: ${colors.white};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
& input,
|
|
116
|
-
& textarea,
|
|
117
|
-
& select {
|
|
118
|
-
color: ${colors.white};
|
|
119
|
-
border-color: ${colors.white};
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
100
|
`
|
|
123
101
|
: `
|
|
124
102
|
& > div{
|
|
@@ -40,6 +40,7 @@ export const StyledSocialLinks = styled.ul<ISocialLinks>`
|
|
|
40
40
|
background-color: ${colors.primary50};
|
|
41
41
|
}
|
|
42
42
|
`;
|
|
43
|
+
|
|
43
44
|
case "dark":
|
|
44
45
|
return css`
|
|
45
46
|
& li a{
|
|
@@ -47,6 +48,19 @@ export const StyledSocialLinks = styled.ul<ISocialLinks>`
|
|
|
47
48
|
background-color: ${colors.secondary50};
|
|
48
49
|
}
|
|
49
50
|
`;
|
|
51
|
+
|
|
52
|
+
case "text":
|
|
53
|
+
return css`
|
|
54
|
+
& li a{
|
|
55
|
+
width: auto;
|
|
56
|
+
height: auto;
|
|
57
|
+
border-radius: 0%;
|
|
58
|
+
|
|
59
|
+
& span{
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
50
64
|
}
|
|
51
65
|
}}
|
|
52
66
|
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ILogosCard } from './LogosCard.interface'
|
|
2
|
+
import ImageWrapper from '@/components/atoms/ImageWrapper/ImageWrapper.component'
|
|
3
|
+
import React from 'react'
|
|
4
|
+
import { StyledLogosCard } from './LogosCard.theme'
|
|
5
|
+
|
|
6
|
+
const LogosCard = ({ imageElement, title, className, style, ...props }: ILogosCard) => {
|
|
7
|
+
return (
|
|
8
|
+
<StyledLogosCard className={className} style={style}>
|
|
9
|
+
{imageElement}
|
|
10
|
+
</StyledLogosCard>
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default LogosCard
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { ILogosCard } from './LogosCard.interface';
|
|
4
|
+
import LogosCard from './LogosCard.component';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Components/LogosCard',
|
|
10
|
+
component: LogosCard
|
|
11
|
+
} as Meta
|
|
12
|
+
|
|
13
|
+
const image = (
|
|
14
|
+
<img
|
|
15
|
+
width="100%"
|
|
16
|
+
height="100%"
|
|
17
|
+
sizes="100vw"
|
|
18
|
+
decoding="async"
|
|
19
|
+
src="/assets/placeholder.png"
|
|
20
|
+
alt="Empty state"
|
|
21
|
+
/>
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
export const Simple: StoryObj<ILogosCard> = {
|
|
25
|
+
render: args => (
|
|
26
|
+
<>
|
|
27
|
+
<LogosCard {...args}></LogosCard>
|
|
28
|
+
<LogosCard {...args}></LogosCard>
|
|
29
|
+
<LogosCard {...args}></LogosCard>
|
|
30
|
+
<LogosCard {...args}></LogosCard>
|
|
31
|
+
<LogosCard {...args}></LogosCard>
|
|
32
|
+
</>
|
|
33
|
+
),
|
|
34
|
+
args: {
|
|
35
|
+
imageElement: image,
|
|
36
|
+
title: "Logo Teste",
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { colors, radius, shadows, spaces } from '@/styles/variables';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { ILogosCard } from './LogosCard.interface';
|
|
5
|
+
|
|
6
|
+
export const StyledLogosCard = styled.div<ILogosCard>`
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
vertical-align: middle;
|
|
9
|
+
width: 100%;
|
|
10
|
+
max-width: 160px;
|
|
11
|
+
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
margin: ${spaces[2]} ${spaces[3]};
|
|
14
|
+
|
|
15
|
+
& img{
|
|
16
|
+
object-fit: contain;
|
|
17
|
+
aspect-ratio: 18/2;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./LogosCard.component";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React, { useRef, useState } from 'react'
|
|
2
|
+
import {
|
|
3
|
+
StyledTabs,
|
|
4
|
+
StyledTabsContent,
|
|
5
|
+
StyledTabsLinks,
|
|
6
|
+
StyledTabsMenu
|
|
7
|
+
} from './Tabs.theme'
|
|
8
|
+
|
|
9
|
+
import Heading from '@/components/atoms/Heading/Heading.component'
|
|
10
|
+
import { ITabs } from './Tabs.interface'
|
|
11
|
+
import Icon from '@/components/atoms/Icon/Icon.component'
|
|
12
|
+
|
|
13
|
+
const Tabs = ({ id, title, menu, vertical, className, style }: ITabs) => {
|
|
14
|
+
const [active, setActive] = useState(0)
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<StyledTabs id={id} vertical={vertical} className={className} style={style}>
|
|
18
|
+
<div>
|
|
19
|
+
{title && <Heading tag="h3" size="h1" className='text-uppercase mb-4'>{title}</Heading>}
|
|
20
|
+
<StyledTabsMenu>
|
|
21
|
+
{menu &&
|
|
22
|
+
menu.map((item, index) => {
|
|
23
|
+
return (
|
|
24
|
+
<li key={`tab-${item.id}`}>
|
|
25
|
+
<StyledTabsLinks
|
|
26
|
+
$active={index === active}
|
|
27
|
+
className='h3 fw-bold'
|
|
28
|
+
onClick={() => {
|
|
29
|
+
if (item?.onClick) item?.onClick()
|
|
30
|
+
|
|
31
|
+
setActive(index)
|
|
32
|
+
}}
|
|
33
|
+
>
|
|
34
|
+
<span>{item.label}</span>
|
|
35
|
+
</StyledTabsLinks>
|
|
36
|
+
</li>
|
|
37
|
+
)
|
|
38
|
+
})}
|
|
39
|
+
</StyledTabsMenu>
|
|
40
|
+
</div>
|
|
41
|
+
{menu && (
|
|
42
|
+
<div>
|
|
43
|
+
{menu.map((item, index) => {
|
|
44
|
+
return (
|
|
45
|
+
<StyledTabsContent
|
|
46
|
+
key={`tab-content-${item.id}`}
|
|
47
|
+
className='h4'
|
|
48
|
+
style={
|
|
49
|
+
active === index ? { display: 'block' } : { display: 'none' }
|
|
50
|
+
}
|
|
51
|
+
>
|
|
52
|
+
{item.content}
|
|
53
|
+
</StyledTabsContent>
|
|
54
|
+
)
|
|
55
|
+
})}
|
|
56
|
+
</div>
|
|
57
|
+
)}
|
|
58
|
+
</StyledTabs>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default Tabs
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ITabs {
|
|
4
|
+
id?: string
|
|
5
|
+
title?: string
|
|
6
|
+
menu?: ITabsItem[]
|
|
7
|
+
vertical?: boolean
|
|
8
|
+
className?: string
|
|
9
|
+
style?: CSSProperties
|
|
10
|
+
}
|
|
11
|
+
export interface ITabsItem {
|
|
12
|
+
id?: string
|
|
13
|
+
label?: string
|
|
14
|
+
$active?: boolean
|
|
15
|
+
content?: React.ReactNode
|
|
16
|
+
onClick?: (event?: React.MouseEvent<HTMLElement>) => void
|
|
17
|
+
}
|