wex-ui-lib 1.0.2 → 1.0.3
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.js +336 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +336 -2
- package/dist/index.mjs.map +1 -1
- package/dist/src/components/Button/index.d.ts +2 -0
- package/dist/src/components/Button/index.stories.d.ts +12 -0
- package/dist/src/components/Button/index.types.d.ts +10 -0
- package/dist/src/components/Hero/index.d.ts +2 -0
- package/dist/src/components/Hero/index.stories.d.ts +12 -0
- package/dist/src/components/Hero/index.types.d.ts +12 -0
- package/dist/src/components/Navbar/index.d.ts +2 -0
- package/dist/src/components/Navbar/index.stories.d.ts +7 -0
- package/dist/src/components/Navbar/index.types.d.ts +25 -0
- package/dist/src/components/Showcase/index.d.ts +2 -0
- package/dist/src/components/Showcase/index.stories.d.ts +7 -0
- package/dist/src/components/Showcase/index.types.d.ts +9 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/samples/Holik/Homepage.d.ts +1 -0
- package/dist/src/samples/Holik/index.stories.d.ts +10 -0
- package/dist/src/shared/components/Fade.d.ts +7 -0
- package/dist/src/shared/components/Icon.d.ts +11 -0
- package/dist/src/shared/styles/animations.d.ts +6 -0
- package/dist/src/shared/styles/theme.d.ts +7 -0
- package/dist/src/shared/types.d.ts +15 -0
- package/dist/src/shared/utils/formatters.d.ts +2 -0
- package/dist/src/shared/utils/useIntObs.d.ts +19 -0
- package/package.json +1 -1
- package/tsconfig.json +6 -1
@@ -0,0 +1,12 @@
|
|
1
|
+
import { ButtonProps } from './index.types';
|
2
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
3
|
+
type StoryProps = ButtonProps & {
|
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;
|
10
|
+
export declare const Rounded: Story;
|
11
|
+
export declare const Pill: Story;
|
12
|
+
export declare const Underlined: Story;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { ArrowIcon } from "../../shared/components/Icon";
|
2
|
+
import { ComponentColors, ComponentFont } from "../../shared/types";
|
3
|
+
export type ButtonProps = {
|
4
|
+
children?: React.ReactNode | string;
|
5
|
+
onClick?: () => void;
|
6
|
+
type?: "default" | "rounded" | "pill" | "underlined";
|
7
|
+
colors?: ComponentColors;
|
8
|
+
font?: ComponentFont;
|
9
|
+
arrow?: ArrowIcon;
|
10
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
2
|
+
import Hero from '.';
|
3
|
+
declare const meta: {
|
4
|
+
title: string;
|
5
|
+
component: typeof Hero;
|
6
|
+
parameters: {
|
7
|
+
layout: string;
|
8
|
+
};
|
9
|
+
};
|
10
|
+
export default meta;
|
11
|
+
type Story = StoryObj<typeof meta>;
|
12
|
+
export declare const Default: Story;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { Opacity } from "../../shared/types";
|
3
|
+
export type HeroProps = {
|
4
|
+
children?: React.ReactNode;
|
5
|
+
imageUrls?: string[];
|
6
|
+
marginTop?: string;
|
7
|
+
height?: string;
|
8
|
+
overlay?: {
|
9
|
+
color: string;
|
10
|
+
opacity: Opacity;
|
11
|
+
};
|
12
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { NavbarProps } from './index.types';
|
2
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
3
|
+
type StoryProps = NavbarProps;
|
4
|
+
declare const meta: Meta<StoryProps>;
|
5
|
+
export default meta;
|
6
|
+
type Story = StoryObj<StoryProps>;
|
7
|
+
export declare const Default: Story;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ButtonProps } from "../Button/index.types";
|
2
|
+
import { ComponentColors } from "../../shared/types";
|
3
|
+
export type NavbarProps = {
|
4
|
+
config: {
|
5
|
+
colors?: ComponentColors;
|
6
|
+
height?: string;
|
7
|
+
centeredItems?: boolean;
|
8
|
+
};
|
9
|
+
logo?: {
|
10
|
+
url: string;
|
11
|
+
onClick?: () => void;
|
12
|
+
};
|
13
|
+
items?: {
|
14
|
+
label: string;
|
15
|
+
onClick?: () => void;
|
16
|
+
subitems?: {
|
17
|
+
label: string;
|
18
|
+
onClick?: () => void;
|
19
|
+
}[];
|
20
|
+
}[];
|
21
|
+
button?: ButtonProps & {
|
22
|
+
label: string;
|
23
|
+
onClick?: () => void;
|
24
|
+
};
|
25
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
2
|
+
import { ShowcaseProps } from './index.types';
|
3
|
+
type StoryProps = ShowcaseProps;
|
4
|
+
declare const meta: Meta<StoryProps>;
|
5
|
+
export default meta;
|
6
|
+
type Story = StoryObj<StoryProps>;
|
7
|
+
export declare const Default: Story;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export type ShowcaseProps = {
|
2
|
+
backgroundColor?: string;
|
3
|
+
items: [ShowcaseItem, ShowcaseItem?, ShowcaseItem?, ShowcaseItem?, ShowcaseItem?, ShowcaseItem?, ShowcaseItem?, ShowcaseItem?];
|
4
|
+
};
|
5
|
+
type ShowcaseItem = {
|
6
|
+
label: string;
|
7
|
+
imageUrl: string;
|
8
|
+
};
|
9
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function Homepage(): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
type FadeProps = {
|
3
|
+
children: React.ReactElement | React.ReactElement[];
|
4
|
+
type?: 'top-to-bottom' | 'right-to-left' | 'bottom-to-top' | 'left-to-right';
|
5
|
+
};
|
6
|
+
export default function Fade(props: FadeProps): import("react/jsx-runtime").JSX.Element;
|
7
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export type ArrowIcon = 'arrow-long' | 'arrow-caret';
|
2
|
+
export type SocialMediaIcon = "twitter" | "instagram" | "youtube" | "linkedin";
|
3
|
+
type Props = {
|
4
|
+
color?: string;
|
5
|
+
icon: ArrowIcon | SocialMediaIcon | "hamburgerMenu";
|
6
|
+
size?: string;
|
7
|
+
link?: string;
|
8
|
+
withBorder?: boolean;
|
9
|
+
};
|
10
|
+
export default function Icon(props: Props): import("react/jsx-runtime").JSX.Element;
|
11
|
+
export {};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export declare const appearAnimation: string;
|
2
|
+
export declare const disappearAnimation: string;
|
3
|
+
export declare const fadeInFromLeft: string;
|
4
|
+
export declare const fadeInFromRight: string;
|
5
|
+
export declare const fadeInFromTop: string;
|
6
|
+
export declare const fadeInFromBottom: string;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { TextCasing } from "./utils/formatters";
|
2
|
+
export type ComponentColors = {
|
3
|
+
text?: string;
|
4
|
+
textHover?: string;
|
5
|
+
background?: string;
|
6
|
+
backgroundHover?: string;
|
7
|
+
border?: string;
|
8
|
+
borderHover?: string;
|
9
|
+
};
|
10
|
+
export type ComponentFont = {
|
11
|
+
size?: string;
|
12
|
+
casing?: TextCasing;
|
13
|
+
weight?: '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
14
|
+
};
|
15
|
+
export type Opacity = "10%" | "20%" | "30%" | "40%" | "50%" | "60%" | "70%" | "80%" | "90%";
|
@@ -0,0 +1,19 @@
|
|
1
|
+
interface UseIntObsOptions {
|
2
|
+
threshold?: number | number[];
|
3
|
+
root?: any;
|
4
|
+
rootMargin?: string;
|
5
|
+
freezeOnceVisible?: boolean;
|
6
|
+
initialIsIntersecting?: boolean;
|
7
|
+
onChange?: (isIntersecting: boolean, entry: IntersectionObserverEntry) => void;
|
8
|
+
}
|
9
|
+
type UseIntObsResult = [
|
10
|
+
(node: Element | null) => void,
|
11
|
+
boolean,
|
12
|
+
IntersectionObserverEntry | undefined
|
13
|
+
] & {
|
14
|
+
ref: (node: Element | null) => void;
|
15
|
+
isIntersecting: boolean;
|
16
|
+
entry: IntersectionObserverEntry | undefined;
|
17
|
+
};
|
18
|
+
export declare function useIntObs({ threshold, root, rootMargin, freezeOnceVisible, initialIsIntersecting, onChange, }?: UseIntObsOptions): UseIntObsResult;
|
19
|
+
export {};
|
package/package.json
CHANGED
package/tsconfig.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"compilerOptions": {
|
3
|
-
"target": "
|
3
|
+
"target": "esnext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
4
4
|
"lib": [
|
5
5
|
"dom",
|
6
6
|
"dom.iterable",
|
@@ -18,6 +18,11 @@
|
|
18
18
|
"resolveJsonModule": true, /* Enable importing .json files. */
|
19
19
|
"noEmit": true, /* Disable emitting files from a compilation. */
|
20
20
|
"jsx": "react-jsx",
|
21
|
+
"rootDir": ".",
|
22
|
+
"declaration": true,
|
23
|
+
"sourceMap": true,
|
24
|
+
"outDir": "dist",
|
25
|
+
"emitDeclarationOnly": true
|
21
26
|
},
|
22
27
|
"include": [
|
23
28
|
"src"
|