wex-ui-lib 1.2.41 → 1.3.0
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/index.cjs.js +153 -76
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +66 -10
- package/dist/index.esm.js +150 -77
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/Button/index.types.d.ts +2 -2
- package/dist/types/components/Card/Card.d.ts +21 -0
- package/dist/types/components/Card/Card.stories.d.ts +9 -0
- package/dist/types/components/Showcase/Showcase.types.d.ts +3 -1
- package/dist/types/components/Tabs/Tabs.d.ts +13 -0
- package/dist/types/components/Tabs/Tabs.stories.d.ts +7 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/sections/Cards/Cards.d.ts +9 -0
- package/dist/types/sections/Cards/Cards.stories.d.ts +7 -0
- package/dist/types/sections/EntrySelector/EntrySelector.d.ts +15 -0
- package/dist/types/sections/EntrySelector/EntrySelector.stories.d.ts +7 -0
- package/dist/types/shared/components/Fade.d.ts +2 -2
- package/dist/types/shared/types.d.ts +3 -3
- package/dist/types/shared/utils/formatters.d.ts +2 -2
- package/package.json +1 -1
@@ -1,10 +1,10 @@
|
|
1
1
|
import { ArrowIcon } from "../Icon";
|
2
|
-
import { ComponentColors,
|
2
|
+
import { ComponentColors, Font } from "../../shared/types";
|
3
3
|
export type ButtonProps = {
|
4
4
|
children?: React.ReactNode | string;
|
5
5
|
onClick?: () => void;
|
6
6
|
type?: "default" | "rounded" | "pill" | "underlined";
|
7
7
|
colors?: ComponentColors;
|
8
|
-
font?:
|
8
|
+
font?: Font;
|
9
9
|
arrow?: ArrowIcon;
|
10
10
|
};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React, { ReactElement } from "react";
|
2
|
+
import { Font } from "../../shared/types";
|
3
|
+
export type CardProps = {
|
4
|
+
type?: "default";
|
5
|
+
backgroundColor?: string;
|
6
|
+
title?: Font & {
|
7
|
+
text: string;
|
8
|
+
color?: string;
|
9
|
+
};
|
10
|
+
description?: Font & {
|
11
|
+
text: string;
|
12
|
+
color?: string;
|
13
|
+
};
|
14
|
+
icon?: {
|
15
|
+
element: ReactElement;
|
16
|
+
width?: string;
|
17
|
+
height?: string;
|
18
|
+
};
|
19
|
+
callback?: () => void;
|
20
|
+
};
|
21
|
+
export default function Card(props: CardProps): React.JSX.Element;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
2
|
+
import { CardProps } from './Card';
|
3
|
+
type StoryProps = CardProps & {
|
4
|
+
buttonText: string;
|
5
|
+
};
|
6
|
+
declare const meta: Meta<StoryProps>;
|
7
|
+
export default meta;
|
8
|
+
type Story = StoryObj<StoryProps>;
|
9
|
+
export declare const Default: Story;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
export type ShowcaseProps = {
|
2
|
+
items: ShowcaseItem[];
|
3
|
+
itemsPerRow?: number;
|
4
|
+
gap?: string;
|
2
5
|
backgroundColor?: string;
|
3
|
-
items: [ShowcaseItem, ShowcaseItem?, ShowcaseItem?, ShowcaseItem?, ShowcaseItem?, ShowcaseItem?, ShowcaseItem?, ShowcaseItem?];
|
4
6
|
};
|
5
7
|
type ShowcaseItem = {
|
6
8
|
label: string;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { DisplayMode, Font } from "../../shared/types";
|
3
|
+
export interface TabsProps {
|
4
|
+
tabPadding?: string;
|
5
|
+
accentColor?: string;
|
6
|
+
displayMode?: DisplayMode;
|
7
|
+
font?: Font;
|
8
|
+
tabs: {
|
9
|
+
label: string;
|
10
|
+
content: React.ReactNode;
|
11
|
+
}[];
|
12
|
+
}
|
13
|
+
export declare const Tabs: React.FC<TabsProps>;
|
package/dist/types/index.d.ts
CHANGED
@@ -6,6 +6,10 @@ import Slider from './components/Slider/Slider';
|
|
6
6
|
import Icon from './components/Icon/Icon';
|
7
7
|
import Showcase from './components/Showcase/Showcase';
|
8
8
|
import Footer from './components/Footer/Footer';
|
9
|
-
|
9
|
+
import Card from './components/Card/Card';
|
10
|
+
import Cards from './sections/Cards/Cards';
|
11
|
+
import EntrySelector from './sections/EntrySelector/EntrySelector';
|
12
|
+
import { Tabs } from './components/Tabs/Tabs';
|
13
|
+
export { Button, Navbar, Hero, Footer, Slider, Fade, Icon, Showcase, Card, Cards, EntrySelector, Tabs };
|
10
14
|
import { SliderRef } from './components/Slider';
|
11
15
|
export { type SliderRef };
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { CardProps } from '../../components/Card/Card';
|
3
|
+
export type CardsProps = {
|
4
|
+
cards: CardProps[];
|
5
|
+
padding?: string;
|
6
|
+
backgroundColor?: string;
|
7
|
+
gap?: string;
|
8
|
+
};
|
9
|
+
export default function Cards(props: CardsProps): React.JSX.Element;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import React, { ReactElement } from 'react';
|
2
|
+
export type EntrySelectorProps = {
|
3
|
+
title?: string;
|
4
|
+
colors?: {
|
5
|
+
background?: string;
|
6
|
+
lightBackground?: string;
|
7
|
+
accent?: string;
|
8
|
+
};
|
9
|
+
padding?: string;
|
10
|
+
items: {
|
11
|
+
name: string;
|
12
|
+
content?: ReactElement;
|
13
|
+
}[];
|
14
|
+
};
|
15
|
+
export default function EntrySelector(props: EntrySelectorProps): React.JSX.Element;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
2
|
+
import { EntrySelectorProps } from './EntrySelector';
|
3
|
+
type StoryProps = EntrySelectorProps;
|
4
|
+
declare const meta: Meta<StoryProps>;
|
5
|
+
export default meta;
|
6
|
+
type Story = StoryObj<StoryProps>;
|
7
|
+
export declare const Default: Story;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
type FadeProps = {
|
3
|
-
children: React.ReactElement
|
3
|
+
children: React.ReactElement;
|
4
4
|
type?: 'top-to-bottom' | 'right-to-left' | 'bottom-to-top' | 'left-to-right';
|
5
5
|
};
|
6
|
-
export default function Fade(props: FadeProps): React.
|
6
|
+
export default function Fade(props: FadeProps): React.JSX.Element;
|
7
7
|
export {};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { TextCasing } from "./utils/formatters";
|
2
1
|
export type ComponentColors = {
|
3
2
|
text?: string;
|
4
3
|
textHover?: string;
|
@@ -7,9 +6,10 @@ export type ComponentColors = {
|
|
7
6
|
border?: string;
|
8
7
|
borderHover?: string;
|
9
8
|
};
|
10
|
-
export type
|
9
|
+
export type Font = {
|
11
10
|
size?: string;
|
12
|
-
casing?:
|
11
|
+
casing?: 'first-capitalized' | 'uppercase' | 'lowercase';
|
13
12
|
weight?: '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
14
13
|
};
|
15
14
|
export type Opacity = "10%" | "20%" | "30%" | "40%" | "50%" | "60%" | "70%" | "80%" | "90%";
|
15
|
+
export type DisplayMode = "light" | "dark";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
export declare const formatText: (text: string, format:
|
1
|
+
import { Font } from "../types";
|
2
|
+
export declare const formatText: (text: string, format: Font["casing"]) => string;
|